fun main() {
    val d = Day22(readInput("inputs/Day22"))
    println(d.part1())
    println(d.part2())
}

class Day22(input: List<String>) {

    private val blockedPlaces: Set<Point> = parseBlockedPlaces(input)
    private val instructions: List<Instruction> = Instruction.ofList(input)

    fun part1(): Int =
        followInstructions(CubeFacing(1)).score()

    fun part2(): Int =
        followInstructions(CubeFacing(11)).score()

    private fun followInstructions(startingCube: CubeFacing): Orientation {
        var cube = startingCube
        var orientation = Orientation(cube.topLeft, Facing.East)

        instructions.forEach { instruction ->
            when (instruction) {
                is Left -> orientation = orientation.copy(facing = orientation.facing.left)
                is Right -> orientation = orientation.copy(facing = orientation.facing.right)
                is Move -> {
                    var keepMoving = true
                    repeat(instruction.steps) {
                        if (keepMoving) {
                            var nextOrientation = orientation.move()
                            var nextCube = cube

                            if (nextOrientation.location !in cube) {
                                with(cube.transition(orientation.facing)) {
                                    nextOrientation = Orientation(move(orientation.location), enter)
                                    nextCube = destination
                                }
                            }
                            if (nextOrientation.location in blockedPlaces) {
                                keepMoving = false
                            } else {
                                orientation = nextOrientation
                                cube = nextCube
                            }
                        }
                    }
                }
            }
        }
        return orientation
    }

    private fun parseBlockedPlaces(input: List<String>): Set<Point> =
        input
            .takeWhile { it.isNotBlank() }
            .flatMapIndexed { y, row ->
                row.mapIndexedNotNull { x, c ->
                    if (c == '#') Point(x, y) else null
                }
            }.toSet()

    private data class Orientation(val location: Point, val facing: Facing) {
        fun score(): Int =
            (1000 * (location.y + 1)) + (4 * (location.x + 1)) + facing.points

        fun move(): Orientation =
            copy(location = location + facing.offset)
    }

    private sealed class Instruction {
        companion object {
            fun ofList(input: List<String>): List<Instruction> =
                input
                    .dropWhile { it.isNotBlank() }
                    .drop(1)
                    .first()
                    .trim()
                    .let { """\d+|[LR]""".toRegex().findAll(it) }
                    .map { it.value }
                    .filter { it.isNotBlank() }
                    .map { symbol ->
                        when (symbol) {
                            "L" -> Left
                            "R" -> Right
                            else -> Move(symbol.toInt())
                        }
                    }.toList()
        }
    }

    private class Move(val steps: Int) : Instruction()
    private object Left : Instruction()
    private object Right : Instruction()

    sealed class Facing(val points: Int, val offset: Point) {
        abstract val left: Facing
        abstract val right: Facing

        object North : Facing(3, Point(0, -1)) {
            override val left = West
            override val right = East
        }

        object East : Facing(0, Point(1, 0)) {
            override val left = North
            override val right = South
        }

        object South : Facing(1, Point(0, 1)) {
            override val left = East
            override val right = West
        }

        object West : Facing(2, Point(-1, 0)) {
            override val left = South
            override val right = North
        }
    }

    class CubeFacing(
        val id: Int,
        val size: Int,
        val topLeft: Point,
        val north: Transition,
        val east: Transition,
        val south: Transition,
        val west: Transition
    ) {
        val minX: Int = topLeft.x
        val maxX: Int = topLeft.x + size - 1
        val minY: Int = topLeft.y
        val maxY: Int = topLeft.y + size - 1

        operator fun contains(place: Point): Boolean =
            place.x in (minX..maxX) && place.y in (minY..maxY)

        fun scaleDown(point: Point): Point =
            point - topLeft

        fun scaleUp(point: Point): Point =
            point + topLeft

        fun transition(direction: Facing): Transition =
            when (direction) {
                Facing.North -> north
                Facing.East -> east
                Facing.South -> south
                Facing.West -> west
            }

        companion object {
            private val instances = mutableMapOf<Int, CubeFacing>()

            operator fun invoke(id: Int): CubeFacing =
                instances.getValue(id)

            private operator fun plus(instance: CubeFacing) {
                instances[instance.id] = instance
            }

            init {
                CubeFacing + CubeFacing(
                    id = 1,
                    size = 50,
                    topLeft = Point(50, 0),
                    north = Transition(1, 5, Facing.North, Facing.North),
                    east = Transition(1, 2, Facing.East, Facing.East),
                    south = Transition(1, 3, Facing.South, Facing.South),
                    west = Transition(1, 2, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 2,
                    size = 50,
                    topLeft = Point(100, 0),
                    north = Transition(2, 2, Facing.North, Facing.North),
                    east = Transition(2, 1, Facing.East, Facing.East),
                    south = Transition(2, 2, Facing.South, Facing.South),
                    west = Transition(2, 1, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 3,
                    size = 50,
                    topLeft = Point(50, 50),
                    north = Transition(3, 1, Facing.North, Facing.North),
                    east = Transition(3, 3, Facing.East, Facing.East),
                    south = Transition(3, 5, Facing.South, Facing.South),
                    west = Transition(3, 3, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 4,
                    size = 50,
                    topLeft = Point(0, 100),
                    north = Transition(4, 6, Facing.North, Facing.North),
                    east = Transition(4, 5, Facing.East, Facing.East),
                    south = Transition(4, 6, Facing.South, Facing.South),
                    west = Transition(4, 5, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 5,
                    size = 50,
                    topLeft = Point(50, 100),
                    north = Transition(5, 3, Facing.North, Facing.North),
                    east = Transition(5, 4, Facing.East, Facing.East),
                    south = Transition(5, 1, Facing.South, Facing.South),
                    west = Transition(5, 4, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 6,
                    size = 50,
                    topLeft = Point(0, 150),
                    north = Transition(6, 4, Facing.North, Facing.North),
                    east = Transition(6, 6, Facing.East, Facing.East),
                    south = Transition(6, 4, Facing.South, Facing.South),
                    west = Transition(6, 6, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 11,
                    size = 50,
                    topLeft = Point(50, 0),
                    north = Transition(11, 16, Facing.North, Facing.East),
                    east = Transition(11, 12, Facing.East, Facing.East),
                    south = Transition(11, 13, Facing.South, Facing.South),
                    west = Transition(11, 14, Facing.West, Facing.East)
                )
                CubeFacing + CubeFacing(
                    id = 12,
                    size = 50,
                    topLeft = Point(100, 0),
                    north = Transition(12, 16, Facing.North, Facing.North),
                    east = Transition(12, 15, Facing.East, Facing.West),
                    south = Transition(12, 13, Facing.South, Facing.West),
                    west = Transition(12, 11, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 13,
                    size = 50,
                    topLeft = Point(50, 50),
                    north = Transition(13, 11, Facing.North, Facing.North),
                    east = Transition(13, 12, Facing.East, Facing.North),
                    south = Transition(13, 15, Facing.South, Facing.South),
                    west = Transition(13, 14, Facing.West, Facing.South)
                )

                CubeFacing + CubeFacing(
                    id = 14,
                    size = 50,
                    topLeft = Point(0, 100),
                    north = Transition(14, 13, Facing.North, Facing.East),
                    east = Transition(14, 15, Facing.East, Facing.East),
                    south = Transition(14, 16, Facing.South, Facing.South),
                    west = Transition(14, 11, Facing.West, Facing.East)
                )

                CubeFacing + CubeFacing(
                    id = 15,
                    size = 50,
                    topLeft = Point(50, 100),
                    north = Transition(15, 13, Facing.North, Facing.North),
                    east = Transition(15, 12, Facing.East, Facing.West),
                    south = Transition(15, 16, Facing.South, Facing.West),
                    west = Transition(15, 14, Facing.West, Facing.West)
                )

                CubeFacing + CubeFacing(
                    id = 16,
                    size = 50,
                    topLeft = Point(0, 150),
                    north = Transition(16, 14, Facing.North, Facing.North),
                    east = Transition(16, 15, Facing.East, Facing.North),
                    south = Transition(16, 12, Facing.South, Facing.South),
                    west = Transition(16, 11, Facing.West, Facing.South)
                )
            }
        }
    }

    data class Transition(val sourceId: Int, val destinationId: Int, val exit: Facing, val enter: Facing) {
        private val byDirection = Pair(exit, enter)
        private val source: CubeFacing by lazy { CubeFacing(sourceId) }
        val destination: CubeFacing by lazy { CubeFacing(destinationId) }

        private fun Point.rescale(): Point =
            destination.scaleUp(source.scaleDown(this))

        private fun Point.flipRescaled(): Point =
            destination.scaleUp(source.scaleDown(this).flip())

        private fun Point.flip(): Point =
            Point(y, x)

        fun move(start: Point): Point = when (byDirection) {
            Pair(Facing.North, Facing.North) -> Point(start.rescale().x, destination.maxY)
            Pair(Facing.East, Facing.East) -> Point(destination.minX, start.rescale().y)
            Pair(Facing.West, Facing.West) -> Point(destination.maxX, start.rescale().y)
            Pair(Facing.South, Facing.South) -> Point(start.rescale().x, destination.minY)

            Pair(Facing.North, Facing.East) -> Point(destination.minX, start.flipRescaled().y)
            Pair(Facing.East, Facing.North) -> Point(start.flipRescaled().x, destination.maxY)
            Pair(Facing.East, Facing.West) -> Point(destination.maxX, destination.maxY - source.scaleDown(start).y)
            Pair(Facing.West, Facing.East) -> Point(destination.minX, destination.maxY - source.scaleDown(start).y)
            Pair(Facing.West, Facing.South) -> Point(start.flipRescaled().x, destination.minY)
            Pair(Facing.South, Facing.West) -> Point(destination.maxX, start.flipRescaled().y)
            else -> throw IllegalStateException("No transition from $exit to $enter")
        }
    }
}

Compiled from "Day22.kt"
public final class Day22Kt {
  public static final void main();
    Code:
       0: new           #8                  // class Day22
       3: dup
       4: ldc           #10                 // String inputs/Day22
       6: invokestatic  #16                 // Method UtilsKt.readInput:(Ljava/lang/String;)Ljava/util/List;
       9: invokespecial #20                 // Method Day22."<init>":(Ljava/util/List;)V
      12: astore_0
      13: aload_0
      14: invokevirtual #24                 // Method Day22.part1:()I
      17: istore_1
      18: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
      21: iload_1
      22: invokevirtual #36                 // Method java/io/PrintStream.println:(I)V
      25: aload_0
      26: invokevirtual #39                 // Method Day22.part2:()I
      29: istore_1
      30: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
      33: iload_1
      34: invokevirtual #36                 // Method java/io/PrintStream.println:(I)V
      37: return

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

Compiled from "Day22.kt"
public final class Day22$Facing$North extends Day22$Facing {
  public static final Day22$Facing$North INSTANCE;

  private static final Day22$Facing$West left;

  private static final Day22$Facing$East right;

  private Day22$Facing$North();
    Code:
       0: aload_0
       1: iconst_3
       2: new           #8                  // class Point
       5: dup
       6: iconst_0
       7: iconst_m1
       8: invokespecial #11                 // Method Point."<init>":(II)V
      11: aconst_null
      12: invokespecial #14                 // Method Day22$Facing."<init>":(ILPoint;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      15: return

  public Day22$Facing$West getLeft();
    Code:
       0: getstatic     #23                 // Field left:LDay22$Facing$West;
       3: areturn

  public Day22$Facing$East getRight();
    Code:
       0: getstatic     #29                 // Field right:LDay22$Facing$East;
       3: areturn

  public Day22$Facing getLeft();
    Code:
       0: aload_0
       1: invokevirtual #32                 // Method getLeft:()LDay22$Facing$West;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  public Day22$Facing getRight();
    Code:
       0: aload_0
       1: invokevirtual #34                 // Method getRight:()LDay22$Facing$East;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  static {};
    Code:
       0: new           #2                  // class Day22$Facing$North
       3: dup
       4: invokespecial #37                 // Method "<init>":()V
       7: putstatic     #40                 // Field INSTANCE:LDay22$Facing$North;
      10: getstatic     #44                 // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
      13: putstatic     #23                 // Field left:LDay22$Facing$West;
      16: getstatic     #48                 // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      19: putstatic     #29                 // Field right:LDay22$Facing$East;
      22: return
}

Compiled from "Day22.kt"
abstract class Day22$Instruction {
  public static final Day22$Instruction$Companion Companion;

  private Day22$Instruction();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public Day22$Instruction(kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: invokespecial #12                 // Method "<init>":()V
       4: return

  static {};
    Code:
       0: new           #17                 // class Day22$Instruction$Companion
       3: dup
       4: aconst_null
       5: invokespecial #19                 // Method Day22$Instruction$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #23                 // Field Companion:LDay22$Instruction$Companion;
      11: return
}

Compiled from "Day22.kt"
final class Day22$Left extends Day22$Instruction {
  public static final Day22$Left INSTANCE;

  private Day22$Left();
    Code:
       0: aload_0
       1: aconst_null
       2: invokespecial #9                  // Method Day22$Instruction."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       5: return

  static {};
    Code:
       0: new           #2                  // class Day22$Left
       3: dup
       4: invokespecial #14                 // Method "<init>":()V
       7: putstatic     #17                 // Field INSTANCE:LDay22$Left;
      10: return
}

Compiled from "Day22.kt"
public final class Day22$Facing$West extends Day22$Facing {
  public static final Day22$Facing$West INSTANCE;

  private static final Day22$Facing$South left;

  private static final Day22$Facing$North right;

  private Day22$Facing$West();
    Code:
       0: aload_0
       1: iconst_2
       2: new           #8                  // class Point
       5: dup
       6: iconst_m1
       7: iconst_0
       8: invokespecial #11                 // Method Point."<init>":(II)V
      11: aconst_null
      12: invokespecial #14                 // Method Day22$Facing."<init>":(ILPoint;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      15: return

  public Day22$Facing$South getLeft();
    Code:
       0: getstatic     #23                 // Field left:LDay22$Facing$South;
       3: areturn

  public Day22$Facing$North getRight();
    Code:
       0: getstatic     #29                 // Field right:LDay22$Facing$North;
       3: areturn

  public Day22$Facing getLeft();
    Code:
       0: aload_0
       1: invokevirtual #32                 // Method getLeft:()LDay22$Facing$South;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  public Day22$Facing getRight();
    Code:
       0: aload_0
       1: invokevirtual #34                 // Method getRight:()LDay22$Facing$North;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  static {};
    Code:
       0: new           #2                  // class Day22$Facing$West
       3: dup
       4: invokespecial #37                 // Method "<init>":()V
       7: putstatic     #40                 // Field INSTANCE:LDay22$Facing$West;
      10: getstatic     #44                 // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
      13: putstatic     #23                 // Field left:LDay22$Facing$South;
      16: getstatic     #48                 // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
      19: putstatic     #29                 // Field right:LDay22$Facing$North;
      22: return
}

Compiled from "Day22.kt"
public final class Day22$Facing$South extends Day22$Facing {
  public static final Day22$Facing$South INSTANCE;

  private static final Day22$Facing$East left;

  private static final Day22$Facing$West right;

  private Day22$Facing$South();
    Code:
       0: aload_0
       1: iconst_1
       2: new           #8                  // class Point
       5: dup
       6: iconst_0
       7: iconst_1
       8: invokespecial #11                 // Method Point."<init>":(II)V
      11: aconst_null
      12: invokespecial #14                 // Method Day22$Facing."<init>":(ILPoint;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      15: return

  public Day22$Facing$East getLeft();
    Code:
       0: getstatic     #23                 // Field left:LDay22$Facing$East;
       3: areturn

  public Day22$Facing$West getRight();
    Code:
       0: getstatic     #29                 // Field right:LDay22$Facing$West;
       3: areturn

  public Day22$Facing getLeft();
    Code:
       0: aload_0
       1: invokevirtual #32                 // Method getLeft:()LDay22$Facing$East;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  public Day22$Facing getRight();
    Code:
       0: aload_0
       1: invokevirtual #34                 // Method getRight:()LDay22$Facing$West;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  static {};
    Code:
       0: new           #2                  // class Day22$Facing$South
       3: dup
       4: invokespecial #37                 // Method "<init>":()V
       7: putstatic     #40                 // Field INSTANCE:LDay22$Facing$South;
      10: getstatic     #44                 // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      13: putstatic     #23                 // Field left:LDay22$Facing$East;
      16: getstatic     #48                 // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
      19: putstatic     #29                 // Field right:LDay22$Facing$West;
      22: return
}

Compiled from "Day22.kt"
public final class Day22$Instruction$Companion {
  private Day22$Instruction$Companion();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final java.util.List<Day22$Instruction> ofList(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/Iterable
      10: astore_2
      11: nop
      12: iconst_0
      13: istore_3
      14: iconst_0
      15: istore        4
      17: new           #26                 // class java/util/ArrayList
      20: dup
      21: invokespecial #27                 // Method java/util/ArrayList."<init>":()V
      24: astore        5
      26: aload_2
      27: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      32: astore        6
      34: aload         6
      36: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      41: ifeq          113
      44: aload         6
      46: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      51: astore        7
      53: iload         4
      55: ifeq          69
      58: aload         5
      60: aload         7
      62: invokevirtual #45                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      65: pop
      66: goto          34
      69: aload         7
      71: checkcast     #47                 // class java/lang/String
      74: astore        8
      76: iconst_0
      77: istore        9
      79: aload         8
      81: checkcast     #49                 // class java/lang/CharSequence
      84: invokestatic  #55                 // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
      87: ifne          94
      90: iconst_1
      91: goto          95
      94: iconst_0
      95: nop
      96: ifne          34
      99: aload         5
     101: aload         7
     103: invokevirtual #45                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     106: pop
     107: iconst_1
     108: istore        4
     110: goto          34
     113: aload         5
     115: checkcast     #57                 // class java/util/List
     118: checkcast     #24                 // class java/lang/Iterable
     121: iconst_1
     122: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
     125: invokestatic  #67                 // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     128: checkcast     #47                 // class java/lang/String
     131: checkcast     #49                 // class java/lang/CharSequence
     134: invokestatic  #71                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     137: invokevirtual #75                 // Method java/lang/Object.toString:()Ljava/lang/String;
     140: astore_3
     141: iconst_0
     142: istore        4
     144: new           #77                 // class kotlin/text/Regex
     147: dup
     148: ldc           #79                 // String \\d+|[LR]
     150: invokespecial #82                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     153: aload_3
     154: checkcast     #49                 // class java/lang/CharSequence
     157: iconst_0
     158: iconst_2
     159: aconst_null
     160: invokestatic  #86                 // Method kotlin/text/Regex.findAll$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/sequences/Sequence;
     163: invokedynamic #105,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
     168: invokestatic  #111                // Method kotlin/sequences/SequencesKt.map:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
     171: invokedynamic #119,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function1;
     176: invokestatic  #122                // Method kotlin/sequences/SequencesKt.filter:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
     179: invokedynamic #129,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function1;
     184: invokestatic  #111                // Method kotlin/sequences/SequencesKt.map:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
     187: invokestatic  #133                // Method kotlin/sequences/SequencesKt.toList:(Lkotlin/sequences/Sequence;)Ljava/util/List;
     190: areturn

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

  private static final boolean ofList$lambda$3(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #149                // String it
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #49                 // class java/lang/CharSequence
      10: invokestatic  #55                 // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
      13: ifne          20
      16: iconst_1
      17: goto          21
      20: iconst_0
      21: ireturn

  private static final Day22$Instruction ofList$lambda$4(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #157                // String symbol
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: astore_1
       8: aload_1
       9: ldc           #159                // String L
      11: invokestatic  #163                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      14: ifeq          26
      17: getstatic     #169                // Field Day22$Left.INSTANCE:LDay22$Left;
      20: checkcast     #171                // class Day22$Instruction
      23: goto          58
      26: aload_1
      27: ldc           #173                // String R
      29: invokestatic  #163                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifeq          44
      35: getstatic     #178                // Field Day22$Right.INSTANCE:LDay22$Right;
      38: checkcast     #171                // class Day22$Instruction
      41: goto          58
      44: new           #180                // class Day22$Move
      47: dup
      48: aload_0
      49: invokestatic  #186                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      52: invokespecial #189                // Method Day22$Move."<init>":(I)V
      55: checkcast     #171                // class Day22$Instruction
      58: areturn

  public Day22$Instruction$Companion(kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: invokespecial #191                // Method "<init>":()V
       4: return
}

Compiled from "Day22.kt"
final class Day22$Right extends Day22$Instruction {
  public static final Day22$Right INSTANCE;

  private Day22$Right();
    Code:
       0: aload_0
       1: aconst_null
       2: invokespecial #9                  // Method Day22$Instruction."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       5: return

  static {};
    Code:
       0: new           #2                  // class Day22$Right
       3: dup
       4: invokespecial #14                 // Method "<init>":()V
       7: putstatic     #17                 // Field INSTANCE:LDay22$Right;
      10: return
}

Compiled from "Day22.kt"
public abstract class Day22$Facing {
  private final int points;

  private final Point offset;

  private Day22$Facing(int, Point);
    Code:
       0: aload_0
       1: invokespecial #9                  // Method java/lang/Object."<init>":()V
       4: aload_0
       5: iload_1
       6: putfield      #13                 // Field points:I
       9: aload_0
      10: aload_2
      11: putfield      #17                 // Field offset:LPoint;
      14: return

  public final int getPoints();
    Code:
       0: aload_0
       1: getfield      #13                 // Field points:I
       4: ireturn

  public final Point getOffset();
    Code:
       0: aload_0
       1: getfield      #17                 // Field offset:LPoint;
       4: areturn

  public abstract Day22$Facing getLeft();

  public abstract Day22$Facing getRight();

  public Day22$Facing(int, Point, kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: iload_1
       2: aload_2
       3: invokespecial #30                 // Method "<init>":(ILPoint;)V
       6: return
}

Compiled from "Day22.kt"
public final class Day22$Facing$East extends Day22$Facing {
  public static final Day22$Facing$East INSTANCE;

  private static final Day22$Facing$North left;

  private static final Day22$Facing$South right;

  private Day22$Facing$East();
    Code:
       0: aload_0
       1: iconst_0
       2: new           #8                  // class Point
       5: dup
       6: iconst_1
       7: iconst_0
       8: invokespecial #11                 // Method Point."<init>":(II)V
      11: aconst_null
      12: invokespecial #14                 // Method Day22$Facing."<init>":(ILPoint;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      15: return

  public Day22$Facing$North getLeft();
    Code:
       0: getstatic     #23                 // Field left:LDay22$Facing$North;
       3: areturn

  public Day22$Facing$South getRight();
    Code:
       0: getstatic     #29                 // Field right:LDay22$Facing$South;
       3: areturn

  public Day22$Facing getLeft();
    Code:
       0: aload_0
       1: invokevirtual #32                 // Method getLeft:()LDay22$Facing$North;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  public Day22$Facing getRight();
    Code:
       0: aload_0
       1: invokevirtual #34                 // Method getRight:()LDay22$Facing$South;
       4: checkcast     #4                  // class Day22$Facing
       7: areturn

  static {};
    Code:
       0: new           #2                  // class Day22$Facing$East
       3: dup
       4: invokespecial #37                 // Method "<init>":()V
       7: putstatic     #40                 // Field INSTANCE:LDay22$Facing$East;
      10: getstatic     #44                 // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
      13: putstatic     #23                 // Field left:LDay22$Facing$North;
      16: getstatic     #48                 // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
      19: putstatic     #29                 // Field right:LDay22$Facing$South;
      22: return
}

Compiled from "Day22.kt"
final class Day22$Move extends Day22$Instruction {
  private final int steps;

  public Day22$Move(int);
    Code:
       0: aload_0
       1: aconst_null
       2: invokespecial #9                  // Method Day22$Instruction."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       5: aload_0
       6: iload_1
       7: putfield      #13                 // Field steps:I
      10: return

  public final int getSteps();
    Code:
       0: aload_0
       1: getfield      #13                 // Field steps:I
       4: ireturn
}

Compiled from "Day22.kt"
public final class Day22$CubeFacing {
  public static final Day22$CubeFacing$Companion Companion;

  private final int id;

  private final int size;

  private final Point topLeft;

  private final Day22$Transition north;

  private final Day22$Transition east;

  private final Day22$Transition south;

  private final Day22$Transition west;

  private final int minX;

  private final int maxX;

  private final int minY;

  private final int maxY;

  private static final java.util.Map<java.lang.Integer, Day22$CubeFacing> instances;

  public Day22$CubeFacing(int, int, Point, Day22$Transition, Day22$Transition, Day22$Transition, Day22$Transition);
    Code:
       0: aload_3
       1: ldc           #9                  // String topLeft
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload         4
       8: ldc           #17                 // String north
      10: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      13: aload         5
      15: ldc           #19                 // String east
      17: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      20: aload         6
      22: ldc           #21                 // String south
      24: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      27: aload         7
      29: ldc           #23                 // String west
      31: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      34: aload_0
      35: invokespecial #26                 // Method java/lang/Object."<init>":()V
      38: aload_0
      39: iload_1
      40: putfield      #30                 // Field id:I
      43: aload_0
      44: iload_2
      45: putfield      #33                 // Field size:I
      48: aload_0
      49: aload_3
      50: putfield      #36                 // Field topLeft:LPoint;
      53: aload_0
      54: aload         4
      56: putfield      #39                 // Field north:LDay22$Transition;
      59: aload_0
      60: aload         5
      62: putfield      #41                 // Field east:LDay22$Transition;
      65: aload_0
      66: aload         6
      68: putfield      #43                 // Field south:LDay22$Transition;
      71: aload_0
      72: aload         7
      74: putfield      #45                 // Field west:LDay22$Transition;
      77: aload_0
      78: aload_0
      79: getfield      #36                 // Field topLeft:LPoint;
      82: invokevirtual #51                 // Method Point.getX:()I
      85: putfield      #54                 // Field minX:I
      88: aload_0
      89: aload_0
      90: getfield      #36                 // Field topLeft:LPoint;
      93: invokevirtual #51                 // Method Point.getX:()I
      96: aload_0
      97: getfield      #33                 // Field size:I
     100: iadd
     101: iconst_1
     102: isub
     103: putfield      #57                 // Field maxX:I
     106: aload_0
     107: aload_0
     108: getfield      #36                 // Field topLeft:LPoint;
     111: invokevirtual #60                 // Method Point.getY:()I
     114: putfield      #63                 // Field minY:I
     117: aload_0
     118: aload_0
     119: getfield      #36                 // Field topLeft:LPoint;
     122: invokevirtual #60                 // Method Point.getY:()I
     125: aload_0
     126: getfield      #33                 // Field size:I
     129: iadd
     130: iconst_1
     131: isub
     132: putfield      #66                 // Field maxY:I
     135: return

  public final int getId();
    Code:
       0: aload_0
       1: getfield      #30                 // Field id:I
       4: ireturn

  public final int getSize();
    Code:
       0: aload_0
       1: getfield      #33                 // Field size:I
       4: ireturn

  public final Point getTopLeft();
    Code:
       0: aload_0
       1: getfield      #36                 // Field topLeft:LPoint;
       4: areturn

  public final Day22$Transition getNorth();
    Code:
       0: aload_0
       1: getfield      #39                 // Field north:LDay22$Transition;
       4: areturn

  public final Day22$Transition getEast();
    Code:
       0: aload_0
       1: getfield      #41                 // Field east:LDay22$Transition;
       4: areturn

  public final Day22$Transition getSouth();
    Code:
       0: aload_0
       1: getfield      #43                 // Field south:LDay22$Transition;
       4: areturn

  public final Day22$Transition getWest();
    Code:
       0: aload_0
       1: getfield      #45                 // Field west:LDay22$Transition;
       4: areturn

  public final int getMinX();
    Code:
       0: aload_0
       1: getfield      #54                 // Field minX:I
       4: ireturn

  public final int getMaxX();
    Code:
       0: aload_0
       1: getfield      #57                 // Field maxX:I
       4: ireturn

  public final int getMinY();
    Code:
       0: aload_0
       1: getfield      #63                 // Field minY:I
       4: ireturn

  public final int getMaxY();
    Code:
       0: aload_0
       1: getfield      #66                 // Field maxY:I
       4: ireturn

  public final boolean contains(Point);
    Code:
       0: aload_1
       1: ldc           #85                 // String place
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #54                 // Field minX:I
      10: istore_2
      11: aload_0
      12: getfield      #57                 // Field maxX:I
      15: istore_3
      16: aload_1
      17: invokevirtual #51                 // Method Point.getX:()I
      20: istore        4
      22: iload_2
      23: iload         4
      25: if_icmpgt     42
      28: iload         4
      30: iload_3
      31: if_icmpgt     38
      34: iconst_1
      35: goto          43
      38: iconst_0
      39: goto          43
      42: iconst_0
      43: ifeq          90
      46: aload_0
      47: getfield      #63                 // Field minY:I
      50: istore_2
      51: aload_0
      52: getfield      #66                 // Field maxY:I
      55: istore_3
      56: aload_1
      57: invokevirtual #60                 // Method Point.getY:()I
      60: istore        4
      62: iload_2
      63: iload         4
      65: if_icmpgt     82
      68: iload         4
      70: iload_3
      71: if_icmpgt     78
      74: iconst_1
      75: goto          83
      78: iconst_0
      79: goto          83
      82: iconst_0
      83: ifeq          90
      86: iconst_1
      87: goto          91
      90: iconst_0
      91: ireturn

  public final Point scaleDown(Point);
    Code:
       0: aload_1
       1: ldc           #89                 // String point
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: aload_0
       8: getfield      #36                 // Field topLeft:LPoint;
      11: invokevirtual #92                 // Method Point.minus:(LPoint;)LPoint;
      14: areturn

  public final Point scaleUp(Point);
    Code:
       0: aload_1
       1: ldc           #89                 // String point
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: aload_0
       8: getfield      #36                 // Field topLeft:LPoint;
      11: invokevirtual #96                 // Method Point.plus:(LPoint;)LPoint;
      14: areturn

  public final Day22$Transition transition(Day22$Facing);
    Code:
       0: aload_1
       1: ldc           #100                // String direction
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: astore_2
       8: aload_2
       9: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
      12: invokestatic  #110                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      15: ifeq          25
      18: aload_0
      19: getfield      #39                 // Field north:LDay22$Transition;
      22: goto          84
      25: aload_2
      26: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      29: invokestatic  #110                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifeq          42
      35: aload_0
      36: getfield      #41                 // Field east:LDay22$Transition;
      39: goto          84
      42: aload_2
      43: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
      46: invokestatic  #110                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      49: ifeq          59
      52: aload_0
      53: getfield      #43                 // Field south:LDay22$Transition;
      56: goto          84
      59: aload_2
      60: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
      63: invokestatic  #110                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      66: ifeq          76
      69: aload_0
      70: getfield      #45                 // Field west:LDay22$Transition;
      73: goto          84
      76: new           #127                // class kotlin/NoWhenBranchMatchedException
      79: dup
      80: invokespecial #128                // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      83: athrow
      84: areturn

  public static final java.util.Map access$getInstances$cp();
    Code:
       0: getstatic     #139                // Field instances:Ljava/util/Map;
       3: areturn

  static {};
    Code:
       0: new           #142                // class Day22$CubeFacing$Companion
       3: dup
       4: aconst_null
       5: invokespecial #145                // Method Day22$CubeFacing$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
      11: new           #151                // class java/util/LinkedHashMap
      14: dup
      15: invokespecial #152                // Method java/util/LinkedHashMap."<init>":()V
      18: checkcast     #154                // class java/util/Map
      21: putstatic     #139                // Field instances:Ljava/util/Map;
      24: nop
      25: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
      28: new           #2                  // class Day22$CubeFacing
      31: dup
      32: iconst_1
      33: bipush        50
      35: new           #47                 // class Point
      38: dup
      39: bipush        50
      41: iconst_0
      42: invokespecial #157                // Method Point."<init>":(II)V
      45: new           #133                // class Day22$Transition
      48: dup
      49: iconst_1
      50: iconst_5
      51: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
      54: checkcast     #131                // class Day22$Facing
      57: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
      60: checkcast     #131                // class Day22$Facing
      63: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
      66: new           #133                // class Day22$Transition
      69: dup
      70: iconst_1
      71: iconst_2
      72: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      75: checkcast     #131                // class Day22$Facing
      78: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      81: checkcast     #131                // class Day22$Facing
      84: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
      87: new           #133                // class Day22$Transition
      90: dup
      91: iconst_1
      92: iconst_3
      93: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
      96: checkcast     #131                // class Day22$Facing
      99: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     102: checkcast     #131                // class Day22$Facing
     105: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     108: new           #133                // class Day22$Transition
     111: dup
     112: iconst_1
     113: iconst_2
     114: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     117: checkcast     #131                // class Day22$Facing
     120: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     123: checkcast     #131                // class Day22$Facing
     126: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     129: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     132: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     135: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     138: new           #2                  // class Day22$CubeFacing
     141: dup
     142: iconst_2
     143: bipush        50
     145: new           #47                 // class Point
     148: dup
     149: bipush        100
     151: iconst_0
     152: invokespecial #157                // Method Point."<init>":(II)V
     155: new           #133                // class Day22$Transition
     158: dup
     159: iconst_2
     160: iconst_2
     161: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     164: checkcast     #131                // class Day22$Facing
     167: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     170: checkcast     #131                // class Day22$Facing
     173: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     176: new           #133                // class Day22$Transition
     179: dup
     180: iconst_2
     181: iconst_1
     182: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     185: checkcast     #131                // class Day22$Facing
     188: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     191: checkcast     #131                // class Day22$Facing
     194: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     197: new           #133                // class Day22$Transition
     200: dup
     201: iconst_2
     202: iconst_2
     203: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     206: checkcast     #131                // class Day22$Facing
     209: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     212: checkcast     #131                // class Day22$Facing
     215: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     218: new           #133                // class Day22$Transition
     221: dup
     222: iconst_2
     223: iconst_1
     224: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     227: checkcast     #131                // class Day22$Facing
     230: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     233: checkcast     #131                // class Day22$Facing
     236: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     239: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     242: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     245: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     248: new           #2                  // class Day22$CubeFacing
     251: dup
     252: iconst_3
     253: bipush        50
     255: new           #47                 // class Point
     258: dup
     259: bipush        50
     261: bipush        50
     263: invokespecial #157                // Method Point."<init>":(II)V
     266: new           #133                // class Day22$Transition
     269: dup
     270: iconst_3
     271: iconst_1
     272: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     275: checkcast     #131                // class Day22$Facing
     278: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     281: checkcast     #131                // class Day22$Facing
     284: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     287: new           #133                // class Day22$Transition
     290: dup
     291: iconst_3
     292: iconst_3
     293: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     296: checkcast     #131                // class Day22$Facing
     299: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     302: checkcast     #131                // class Day22$Facing
     305: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     308: new           #133                // class Day22$Transition
     311: dup
     312: iconst_3
     313: iconst_5
     314: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     317: checkcast     #131                // class Day22$Facing
     320: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     323: checkcast     #131                // class Day22$Facing
     326: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     329: new           #133                // class Day22$Transition
     332: dup
     333: iconst_3
     334: iconst_3
     335: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     338: checkcast     #131                // class Day22$Facing
     341: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     344: checkcast     #131                // class Day22$Facing
     347: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     350: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     353: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     356: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     359: new           #2                  // class Day22$CubeFacing
     362: dup
     363: iconst_4
     364: bipush        50
     366: new           #47                 // class Point
     369: dup
     370: iconst_0
     371: bipush        100
     373: invokespecial #157                // Method Point."<init>":(II)V
     376: new           #133                // class Day22$Transition
     379: dup
     380: iconst_4
     381: bipush        6
     383: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     386: checkcast     #131                // class Day22$Facing
     389: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     392: checkcast     #131                // class Day22$Facing
     395: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     398: new           #133                // class Day22$Transition
     401: dup
     402: iconst_4
     403: iconst_5
     404: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     407: checkcast     #131                // class Day22$Facing
     410: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     413: checkcast     #131                // class Day22$Facing
     416: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     419: new           #133                // class Day22$Transition
     422: dup
     423: iconst_4
     424: bipush        6
     426: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     429: checkcast     #131                // class Day22$Facing
     432: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     435: checkcast     #131                // class Day22$Facing
     438: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     441: new           #133                // class Day22$Transition
     444: dup
     445: iconst_4
     446: iconst_5
     447: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     450: checkcast     #131                // class Day22$Facing
     453: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     456: checkcast     #131                // class Day22$Facing
     459: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     462: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     465: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     468: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     471: new           #2                  // class Day22$CubeFacing
     474: dup
     475: iconst_5
     476: bipush        50
     478: new           #47                 // class Point
     481: dup
     482: bipush        50
     484: bipush        100
     486: invokespecial #157                // Method Point."<init>":(II)V
     489: new           #133                // class Day22$Transition
     492: dup
     493: iconst_5
     494: iconst_3
     495: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     498: checkcast     #131                // class Day22$Facing
     501: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     504: checkcast     #131                // class Day22$Facing
     507: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     510: new           #133                // class Day22$Transition
     513: dup
     514: iconst_5
     515: iconst_4
     516: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     519: checkcast     #131                // class Day22$Facing
     522: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     525: checkcast     #131                // class Day22$Facing
     528: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     531: new           #133                // class Day22$Transition
     534: dup
     535: iconst_5
     536: iconst_1
     537: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     540: checkcast     #131                // class Day22$Facing
     543: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     546: checkcast     #131                // class Day22$Facing
     549: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     552: new           #133                // class Day22$Transition
     555: dup
     556: iconst_5
     557: iconst_4
     558: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     561: checkcast     #131                // class Day22$Facing
     564: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     567: checkcast     #131                // class Day22$Facing
     570: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     573: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     576: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     579: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     582: new           #2                  // class Day22$CubeFacing
     585: dup
     586: bipush        6
     588: bipush        50
     590: new           #47                 // class Point
     593: dup
     594: iconst_0
     595: sipush        150
     598: invokespecial #157                // Method Point."<init>":(II)V
     601: new           #133                // class Day22$Transition
     604: dup
     605: bipush        6
     607: iconst_4
     608: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     611: checkcast     #131                // class Day22$Facing
     614: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     617: checkcast     #131                // class Day22$Facing
     620: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     623: new           #133                // class Day22$Transition
     626: dup
     627: bipush        6
     629: bipush        6
     631: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     634: checkcast     #131                // class Day22$Facing
     637: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     640: checkcast     #131                // class Day22$Facing
     643: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     646: new           #133                // class Day22$Transition
     649: dup
     650: bipush        6
     652: iconst_4
     653: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     656: checkcast     #131                // class Day22$Facing
     659: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     662: checkcast     #131                // class Day22$Facing
     665: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     668: new           #133                // class Day22$Transition
     671: dup
     672: bipush        6
     674: bipush        6
     676: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     679: checkcast     #131                // class Day22$Facing
     682: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     685: checkcast     #131                // class Day22$Facing
     688: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     691: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     694: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     697: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     700: new           #2                  // class Day22$CubeFacing
     703: dup
     704: bipush        11
     706: bipush        50
     708: new           #47                 // class Point
     711: dup
     712: bipush        50
     714: iconst_0
     715: invokespecial #157                // Method Point."<init>":(II)V
     718: new           #133                // class Day22$Transition
     721: dup
     722: bipush        11
     724: bipush        16
     726: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     729: checkcast     #131                // class Day22$Facing
     732: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     735: checkcast     #131                // class Day22$Facing
     738: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     741: new           #133                // class Day22$Transition
     744: dup
     745: bipush        11
     747: bipush        12
     749: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     752: checkcast     #131                // class Day22$Facing
     755: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     758: checkcast     #131                // class Day22$Facing
     761: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     764: new           #133                // class Day22$Transition
     767: dup
     768: bipush        11
     770: bipush        13
     772: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     775: checkcast     #131                // class Day22$Facing
     778: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     781: checkcast     #131                // class Day22$Facing
     784: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     787: new           #133                // class Day22$Transition
     790: dup
     791: bipush        11
     793: bipush        14
     795: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     798: checkcast     #131                // class Day22$Facing
     801: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     804: checkcast     #131                // class Day22$Facing
     807: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     810: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     813: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     816: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     819: new           #2                  // class Day22$CubeFacing
     822: dup
     823: bipush        12
     825: bipush        50
     827: new           #47                 // class Point
     830: dup
     831: bipush        100
     833: iconst_0
     834: invokespecial #157                // Method Point."<init>":(II)V
     837: new           #133                // class Day22$Transition
     840: dup
     841: bipush        12
     843: bipush        16
     845: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     848: checkcast     #131                // class Day22$Facing
     851: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     854: checkcast     #131                // class Day22$Facing
     857: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     860: new           #133                // class Day22$Transition
     863: dup
     864: bipush        12
     866: bipush        15
     868: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     871: checkcast     #131                // class Day22$Facing
     874: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     877: checkcast     #131                // class Day22$Facing
     880: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     883: new           #133                // class Day22$Transition
     886: dup
     887: bipush        12
     889: bipush        13
     891: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     894: checkcast     #131                // class Day22$Facing
     897: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     900: checkcast     #131                // class Day22$Facing
     903: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     906: new           #133                // class Day22$Transition
     909: dup
     910: bipush        12
     912: bipush        11
     914: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     917: checkcast     #131                // class Day22$Facing
     920: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     923: checkcast     #131                // class Day22$Facing
     926: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     929: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
     932: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
     935: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
     938: new           #2                  // class Day22$CubeFacing
     941: dup
     942: bipush        13
     944: bipush        50
     946: new           #47                 // class Point
     949: dup
     950: bipush        50
     952: bipush        50
     954: invokespecial #157                // Method Point."<init>":(II)V
     957: new           #133                // class Day22$Transition
     960: dup
     961: bipush        13
     963: bipush        11
     965: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     968: checkcast     #131                // class Day22$Facing
     971: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     974: checkcast     #131                // class Day22$Facing
     977: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
     980: new           #133                // class Day22$Transition
     983: dup
     984: bipush        13
     986: bipush        12
     988: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     991: checkcast     #131                // class Day22$Facing
     994: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     997: checkcast     #131                // class Day22$Facing
    1000: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1003: new           #133                // class Day22$Transition
    1006: dup
    1007: bipush        13
    1009: bipush        15
    1011: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1014: checkcast     #131                // class Day22$Facing
    1017: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1020: checkcast     #131                // class Day22$Facing
    1023: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1026: new           #133                // class Day22$Transition
    1029: dup
    1030: bipush        13
    1032: bipush        14
    1034: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
    1037: checkcast     #131                // class Day22$Facing
    1040: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1043: checkcast     #131                // class Day22$Facing
    1046: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1049: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
    1052: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
    1055: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
    1058: new           #2                  // class Day22$CubeFacing
    1061: dup
    1062: bipush        14
    1064: bipush        50
    1066: new           #47                 // class Point
    1069: dup
    1070: iconst_0
    1071: bipush        100
    1073: invokespecial #157                // Method Point."<init>":(II)V
    1076: new           #133                // class Day22$Transition
    1079: dup
    1080: bipush        14
    1082: bipush        13
    1084: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
    1087: checkcast     #131                // class Day22$Facing
    1090: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
    1093: checkcast     #131                // class Day22$Facing
    1096: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1099: new           #133                // class Day22$Transition
    1102: dup
    1103: bipush        14
    1105: bipush        15
    1107: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
    1110: checkcast     #131                // class Day22$Facing
    1113: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
    1116: checkcast     #131                // class Day22$Facing
    1119: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1122: new           #133                // class Day22$Transition
    1125: dup
    1126: bipush        14
    1128: bipush        16
    1130: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1133: checkcast     #131                // class Day22$Facing
    1136: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1139: checkcast     #131                // class Day22$Facing
    1142: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1145: new           #133                // class Day22$Transition
    1148: dup
    1149: bipush        14
    1151: bipush        11
    1153: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
    1156: checkcast     #131                // class Day22$Facing
    1159: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
    1162: checkcast     #131                // class Day22$Facing
    1165: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1168: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
    1171: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
    1174: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
    1177: new           #2                  // class Day22$CubeFacing
    1180: dup
    1181: bipush        15
    1183: bipush        50
    1185: new           #47                 // class Point
    1188: dup
    1189: bipush        50
    1191: bipush        100
    1193: invokespecial #157                // Method Point."<init>":(II)V
    1196: new           #133                // class Day22$Transition
    1199: dup
    1200: bipush        15
    1202: bipush        13
    1204: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
    1207: checkcast     #131                // class Day22$Facing
    1210: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
    1213: checkcast     #131                // class Day22$Facing
    1216: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1219: new           #133                // class Day22$Transition
    1222: dup
    1223: bipush        15
    1225: bipush        12
    1227: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
    1230: checkcast     #131                // class Day22$Facing
    1233: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
    1236: checkcast     #131                // class Day22$Facing
    1239: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1242: new           #133                // class Day22$Transition
    1245: dup
    1246: bipush        15
    1248: bipush        16
    1250: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1253: checkcast     #131                // class Day22$Facing
    1256: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
    1259: checkcast     #131                // class Day22$Facing
    1262: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1265: new           #133                // class Day22$Transition
    1268: dup
    1269: bipush        15
    1271: bipush        14
    1273: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
    1276: checkcast     #131                // class Day22$Facing
    1279: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
    1282: checkcast     #131                // class Day22$Facing
    1285: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1288: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
    1291: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
    1294: getstatic     #149                // Field Companion:LDay22$CubeFacing$Companion;
    1297: new           #2                  // class Day22$CubeFacing
    1300: dup
    1301: bipush        16
    1303: bipush        50
    1305: new           #47                 // class Point
    1308: dup
    1309: iconst_0
    1310: sipush        150
    1313: invokespecial #157                // Method Point."<init>":(II)V
    1316: new           #133                // class Day22$Transition
    1319: dup
    1320: bipush        16
    1322: bipush        14
    1324: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
    1327: checkcast     #131                // class Day22$Facing
    1330: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
    1333: checkcast     #131                // class Day22$Facing
    1336: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1339: new           #133                // class Day22$Transition
    1342: dup
    1343: bipush        16
    1345: bipush        15
    1347: getstatic     #115                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
    1350: checkcast     #131                // class Day22$Facing
    1353: getstatic     #106                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
    1356: checkcast     #131                // class Day22$Facing
    1359: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1362: new           #133                // class Day22$Transition
    1365: dup
    1366: bipush        16
    1368: bipush        12
    1370: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1373: checkcast     #131                // class Day22$Facing
    1376: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1379: checkcast     #131                // class Day22$Facing
    1382: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1385: new           #133                // class Day22$Transition
    1388: dup
    1389: bipush        16
    1391: bipush        11
    1393: getstatic     #125                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
    1396: checkcast     #131                // class Day22$Facing
    1399: getstatic     #120                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
    1402: checkcast     #131                // class Day22$Facing
    1405: invokespecial #160                // Method Day22$Transition."<init>":(IILDay22$Facing;LDay22$Facing;)V
    1408: invokespecial #162                // Method "<init>":(IILPoint;LDay22$Transition;LDay22$Transition;LDay22$Transition;LDay22$Transition;)V
    1411: invokestatic  #166                // Method Day22$CubeFacing$Companion.access$plus:(LDay22$CubeFacing$Companion;LDay22$CubeFacing;)V
    1414: return
}

Compiled from "Day22.kt"
public final class Day22 {
  private final java.util.Set<Point> blockedPlaces;

  private final java.util.List<Day22$Instruction> instructions;

  public Day22(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #10                 // String input
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_0
      12: aload_1
      13: invokespecial #23                 // Method parseBlockedPlaces:(Ljava/util/List;)Ljava/util/Set;
      16: putfield      #27                 // Field blockedPlaces:Ljava/util/Set;
      19: aload_0
      20: getstatic     #33                 // Field Day22$Instruction.Companion:LDay22$Instruction$Companion;
      23: aload_1
      24: invokevirtual #39                 // Method Day22$Instruction$Companion.ofList:(Ljava/util/List;)Ljava/util/List;
      27: putfield      #43                 // Field instructions:Ljava/util/List;
      30: return

  public final int part1();
    Code:
       0: aload_0
       1: getstatic     #52                 // Field Day22$CubeFacing.Companion:LDay22$CubeFacing$Companion;
       4: iconst_1
       5: invokevirtual #58                 // Method Day22$CubeFacing$Companion.invoke:(I)LDay22$CubeFacing;
       8: invokespecial #62                 // Method followInstructions:(LDay22$CubeFacing;)LDay22$Orientation;
      11: invokevirtual #67                 // Method Day22$Orientation.score:()I
      14: ireturn

  public final int part2();
    Code:
       0: aload_0
       1: getstatic     #52                 // Field Day22$CubeFacing.Companion:LDay22$CubeFacing$Companion;
       4: bipush        11
       6: invokevirtual #58                 // Method Day22$CubeFacing$Companion.invoke:(I)LDay22$CubeFacing;
       9: invokespecial #62                 // Method followInstructions:(LDay22$CubeFacing;)LDay22$Orientation;
      12: invokevirtual #67                 // Method Day22$Orientation.score:()I
      15: ireturn

  private final Day22$Orientation followInstructions(Day22$CubeFacing);
    Code:
       0: aconst_null
       1: astore_2
       2: aload_1
       3: astore_2
       4: aconst_null
       5: astore_3
       6: new           #64                 // class Day22$Orientation
       9: dup
      10: aload_2
      11: invokevirtual #72                 // Method Day22$CubeFacing.getTopLeft:()LPoint;
      14: getstatic     #78                 // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      17: checkcast     #80                 // class Day22$Facing
      20: invokespecial #83                 // Method Day22$Orientation."<init>":(LPoint;LDay22$Facing;)V
      23: astore_3
      24: aload_0
      25: getfield      #43                 // Field instructions:Ljava/util/List;
      28: checkcast     #85                 // class java/lang/Iterable
      31: astore        4
      33: iconst_0
      34: istore        5
      36: aload         4
      38: invokeinterface #89,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      43: astore        6
      45: aload         6
      47: invokeinterface #95,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      52: ifeq          297
      55: aload         6
      57: invokeinterface #99,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      62: astore        7
      64: aload         7
      66: checkcast     #29                 // class Day22$Instruction
      69: astore        8
      71: iconst_0
      72: istore        9
      74: aload         8
      76: astore        10
      78: aload         10
      80: instanceof    #101                // class Day22$Left
      83: ifeq          104
      86: aload_3
      87: aconst_null
      88: aload_3
      89: invokevirtual #105                // Method Day22$Orientation.getFacing:()LDay22$Facing;
      92: invokevirtual #108                // Method Day22$Facing.getLeft:()LDay22$Facing;
      95: iconst_1
      96: aconst_null
      97: invokestatic  #112                // Method Day22$Orientation.copy$default:(LDay22$Orientation;LPoint;LDay22$Facing;ILjava/lang/Object;)LDay22$Orientation;
     100: astore_3
     101: goto          292
     104: aload         10
     106: instanceof    #114                // class Day22$Right
     109: ifeq          130
     112: aload_3
     113: aconst_null
     114: aload_3
     115: invokevirtual #105                // Method Day22$Orientation.getFacing:()LDay22$Facing;
     118: invokevirtual #117                // Method Day22$Facing.getRight:()LDay22$Facing;
     121: iconst_1
     122: aconst_null
     123: invokestatic  #112                // Method Day22$Orientation.copy$default:(LDay22$Orientation;LPoint;LDay22$Facing;ILjava/lang/Object;)LDay22$Orientation;
     126: astore_3
     127: goto          292
     130: aload         10
     132: instanceof    #119                // class Day22$Move
     135: ifeq          284
     138: iconst_0
     139: istore        11
     141: iconst_1
     142: istore        11
     144: aload         8
     146: checkcast     #119                // class Day22$Move
     149: invokevirtual #122                // Method Day22$Move.getSteps:()I
     152: istore        12
     154: iconst_0
     155: istore        13
     157: iload         13
     159: iload         12
     161: if_icmpge     292
     164: iload         13
     166: istore        14
     168: iconst_0
     169: istore        15
     171: iload         11
     173: ifeq          277
     176: aconst_null
     177: astore        16
     179: aload_3
     180: invokevirtual #126                // Method Day22$Orientation.move:()LDay22$Orientation;
     183: astore        16
     185: aconst_null
     186: astore        17
     188: aload_2
     189: astore        17
     191: aload_2
     192: aload         16
     194: invokevirtual #129                // Method Day22$Orientation.getLocation:()LPoint;
     197: invokevirtual #133                // Method Day22$CubeFacing.contains:(LPoint;)Z
     200: ifne          248
     203: aload_2
     204: aload_3
     205: invokevirtual #105                // Method Day22$Orientation.getFacing:()LDay22$Facing;
     208: invokevirtual #137                // Method Day22$CubeFacing.transition:(LDay22$Facing;)LDay22$Transition;
     211: astore        18
     213: iconst_0
     214: istore        19
     216: new           #64                 // class Day22$Orientation
     219: dup
     220: aload         18
     222: aload_3
     223: invokevirtual #129                // Method Day22$Orientation.getLocation:()LPoint;
     226: invokevirtual #142                // Method Day22$Transition.move:(LPoint;)LPoint;
     229: aload         18
     231: invokevirtual #145                // Method Day22$Transition.getEnter:()LDay22$Facing;
     234: invokespecial #83                 // Method Day22$Orientation."<init>":(LPoint;LDay22$Facing;)V
     237: astore        16
     239: aload         18
     241: invokevirtual #149                // Method Day22$Transition.getDestination:()LDay22$CubeFacing;
     244: astore        17
     246: nop
     247: nop
     248: aload_0
     249: getfield      #27                 // Field blockedPlaces:Ljava/util/Set;
     252: aload         16
     254: invokevirtual #129                // Method Day22$Orientation.getLocation:()LPoint;
     257: invokeinterface #154,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     262: ifeq          271
     265: iconst_0
     266: istore        11
     268: goto          277
     271: aload         16
     273: astore_3
     274: aload         17
     276: astore_2
     277: nop
     278: iinc          13, 1
     281: goto          157
     284: new           #156                // class kotlin/NoWhenBranchMatchedException
     287: dup
     288: invokespecial #157                // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     291: athrow
     292: nop
     293: nop
     294: goto          45
     297: nop
     298: aload_3
     299: areturn

  private final java.util.Set<Point> parseBlockedPlaces(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: checkcast     #85                 // class java/lang/Iterable
       4: astore_2
       5: nop
       6: iconst_0
       7: istore_3
       8: new           #182                // class java/util/ArrayList
      11: dup
      12: invokespecial #183                // Method java/util/ArrayList."<init>":()V
      15: astore        4
      17: aload_2
      18: invokeinterface #89,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      23: astore        5
      25: aload         5
      27: invokeinterface #95,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      32: ifeq          88
      35: aload         5
      37: invokeinterface #99,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      42: astore        6
      44: aload         6
      46: checkcast     #185                // class java/lang/String
      49: astore        7
      51: iconst_0
      52: istore        8
      54: aload         7
      56: checkcast     #187                // class java/lang/CharSequence
      59: invokestatic  #193                // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
      62: ifne          69
      65: iconst_1
      66: goto          70
      69: iconst_0
      70: nop
      71: ifne          77
      74: goto          88
      77: aload         4
      79: aload         6
      81: invokevirtual #196                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      84: pop
      85: goto          25
      88: aload         4
      90: checkcast     #198                // class java/util/List
      93: checkcast     #85                 // class java/lang/Iterable
      96: astore_3
      97: new           #182                // class java/util/ArrayList
     100: dup
     101: invokespecial #183                // Method java/util/ArrayList."<init>":()V
     104: checkcast     #200                // class java/util/Collection
     107: astore        4
     109: iconst_0
     110: istore        5
     112: aload_3
     113: invokeinterface #89,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     118: astore        6
     120: aload         6
     122: invokeinterface #95,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     127: ifeq          331
     130: aload         6
     132: invokeinterface #99,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     137: astore        7
     139: iload         5
     141: iinc          5, 1
     144: istore        8
     146: iload         8
     148: ifge          154
     151: invokestatic  #205                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     154: iload         8
     156: aload         7
     158: checkcast     #185                // class java/lang/String
     161: astore        9
     163: istore        10
     165: iconst_0
     166: istore        11
     168: aload         9
     170: checkcast     #187                // class java/lang/CharSequence
     173: astore        12
     175: iconst_0
     176: istore        13
     178: aload         12
     180: astore        14
     182: new           #182                // class java/util/ArrayList
     185: dup
     186: invokespecial #183                // Method java/util/ArrayList."<init>":()V
     189: checkcast     #200                // class java/util/Collection
     192: astore        15
     194: iconst_0
     195: istore        16
     197: aload         14
     199: astore        17
     201: iconst_0
     202: istore        18
     204: iconst_0
     205: istore        19
     207: iconst_0
     208: istore        20
     210: iload         20
     212: aload         17
     214: invokeinterface #208,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     219: if_icmpge     310
     222: aload         17
     224: iload         20
     226: invokeinterface #212,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     231: istore        21
     233: iload         19
     235: iinc          19, 1
     238: iload         21
     240: istore        22
     242: istore        23
     244: iconst_0
     245: istore        24
     247: iload         23
     249: iload         22
     251: istore        25
     253: istore        26
     255: iconst_0
     256: istore        27
     258: iload         25
     260: bipush        35
     262: if_icmpne     279
     265: new           #214                // class Point
     268: dup
     269: iload         26
     271: iload         10
     273: invokespecial #217                // Method Point."<init>":(II)V
     276: goto          280
     279: aconst_null
     280: dup
     281: ifnull        302
     284: astore        28
     286: iconst_0
     287: istore        29
     289: aload         15
     291: aload         28
     293: invokeinterface #218,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     298: pop
     299: goto          303
     302: pop
     303: nop
     304: iinc          20, 1
     307: goto          210
     310: nop
     311: aload         15
     313: checkcast     #198                // class java/util/List
     316: nop
     317: checkcast     #85                 // class java/lang/Iterable
     320: nop
     321: aload         4
     323: swap
     324: invokestatic  #222                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     327: pop
     328: goto          120
     331: aload         4
     333: checkcast     #198                // class java/util/List
     336: checkcast     #85                 // class java/lang/Iterable
     339: invokestatic  #226                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     342: areturn
}

Compiled from "Day22.kt"
final class Day22$Orientation {
  private final Point location;

  private final Day22$Facing facing;

  public Day22$Orientation(Point, Day22$Facing);
    Code:
       0: aload_1
       1: ldc           #9                  // String location
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String facing
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #20                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: aload_1
      18: putfield      #23                 // Field location:LPoint;
      21: aload_0
      22: aload_2
      23: putfield      #26                 // Field facing:LDay22$Facing;
      26: return

  public final Point getLocation();
    Code:
       0: aload_0
       1: getfield      #23                 // Field location:LPoint;
       4: areturn

  public final Day22$Facing getFacing();
    Code:
       0: aload_0
       1: getfield      #26                 // Field facing:LDay22$Facing;
       4: areturn

  public final int score();
    Code:
       0: sipush        1000
       3: aload_0
       4: getfield      #23                 // Field location:LPoint;
       7: invokevirtual #39                 // Method Point.getY:()I
      10: iconst_1
      11: iadd
      12: imul
      13: iconst_4
      14: aload_0
      15: getfield      #23                 // Field location:LPoint;
      18: invokevirtual #42                 // Method Point.getX:()I
      21: iconst_1
      22: iadd
      23: imul
      24: iadd
      25: aload_0
      26: getfield      #26                 // Field facing:LDay22$Facing;
      29: invokevirtual #47                 // Method Day22$Facing.getPoints:()I
      32: iadd
      33: ireturn

  public final Day22$Orientation move();
    Code:
       0: aload_0
       1: aload_0
       2: getfield      #23                 // Field location:LPoint;
       5: aload_0
       6: getfield      #26                 // Field facing:LDay22$Facing;
       9: invokevirtual #52                 // Method Day22$Facing.getOffset:()LPoint;
      12: invokevirtual #56                 // Method Point.plus:(LPoint;)LPoint;
      15: aconst_null
      16: iconst_2
      17: aconst_null
      18: invokestatic  #60                 // Method copy$default:(LDay22$Orientation;LPoint;LDay22$Facing;ILjava/lang/Object;)LDay22$Orientation;
      21: areturn

  public final Point component1();
    Code:
       0: aload_0
       1: getfield      #23                 // Field location:LPoint;
       4: areturn

  public final Day22$Facing component2();
    Code:
       0: aload_0
       1: getfield      #26                 // Field facing:LDay22$Facing;
       4: areturn

  public final Day22$Orientation copy(Point, Day22$Facing);
    Code:
       0: aload_1
       1: ldc           #9                  // String location
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String facing
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Day22$Orientation
      15: dup
      16: aload_1
      17: aload_2
      18: invokespecial #66                 // Method "<init>":(LPoint;LDay22$Facing;)V
      21: areturn

  public static Day22$Orientation copy$default(Day22$Orientation, Point, Day22$Facing, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #23                 // Field location:LPoint;
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #26                 // Field facing:LDay22$Facing;
      21: astore_2
      22: aload_0
      23: aload_1
      24: aload_2
      25: invokevirtual #68                 // Method copy:(LPoint;LDay22$Facing;)LDay22$Orientation;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #72                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #73                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #75                 // String Orientation(location=
       9: invokevirtual #79                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #23                 // Field location:LPoint;
      16: invokevirtual #82                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #84                 // String , facing=
      21: invokevirtual #79                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #26                 // Field facing:LDay22$Facing;
      28: invokevirtual #82                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #87                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #89                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #23                 // Field location:LPoint;
       4: invokevirtual #92                 // Method Point.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #26                 // Field facing:LDay22$Facing;
      16: invokevirtual #93                 // Method Day22$Facing.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Day22$Orientation
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day22$Orientation
      20: astore_2
      21: aload_0
      22: getfield      #23                 // Field location:LPoint;
      25: aload_2
      26: getfield      #23                 // Field location:LPoint;
      29: invokestatic  #102                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: aload_0
      38: getfield      #26                 // Field facing:LDay22$Facing;
      41: aload_2
      42: getfield      #26                 // Field facing:LDay22$Facing;
      45: invokestatic  #102                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: iconst_1
      54: ireturn
}

Compiled from "Day22.kt"
public final class Day22$Transition {
  private final int sourceId;

  private final int destinationId;

  private final Day22$Facing exit;

  private final Day22$Facing enter;

  private final kotlin.Pair<Day22$Facing, Day22$Facing> byDirection;

  private final kotlin.Lazy source$delegate;

  private final kotlin.Lazy destination$delegate;

  public Day22$Transition(int, int, Day22$Facing, Day22$Facing);
    Code:
       0: aload_3
       1: ldc           #9                  // String exit
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload         4
       8: ldc           #17                 // String enter
      10: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      13: aload_0
      14: invokespecial #20                 // Method java/lang/Object."<init>":()V
      17: aload_0
      18: iload_1
      19: putfield      #24                 // Field sourceId:I
      22: aload_0
      23: iload_2
      24: putfield      #27                 // Field destinationId:I
      27: aload_0
      28: aload_3
      29: putfield      #30                 // Field exit:LDay22$Facing;
      32: aload_0
      33: aload         4
      35: putfield      #32                 // Field enter:LDay22$Facing;
      38: aload_0
      39: new           #34                 // class kotlin/Pair
      42: dup
      43: aload_0
      44: getfield      #30                 // Field exit:LDay22$Facing;
      47: aload_0
      48: getfield      #32                 // Field enter:LDay22$Facing;
      51: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      54: putfield      #41                 // Field byDirection:Lkotlin/Pair;
      57: aload_0
      58: aload_0
      59: invokedynamic #61,  0             // InvokeDynamic #0:invoke:(LDay22$Transition;)Lkotlin/jvm/functions/Function0;
      64: invokestatic  #67                 // Method kotlin/LazyKt.lazy:(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
      67: putfield      #71                 // Field source$delegate:Lkotlin/Lazy;
      70: aload_0
      71: aload_0
      72: invokedynamic #76,  0             // InvokeDynamic #1:invoke:(LDay22$Transition;)Lkotlin/jvm/functions/Function0;
      77: invokestatic  #67                 // Method kotlin/LazyKt.lazy:(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
      80: putfield      #79                 // Field destination$delegate:Lkotlin/Lazy;
      83: return

  public final int getSourceId();
    Code:
       0: aload_0
       1: getfield      #24                 // Field sourceId:I
       4: ireturn

  public final int getDestinationId();
    Code:
       0: aload_0
       1: getfield      #27                 // Field destinationId:I
       4: ireturn

  public final Day22$Facing getExit();
    Code:
       0: aload_0
       1: getfield      #30                 // Field exit:LDay22$Facing;
       4: areturn

  public final Day22$Facing getEnter();
    Code:
       0: aload_0
       1: getfield      #32                 // Field enter:LDay22$Facing;
       4: areturn

  private final Day22$CubeFacing getSource();
    Code:
       0: aload_0
       1: getfield      #71                 // Field source$delegate:Lkotlin/Lazy;
       4: astore_1
       5: aload_1
       6: invokeinterface #93,  1           // InterfaceMethod kotlin/Lazy.getValue:()Ljava/lang/Object;
      11: checkcast     #95                 // class Day22$CubeFacing
      14: areturn

  public final Day22$CubeFacing getDestination();
    Code:
       0: aload_0
       1: getfield      #79                 // Field destination$delegate:Lkotlin/Lazy;
       4: astore_1
       5: aload_1
       6: invokeinterface #93,  1           // InterfaceMethod kotlin/Lazy.getValue:()Ljava/lang/Object;
      11: checkcast     #95                 // class Day22$CubeFacing
      14: areturn

  private final Point rescale(Point);
    Code:
       0: aload_0
       1: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
       4: aload_0
       5: invokespecial #102                // Method getSource:()LDay22$CubeFacing;
       8: aload_1
       9: invokevirtual #105                // Method Day22$CubeFacing.scaleDown:(LPoint;)LPoint;
      12: invokevirtual #108                // Method Day22$CubeFacing.scaleUp:(LPoint;)LPoint;
      15: areturn

  private final Point flipRescaled(Point);
    Code:
       0: aload_0
       1: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
       4: aload_0
       5: aload_0
       6: invokespecial #102                // Method getSource:()LDay22$CubeFacing;
       9: aload_1
      10: invokevirtual #105                // Method Day22$CubeFacing.scaleDown:(LPoint;)LPoint;
      13: invokespecial #114                // Method flip:(LPoint;)LPoint;
      16: invokevirtual #108                // Method Day22$CubeFacing.scaleUp:(LPoint;)LPoint;
      19: areturn

  private final Point flip(Point);
    Code:
       0: new           #117                // class Point
       3: dup
       4: aload_1
       5: invokevirtual #120                // Method Point.getY:()I
       8: aload_1
       9: invokevirtual #123                // Method Point.getX:()I
      12: invokespecial #126                // Method Point."<init>":(II)V
      15: areturn

  public final Point move(Point);
    Code:
       0: aload_1
       1: ldc           #130                // String start
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #41                 // Field byDirection:Lkotlin/Pair;
      10: astore_2
      11: aload_2
      12: new           #34                 // class kotlin/Pair
      15: dup
      16: getstatic     #136                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
      19: getstatic     #136                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
      22: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      25: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      28: ifeq          56
      31: new           #117                // class Point
      34: dup
      35: aload_0
      36: aload_1
      37: invokespecial #142                // Method rescale:(LPoint;)LPoint;
      40: invokevirtual #123                // Method Point.getX:()I
      43: aload_0
      44: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
      47: invokevirtual #145                // Method Day22$CubeFacing.getMaxY:()I
      50: invokespecial #126                // Method Point."<init>":(II)V
      53: goto          525
      56: aload_2
      57: new           #34                 // class kotlin/Pair
      60: dup
      61: getstatic     #150                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      64: getstatic     #150                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
      67: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      70: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      73: ifeq          101
      76: new           #117                // class Point
      79: dup
      80: aload_0
      81: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
      84: invokevirtual #153                // Method Day22$CubeFacing.getMinX:()I
      87: aload_0
      88: aload_1
      89: invokespecial #142                // Method rescale:(LPoint;)LPoint;
      92: invokevirtual #120                // Method Point.getY:()I
      95: invokespecial #126                // Method Point."<init>":(II)V
      98: goto          525
     101: aload_2
     102: new           #34                 // class kotlin/Pair
     105: dup
     106: getstatic     #158                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     109: getstatic     #158                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     112: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     115: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     118: ifeq          146
     121: new           #117                // class Point
     124: dup
     125: aload_0
     126: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     129: invokevirtual #161                // Method Day22$CubeFacing.getMaxX:()I
     132: aload_0
     133: aload_1
     134: invokespecial #142                // Method rescale:(LPoint;)LPoint;
     137: invokevirtual #120                // Method Point.getY:()I
     140: invokespecial #126                // Method Point."<init>":(II)V
     143: goto          525
     146: aload_2
     147: new           #34                 // class kotlin/Pair
     150: dup
     151: getstatic     #166                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     154: getstatic     #166                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     157: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     160: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     163: ifeq          191
     166: new           #117                // class Point
     169: dup
     170: aload_0
     171: aload_1
     172: invokespecial #142                // Method rescale:(LPoint;)LPoint;
     175: invokevirtual #123                // Method Point.getX:()I
     178: aload_0
     179: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     182: invokevirtual #169                // Method Day22$CubeFacing.getMinY:()I
     185: invokespecial #126                // Method Point."<init>":(II)V
     188: goto          525
     191: aload_2
     192: new           #34                 // class kotlin/Pair
     195: dup
     196: getstatic     #136                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     199: getstatic     #150                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     202: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     205: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     208: ifeq          236
     211: new           #117                // class Point
     214: dup
     215: aload_0
     216: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     219: invokevirtual #153                // Method Day22$CubeFacing.getMinX:()I
     222: aload_0
     223: aload_1
     224: invokespecial #171                // Method flipRescaled:(LPoint;)LPoint;
     227: invokevirtual #120                // Method Point.getY:()I
     230: invokespecial #126                // Method Point."<init>":(II)V
     233: goto          525
     236: aload_2
     237: new           #34                 // class kotlin/Pair
     240: dup
     241: getstatic     #150                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     244: getstatic     #136                // Field Day22$Facing$North.INSTANCE:LDay22$Facing$North;
     247: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     250: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     253: ifeq          281
     256: new           #117                // class Point
     259: dup
     260: aload_0
     261: aload_1
     262: invokespecial #171                // Method flipRescaled:(LPoint;)LPoint;
     265: invokevirtual #123                // Method Point.getX:()I
     268: aload_0
     269: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     272: invokevirtual #145                // Method Day22$CubeFacing.getMaxY:()I
     275: invokespecial #126                // Method Point."<init>":(II)V
     278: goto          525
     281: aload_2
     282: new           #34                 // class kotlin/Pair
     285: dup
     286: getstatic     #150                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     289: getstatic     #158                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     292: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     295: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     298: ifeq          337
     301: new           #117                // class Point
     304: dup
     305: aload_0
     306: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     309: invokevirtual #161                // Method Day22$CubeFacing.getMaxX:()I
     312: aload_0
     313: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     316: invokevirtual #145                // Method Day22$CubeFacing.getMaxY:()I
     319: aload_0
     320: invokespecial #102                // Method getSource:()LDay22$CubeFacing;
     323: aload_1
     324: invokevirtual #105                // Method Day22$CubeFacing.scaleDown:(LPoint;)LPoint;
     327: invokevirtual #120                // Method Point.getY:()I
     330: isub
     331: invokespecial #126                // Method Point."<init>":(II)V
     334: goto          525
     337: aload_2
     338: new           #34                 // class kotlin/Pair
     341: dup
     342: getstatic     #158                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     345: getstatic     #150                // Field Day22$Facing$East.INSTANCE:LDay22$Facing$East;
     348: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     351: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     354: ifeq          393
     357: new           #117                // class Point
     360: dup
     361: aload_0
     362: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     365: invokevirtual #153                // Method Day22$CubeFacing.getMinX:()I
     368: aload_0
     369: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     372: invokevirtual #145                // Method Day22$CubeFacing.getMaxY:()I
     375: aload_0
     376: invokespecial #102                // Method getSource:()LDay22$CubeFacing;
     379: aload_1
     380: invokevirtual #105                // Method Day22$CubeFacing.scaleDown:(LPoint;)LPoint;
     383: invokevirtual #120                // Method Point.getY:()I
     386: isub
     387: invokespecial #126                // Method Point."<init>":(II)V
     390: goto          525
     393: aload_2
     394: new           #34                 // class kotlin/Pair
     397: dup
     398: getstatic     #158                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     401: getstatic     #166                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     404: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     407: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     410: ifeq          438
     413: new           #117                // class Point
     416: dup
     417: aload_0
     418: aload_1
     419: invokespecial #171                // Method flipRescaled:(LPoint;)LPoint;
     422: invokevirtual #123                // Method Point.getX:()I
     425: aload_0
     426: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     429: invokevirtual #169                // Method Day22$CubeFacing.getMinY:()I
     432: invokespecial #126                // Method Point."<init>":(II)V
     435: goto          525
     438: aload_2
     439: new           #34                 // class kotlin/Pair
     442: dup
     443: getstatic     #166                // Field Day22$Facing$South.INSTANCE:LDay22$Facing$South;
     446: getstatic     #158                // Field Day22$Facing$West.INSTANCE:LDay22$Facing$West;
     449: invokespecial #37                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     452: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     455: ifeq          483
     458: new           #117                // class Point
     461: dup
     462: aload_0
     463: invokevirtual #100                // Method getDestination:()LDay22$CubeFacing;
     466: invokevirtual #161                // Method Day22$CubeFacing.getMaxX:()I
     469: aload_0
     470: aload_1
     471: invokespecial #171                // Method flipRescaled:(LPoint;)LPoint;
     474: invokevirtual #120                // Method Point.getY:()I
     477: invokespecial #126                // Method Point."<init>":(II)V
     480: goto          525
     483: new           #173                // class java/lang/IllegalStateException
     486: dup
     487: new           #175                // class java/lang/StringBuilder
     490: dup
     491: invokespecial #176                // Method java/lang/StringBuilder."<init>":()V
     494: ldc           #178                // String No transition from
     496: invokevirtual #182                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     499: aload_0
     500: getfield      #30                 // Field exit:LDay22$Facing;
     503: invokevirtual #185                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     506: ldc           #187                // String  to
     508: invokevirtual #182                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     511: aload_0
     512: getfield      #32                 // Field enter:LDay22$Facing;
     515: invokevirtual #185                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     518: invokevirtual #191                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     521: invokespecial #194                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     524: athrow
     525: areturn

  public final int component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field sourceId:I
       4: ireturn

  public final int component2();
    Code:
       0: aload_0
       1: getfield      #27                 // Field destinationId:I
       4: ireturn

  public final Day22$Facing component3();
    Code:
       0: aload_0
       1: getfield      #30                 // Field exit:LDay22$Facing;
       4: areturn

  public final Day22$Facing component4();
    Code:
       0: aload_0
       1: getfield      #32                 // Field enter:LDay22$Facing;
       4: areturn

  public final Day22$Transition copy(int, int, Day22$Facing, Day22$Facing);
    Code:
       0: aload_3
       1: ldc           #9                  // String exit
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload         4
       8: ldc           #17                 // String enter
      10: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      13: new           #2                  // class Day22$Transition
      16: dup
      17: iload_1
      18: iload_2
      19: aload_3
      20: aload         4
      22: invokespecial #202                // Method "<init>":(IILDay22$Facing;LDay22$Facing;)V
      25: areturn

  public static Day22$Transition copy$default(Day22$Transition, int, int, Day22$Facing, Day22$Facing, int, java.lang.Object);
    Code:
       0: iload         5
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #24                 // Field sourceId:I
      11: istore_1
      12: iload         5
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #27                 // Field destinationId:I
      23: istore_2
      24: iload         5
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #30                 // Field exit:LDay22$Facing;
      35: astore_3
      36: iload         5
      38: bipush        8
      40: iand
      41: ifeq          50
      44: aload_0
      45: getfield      #32                 // Field enter:LDay22$Facing;
      48: astore        4
      50: aload_0
      51: iload_1
      52: iload_2
      53: aload_3
      54: aload         4
      56: invokevirtual #206                // Method copy:(IILDay22$Facing;LDay22$Facing;)LDay22$Transition;
      59: areturn

  public java.lang.String toString();
    Code:
       0: new           #175                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #176                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #208                // String Transition(sourceId=
       9: invokevirtual #182                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field sourceId:I
      16: invokevirtual #211                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #213                // String , destinationId=
      21: invokevirtual #182                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #27                 // Field destinationId:I
      28: invokevirtual #211                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: ldc           #215                // String , exit=
      33: invokevirtual #182                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #30                 // Field exit:LDay22$Facing;
      40: invokevirtual #185                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      43: ldc           #217                // String , enter=
      45: invokevirtual #182                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      48: aload_0
      49: getfield      #32                 // Field enter:LDay22$Facing;
      52: invokevirtual #185                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      55: bipush        41
      57: invokevirtual #220                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      60: invokevirtual #191                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      63: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field sourceId:I
       4: invokestatic  #226                // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #27                 // Field destinationId:I
      16: invokestatic  #226                // Method java/lang/Integer.hashCode:(I)I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #30                 // Field exit:LDay22$Facing;
      29: invokevirtual #230                // Method Day22$Facing.hashCode:()I
      32: iadd
      33: istore_1
      34: iload_1
      35: bipush        31
      37: imul
      38: aload_0
      39: getfield      #32                 // Field enter:LDay22$Facing;
      42: invokevirtual #230                // Method Day22$Facing.hashCode:()I
      45: iadd
      46: istore_1
      47: iload_1
      48: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Day22$Transition
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day22$Transition
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field sourceId:I
      25: aload_2
      26: getfield      #24                 // Field sourceId:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #27                 // Field destinationId:I
      38: aload_2
      39: getfield      #27                 // Field destinationId:I
      42: if_icmpeq     47
      45: iconst_0
      46: ireturn
      47: aload_0
      48: getfield      #30                 // Field exit:LDay22$Facing;
      51: aload_2
      52: getfield      #30                 // Field exit:LDay22$Facing;
      55: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      58: ifne          63
      61: iconst_0
      62: ireturn
      63: aload_0
      64: getfield      #32                 // Field enter:LDay22$Facing;
      67: aload_2
      68: getfield      #32                 // Field enter:LDay22$Facing;
      71: invokestatic  #140                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      74: ifne          79
      77: iconst_0
      78: ireturn
      79: iconst_1
      80: ireturn

  private static final Day22$CubeFacing source_delegate$lambda$0(Day22$Transition);
    Code:
       0: getstatic     #240                // Field Day22$CubeFacing.Companion:LDay22$CubeFacing$Companion;
       3: aload_0
       4: getfield      #24                 // Field sourceId:I
       7: invokevirtual #245                // Method Day22$CubeFacing$Companion.invoke:(I)LDay22$CubeFacing;
      10: areturn

  private static final Day22$CubeFacing destination_delegate$lambda$1(Day22$Transition);
    Code:
       0: getstatic     #240                // Field Day22$CubeFacing.Companion:LDay22$CubeFacing$Companion;
       3: aload_0
       4: getfield      #27                 // Field destinationId:I
       7: invokevirtual #245                // Method Day22$CubeFacing$Companion.invoke:(I)LDay22$CubeFacing;
      10: areturn
}

Compiled from "Day22.kt"
public final class Day22$CubeFacing$Companion {
  private Day22$CubeFacing$Companion();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final Day22$CubeFacing invoke(int);
    Code:
       0: invokestatic  #19                 // Method Day22$CubeFacing.access$getInstances$cp:()Ljava/util/Map;
       3: iload_1
       4: invokestatic  #25                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
       7: invokestatic  #31                 // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
      10: checkcast     #15                 // class Day22$CubeFacing
      13: areturn

  private final void plus(Day22$CubeFacing);
    Code:
       0: invokestatic  #19                 // Method Day22$CubeFacing.access$getInstances$cp:()Ljava/util/Map;
       3: aload_1
       4: invokevirtual #39                 // Method Day22$CubeFacing.getId:()I
       7: invokestatic  #25                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      10: aload_1
      11: invokeinterface #45,  3           // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      16: pop
      17: return

  public Day22$CubeFacing$Companion(kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: invokespecial #49                 // Method "<init>":()V
       4: return

  public static final void access$plus(Day22$CubeFacing$Companion, Day22$CubeFacing);
    Code:
       0: aload_0
       1: aload_1
       2: invokespecial #55                 // Method plus:(LDay22$CubeFacing;)V
       5: return
}