fun main() {
    val directions = mapOf('<' to Vector3d.LEFT, '>' to Vector3d.RIGHT, '^' to Vector3d.UP, 'v' to Vector3d.DOWN)
    val neighboursInTime = directions.values.map { it + Vector3d.BACK }.toSet() + Vector3d.BACK
    val start = Vector3d(0, -1, 0)

    fun isEmpty(positionInTime: Vector3d, width: Int, height: Int, initialState: Map<Vector3d, Vector3d?>, start: Vector3d, end: Vector2d) = when {
        (positionInTime.x == start.x && positionInTime.y == start.y) || (positionInTime.x == end.x && positionInTime.y == end.y) -> true // start or end is OK
        positionInTime.x !in (0 until width) || positionInTime.y !in (0 until height) -> false
        directions.values.map { direction ->
            Pair((Vector3d(positionInTime.x, positionInTime.y, 0) - direction * positionInTime.z).apply {
                x = (width + (x % width)) % width
                y = (height + (y % height)) % height
            }, direction)
        }.any { (possibleBlizzard, direction) -> possibleBlizzard in initialState && initialState[possibleBlizzard] == direction } -> false

        else -> true
    }

    fun neighbours(node: Vector3d, start: Vector3d, end: Vector2d, width: Int, height: Int, initialState: Map<Vector3d, Vector3d?>): Set<Vector3d> {
        return neighboursInTime.map { node + it }.filter { isEmpty(it, width, height, initialState, start, end) }.toSet()
    }

    fun part1(input: List<String>): Int {
        val grid = Grid(input.map { it.toCharArray().toList() })
        val width = grid.width - 2
        val height = grid.height - 2
        val end = Vector2d(width - 1, height)

        val initialState = grid.data.flatten().filter { it.value in directions }.associate {
            Vector3d(it.position.x, it.position.y, 0) - Vector3d(1, 1, 0) to directions[it.value]
        }

        val path = aStar(
            start = start,
            isEndNode = { node -> node.x == end.x && node.y == end.y },
            heuristic = { (end - Vector2d(it.x, it.y)).manhattan() },
            neighbours = { node ->
                neighbours(node, start, end, width, height, initialState)
            })

        return path.size - 1
    }

    fun part2(input: List<String>): Int {
        val grid = Grid(input.map { it.toCharArray().toList() })
        val width = grid.width - 2
        val height = grid.height - 2
        val end = Vector2d(width - 1, height)

        val initialState = grid.data.flatten().filter { it.value in directions }.associate {
            Vector3d(it.position.x, it.position.y, 0) - Vector3d(1, 1, 0) to directions[it.value]
        }

        val path1 = aStar(
            start = start,
            isEndNode = { node -> node.x == end.x && node.y == end.y },
            heuristic = { (end - Vector2d(it.x, it.y)).manhattan() },
            neighbours = { node ->
                neighbours(node, start, end, width, height, initialState)
            })

        val path2 = aStar(
            start = path1.first(),
            isEndNode = { node -> node.x == 0 && node.y == -1 },
            heuristic = { (end - Vector2d(it.x, it.y)).manhattan() },
            neighbours = { node ->
                neighbours(node, start, end, width, height, initialState)
            })

        val path3 = aStar(
            start = path2.first(),
            isEndNode = { node -> node.x == end.x && node.y == end.y },
            heuristic = { (end - Vector2d(it.x, it.y)).manhattan() },
            neighbours = { node ->
                neighbours(node, start, end, width, height, initialState)
            })

        return path1.size + path2.size + path3.size - 3
    }

    test(
        day = 24,
        testTarget1 = 18,
        testTarget2 = 54,
        part1 = ::part1,
        part2 = ::part2,
    )
}

Compiled from "Day24.kt"
final class Day24Kt$main$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function1<java.util.List<? extends java.lang.String>, java.lang.Integer> {
  final Vector3d $start;

  final java.util.Map<java.lang.Character, Vector3d> $directions;

  final java.util.Set<Vector3d> $neighboursInTime;

  Day24Kt$main$1(Vector3d, java.util.Map<java.lang.Character, Vector3d>, java.util.Set<Vector3d>);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #14                 // Field $start:LVector3d;
       5: aload_0
       6: aload_2
       7: putfield      #18                 // Field $directions:Ljava/util/Map;
      10: aload_0
      11: aload_3
      12: putfield      #22                 // Field $neighboursInTime:Ljava/util/Set;
      15: aload_0
      16: iconst_1
      17: ldc           #24                 // class kotlin/jvm/internal/Intrinsics$Kotlin
      19: ldc           #26                 // String part1
      21: ldc           #28                 // String main$part1(LVector3d;Ljava/util/Map;Ljava/util/Set;Ljava/util/List;)I
      23: iconst_0
      24: invokespecial #31                 // Method kotlin/jvm/internal/FunctionReferenceImpl."<init>":(ILjava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V
      27: return

  public final java.lang.Integer invoke(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #38                 // String p0
       3: invokestatic  #44                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #14                 // Field $start:LVector3d;
      10: aload_0
      11: getfield      #18                 // Field $directions:Ljava/util/Map;
      14: aload_0
      15: getfield      #22                 // Field $neighboursInTime:Ljava/util/Set;
      18: aload_1
      19: invokestatic  #50                 // Method Day24Kt.access$main$part1:(LVector3d;Ljava/util/Map;Ljava/util/Set;Ljava/util/List;)I
      22: invokestatic  #56                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: areturn

  public java.lang.Object invoke(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #60                 // class java/util/List
       5: invokevirtual #62                 // Method invoke:(Ljava/util/List;)Ljava/lang/Integer;
       8: areturn
}

Compiled from "Day24.kt"
final class Day24Kt$main$2 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function1<java.util.List<? extends java.lang.String>, java.lang.Integer> {
  final Vector3d $start;

  final java.util.Map<java.lang.Character, Vector3d> $directions;

  final java.util.Set<Vector3d> $neighboursInTime;

  Day24Kt$main$2(Vector3d, java.util.Map<java.lang.Character, Vector3d>, java.util.Set<Vector3d>);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #14                 // Field $start:LVector3d;
       5: aload_0
       6: aload_2
       7: putfield      #18                 // Field $directions:Ljava/util/Map;
      10: aload_0
      11: aload_3
      12: putfield      #22                 // Field $neighboursInTime:Ljava/util/Set;
      15: aload_0
      16: iconst_1
      17: ldc           #24                 // class kotlin/jvm/internal/Intrinsics$Kotlin
      19: ldc           #26                 // String part2
      21: ldc           #28                 // String main$part2(LVector3d;Ljava/util/Map;Ljava/util/Set;Ljava/util/List;)I
      23: iconst_0
      24: invokespecial #31                 // Method kotlin/jvm/internal/FunctionReferenceImpl."<init>":(ILjava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V
      27: return

  public final java.lang.Integer invoke(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #38                 // String p0
       3: invokestatic  #44                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #14                 // Field $start:LVector3d;
      10: aload_0
      11: getfield      #18                 // Field $directions:Ljava/util/Map;
      14: aload_0
      15: getfield      #22                 // Field $neighboursInTime:Ljava/util/Set;
      18: aload_1
      19: invokestatic  #50                 // Method Day24Kt.access$main$part2:(LVector3d;Ljava/util/Map;Ljava/util/Set;Ljava/util/List;)I
      22: invokestatic  #56                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: areturn

  public java.lang.Object invoke(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #60                 // class java/util/List
       5: invokevirtual #62                 // Method invoke:(Ljava/util/List;)Ljava/lang/Integer;
       8: areturn
}

Compiled from "Day24.kt"
public final class Day24Kt {
  public static final void main();
    Code:
       0: iconst_4
       1: anewarray     #8                  // class kotlin/Pair
       4: astore_1
       5: aload_1
       6: iconst_0
       7: bipush        60
       9: invokestatic  #14                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      12: getstatic     #20                 // Field Vector3d.Companion:LVector3d$Companion;
      15: invokevirtual #26                 // Method Vector3d$Companion.getLEFT:()LVector3d;
      18: invokestatic  #32                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      21: aastore
      22: aload_1
      23: iconst_1
      24: bipush        62
      26: invokestatic  #14                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      29: getstatic     #20                 // Field Vector3d.Companion:LVector3d$Companion;
      32: invokevirtual #35                 // Method Vector3d$Companion.getRIGHT:()LVector3d;
      35: invokestatic  #32                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      38: aastore
      39: aload_1
      40: iconst_2
      41: bipush        94
      43: invokestatic  #14                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      46: getstatic     #20                 // Field Vector3d.Companion:LVector3d$Companion;
      49: invokevirtual #38                 // Method Vector3d$Companion.getUP:()LVector3d;
      52: invokestatic  #32                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      55: aastore
      56: aload_1
      57: iconst_3
      58: bipush        118
      60: invokestatic  #14                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      63: getstatic     #20                 // Field Vector3d.Companion:LVector3d$Companion;
      66: invokevirtual #41                 // Method Vector3d$Companion.getDOWN:()LVector3d;
      69: invokestatic  #32                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      72: aastore
      73: aload_1
      74: invokestatic  #47                 // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
      77: astore_0
      78: aload_0
      79: invokeinterface #53,  1           // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
      84: checkcast     #55                 // class java/lang/Iterable
      87: astore_2
      88: iconst_0
      89: istore_3
      90: aload_2
      91: astore        4
      93: new           #57                 // class java/util/ArrayList
      96: dup
      97: aload_2
      98: bipush        10
     100: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     103: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
     106: checkcast     #69                 // class java/util/Collection
     109: astore        5
     111: iconst_0
     112: istore        6
     114: aload         4
     116: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     121: astore        7
     123: aload         7
     125: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     130: ifeq          179
     133: aload         7
     135: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     140: astore        8
     142: aload         5
     144: aload         8
     146: checkcast     #16                 // class Vector3d
     149: astore        9
     151: astore        11
     153: iconst_0
     154: istore        10
     156: aload         9
     158: getstatic     #20                 // Field Vector3d.Companion:LVector3d$Companion;
     161: invokevirtual #86                 // Method Vector3d$Companion.getBACK:()LVector3d;
     164: invokevirtual #90                 // Method Vector3d.plus:(LVector3d;)LVector3d;
     167: aload         11
     169: swap
     170: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     175: pop
     176: goto          123
     179: aload         5
     181: checkcast     #96                 // class java/util/List
     184: nop
     185: checkcast     #55                 // class java/lang/Iterable
     188: invokestatic  #100                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     191: getstatic     #20                 // Field Vector3d.Companion:LVector3d$Companion;
     194: invokevirtual #86                 // Method Vector3d$Companion.getBACK:()LVector3d;
     197: invokestatic  #105                // Method kotlin/collections/SetsKt.plus:(Ljava/util/Set;Ljava/lang/Object;)Ljava/util/Set;
     200: astore_1
     201: new           #16                 // class Vector3d
     204: dup
     205: iconst_0
     206: iconst_m1
     207: iconst_0
     208: invokespecial #108                // Method Vector3d."<init>":(III)V
     211: astore_2
     212: bipush        24
     214: bipush        18
     216: invokestatic  #113                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     219: bipush        54
     221: invokestatic  #113                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     224: new           #115                // class Day24Kt$main$1
     227: dup
     228: aload_2
     229: aload_0
     230: aload_1
     231: invokespecial #118                // Method Day24Kt$main$1."<init>":(LVector3d;Ljava/util/Map;Ljava/util/Set;)V
     234: checkcast     #120                // class kotlin/jvm/functions/Function1
     237: new           #122                // class Day24Kt$main$2
     240: dup
     241: aload_2
     242: aload_0
     243: aload_1
     244: invokespecial #123                // Method Day24Kt$main$2."<init>":(LVector3d;Ljava/util/Map;Ljava/util/Set;)V
     247: checkcast     #120                // class kotlin/jvm/functions/Function1
     250: invokestatic  #129                // Method UtilsKt.test:(ILjava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
     253: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #152                // Method main:()V
       3: return

  private static final boolean main$isEmpty(java.util.Map<java.lang.Character, Vector3d>, Vector3d, int, int, java.util.Map<Vector3d, Vector3d>, Vector3d, Vector2d);
    Code:
       0: nop
       1: aload_1
       2: invokevirtual #161                // Method Vector3d.getX:()I
       5: aload         5
       7: invokevirtual #161                // Method Vector3d.getX:()I
      10: if_icmpne     25
      13: aload_1
      14: invokevirtual #164                // Method Vector3d.getY:()I
      17: aload         5
      19: invokevirtual #164                // Method Vector3d.getY:()I
      22: if_icmpeq     49
      25: aload_1
      26: invokevirtual #161                // Method Vector3d.getX:()I
      29: aload         6
      31: invokevirtual #167                // Method Vector2d.getX:()I
      34: if_icmpne     53
      37: aload_1
      38: invokevirtual #164                // Method Vector3d.getY:()I
      41: aload         6
      43: invokevirtual #168                // Method Vector2d.getY:()I
      46: if_icmpne     53
      49: iconst_1
      50: goto          449
      53: aload_1
      54: invokevirtual #161                // Method Vector3d.getX:()I
      57: istore        7
      59: iconst_0
      60: iload         7
      62: if_icmpgt     79
      65: iload         7
      67: iload_2
      68: if_icmpge     75
      71: iconst_1
      72: goto          80
      75: iconst_0
      76: goto          80
      79: iconst_0
      80: ifeq          113
      83: aload_1
      84: invokevirtual #164                // Method Vector3d.getY:()I
      87: istore        7
      89: iconst_0
      90: iload         7
      92: if_icmpgt     109
      95: iload         7
      97: iload_3
      98: if_icmpge     105
     101: iconst_1
     102: goto          110
     105: iconst_0
     106: goto          110
     109: iconst_0
     110: ifne          117
     113: iconst_0
     114: goto          449
     117: aload_0
     118: invokeinterface #53,  1           // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
     123: checkcast     #55                 // class java/lang/Iterable
     126: astore        7
     128: iconst_0
     129: istore        8
     131: aload         7
     133: astore        9
     135: new           #57                 // class java/util/ArrayList
     138: dup
     139: aload         7
     141: bipush        10
     143: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     146: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
     149: checkcast     #69                 // class java/util/Collection
     152: astore        10
     154: iconst_0
     155: istore        11
     157: aload         9
     159: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     164: astore        12
     166: aload         12
     168: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     173: ifeq          301
     176: aload         12
     178: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     183: astore        13
     185: aload         10
     187: aload         13
     189: checkcast     #16                 // class Vector3d
     192: astore        14
     194: astore        19
     196: iconst_0
     197: istore        15
     199: new           #16                 // class Vector3d
     202: dup
     203: aload_1
     204: invokevirtual #161                // Method Vector3d.getX:()I
     207: aload_1
     208: invokevirtual #164                // Method Vector3d.getY:()I
     211: iconst_0
     212: invokespecial #108                // Method Vector3d."<init>":(III)V
     215: aload         14
     217: aload_1
     218: invokevirtual #171                // Method Vector3d.getZ:()I
     221: invokevirtual #175                // Method Vector3d.times:(I)LVector3d;
     224: invokevirtual #178                // Method Vector3d.minus:(LVector3d;)LVector3d;
     227: astore        16
     229: aload         16
     231: astore        17
     233: iconst_0
     234: istore        18
     236: aload         17
     238: iload_2
     239: aload         17
     241: invokevirtual #161                // Method Vector3d.getX:()I
     244: iload_2
     245: irem
     246: iadd
     247: iload_2
     248: irem
     249: invokevirtual #181                // Method Vector3d.setX:(I)V
     252: aload         17
     254: iload_3
     255: aload         17
     257: invokevirtual #164                // Method Vector3d.getY:()I
     260: iload_3
     261: irem
     262: iadd
     263: iload_3
     264: irem
     265: invokevirtual #184                // Method Vector3d.setY:(I)V
     268: nop
     269: aload         16
     271: aload         14
     273: astore        20
     275: astore        21
     277: new           #8                  // class kotlin/Pair
     280: dup
     281: aload         21
     283: aload         20
     285: invokespecial #187                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     288: nop
     289: aload         19
     291: swap
     292: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     297: pop
     298: goto          166
     301: aload         10
     303: checkcast     #96                 // class java/util/List
     306: nop
     307: checkcast     #55                 // class java/lang/Iterable
     310: astore        7
     312: nop
     313: iconst_0
     314: istore        8
     316: aload         7
     318: instanceof    #69                 // class java/util/Collection
     321: ifeq          341
     324: aload         7
     326: checkcast     #69                 // class java/util/Collection
     329: invokeinterface #190,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     334: ifeq          341
     337: iconst_0
     338: goto          441
     341: aload         7
     343: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     348: astore        9
     350: aload         9
     352: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     357: ifeq          440
     360: aload         9
     362: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     367: astore        10
     369: aload         10
     371: checkcast     #8                  // class kotlin/Pair
     374: astore        11
     376: iconst_0
     377: istore        12
     379: aload         11
     381: invokevirtual #193                // Method kotlin/Pair.component1:()Ljava/lang/Object;
     384: checkcast     #16                 // class Vector3d
     387: astore        13
     389: aload         11
     391: invokevirtual #196                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     394: checkcast     #16                 // class Vector3d
     397: astore        14
     399: aload         4
     401: aload         13
     403: invokeinterface #199,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     408: ifeq          432
     411: aload         4
     413: aload         13
     415: invokeinterface #203,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     420: aload         14
     422: invokestatic  #209                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     425: ifeq          432
     428: iconst_1
     429: goto          433
     432: iconst_0
     433: ifeq          350
     436: iconst_1
     437: goto          441
     440: iconst_0
     441: ifeq          448
     444: iconst_0
     445: goto          449
     448: iconst_1
     449: ireturn

  private static final java.util.Set<Vector3d> main$neighbours(java.util.Set<Vector3d>, java.util.Map<java.lang.Character, Vector3d>, Vector3d, Vector3d, Vector2d, int, int, java.util.Map<Vector3d, Vector3d>);
    Code:
       0: aload_0
       1: checkcast     #55                 // class java/lang/Iterable
       4: astore        8
       6: iconst_0
       7: istore        9
       9: aload         8
      11: astore        10
      13: new           #57                 // class java/util/ArrayList
      16: dup
      17: aload         8
      19: bipush        10
      21: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      24: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
      27: checkcast     #69                 // class java/util/Collection
      30: astore        11
      32: iconst_0
      33: istore        12
      35: aload         10
      37: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        13
      44: aload         13
      46: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          95
      54: aload         13
      56: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        14
      63: aload         11
      65: aload         14
      67: checkcast     #16                 // class Vector3d
      70: astore        15
      72: astore        17
      74: iconst_0
      75: istore        16
      77: aload_2
      78: aload         15
      80: invokevirtual #90                 // Method Vector3d.plus:(LVector3d;)LVector3d;
      83: aload         17
      85: swap
      86: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      91: pop
      92: goto          44
      95: aload         11
      97: checkcast     #96                 // class java/util/List
     100: nop
     101: checkcast     #55                 // class java/lang/Iterable
     104: astore        8
     106: nop
     107: iconst_0
     108: istore        9
     110: aload         8
     112: astore        10
     114: new           #57                 // class java/util/ArrayList
     117: dup
     118: invokespecial #229                // Method java/util/ArrayList."<init>":()V
     121: checkcast     #69                 // class java/util/Collection
     124: astore        11
     126: iconst_0
     127: istore        12
     129: aload         10
     131: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     136: astore        13
     138: aload         13
     140: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     145: ifeq          198
     148: aload         13
     150: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     155: astore        14
     157: aload         14
     159: checkcast     #16                 // class Vector3d
     162: astore        15
     164: iconst_0
     165: istore        16
     167: aload_1
     168: aload         15
     170: iload         5
     172: iload         6
     174: aload         7
     176: aload_3
     177: aload         4
     179: invokestatic  #231                // Method main$isEmpty:(Ljava/util/Map;LVector3d;IILjava/util/Map;LVector3d;LVector2d;)Z
     182: ifeq          138
     185: aload         11
     187: aload         14
     189: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     194: pop
     195: goto          138
     198: aload         11
     200: checkcast     #96                 // class java/util/List
     203: nop
     204: checkcast     #55                 // class java/lang/Iterable
     207: invokestatic  #100                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     210: areturn

  private static final boolean main$part1$lambda$9(Vector2d, Vector3d);
    Code:
       0: aload_1
       1: ldc           #244                // String node
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #161                // Method Vector3d.getX:()I
      10: aload_0
      11: invokevirtual #167                // Method Vector2d.getX:()I
      14: if_icmpne     32
      17: aload_1
      18: invokevirtual #164                // Method Vector3d.getY:()I
      21: aload_0
      22: invokevirtual #168                // Method Vector2d.getY:()I
      25: if_icmpne     32
      28: iconst_1
      29: goto          33
      32: iconst_0
      33: ireturn

  private static final int main$part1$lambda$10(Vector2d, Vector3d);
    Code:
       0: aload_1
       1: ldc           #252                // String it
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: new           #166                // class Vector2d
      10: dup
      11: aload_1
      12: invokevirtual #161                // Method Vector3d.getX:()I
      15: aload_1
      16: invokevirtual #164                // Method Vector3d.getY:()I
      19: invokespecial #255                // Method Vector2d."<init>":(II)V
      22: invokevirtual #258                // Method Vector2d.minus:(LVector2d;)LVector2d;
      25: invokevirtual #261                // Method Vector2d.manhattan:()I
      28: ireturn

  private static final java.util.Collection main$part1$lambda$11(Vector3d, Vector2d, int, int, java.util.Map, java.util.Set, java.util.Map, Vector3d);
    Code:
       0: aload         7
       2: ldc           #244                // String node
       4: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload         5
       9: aload         6
      11: aload         7
      13: aload_0
      14: aload_1
      15: iload_2
      16: iload_3
      17: aload         4
      19: invokestatic  #265                // Method main$neighbours:(Ljava/util/Set;Ljava/util/Map;LVector3d;LVector3d;LVector2d;IILjava/util/Map;)Ljava/util/Set;
      22: checkcast     #69                 // class java/util/Collection
      25: areturn

  private static final int main$part1(Vector3d, java.util.Map<java.lang.Character, Vector3d>, java.util.Set<Vector3d>, java.util.List<java.lang.String>);
    Code:
       0: aload_3
       1: checkcast     #55                 // class java/lang/Iterable
       4: astore        5
       6: iconst_0
       7: istore        6
       9: aload         5
      11: astore        7
      13: new           #57                 // class java/util/ArrayList
      16: dup
      17: aload         5
      19: bipush        10
      21: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      24: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
      27: checkcast     #69                 // class java/util/Collection
      30: astore        8
      32: iconst_0
      33: istore        9
      35: aload         7
      37: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        10
      44: aload         10
      46: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          104
      54: aload         10
      56: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        11
      63: aload         8
      65: aload         11
      67: checkcast     #276                // class java/lang/String
      70: astore        12
      72: astore        20
      74: iconst_0
      75: istore        13
      77: aload         12
      79: invokevirtual #280                // Method java/lang/String.toCharArray:()[C
      82: dup
      83: ldc_w         #282                // String toCharArray(...)
      86: invokestatic  #285                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      89: invokestatic  #291                // Method kotlin/collections/ArraysKt.toList:([C)Ljava/util/List;
      92: aload         20
      94: swap
      95: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     100: pop
     101: goto          44
     104: aload         8
     106: checkcast     #96                 // class java/util/List
     109: nop
     110: astore        21
     112: new           #293                // class Grid
     115: dup
     116: aload         21
     118: invokespecial #296                // Method Grid."<init>":(Ljava/util/List;)V
     121: astore        4
     123: aload         4
     125: invokevirtual #299                // Method Grid.getWidth:()I
     128: iconst_2
     129: isub
     130: istore        5
     132: aload         4
     134: invokevirtual #302                // Method Grid.getHeight:()I
     137: iconst_2
     138: isub
     139: istore        6
     141: new           #166                // class Vector2d
     144: dup
     145: iload         5
     147: iconst_1
     148: isub
     149: iload         6
     151: invokespecial #255                // Method Vector2d."<init>":(II)V
     154: astore        7
     156: aload         4
     158: invokevirtual #306                // Method Grid.getData:()Ljava/util/List;
     161: checkcast     #55                 // class java/lang/Iterable
     164: invokestatic  #310                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
     167: checkcast     #55                 // class java/lang/Iterable
     170: astore        9
     172: iconst_0
     173: istore        10
     175: aload         9
     177: astore        11
     179: new           #57                 // class java/util/ArrayList
     182: dup
     183: invokespecial #229                // Method java/util/ArrayList."<init>":()V
     186: checkcast     #69                 // class java/util/Collection
     189: astore        12
     191: iconst_0
     192: istore        13
     194: aload         11
     196: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     201: astore        14
     203: aload         14
     205: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     210: ifeq          260
     213: aload         14
     215: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     220: astore        15
     222: aload         15
     224: checkcast     #312                // class GridCell
     227: astore        16
     229: iconst_0
     230: istore        17
     232: aload_1
     233: aload         16
     235: invokevirtual #315                // Method GridCell.getValue:()Ljava/lang/Object;
     238: invokeinterface #199,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     243: nop
     244: ifeq          203
     247: aload         12
     249: aload         15
     251: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     256: pop
     257: goto          203
     260: aload         12
     262: checkcast     #96                 // class java/util/List
     265: nop
     266: checkcast     #55                 // class java/lang/Iterable
     269: astore        9
     271: nop
     272: iconst_0
     273: istore        10
     275: aload         9
     277: bipush        10
     279: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     282: invokestatic  #319                // Method kotlin/collections/MapsKt.mapCapacity:(I)I
     285: bipush        16
     287: invokestatic  #325                // Method kotlin/ranges/RangesKt.coerceAtLeast:(II)I
     290: istore        11
     292: aload         9
     294: astore        12
     296: new           #327                // class java/util/LinkedHashMap
     299: dup
     300: iload         11
     302: invokespecial #328                // Method java/util/LinkedHashMap."<init>":(I)V
     305: checkcast     #49                 // class java/util/Map
     308: astore        13
     310: iconst_0
     311: istore        14
     313: aload         12
     315: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     320: astore        15
     322: aload         15
     324: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     329: ifeq          429
     332: aload         15
     334: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     339: astore        16
     341: aload         13
     343: astore        17
     345: aload         16
     347: checkcast     #312                // class GridCell
     350: astore        18
     352: iconst_0
     353: istore        19
     355: new           #16                 // class Vector3d
     358: dup
     359: aload         18
     361: invokevirtual #332                // Method GridCell.getPosition:()LVector2d;
     364: invokevirtual #167                // Method Vector2d.getX:()I
     367: aload         18
     369: invokevirtual #332                // Method GridCell.getPosition:()LVector2d;
     372: invokevirtual #168                // Method Vector2d.getY:()I
     375: iconst_0
     376: invokespecial #108                // Method Vector3d."<init>":(III)V
     379: new           #16                 // class Vector3d
     382: dup
     383: iconst_1
     384: iconst_1
     385: iconst_0
     386: invokespecial #108                // Method Vector3d."<init>":(III)V
     389: invokevirtual #178                // Method Vector3d.minus:(LVector3d;)LVector3d;
     392: aload_1
     393: aload         18
     395: invokevirtual #315                // Method GridCell.getValue:()Ljava/lang/Object;
     398: invokeinterface #203,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     403: invokestatic  #32                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     406: astore        18
     408: aload         17
     410: aload         18
     412: invokevirtual #335                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     415: aload         18
     417: invokevirtual #338                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     420: invokeinterface #342,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     425: pop
     426: goto          322
     429: aload         13
     431: nop
     432: astore        8
     434: aload_0
     435: aload         7
     437: invokedynamic #359,  0            // InvokeDynamic #0:invoke:(LVector2d;)Lkotlin/jvm/functions/Function1;
     442: aload         7
     444: invokedynamic #365,  0            // InvokeDynamic #1:invoke:(LVector2d;)Lkotlin/jvm/functions/Function1;
     449: aload_0
     450: aload         7
     452: iload         5
     454: iload         6
     456: aload         8
     458: aload_2
     459: aload_1
     460: invokedynamic #373,  0            // InvokeDynamic #2:invoke:(LVector3d;LVector2d;IILjava/util/Map;Ljava/util/Set;Ljava/util/Map;)Lkotlin/jvm/functions/Function1;
     465: invokestatic  #377                // Method UtilsKt.aStar:(Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Ljava/util/List;
     468: astore        9
     470: aload         9
     472: invokeinterface #380,  1          // InterfaceMethod java/util/List.size:()I
     477: iconst_1
     478: isub
     479: ireturn

  private static final boolean main$part2$lambda$15(Vector2d, Vector3d);
    Code:
       0: aload_1
       1: ldc           #244                // String node
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #161                // Method Vector3d.getX:()I
      10: aload_0
      11: invokevirtual #167                // Method Vector2d.getX:()I
      14: if_icmpne     32
      17: aload_1
      18: invokevirtual #164                // Method Vector3d.getY:()I
      21: aload_0
      22: invokevirtual #168                // Method Vector2d.getY:()I
      25: if_icmpne     32
      28: iconst_1
      29: goto          33
      32: iconst_0
      33: ireturn

  private static final int main$part2$lambda$16(Vector2d, Vector3d);
    Code:
       0: aload_1
       1: ldc           #252                // String it
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: new           #166                // class Vector2d
      10: dup
      11: aload_1
      12: invokevirtual #161                // Method Vector3d.getX:()I
      15: aload_1
      16: invokevirtual #164                // Method Vector3d.getY:()I
      19: invokespecial #255                // Method Vector2d."<init>":(II)V
      22: invokevirtual #258                // Method Vector2d.minus:(LVector2d;)LVector2d;
      25: invokevirtual #261                // Method Vector2d.manhattan:()I
      28: ireturn

  private static final java.util.Collection main$part2$lambda$17(Vector3d, Vector2d, int, int, java.util.Map, java.util.Set, java.util.Map, Vector3d);
    Code:
       0: aload         7
       2: ldc           #244                // String node
       4: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload         5
       9: aload         6
      11: aload         7
      13: aload_0
      14: aload_1
      15: iload_2
      16: iload_3
      17: aload         4
      19: invokestatic  #265                // Method main$neighbours:(Ljava/util/Set;Ljava/util/Map;LVector3d;LVector3d;LVector2d;IILjava/util/Map;)Ljava/util/Set;
      22: checkcast     #69                 // class java/util/Collection
      25: areturn

  private static final boolean main$part2$lambda$18(Vector3d);
    Code:
       0: aload_0
       1: ldc           #244                // String node
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokevirtual #161                // Method Vector3d.getX:()I
      10: ifne          25
      13: aload_0
      14: invokevirtual #164                // Method Vector3d.getY:()I
      17: iconst_m1
      18: if_icmpne     25
      21: iconst_1
      22: goto          26
      25: iconst_0
      26: ireturn

  private static final int main$part2$lambda$19(Vector2d, Vector3d);
    Code:
       0: aload_1
       1: ldc           #252                // String it
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: new           #166                // class Vector2d
      10: dup
      11: aload_1
      12: invokevirtual #161                // Method Vector3d.getX:()I
      15: aload_1
      16: invokevirtual #164                // Method Vector3d.getY:()I
      19: invokespecial #255                // Method Vector2d."<init>":(II)V
      22: invokevirtual #258                // Method Vector2d.minus:(LVector2d;)LVector2d;
      25: invokevirtual #261                // Method Vector2d.manhattan:()I
      28: ireturn

  private static final java.util.Collection main$part2$lambda$20(Vector3d, Vector2d, int, int, java.util.Map, java.util.Set, java.util.Map, Vector3d);
    Code:
       0: aload         7
       2: ldc           #244                // String node
       4: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload         5
       9: aload         6
      11: aload         7
      13: aload_0
      14: aload_1
      15: iload_2
      16: iload_3
      17: aload         4
      19: invokestatic  #265                // Method main$neighbours:(Ljava/util/Set;Ljava/util/Map;LVector3d;LVector3d;LVector2d;IILjava/util/Map;)Ljava/util/Set;
      22: checkcast     #69                 // class java/util/Collection
      25: areturn

  private static final boolean main$part2$lambda$21(Vector2d, Vector3d);
    Code:
       0: aload_1
       1: ldc           #244                // String node
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #161                // Method Vector3d.getX:()I
      10: aload_0
      11: invokevirtual #167                // Method Vector2d.getX:()I
      14: if_icmpne     32
      17: aload_1
      18: invokevirtual #164                // Method Vector3d.getY:()I
      21: aload_0
      22: invokevirtual #168                // Method Vector2d.getY:()I
      25: if_icmpne     32
      28: iconst_1
      29: goto          33
      32: iconst_0
      33: ireturn

  private static final int main$part2$lambda$22(Vector2d, Vector3d);
    Code:
       0: aload_1
       1: ldc           #252                // String it
       3: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: new           #166                // class Vector2d
      10: dup
      11: aload_1
      12: invokevirtual #161                // Method Vector3d.getX:()I
      15: aload_1
      16: invokevirtual #164                // Method Vector3d.getY:()I
      19: invokespecial #255                // Method Vector2d."<init>":(II)V
      22: invokevirtual #258                // Method Vector2d.minus:(LVector2d;)LVector2d;
      25: invokevirtual #261                // Method Vector2d.manhattan:()I
      28: ireturn

  private static final java.util.Collection main$part2$lambda$23(Vector3d, Vector2d, int, int, java.util.Map, java.util.Set, java.util.Map, Vector3d);
    Code:
       0: aload         7
       2: ldc           #244                // String node
       4: invokestatic  #248                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload         5
       9: aload         6
      11: aload         7
      13: aload_0
      14: aload_1
      15: iload_2
      16: iload_3
      17: aload         4
      19: invokestatic  #265                // Method main$neighbours:(Ljava/util/Set;Ljava/util/Map;LVector3d;LVector3d;LVector2d;IILjava/util/Map;)Ljava/util/Set;
      22: checkcast     #69                 // class java/util/Collection
      25: areturn

  private static final int main$part2(Vector3d, java.util.Map<java.lang.Character, Vector3d>, java.util.Set<Vector3d>, java.util.List<java.lang.String>);
    Code:
       0: aload_3
       1: checkcast     #55                 // class java/lang/Iterable
       4: astore        5
       6: iconst_0
       7: istore        6
       9: aload         5
      11: astore        7
      13: new           #57                 // class java/util/ArrayList
      16: dup
      17: aload         5
      19: bipush        10
      21: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      24: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
      27: checkcast     #69                 // class java/util/Collection
      30: astore        8
      32: iconst_0
      33: istore        9
      35: aload         7
      37: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        10
      44: aload         10
      46: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          104
      54: aload         10
      56: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        11
      63: aload         8
      65: aload         11
      67: checkcast     #276                // class java/lang/String
      70: astore        12
      72: astore        20
      74: iconst_0
      75: istore        13
      77: aload         12
      79: invokevirtual #280                // Method java/lang/String.toCharArray:()[C
      82: dup
      83: ldc_w         #282                // String toCharArray(...)
      86: invokestatic  #285                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      89: invokestatic  #291                // Method kotlin/collections/ArraysKt.toList:([C)Ljava/util/List;
      92: aload         20
      94: swap
      95: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     100: pop
     101: goto          44
     104: aload         8
     106: checkcast     #96                 // class java/util/List
     109: nop
     110: astore        21
     112: new           #293                // class Grid
     115: dup
     116: aload         21
     118: invokespecial #296                // Method Grid."<init>":(Ljava/util/List;)V
     121: astore        4
     123: aload         4
     125: invokevirtual #299                // Method Grid.getWidth:()I
     128: iconst_2
     129: isub
     130: istore        5
     132: aload         4
     134: invokevirtual #302                // Method Grid.getHeight:()I
     137: iconst_2
     138: isub
     139: istore        6
     141: new           #166                // class Vector2d
     144: dup
     145: iload         5
     147: iconst_1
     148: isub
     149: iload         6
     151: invokespecial #255                // Method Vector2d."<init>":(II)V
     154: astore        7
     156: aload         4
     158: invokevirtual #306                // Method Grid.getData:()Ljava/util/List;
     161: checkcast     #55                 // class java/lang/Iterable
     164: invokestatic  #310                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
     167: checkcast     #55                 // class java/lang/Iterable
     170: astore        9
     172: iconst_0
     173: istore        10
     175: aload         9
     177: astore        11
     179: new           #57                 // class java/util/ArrayList
     182: dup
     183: invokespecial #229                // Method java/util/ArrayList."<init>":()V
     186: checkcast     #69                 // class java/util/Collection
     189: astore        12
     191: iconst_0
     192: istore        13
     194: aload         11
     196: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     201: astore        14
     203: aload         14
     205: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     210: ifeq          260
     213: aload         14
     215: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     220: astore        15
     222: aload         15
     224: checkcast     #312                // class GridCell
     227: astore        16
     229: iconst_0
     230: istore        17
     232: aload_1
     233: aload         16
     235: invokevirtual #315                // Method GridCell.getValue:()Ljava/lang/Object;
     238: invokeinterface #199,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     243: nop
     244: ifeq          203
     247: aload         12
     249: aload         15
     251: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     256: pop
     257: goto          203
     260: aload         12
     262: checkcast     #96                 // class java/util/List
     265: nop
     266: checkcast     #55                 // class java/lang/Iterable
     269: astore        9
     271: nop
     272: iconst_0
     273: istore        10
     275: aload         9
     277: bipush        10
     279: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     282: invokestatic  #319                // Method kotlin/collections/MapsKt.mapCapacity:(I)I
     285: bipush        16
     287: invokestatic  #325                // Method kotlin/ranges/RangesKt.coerceAtLeast:(II)I
     290: istore        11
     292: aload         9
     294: astore        12
     296: new           #327                // class java/util/LinkedHashMap
     299: dup
     300: iload         11
     302: invokespecial #328                // Method java/util/LinkedHashMap."<init>":(I)V
     305: checkcast     #49                 // class java/util/Map
     308: astore        13
     310: iconst_0
     311: istore        14
     313: aload         12
     315: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     320: astore        15
     322: aload         15
     324: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     329: ifeq          429
     332: aload         15
     334: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     339: astore        16
     341: aload         13
     343: astore        17
     345: aload         16
     347: checkcast     #312                // class GridCell
     350: astore        18
     352: iconst_0
     353: istore        19
     355: new           #16                 // class Vector3d
     358: dup
     359: aload         18
     361: invokevirtual #332                // Method GridCell.getPosition:()LVector2d;
     364: invokevirtual #167                // Method Vector2d.getX:()I
     367: aload         18
     369: invokevirtual #332                // Method GridCell.getPosition:()LVector2d;
     372: invokevirtual #168                // Method Vector2d.getY:()I
     375: iconst_0
     376: invokespecial #108                // Method Vector3d."<init>":(III)V
     379: new           #16                 // class Vector3d
     382: dup
     383: iconst_1
     384: iconst_1
     385: iconst_0
     386: invokespecial #108                // Method Vector3d."<init>":(III)V
     389: invokevirtual #178                // Method Vector3d.minus:(LVector3d;)LVector3d;
     392: aload_1
     393: aload         18
     395: invokevirtual #315                // Method GridCell.getValue:()Ljava/lang/Object;
     398: invokeinterface #203,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     403: invokestatic  #32                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     406: astore        18
     408: aload         17
     410: aload         18
     412: invokevirtual #335                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     415: aload         18
     417: invokevirtual #338                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     420: invokeinterface #342,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     425: pop
     426: goto          322
     429: aload         13
     431: nop
     432: astore        8
     434: aload_0
     435: aload         7
     437: invokedynamic #410,  0            // InvokeDynamic #3:invoke:(LVector2d;)Lkotlin/jvm/functions/Function1;
     442: aload         7
     444: invokedynamic #414,  0            // InvokeDynamic #4:invoke:(LVector2d;)Lkotlin/jvm/functions/Function1;
     449: aload_0
     450: aload         7
     452: iload         5
     454: iload         6
     456: aload         8
     458: aload_2
     459: aload_1
     460: invokedynamic #418,  0            // InvokeDynamic #5:invoke:(LVector3d;LVector2d;IILjava/util/Map;Ljava/util/Set;Ljava/util/Map;)Lkotlin/jvm/functions/Function1;
     465: invokestatic  #377                // Method UtilsKt.aStar:(Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Ljava/util/List;
     468: astore        9
     470: aload         9
     472: invokestatic  #422                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     475: invokedynamic #428,  0            // InvokeDynamic #6:invoke:()Lkotlin/jvm/functions/Function1;
     480: aload         7
     482: invokedynamic #432,  0            // InvokeDynamic #7:invoke:(LVector2d;)Lkotlin/jvm/functions/Function1;
     487: aload_0
     488: aload         7
     490: iload         5
     492: iload         6
     494: aload         8
     496: aload_2
     497: aload_1
     498: invokedynamic #436,  0            // InvokeDynamic #8:invoke:(LVector3d;LVector2d;IILjava/util/Map;Ljava/util/Set;Ljava/util/Map;)Lkotlin/jvm/functions/Function1;
     503: invokestatic  #377                // Method UtilsKt.aStar:(Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Ljava/util/List;
     506: astore        10
     508: aload         10
     510: invokestatic  #422                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     513: aload         7
     515: invokedynamic #440,  0            // InvokeDynamic #9:invoke:(LVector2d;)Lkotlin/jvm/functions/Function1;
     520: aload         7
     522: invokedynamic #444,  0            // InvokeDynamic #10:invoke:(LVector2d;)Lkotlin/jvm/functions/Function1;
     527: aload_0
     528: aload         7
     530: iload         5
     532: iload         6
     534: aload         8
     536: aload_2
     537: aload_1
     538: invokedynamic #448,  0            // InvokeDynamic #11:invoke:(LVector3d;LVector2d;IILjava/util/Map;Ljava/util/Set;Ljava/util/Map;)Lkotlin/jvm/functions/Function1;
     543: invokestatic  #377                // Method UtilsKt.aStar:(Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Ljava/util/List;
     546: astore        11
     548: aload         9
     550: invokeinterface #380,  1          // InterfaceMethod java/util/List.size:()I
     555: aload         10
     557: invokeinterface #380,  1          // InterfaceMethod java/util/List.size:()I
     562: iadd
     563: aload         11
     565: invokeinterface #380,  1          // InterfaceMethod java/util/List.size:()I
     570: iadd
     571: iconst_3
     572: isub
     573: ireturn

  public static final int access$main$part1(Vector3d, java.util.Map, java.util.Set, java.util.List);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: aload_3
       4: invokestatic  #457                // Method main$part1:(LVector3d;Ljava/util/Map;Ljava/util/Set;Ljava/util/List;)I
       7: ireturn

  public static final int access$main$part2(Vector3d, java.util.Map, java.util.Set, java.util.List);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: aload_3
       4: invokestatic  #460                // Method main$part2:(LVector3d;Ljava/util/Map;Ljava/util/Set;Ljava/util/List;)I
       7: ireturn
}