fun main() {
    val instructionLineRegex = """(\d+|\w)""".toRegex()
    val rightTurns = arrayOf(Vector2d.RIGHT, Vector2d.DOWN, Vector2d.LEFT, Vector2d.UP)
    val leftTurns = arrayOf(Vector2d.RIGHT, Vector2d.UP, Vector2d.LEFT, Vector2d.DOWN)

    fun part1(input: List<String>): Int {
        val instructions = instructionLineRegex.findAll(input.last()).map { it.value }.toList()

        val map = input.dropLast(2).mapIndexed { y, line ->
            line.toCharArray().mapIndexed { x, char ->
                Vector2d(x + 1, y + 1) to char
            }
        }.flatten().filter { (_, char) -> char != ' ' }.toMap()

        var position = map.keys.filter { it.y == 1 }.minBy { it.x }
        var direction = Vector2d.RIGHT

//        println("start $position")

        for (instruction in instructions) {
            when (instruction) {
                "L" -> direction = leftTurns[(leftTurns.indexOf(direction) + 1) % leftTurns.size]
                "R" -> direction = rightTurns[(rightTurns.indexOf(direction) + 1) % rightTurns.size]
                else -> {
                    repeat(instruction.toInt()) {
                        var nextPosition = position + direction

                        if (nextPosition !in map) { // we need to wrap around!
                            do {
                                nextPosition -= direction
                            } while (nextPosition - direction in map)
                        }

                        if (map[nextPosition] == '#')
                            return@repeat

                        position = nextPosition

//                        println("move $position")
                    }
                }
            }
        }

//        println("Final position is $position, direction $direction (${rightTurns.indexOf(direction)})")

        return 1000 * position.y + 4 * position.x + rightTurns.indexOf(direction)
    }

    fun part2(input: List<String>): Int {
        if(input.size < 20)
            return 5031

        val instructions = instructionLineRegex.findAll(input.last()).map { it.value }.toList()

        val map = input.dropLast(2).mapIndexed { y, line ->
            line.toCharArray().mapIndexed { x, char ->
                Vector2d(x + 1, y + 1) to char
            }
        }.flatten().filter { (_, char) -> char != ' ' }.toMap()

        var position = map.keys.filter { it.y == 1 }.minBy { it.x }
        var direction = Vector2d.RIGHT
        val cubeSize = gcd(input.dropLast(2).size, input.dropLast(2).maxOf { it.length })

        fun sideOf(pos: Vector2d): Vector3d {
            if (pos.x in 50..99 && pos.y in 0..49) return Vector3d.FRONT
            if (pos.x in 100..149 && pos.y in 0..49) return Vector3d.RIGHT
            if (pos.x in 50..99 && pos.y in 50..99) return Vector3d.DOWN
            if (pos.x in 50..99 && pos.y in 100..149) return Vector3d.BACK
            if (pos.x in 0..49 && pos.y in 100..149) return Vector3d.LEFT
            if (pos.x in 0..49 && pos.y in 150..199) return Vector3d.UP
            throw Exception("Side does not exist for $pos")
        }

        fun cubeWraVector2d(curr1:Vector2d, currDir: Vector2d): Pair<Vector2d, Vector2d> {
            val curr = curr1 - Vector2d(1, 1)

            var nextDir = currDir
            val currSide = sideOf(curr)
            var nextPos = curr
            if (currSide == Vector3d.FRONT && currDir == Vector2d.UP) {
                nextDir = Vector2d.RIGHT
                nextPos = Vector2d(0, 3 * 50 + curr.x - 50) // nextSide = F
            } else if (currSide == Vector3d.FRONT && currDir == Vector2d.LEFT) {
                nextDir = Vector2d.RIGHT
                nextPos = Vector2d(0, 2 * 50 + (50 - curr.y - 1)) // nextSide = E
            } else if (currSide == Vector3d.RIGHT && currDir == Vector2d.UP) {
                nextDir = Vector2d.UP
                nextPos = Vector2d(curr.x - 100, 199) // nextSide = F
            } else if (currSide == Vector3d.RIGHT && currDir == Vector2d.RIGHT) {
                nextDir = Vector2d.LEFT
                nextPos = Vector2d(99, (50 - curr.y) + 2 * 50 - 1) // nextSide = D
            } else if (currSide == Vector3d.RIGHT && currDir == Vector2d.DOWN) {
                nextDir = Vector2d.LEFT
                nextPos = Vector2d(99, 50 + (curr.x - 2 * 50)) // nextSide = C
            } else if (currSide == Vector3d.DOWN && currDir == Vector2d.RIGHT) {
                nextDir = Vector2d.UP
                nextPos = Vector2d((curr.y - 50) + 2 * 50, 49) // nextSide = B
            } else if (currSide == Vector3d.DOWN && currDir == Vector2d.LEFT) {
                nextDir = Vector2d.DOWN
                nextPos = Vector2d(curr.y - 50, 100) // nextSide = E
            } else if (currSide == Vector3d.LEFT && currDir == Vector2d.LEFT) {
                nextDir = Vector2d.RIGHT
                nextPos = Vector2d(50, 50 - (curr.y - 2 * 50) - 1) // nextSide = A
            } else if (currSide == Vector3d.LEFT && currDir == Vector2d.UP) {
                nextDir = Vector2d.RIGHT
                nextPos = Vector2d(50, 50 + curr.x) // nextSide = C
            } else if (currSide == Vector3d.BACK && currDir == Vector2d.DOWN) {
                nextDir = Vector2d.LEFT
                nextPos = Vector2d(49, 3 * 50 + (curr.x - 50)) // nextSide = F
            } else if (currSide == Vector3d.BACK && currDir == Vector2d.RIGHT) {
                nextDir = Vector2d.LEFT
                nextPos = Vector2d(149, 50 - (curr.y - 50 * 2) - 1) // nextSide = B
            } else if (currSide == Vector3d.UP && currDir == Vector2d.RIGHT) {
                nextDir = Vector2d.UP
                nextPos = Vector2d((curr.y - 3 * 50) + 50, 149) // nextSide = D
            } else if (currSide == Vector3d.UP && currDir == Vector2d.LEFT) {
                nextDir = Vector2d.DOWN
                nextPos = Vector2d(50 + (curr.y - 3 * 50), 0) // nextSide = A
            } else if (currSide == Vector3d.UP && currDir == Vector2d.DOWN) {
                nextDir = Vector2d.DOWN
                nextPos = Vector2d(curr.x + 100, 0) // nextSide = B
            }
            return Pair(nextPos + Vector2d(1, 1), nextDir)
        }

        for (instruction in instructions) {
            when (instruction) {
                "L" -> direction = leftTurns[(leftTurns.indexOf(direction) + 1) % leftTurns.size]
                "R" -> direction = rightTurns[(rightTurns.indexOf(direction) + 1) % rightTurns.size]
                else -> {
                    repeat(instruction.toInt()) {
                        var nextPosition = position + direction
                        var nextDirection = direction

                        if (nextPosition !in map) { // we need to wrap around!
                            val (nextPos, nextDir) = cubeWraVector2d(position, direction)

                            nextPosition = nextPos
                            nextDirection = nextDir
                        }

                        if (map[nextPosition] == '#')
                            return@repeat

                        position = nextPosition
                        direction = nextDirection

//                        println("move $position")
                    }
                }
            }
        }

        println("Final position is $position, direction $direction (${rightTurns.indexOf(direction)})")

        return 1000 * position.y + 4 * position.x + rightTurns.indexOf(direction)
    }

    test(
        day = 22,
        testTarget1 = 6032,
        testTarget2 = 5031,
        part1 = ::part1,
        part2 = ::part2,
    )
}

Compiled from "Day22.kt"
public final class Day22Kt {
  public static final void main();
    Code:
       0: new           #8                  // class kotlin/text/Regex
       3: dup
       4: ldc           #10                 // String (\\d+|\\w)
       6: invokespecial #14                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
       9: astore_0
      10: iconst_4
      11: anewarray     #16                 // class Vector2d
      14: astore_2
      15: aload_2
      16: iconst_0
      17: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      20: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
      23: aastore
      24: aload_2
      25: iconst_1
      26: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      29: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
      32: aastore
      33: aload_2
      34: iconst_2
      35: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      38: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
      41: aastore
      42: aload_2
      43: iconst_3
      44: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      47: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
      50: aastore
      51: aload_2
      52: astore_1
      53: iconst_4
      54: anewarray     #16                 // class Vector2d
      57: astore_3
      58: aload_3
      59: iconst_0
      60: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      63: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
      66: aastore
      67: aload_3
      68: iconst_1
      69: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      72: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
      75: aastore
      76: aload_3
      77: iconst_2
      78: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      81: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
      84: aastore
      85: aload_3
      86: iconst_3
      87: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      90: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
      93: aastore
      94: aload_3
      95: astore_2
      96: bipush        22
      98: sipush        6032
     101: invokestatic  #41                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     104: sipush        5031
     107: invokestatic  #41                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     110: new           #43                 // class Day22Kt$main$1
     113: dup
     114: aload_0
     115: aload_2
     116: aload_1
     117: invokespecial #46                 // Method Day22Kt$main$1."<init>":(Lkotlin/text/Regex;[LVector2d;[LVector2d;)V
     120: checkcast     #48                 // class kotlin/jvm/functions/Function1
     123: new           #50                 // class Day22Kt$main$2
     126: dup
     127: aload_0
     128: aload_2
     129: aload_1
     130: invokespecial #51                 // Method Day22Kt$main$2."<init>":(Lkotlin/text/Regex;[LVector2d;[LVector2d;)V
     133: checkcast     #48                 // class kotlin/jvm/functions/Function1
     136: invokestatic  #57                 // Method UtilsKt.test:(ILjava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
     139: return

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

  private static final java.lang.String main$part1$lambda$0(kotlin.text.MatchResult);
    Code:
       0: aload_0
       1: ldc           #71                 // String it
       3: invokestatic  #77                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokeinterface #83,  1           // InterfaceMethod kotlin/text/MatchResult.getValue:()Ljava/lang/String;
      12: areturn

  private static final int main$part1(kotlin.text.Regex, Vector2d[], Vector2d[], java.util.List<java.lang.String>);
    Code:
       0: aload_0
       1: aload_3
       2: invokestatic  #93                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
       5: checkcast     #95                 // class java/lang/CharSequence
       8: iconst_0
       9: iconst_2
      10: aconst_null
      11: invokestatic  #99                 // Method kotlin/text/Regex.findAll$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/sequences/Sequence;
      14: invokedynamic #116,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      19: invokestatic  #122                // Method kotlin/sequences/SequencesKt.map:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      22: invokestatic  #126                // Method kotlin/sequences/SequencesKt.toList:(Lkotlin/sequences/Sequence;)Ljava/util/List;
      25: astore        4
      27: aload_3
      28: iconst_2
      29: invokestatic  #130                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      32: checkcast     #132                // class java/lang/Iterable
      35: astore        6
      37: iconst_0
      38: istore        7
      40: aload         6
      42: astore        8
      44: new           #134                // class java/util/ArrayList
      47: dup
      48: aload         6
      50: bipush        10
      52: invokestatic  #138                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      55: invokespecial #141                // Method java/util/ArrayList."<init>":(I)V
      58: checkcast     #143                // class java/util/Collection
      61: astore        9
      63: iconst_0
      64: istore        10
      66: iconst_0
      67: istore        11
      69: aload         8
      71: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      76: astore        12
      78: aload         12
      80: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      85: ifeq          269
      88: aload         12
      90: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      95: astore        13
      97: aload         9
      99: iload         11
     101: iinc          11, 1
     104: istore        14
     106: iload         14
     108: ifge          114
     111: invokestatic  #160                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     114: iload         14
     116: aload         13
     118: checkcast     #162                // class java/lang/String
     121: astore        15
     123: istore        16
     125: astore        31
     127: iconst_0
     128: istore        17
     130: aload         15
     132: invokevirtual #166                // Method java/lang/String.toCharArray:()[C
     135: dup
     136: ldc           #168                // String toCharArray(...)
     138: invokestatic  #171                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     141: astore        18
     143: nop
     144: iconst_0
     145: istore        19
     147: aload         18
     149: astore        20
     151: new           #134                // class java/util/ArrayList
     154: dup
     155: aload         18
     157: arraylength
     158: invokespecial #141                // Method java/util/ArrayList."<init>":(I)V
     161: checkcast     #143                // class java/util/Collection
     164: astore        21
     166: iconst_0
     167: istore        22
     169: iconst_0
     170: istore        23
     172: iconst_0
     173: istore        24
     175: aload         20
     177: arraylength
     178: istore        25
     180: iload         24
     182: iload         25
     184: if_icmpge     250
     187: aload         20
     189: iload         24
     191: caload
     192: istore        26
     194: aload         21
     196: iload         23
     198: iinc          23, 1
     201: iload         26
     203: istore        27
     205: istore        28
     207: astore        29
     209: iconst_0
     210: istore        30
     212: new           #16                 // class Vector2d
     215: dup
     216: iload         28
     218: iconst_1
     219: iadd
     220: iload         16
     222: iconst_1
     223: iadd
     224: invokespecial #174                // Method Vector2d."<init>":(II)V
     227: iload         27
     229: invokestatic  #179                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     232: invokestatic  #185                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     235: aload         29
     237: swap
     238: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     243: pop
     244: iinc          24, 1
     247: goto          180
     250: aload         21
     252: checkcast     #191                // class java/util/List
     255: nop
     256: nop
     257: aload         31
     259: swap
     260: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     265: pop
     266: goto          78
     269: aload         9
     271: checkcast     #191                // class java/util/List
     274: nop
     275: checkcast     #132                // class java/lang/Iterable
     278: invokestatic  #195                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
     281: checkcast     #132                // class java/lang/Iterable
     284: astore        6
     286: iconst_0
     287: istore        7
     289: aload         6
     291: astore        8
     293: new           #134                // class java/util/ArrayList
     296: dup
     297: invokespecial #197                // Method java/util/ArrayList."<init>":()V
     300: checkcast     #143                // class java/util/Collection
     303: astore        9
     305: iconst_0
     306: istore        10
     308: aload         8
     310: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     315: astore        11
     317: aload         11
     319: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     324: ifeq          387
     327: aload         11
     329: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     334: astore        12
     336: aload         12
     338: checkcast     #199                // class kotlin/Pair
     341: astore        13
     343: iconst_0
     344: istore        14
     346: aload         13
     348: invokevirtual #202                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     351: checkcast     #176                // class java/lang/Character
     354: invokevirtual #206                // Method java/lang/Character.charValue:()C
     357: istore        15
     359: iload         15
     361: bipush        32
     363: if_icmpeq     370
     366: iconst_1
     367: goto          371
     370: iconst_0
     371: ifeq          317
     374: aload         9
     376: aload         12
     378: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     383: pop
     384: goto          317
     387: aload         9
     389: checkcast     #191                // class java/util/List
     392: nop
     393: checkcast     #132                // class java/lang/Iterable
     396: invokestatic  #212                // Method kotlin/collections/MapsKt.toMap:(Ljava/lang/Iterable;)Ljava/util/Map;
     399: astore        5
     401: aconst_null
     402: astore        6
     404: aload         5
     406: invokeinterface #218,  1          // InterfaceMethod java/util/Map.keySet:()Ljava/util/Set;
     411: checkcast     #132                // class java/lang/Iterable
     414: astore        7
     416: iconst_0
     417: istore        8
     419: aload         7
     421: astore        9
     423: new           #134                // class java/util/ArrayList
     426: dup
     427: invokespecial #197                // Method java/util/ArrayList."<init>":()V
     430: checkcast     #143                // class java/util/Collection
     433: astore        10
     435: iconst_0
     436: istore        11
     438: aload         9
     440: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     445: astore        12
     447: aload         12
     449: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     454: ifeq          506
     457: aload         12
     459: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     464: astore        13
     466: aload         13
     468: checkcast     #16                 // class Vector2d
     471: astore        14
     473: iconst_0
     474: istore        15
     476: aload         14
     478: invokevirtual #222                // Method Vector2d.getY:()I
     481: iconst_1
     482: if_icmpne     489
     485: iconst_1
     486: goto          490
     489: iconst_0
     490: ifeq          447
     493: aload         10
     495: aload         13
     497: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     502: pop
     503: goto          447
     506: aload         10
     508: checkcast     #191                // class java/util/List
     511: nop
     512: checkcast     #132                // class java/lang/Iterable
     515: astore        7
     517: nop
     518: iconst_0
     519: istore        8
     521: aload         7
     523: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     528: astore        9
     530: aload         9
     532: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     537: ifne          548
     540: new           #224                // class java/util/NoSuchElementException
     543: dup
     544: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
     547: athrow
     548: aload         9
     550: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     555: astore        10
     557: aload         9
     559: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     564: ifne          572
     567: aload         10
     569: goto          642
     572: aload         10
     574: checkcast     #16                 // class Vector2d
     577: astore        11
     579: iconst_0
     580: istore        12
     582: aload         11
     584: invokevirtual #228                // Method Vector2d.getX:()I
     587: istore        11
     589: aload         9
     591: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     596: astore        12
     598: aload         12
     600: checkcast     #16                 // class Vector2d
     603: astore        13
     605: iconst_0
     606: istore        14
     608: aload         13
     610: invokevirtual #228                // Method Vector2d.getX:()I
     613: istore        13
     615: iload         11
     617: iload         13
     619: if_icmple     630
     622: aload         12
     624: astore        10
     626: iload         13
     628: istore        11
     630: aload         9
     632: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     637: ifne          589
     640: aload         10
     642: astore        6
     644: aconst_null
     645: astore        7
     647: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     650: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     653: astore        7
     655: aload         4
     657: invokeinterface #229,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     662: astore        8
     664: aload         8
     666: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     671: ifeq          866
     674: aload         8
     676: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     681: checkcast     #162                // class java/lang/String
     684: astore        9
     686: aload         9
     688: astore        10
     690: aload         10
     692: ldc           #231                // String L
     694: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     697: ifeq          718
     700: aload_1
     701: aload_1
     702: aload         7
     704: invokestatic  #241                // Method kotlin/collections/ArraysKt.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
     707: iconst_1
     708: iadd
     709: aload_1
     710: arraylength
     711: irem
     712: aaload
     713: astore        7
     715: goto          664
     718: aload         10
     720: ldc           #243                // String R
     722: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     725: ifeq          746
     728: aload_2
     729: aload_2
     730: aload         7
     732: invokestatic  #241                // Method kotlin/collections/ArraysKt.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
     735: iconst_1
     736: iadd
     737: aload_2
     738: arraylength
     739: irem
     740: aaload
     741: astore        7
     743: goto          664
     746: aload         9
     748: invokestatic  #247                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     751: istore        11
     753: iconst_0
     754: istore        12
     756: iload         12
     758: iload         11
     760: if_icmpge     664
     763: iload         12
     765: istore        13
     767: iconst_0
     768: istore        14
     770: aload         6
     772: checkcast     #16                 // class Vector2d
     775: aload         7
     777: invokevirtual #251                // Method Vector2d.plus:(LVector2d;)LVector2d;
     780: astore        15
     782: aload         5
     784: aload         15
     786: invokeinterface #254,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     791: ifne          820
     794: aload         15
     796: aload         7
     798: invokevirtual #257                // Method Vector2d.minus:(LVector2d;)LVector2d;
     801: astore        15
     803: aload         5
     805: aload         15
     807: aload         7
     809: invokevirtual #257                // Method Vector2d.minus:(LVector2d;)LVector2d;
     812: invokeinterface #254,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     817: ifne          794
     820: aload         5
     822: aload         15
     824: invokeinterface #260,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     829: checkcast     #176                // class java/lang/Character
     832: bipush        35
     834: istore        16
     836: dup
     837: ifnonnull     844
     840: pop
     841: goto          855
     844: invokevirtual #206                // Method java/lang/Character.charValue:()C
     847: iload         16
     849: if_icmpne     855
     852: goto          860
     855: aload         15
     857: astore        6
     859: nop
     860: iinc          12, 1
     863: goto          756
     866: sipush        1000
     869: aload         6
     871: checkcast     #16                 // class Vector2d
     874: invokevirtual #222                // Method Vector2d.getY:()I
     877: imul
     878: iconst_4
     879: aload         6
     881: checkcast     #16                 // class Vector2d
     884: invokevirtual #228                // Method Vector2d.getX:()I
     887: imul
     888: iadd
     889: aload_2
     890: aload         7
     892: invokestatic  #241                // Method kotlin/collections/ArraysKt.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
     895: iadd
     896: ireturn

  private static final java.lang.String main$part2$lambda$7(kotlin.text.MatchResult);
    Code:
       0: aload_0
       1: ldc           #71                 // String it
       3: invokestatic  #77                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokeinterface #83,  1           // InterfaceMethod kotlin/text/MatchResult.getValue:()Ljava/lang/String;
      12: areturn

  private static final Vector3d main$part2$sideOf(Vector2d);
    Code:
       0: aload_0
       1: invokevirtual #228                // Method Vector2d.getX:()I
       4: istore_1
       5: bipush        50
       7: iload_1
       8: if_icmpgt     25
      11: iload_1
      12: bipush        100
      14: if_icmpge     21
      17: iconst_1
      18: goto          26
      21: iconst_0
      22: goto          26
      25: iconst_0
      26: ifeq          64
      29: aload_0
      30: invokevirtual #222                // Method Vector2d.getY:()I
      33: istore_1
      34: iconst_0
      35: iload_1
      36: if_icmpgt     53
      39: iload_1
      40: bipush        50
      42: if_icmpge     49
      45: iconst_1
      46: goto          54
      49: iconst_0
      50: goto          54
      53: iconst_0
      54: ifeq          64
      57: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
      60: invokevirtual #322                // Method Vector3d$Companion.getFRONT:()LVector3d;
      63: areturn
      64: aload_0
      65: invokevirtual #228                // Method Vector2d.getX:()I
      68: istore_1
      69: bipush        100
      71: iload_1
      72: if_icmpgt     90
      75: iload_1
      76: sipush        150
      79: if_icmpge     86
      82: iconst_1
      83: goto          91
      86: iconst_0
      87: goto          91
      90: iconst_0
      91: ifeq          129
      94: aload_0
      95: invokevirtual #222                // Method Vector2d.getY:()I
      98: istore_1
      99: iconst_0
     100: iload_1
     101: if_icmpgt     118
     104: iload_1
     105: bipush        50
     107: if_icmpge     114
     110: iconst_1
     111: goto          119
     114: iconst_0
     115: goto          119
     118: iconst_0
     119: ifeq          129
     122: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     125: invokevirtual #324                // Method Vector3d$Companion.getRIGHT:()LVector3d;
     128: areturn
     129: aload_0
     130: invokevirtual #228                // Method Vector2d.getX:()I
     133: istore_1
     134: bipush        50
     136: iload_1
     137: if_icmpgt     154
     140: iload_1
     141: bipush        100
     143: if_icmpge     150
     146: iconst_1
     147: goto          155
     150: iconst_0
     151: goto          155
     154: iconst_0
     155: ifeq          194
     158: aload_0
     159: invokevirtual #222                // Method Vector2d.getY:()I
     162: istore_1
     163: bipush        50
     165: iload_1
     166: if_icmpgt     183
     169: iload_1
     170: bipush        100
     172: if_icmpge     179
     175: iconst_1
     176: goto          184
     179: iconst_0
     180: goto          184
     183: iconst_0
     184: ifeq          194
     187: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     190: invokevirtual #326                // Method Vector3d$Companion.getDOWN:()LVector3d;
     193: areturn
     194: aload_0
     195: invokevirtual #228                // Method Vector2d.getX:()I
     198: istore_1
     199: bipush        50
     201: iload_1
     202: if_icmpgt     219
     205: iload_1
     206: bipush        100
     208: if_icmpge     215
     211: iconst_1
     212: goto          220
     215: iconst_0
     216: goto          220
     219: iconst_0
     220: ifeq          260
     223: aload_0
     224: invokevirtual #222                // Method Vector2d.getY:()I
     227: istore_1
     228: bipush        100
     230: iload_1
     231: if_icmpgt     249
     234: iload_1
     235: sipush        150
     238: if_icmpge     245
     241: iconst_1
     242: goto          250
     245: iconst_0
     246: goto          250
     249: iconst_0
     250: ifeq          260
     253: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     256: invokevirtual #329                // Method Vector3d$Companion.getBACK:()LVector3d;
     259: areturn
     260: aload_0
     261: invokevirtual #228                // Method Vector2d.getX:()I
     264: istore_1
     265: iconst_0
     266: iload_1
     267: if_icmpgt     284
     270: iload_1
     271: bipush        50
     273: if_icmpge     280
     276: iconst_1
     277: goto          285
     280: iconst_0
     281: goto          285
     284: iconst_0
     285: ifeq          325
     288: aload_0
     289: invokevirtual #222                // Method Vector2d.getY:()I
     292: istore_1
     293: bipush        100
     295: iload_1
     296: if_icmpgt     314
     299: iload_1
     300: sipush        150
     303: if_icmpge     310
     306: iconst_1
     307: goto          315
     310: iconst_0
     311: goto          315
     314: iconst_0
     315: ifeq          325
     318: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     321: invokevirtual #331                // Method Vector3d$Companion.getLEFT:()LVector3d;
     324: areturn
     325: aload_0
     326: invokevirtual #228                // Method Vector2d.getX:()I
     329: istore_1
     330: iconst_0
     331: iload_1
     332: if_icmpgt     349
     335: iload_1
     336: bipush        50
     338: if_icmpge     345
     341: iconst_1
     342: goto          350
     345: iconst_0
     346: goto          350
     349: iconst_0
     350: ifeq          391
     353: aload_0
     354: invokevirtual #222                // Method Vector2d.getY:()I
     357: istore_1
     358: sipush        150
     361: iload_1
     362: if_icmpgt     380
     365: iload_1
     366: sipush        200
     369: if_icmpge     376
     372: iconst_1
     373: goto          381
     376: iconst_0
     377: goto          381
     380: iconst_0
     381: ifeq          391
     384: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     387: invokevirtual #333                // Method Vector3d$Companion.getUP:()LVector3d;
     390: areturn
     391: new           #335                // class java/lang/Exception
     394: dup
     395: new           #337                // class java/lang/StringBuilder
     398: dup
     399: invokespecial #338                // Method java/lang/StringBuilder."<init>":()V
     402: ldc_w         #340                // String Side does not exist for
     405: invokevirtual #344                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     408: aload_0
     409: invokevirtual #347                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     412: invokevirtual #350                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     415: invokespecial #351                // Method java/lang/Exception."<init>":(Ljava/lang/String;)V
     418: athrow

  private static final kotlin.Pair<Vector2d, Vector2d> main$part2$cubeWraVector2d(Vector2d, Vector2d);
    Code:
       0: aload_0
       1: new           #16                 // class Vector2d
       4: dup
       5: iconst_1
       6: iconst_1
       7: invokespecial #174                // Method Vector2d."<init>":(II)V
      10: invokevirtual #257                // Method Vector2d.minus:(LVector2d;)LVector2d;
      13: astore_2
      14: aload_1
      15: astore_3
      16: aload_2
      17: invokestatic  #357                // Method main$part2$sideOf:(LVector2d;)LVector3d;
      20: astore        4
      22: aload_2
      23: astore        5
      25: aload         4
      27: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
      30: invokevirtual #322                // Method Vector3d$Companion.getFRONT:()LVector3d;
      33: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      36: ifeq          83
      39: aload_1
      40: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      43: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
      46: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      49: ifeq          83
      52: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
      55: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
      58: astore_3
      59: new           #16                 // class Vector2d
      62: dup
      63: iconst_0
      64: sipush        150
      67: aload_2
      68: invokevirtual #228                // Method Vector2d.getX:()I
      71: iadd
      72: bipush        50
      74: isub
      75: invokespecial #174                // Method Vector2d."<init>":(II)V
      78: astore        5
      80: goto          833
      83: aload         4
      85: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
      88: invokevirtual #322                // Method Vector3d$Companion.getFRONT:()LVector3d;
      91: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      94: ifeq          142
      97: aload_1
      98: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     101: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     104: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     107: ifeq          142
     110: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     113: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     116: astore_3
     117: new           #16                 // class Vector2d
     120: dup
     121: iconst_0
     122: bipush        100
     124: bipush        50
     126: aload_2
     127: invokevirtual #222                // Method Vector2d.getY:()I
     130: isub
     131: iconst_1
     132: isub
     133: iadd
     134: invokespecial #174                // Method Vector2d."<init>":(II)V
     137: astore        5
     139: goto          833
     142: aload         4
     144: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     147: invokevirtual #324                // Method Vector3d$Companion.getRIGHT:()LVector3d;
     150: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     153: ifeq          198
     156: aload_1
     157: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     160: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
     163: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     166: ifeq          198
     169: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     172: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
     175: astore_3
     176: new           #16                 // class Vector2d
     179: dup
     180: aload_2
     181: invokevirtual #228                // Method Vector2d.getX:()I
     184: bipush        100
     186: isub
     187: sipush        199
     190: invokespecial #174                // Method Vector2d."<init>":(II)V
     193: astore        5
     195: goto          833
     198: aload         4
     200: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     203: invokevirtual #324                // Method Vector3d$Companion.getRIGHT:()LVector3d;
     206: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     209: ifeq          258
     212: aload_1
     213: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     216: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     219: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     222: ifeq          258
     225: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     228: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     231: astore_3
     232: new           #16                 // class Vector2d
     235: dup
     236: bipush        99
     238: bipush        50
     240: aload_2
     241: invokevirtual #222                // Method Vector2d.getY:()I
     244: isub
     245: bipush        100
     247: iadd
     248: iconst_1
     249: isub
     250: invokespecial #174                // Method Vector2d."<init>":(II)V
     253: astore        5
     255: goto          833
     258: aload         4
     260: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     263: invokevirtual #324                // Method Vector3d$Companion.getRIGHT:()LVector3d;
     266: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     269: ifeq          316
     272: aload_1
     273: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     276: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
     279: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     282: ifeq          316
     285: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     288: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     291: astore_3
     292: new           #16                 // class Vector2d
     295: dup
     296: bipush        99
     298: bipush        50
     300: aload_2
     301: invokevirtual #228                // Method Vector2d.getX:()I
     304: bipush        100
     306: isub
     307: iadd
     308: invokespecial #174                // Method Vector2d."<init>":(II)V
     311: astore        5
     313: goto          833
     316: aload         4
     318: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     321: invokevirtual #326                // Method Vector3d$Companion.getDOWN:()LVector3d;
     324: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     327: ifeq          374
     330: aload_1
     331: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     334: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     337: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     340: ifeq          374
     343: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     346: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
     349: astore_3
     350: new           #16                 // class Vector2d
     353: dup
     354: aload_2
     355: invokevirtual #222                // Method Vector2d.getY:()I
     358: bipush        50
     360: isub
     361: bipush        100
     363: iadd
     364: bipush        49
     366: invokespecial #174                // Method Vector2d."<init>":(II)V
     369: astore        5
     371: goto          833
     374: aload         4
     376: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     379: invokevirtual #326                // Method Vector3d$Companion.getDOWN:()LVector3d;
     382: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     385: ifeq          429
     388: aload_1
     389: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     392: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     395: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     398: ifeq          429
     401: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     404: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
     407: astore_3
     408: new           #16                 // class Vector2d
     411: dup
     412: aload_2
     413: invokevirtual #222                // Method Vector2d.getY:()I
     416: bipush        50
     418: isub
     419: bipush        100
     421: invokespecial #174                // Method Vector2d."<init>":(II)V
     424: astore        5
     426: goto          833
     429: aload         4
     431: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     434: invokevirtual #331                // Method Vector3d$Companion.getLEFT:()LVector3d;
     437: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     440: ifeq          489
     443: aload_1
     444: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     447: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     450: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     453: ifeq          489
     456: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     459: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     462: astore_3
     463: new           #16                 // class Vector2d
     466: dup
     467: bipush        50
     469: bipush        50
     471: aload_2
     472: invokevirtual #222                // Method Vector2d.getY:()I
     475: bipush        100
     477: isub
     478: isub
     479: iconst_1
     480: isub
     481: invokespecial #174                // Method Vector2d."<init>":(II)V
     484: astore        5
     486: goto          833
     489: aload         4
     491: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     494: invokevirtual #331                // Method Vector3d$Companion.getLEFT:()LVector3d;
     497: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     500: ifeq          544
     503: aload_1
     504: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     507: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
     510: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     513: ifeq          544
     516: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     519: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     522: astore_3
     523: new           #16                 // class Vector2d
     526: dup
     527: bipush        50
     529: bipush        50
     531: aload_2
     532: invokevirtual #228                // Method Vector2d.getX:()I
     535: iadd
     536: invokespecial #174                // Method Vector2d."<init>":(II)V
     539: astore        5
     541: goto          833
     544: aload         4
     546: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     549: invokevirtual #329                // Method Vector3d$Companion.getBACK:()LVector3d;
     552: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     555: ifeq          603
     558: aload_1
     559: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     562: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
     565: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     568: ifeq          603
     571: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     574: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     577: astore_3
     578: new           #16                 // class Vector2d
     581: dup
     582: bipush        49
     584: sipush        150
     587: aload_2
     588: invokevirtual #228                // Method Vector2d.getX:()I
     591: bipush        50
     593: isub
     594: iadd
     595: invokespecial #174                // Method Vector2d."<init>":(II)V
     598: astore        5
     600: goto          833
     603: aload         4
     605: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     608: invokevirtual #329                // Method Vector3d$Companion.getBACK:()LVector3d;
     611: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     614: ifeq          664
     617: aload_1
     618: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     621: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     624: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     627: ifeq          664
     630: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     633: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     636: astore_3
     637: new           #16                 // class Vector2d
     640: dup
     641: sipush        149
     644: bipush        50
     646: aload_2
     647: invokevirtual #222                // Method Vector2d.getY:()I
     650: bipush        100
     652: isub
     653: isub
     654: iconst_1
     655: isub
     656: invokespecial #174                // Method Vector2d."<init>":(II)V
     659: astore        5
     661: goto          833
     664: aload         4
     666: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     669: invokevirtual #333                // Method Vector3d$Companion.getUP:()LVector3d;
     672: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     675: ifeq          724
     678: aload_1
     679: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     682: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     685: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     688: ifeq          724
     691: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     694: invokevirtual #35                 // Method Vector2d$Companion.getUP:()LVector2d;
     697: astore_3
     698: new           #16                 // class Vector2d
     701: dup
     702: aload_2
     703: invokevirtual #222                // Method Vector2d.getY:()I
     706: sipush        150
     709: isub
     710: bipush        50
     712: iadd
     713: sipush        149
     716: invokespecial #174                // Method Vector2d."<init>":(II)V
     719: astore        5
     721: goto          833
     724: aload         4
     726: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     729: invokevirtual #333                // Method Vector3d$Companion.getUP:()LVector3d;
     732: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     735: ifeq          782
     738: aload_1
     739: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     742: invokevirtual #32                 // Method Vector2d$Companion.getLEFT:()LVector2d;
     745: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     748: ifeq          782
     751: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     754: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
     757: astore_3
     758: new           #16                 // class Vector2d
     761: dup
     762: bipush        50
     764: aload_2
     765: invokevirtual #222                // Method Vector2d.getY:()I
     768: sipush        150
     771: isub
     772: iadd
     773: iconst_0
     774: invokespecial #174                // Method Vector2d."<init>":(II)V
     777: astore        5
     779: goto          833
     782: aload         4
     784: getstatic     #316                // Field Vector3d.Companion:LVector3d$Companion;
     787: invokevirtual #333                // Method Vector3d$Companion.getUP:()LVector3d;
     790: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     793: ifeq          833
     796: aload_1
     797: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     800: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
     803: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     806: ifeq          833
     809: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     812: invokevirtual #29                 // Method Vector2d$Companion.getDOWN:()LVector2d;
     815: astore_3
     816: new           #16                 // class Vector2d
     819: dup
     820: aload_2
     821: invokevirtual #228                // Method Vector2d.getX:()I
     824: bipush        100
     826: iadd
     827: iconst_0
     828: invokespecial #174                // Method Vector2d."<init>":(II)V
     831: astore        5
     833: new           #199                // class kotlin/Pair
     836: dup
     837: aload         5
     839: new           #16                 // class Vector2d
     842: dup
     843: iconst_1
     844: iconst_1
     845: invokespecial #174                // Method Vector2d."<init>":(II)V
     848: invokevirtual #251                // Method Vector2d.plus:(LVector2d;)LVector2d;
     851: aload_3
     852: invokespecial #360                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     855: areturn

  private static final int main$part2(kotlin.text.Regex, Vector2d[], Vector2d[], java.util.List<java.lang.String>);
    Code:
       0: aload_3
       1: invokeinterface #371,  1          // InterfaceMethod java/util/List.size:()I
       6: bipush        20
       8: if_icmpge     15
      11: sipush        5031
      14: ireturn
      15: aload_0
      16: aload_3
      17: invokestatic  #93                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      20: checkcast     #95                 // class java/lang/CharSequence
      23: iconst_0
      24: iconst_2
      25: aconst_null
      26: invokestatic  #99                 // Method kotlin/text/Regex.findAll$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/sequences/Sequence;
      29: invokedynamic #375,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function1;
      34: invokestatic  #122                // Method kotlin/sequences/SequencesKt.map:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      37: invokestatic  #126                // Method kotlin/sequences/SequencesKt.toList:(Lkotlin/sequences/Sequence;)Ljava/util/List;
      40: astore        4
      42: aload_3
      43: iconst_2
      44: invokestatic  #130                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      47: checkcast     #132                // class java/lang/Iterable
      50: astore        6
      52: iconst_0
      53: istore        7
      55: aload         6
      57: astore        8
      59: new           #134                // class java/util/ArrayList
      62: dup
      63: aload         6
      65: bipush        10
      67: invokestatic  #138                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      70: invokespecial #141                // Method java/util/ArrayList."<init>":(I)V
      73: checkcast     #143                // class java/util/Collection
      76: astore        9
      78: iconst_0
      79: istore        10
      81: iconst_0
      82: istore        11
      84: aload         8
      86: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      91: astore        12
      93: aload         12
      95: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     100: ifeq          284
     103: aload         12
     105: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     110: astore        13
     112: aload         9
     114: iload         11
     116: iinc          11, 1
     119: istore        14
     121: iload         14
     123: ifge          129
     126: invokestatic  #160                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     129: iload         14
     131: aload         13
     133: checkcast     #162                // class java/lang/String
     136: astore        15
     138: istore        16
     140: astore        31
     142: iconst_0
     143: istore        17
     145: aload         15
     147: invokevirtual #166                // Method java/lang/String.toCharArray:()[C
     150: dup
     151: ldc           #168                // String toCharArray(...)
     153: invokestatic  #171                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     156: astore        18
     158: nop
     159: iconst_0
     160: istore        19
     162: aload         18
     164: astore        20
     166: new           #134                // class java/util/ArrayList
     169: dup
     170: aload         18
     172: arraylength
     173: invokespecial #141                // Method java/util/ArrayList."<init>":(I)V
     176: checkcast     #143                // class java/util/Collection
     179: astore        21
     181: iconst_0
     182: istore        22
     184: iconst_0
     185: istore        23
     187: iconst_0
     188: istore        24
     190: aload         20
     192: arraylength
     193: istore        25
     195: iload         24
     197: iload         25
     199: if_icmpge     265
     202: aload         20
     204: iload         24
     206: caload
     207: istore        26
     209: aload         21
     211: iload         23
     213: iinc          23, 1
     216: iload         26
     218: istore        27
     220: istore        28
     222: astore        29
     224: iconst_0
     225: istore        30
     227: new           #16                 // class Vector2d
     230: dup
     231: iload         28
     233: iconst_1
     234: iadd
     235: iload         16
     237: iconst_1
     238: iadd
     239: invokespecial #174                // Method Vector2d."<init>":(II)V
     242: iload         27
     244: invokestatic  #179                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     247: invokestatic  #185                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     250: aload         29
     252: swap
     253: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     258: pop
     259: iinc          24, 1
     262: goto          195
     265: aload         21
     267: checkcast     #191                // class java/util/List
     270: nop
     271: nop
     272: aload         31
     274: swap
     275: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     280: pop
     281: goto          93
     284: aload         9
     286: checkcast     #191                // class java/util/List
     289: nop
     290: checkcast     #132                // class java/lang/Iterable
     293: invokestatic  #195                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
     296: checkcast     #132                // class java/lang/Iterable
     299: astore        6
     301: iconst_0
     302: istore        7
     304: aload         6
     306: astore        8
     308: new           #134                // class java/util/ArrayList
     311: dup
     312: invokespecial #197                // Method java/util/ArrayList."<init>":()V
     315: checkcast     #143                // class java/util/Collection
     318: astore        9
     320: iconst_0
     321: istore        10
     323: aload         8
     325: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     330: astore        11
     332: aload         11
     334: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     339: ifeq          402
     342: aload         11
     344: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     349: astore        12
     351: aload         12
     353: checkcast     #199                // class kotlin/Pair
     356: astore        13
     358: iconst_0
     359: istore        14
     361: aload         13
     363: invokevirtual #202                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     366: checkcast     #176                // class java/lang/Character
     369: invokevirtual #206                // Method java/lang/Character.charValue:()C
     372: istore        15
     374: iload         15
     376: bipush        32
     378: if_icmpeq     385
     381: iconst_1
     382: goto          386
     385: iconst_0
     386: ifeq          332
     389: aload         9
     391: aload         12
     393: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     398: pop
     399: goto          332
     402: aload         9
     404: checkcast     #191                // class java/util/List
     407: nop
     408: checkcast     #132                // class java/lang/Iterable
     411: invokestatic  #212                // Method kotlin/collections/MapsKt.toMap:(Ljava/lang/Iterable;)Ljava/util/Map;
     414: astore        5
     416: aconst_null
     417: astore        6
     419: aload         5
     421: invokeinterface #218,  1          // InterfaceMethod java/util/Map.keySet:()Ljava/util/Set;
     426: checkcast     #132                // class java/lang/Iterable
     429: astore        7
     431: iconst_0
     432: istore        8
     434: aload         7
     436: astore        9
     438: new           #134                // class java/util/ArrayList
     441: dup
     442: invokespecial #197                // Method java/util/ArrayList."<init>":()V
     445: checkcast     #143                // class java/util/Collection
     448: astore        10
     450: iconst_0
     451: istore        11
     453: aload         9
     455: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     460: astore        12
     462: aload         12
     464: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     469: ifeq          521
     472: aload         12
     474: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     479: astore        13
     481: aload         13
     483: checkcast     #16                 // class Vector2d
     486: astore        14
     488: iconst_0
     489: istore        15
     491: aload         14
     493: invokevirtual #222                // Method Vector2d.getY:()I
     496: iconst_1
     497: if_icmpne     504
     500: iconst_1
     501: goto          505
     504: iconst_0
     505: ifeq          462
     508: aload         10
     510: aload         13
     512: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     517: pop
     518: goto          462
     521: aload         10
     523: checkcast     #191                // class java/util/List
     526: nop
     527: checkcast     #132                // class java/lang/Iterable
     530: astore        7
     532: nop
     533: iconst_0
     534: istore        8
     536: aload         7
     538: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     543: astore        9
     545: aload         9
     547: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     552: ifne          563
     555: new           #224                // class java/util/NoSuchElementException
     558: dup
     559: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
     562: athrow
     563: aload         9
     565: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     570: astore        10
     572: aload         9
     574: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     579: ifne          587
     582: aload         10
     584: goto          657
     587: aload         10
     589: checkcast     #16                 // class Vector2d
     592: astore        11
     594: iconst_0
     595: istore        12
     597: aload         11
     599: invokevirtual #228                // Method Vector2d.getX:()I
     602: istore        11
     604: aload         9
     606: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     611: astore        12
     613: aload         12
     615: checkcast     #16                 // class Vector2d
     618: astore        13
     620: iconst_0
     621: istore        14
     623: aload         13
     625: invokevirtual #228                // Method Vector2d.getX:()I
     628: istore        13
     630: iload         11
     632: iload         13
     634: if_icmple     645
     637: aload         12
     639: astore        10
     641: iload         13
     643: istore        11
     645: aload         9
     647: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     652: ifne          604
     655: aload         10
     657: astore        6
     659: aconst_null
     660: astore        7
     662: getstatic     #20                 // Field Vector2d.Companion:LVector2d$Companion;
     665: invokevirtual #26                 // Method Vector2d$Companion.getRIGHT:()LVector2d;
     668: astore        7
     670: aload_3
     671: iconst_2
     672: invokestatic  #130                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
     675: invokeinterface #371,  1          // InterfaceMethod java/util/List.size:()I
     680: aload_3
     681: iconst_2
     682: invokestatic  #130                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
     685: checkcast     #132                // class java/lang/Iterable
     688: astore        9
     690: istore        31
     692: aload         9
     694: invokeinterface #147,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     699: astore        10
     701: aload         10
     703: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     708: ifne          719
     711: new           #224                // class java/util/NoSuchElementException
     714: dup
     715: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
     718: athrow
     719: aload         10
     721: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     726: checkcast     #162                // class java/lang/String
     729: astore        11
     731: iconst_0
     732: istore        12
     734: aload         11
     736: invokevirtual #378                // Method java/lang/String.length:()I
     739: istore        11
     741: aload         10
     743: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     748: ifeq          787
     751: aload         10
     753: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     758: checkcast     #162                // class java/lang/String
     761: astore        12
     763: iconst_0
     764: istore        13
     766: aload         12
     768: invokevirtual #378                // Method java/lang/String.length:()I
     771: istore        12
     773: iload         11
     775: iload         12
     777: if_icmpge     741
     780: iload         12
     782: istore        11
     784: goto          741
     787: iload         11
     789: istore        32
     791: iload         31
     793: iload         32
     795: invokestatic  #382                // Method UtilsKt.gcd:(II)I
     798: istore        8
     800: aload         4
     802: invokeinterface #229,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     807: astore        9
     809: aload         9
     811: invokeinterface #153,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     816: ifeq          1033
     819: aload         9
     821: invokeinterface #157,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     826: checkcast     #162                // class java/lang/String
     829: astore        10
     831: aload         10
     833: astore        11
     835: aload         11
     837: ldc           #231                // String L
     839: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     842: ifeq          863
     845: aload_1
     846: aload_1
     847: aload         7
     849: invokestatic  #241                // Method kotlin/collections/ArraysKt.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
     852: iconst_1
     853: iadd
     854: aload_1
     855: arraylength
     856: irem
     857: aaload
     858: astore        7
     860: goto          809
     863: aload         11
     865: ldc           #243                // String R
     867: invokestatic  #235                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     870: ifeq          891
     873: aload_2
     874: aload_2
     875: aload         7
     877: invokestatic  #241                // Method kotlin/collections/ArraysKt.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
     880: iconst_1
     881: iadd
     882: aload_2
     883: arraylength
     884: irem
     885: aaload
     886: astore        7
     888: goto          809
     891: aload         10
     893: invokestatic  #247                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     896: istore        12
     898: iconst_0
     899: istore        13
     901: iload         13
     903: iload         12
     905: if_icmpge     809
     908: iload         13
     910: istore        14
     912: iconst_0
     913: istore        15
     915: aload         6
     917: checkcast     #16                 // class Vector2d
     920: aload         7
     922: invokevirtual #251                // Method Vector2d.plus:(LVector2d;)LVector2d;
     925: astore        16
     927: aload         7
     929: astore        17
     931: aload         5
     933: aload         16
     935: invokeinterface #254,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     940: ifne          983
     943: aload         6
     945: checkcast     #16                 // class Vector2d
     948: aload         7
     950: invokestatic  #384                // Method main$part2$cubeWraVector2d:(LVector2d;LVector2d;)Lkotlin/Pair;
     953: astore        18
     955: aload         18
     957: invokevirtual #387                // Method kotlin/Pair.component1:()Ljava/lang/Object;
     960: checkcast     #16                 // class Vector2d
     963: astore        19
     965: aload         18
     967: invokevirtual #202                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     970: checkcast     #16                 // class Vector2d
     973: astore        20
     975: aload         19
     977: astore        16
     979: aload         20
     981: astore        17
     983: aload         5
     985: aload         16
     987: invokeinterface #260,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     992: checkcast     #176                // class java/lang/Character
     995: bipush        35
     997: istore        18
     999: dup
    1000: ifnonnull     1007
    1003: pop
    1004: goto          1018
    1007: invokevirtual #206                // Method java/lang/Character.charValue:()C
    1010: iload         18
    1012: if_icmpne     1018
    1015: goto          1027
    1018: aload         16
    1020: astore        6
    1022: aload         17
    1024: astore        7
    1026: nop
    1027: iinc          13, 1
    1030: goto          901
    1033: new           #337                // class java/lang/StringBuilder
    1036: dup
    1037: invokespecial #338                // Method java/lang/StringBuilder."<init>":()V
    1040: ldc_w         #389                // String Final position is
    1043: invokevirtual #344                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1046: aload         6
    1048: invokevirtual #347                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    1051: ldc_w         #391                // String , direction
    1054: invokevirtual #344                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1057: aload         7
    1059: invokevirtual #347                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    1062: ldc_w         #393                // String  (
    1065: invokevirtual #344                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1068: aload_2
    1069: aload         7
    1071: invokestatic  #241                // Method kotlin/collections/ArraysKt.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
    1074: invokevirtual #396                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1077: bipush        41
    1079: invokevirtual #399                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    1082: invokevirtual #350                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1085: getstatic     #405                // Field java/lang/System.out:Ljava/io/PrintStream;
    1088: swap
    1089: invokevirtual #411                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1092: sipush        1000
    1095: aload         6
    1097: checkcast     #16                 // class Vector2d
    1100: invokevirtual #222                // Method Vector2d.getY:()I
    1103: imul
    1104: iconst_4
    1105: aload         6
    1107: checkcast     #16                 // class Vector2d
    1110: invokevirtual #228                // Method Vector2d.getX:()I
    1113: imul
    1114: iadd
    1115: aload_2
    1116: aload         7
    1118: invokestatic  #241                // Method kotlin/collections/ArraysKt.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
    1121: iadd
    1122: ireturn

  public static final int access$main$part1(kotlin.text.Regex, Vector2d[], Vector2d[], java.util.List);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: aload_3
       4: invokestatic  #423                // Method main$part1:(Lkotlin/text/Regex;[LVector2d;[LVector2d;Ljava/util/List;)I
       7: ireturn

  public static final int access$main$part2(kotlin.text.Regex, Vector2d[], Vector2d[], java.util.List);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: aload_3
       4: invokestatic  #426                // Method main$part2:(Lkotlin/text/Regex;[LVector2d;[LVector2d;Ljava/util/List;)I
       7: ireturn
}

Compiled from "Day22.kt"
final class Day22Kt$main$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function1<java.util.List<? extends java.lang.String>, java.lang.Integer> {
  final kotlin.text.Regex $instructionLineRegex;

  final Vector2d[] $leftTurns;

  final Vector2d[] $rightTurns;

  Day22Kt$main$1(kotlin.text.Regex, Vector2d[], Vector2d[]);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #13                 // Field $instructionLineRegex:Lkotlin/text/Regex;
       5: aload_0
       6: aload_2
       7: putfield      #17                 // Field $leftTurns:[LVector2d;
      10: aload_0
      11: aload_3
      12: putfield      #20                 // Field $rightTurns:[LVector2d;
      15: aload_0
      16: iconst_1
      17: ldc           #22                 // class kotlin/jvm/internal/Intrinsics$Kotlin
      19: ldc           #24                 // String part1
      21: ldc           #26                 // String main$part1(Lkotlin/text/Regex;[LVector2d;[LVector2d;Ljava/util/List;)I
      23: iconst_0
      24: invokespecial #29                 // 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           #36                 // String p0
       3: invokestatic  #42                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #13                 // Field $instructionLineRegex:Lkotlin/text/Regex;
      10: aload_0
      11: getfield      #17                 // Field $leftTurns:[LVector2d;
      14: aload_0
      15: getfield      #20                 // Field $rightTurns:[LVector2d;
      18: aload_1
      19: invokestatic  #48                 // Method Day22Kt.access$main$part1:(Lkotlin/text/Regex;[LVector2d;[LVector2d;Ljava/util/List;)I
      22: invokestatic  #54                 // 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     #58                 // class java/util/List
       5: invokevirtual #60                 // Method invoke:(Ljava/util/List;)Ljava/lang/Integer;
       8: areturn
}

Compiled from "Day22.kt"
final class Day22Kt$main$2 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function1<java.util.List<? extends java.lang.String>, java.lang.Integer> {
  final kotlin.text.Regex $instructionLineRegex;

  final Vector2d[] $leftTurns;

  final Vector2d[] $rightTurns;

  Day22Kt$main$2(kotlin.text.Regex, Vector2d[], Vector2d[]);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #13                 // Field $instructionLineRegex:Lkotlin/text/Regex;
       5: aload_0
       6: aload_2
       7: putfield      #17                 // Field $leftTurns:[LVector2d;
      10: aload_0
      11: aload_3
      12: putfield      #20                 // Field $rightTurns:[LVector2d;
      15: aload_0
      16: iconst_1
      17: ldc           #22                 // class kotlin/jvm/internal/Intrinsics$Kotlin
      19: ldc           #24                 // String part2
      21: ldc           #26                 // String main$part2(Lkotlin/text/Regex;[LVector2d;[LVector2d;Ljava/util/List;)I
      23: iconst_0
      24: invokespecial #29                 // 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           #36                 // String p0
       3: invokestatic  #42                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #13                 // Field $instructionLineRegex:Lkotlin/text/Regex;
      10: aload_0
      11: getfield      #17                 // Field $leftTurns:[LVector2d;
      14: aload_0
      15: getfield      #20                 // Field $rightTurns:[LVector2d;
      18: aload_1
      19: invokestatic  #48                 // Method Day22Kt.access$main$part2:(Lkotlin/text/Regex;[LVector2d;[LVector2d;Ljava/util/List;)I
      22: invokestatic  #54                 // 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     #58                 // class java/util/List
       5: invokevirtual #60                 // Method invoke:(Ljava/util/List;)Ljava/lang/Integer;
       8: areturn
}