import java.io.File
import kotlin.math.absoluteValue

fun main() {
    val day17 = Day17(File("src/inputs/Day17.txt").readText())
    println(day17.part1())
    println(day17.part2())
}

class Day17(input: String) {

    private val jets = jets(input)
    private val shapes = shapes()
    private val cave = (0..6).map { Point(it, 0) }.toMutableSet()
    private val down = Point(0, 1)
    private val up = Point(0, -1)
    private var jetCounter = 0
    private var blockCounter = 0

    fun part1(): Int {
        repeat(2022) {
            simulate()
        }
        return cave.height()
    }

    fun part2(): Long =
        calculateHeight(1000000000000L - 1)

    private fun simulate() {
        var currentShape = shapes.nth(blockCounter++).moveToStart(cave.minY())
        do {
            val jetShape = currentShape * jets.nth(jetCounter++)
            if (jetShape in (0..6) && jetShape.intersect(cave).isEmpty()) {
                currentShape = jetShape
            }
            currentShape = currentShape * down
        } while (currentShape.intersect(cave).isEmpty())
        cave += (currentShape * up)
    }

    private fun calculateHeight(targetBlockCount: Long): Long {
        data class State(val ceiling: List<Int>, val blockIdx: Int, val jetIdx: Int)

        val seen: MutableMap<State, Pair<Int, Int>> = mutableMapOf()
        while (true) {
            simulate()
            val state = State(cave.heuristicPrevious(), blockCounter % shapes.size, jetCounter % jets.size)
            if (state in seen) {
                val (blockCountAtLoopStart, heightAtLoopStart) = seen.getValue(state)
                val blocksPerLoop = blockCounter - 1L - blockCountAtLoopStart
                val totalLoops = (targetBlockCount - blockCountAtLoopStart) / blocksPerLoop
                val remainingBlocks = (targetBlockCount - blockCountAtLoopStart) - (totalLoops * blocksPerLoop)
                val heightGainedSinceLoop = cave.height() - heightAtLoopStart

                repeat (remainingBlocks.toInt()) {
                    simulate()
                }

                return cave.height() + heightGainedSinceLoop * (totalLoops - 1)
            }

            seen[state] = blockCounter - 1 to cave.height()
        }
    }

    private operator fun IntRange.contains(set: Set<Point>): Boolean = set.all { it.x in this }
    private operator fun Set<Point>.times(point: Point): Set<Point> = map { it + point }.toSet()
    private fun Set<Point>.minY(): Int = minOf { it.y }
    private fun Set<Point>.height(): Int = minY().absoluteValue

    private fun Set<Point>.heuristicPrevious(): List<Int> {
        return groupBy { it.x }
                .map { pointList -> pointList.value.minBy { it.y } }
                .let {
                    val normalTo = minY()
                    it.map { point -> normalTo - point.y }
                }
    }

    private fun Set<Point>.moveToStart(ceilingHeight: Int): Set<Point> =
        map { it + Point(2, ceilingHeight - 4) }.toSet()

    private fun shapes(): List<Set<Point>> =
        listOf(
            setOf(Point(0, 0), Point(1, 0), Point(2, 0), Point(3, 0)),
            setOf(Point(1, 0), Point(0, -1), Point(1, -1), Point(2, -1), Point(1, -2)),
            setOf(Point(0, 0), Point(1, 0), Point(2, 0), Point(2, -1), Point(2, -2)),
            setOf(Point(0, 0), Point(0, -1), Point(0, -2), Point(0, -3)),
            setOf(Point(0, 0), Point(1, 0), Point(0, -1), Point(1, -1))
        )

    private fun jets(input: String): List<Point> =
        input.map {
            when (it) {
                '>' -> Point(1, 0)
                '<' -> Point(-1, 0)
                else -> throw IllegalStateException("Wrong jet $it")
            }
        }
}

Compiled from "Day17.kt"
public final class Day17 {
  private final java.util.List<Point> jets;

  private final java.util.List<java.util.Set<Point>> shapes;

  private final java.util.Set<Point> cave;

  private final Point down;

  private final Point up;

  private int jetCounter;

  private int blockCounter;

  public Day17(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #9                  // String input
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #18                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_0
      12: aload_1
      13: invokespecial #22                 // Method jets:(Ljava/lang/String;)Ljava/util/List;
      16: putfield      #25                 // Field jets:Ljava/util/List;
      19: aload_0
      20: aload_0
      21: invokespecial #29                 // Method shapes:()Ljava/util/List;
      24: putfield      #31                 // Field shapes:Ljava/util/List;
      27: aload_0
      28: new           #33                 // class kotlin/ranges/IntRange
      31: dup
      32: iconst_0
      33: bipush        6
      35: invokespecial #36                 // Method kotlin/ranges/IntRange."<init>":(II)V
      38: checkcast     #38                 // class java/lang/Iterable
      41: astore_2
      42: astore        11
      44: iconst_0
      45: istore_3
      46: aload_2
      47: astore        4
      49: new           #40                 // class java/util/ArrayList
      52: dup
      53: aload_2
      54: bipush        10
      56: invokestatic  #46                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      59: invokespecial #49                 // Method java/util/ArrayList."<init>":(I)V
      62: checkcast     #51                 // class java/util/Collection
      65: astore        5
      67: iconst_0
      68: istore        6
      70: aload         4
      72: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      77: astore        7
      79: aload         7
      81: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      86: ifeq          132
      89: aload         7
      91: checkcast     #63                 // class kotlin/collections/IntIterator
      94: invokevirtual #67                 // Method kotlin/collections/IntIterator.nextInt:()I
      97: istore        8
      99: aload         5
     101: iload         8
     103: istore        9
     105: astore        12
     107: iconst_0
     108: istore        10
     110: new           #69                 // class Point
     113: dup
     114: iload         9
     116: iconst_0
     117: invokespecial #70                 // Method Point."<init>":(II)V
     120: aload         12
     122: swap
     123: invokeinterface #74,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     128: pop
     129: goto          79
     132: aload         5
     134: checkcast     #76                 // class java/util/List
     137: nop
     138: aload         11
     140: swap
     141: checkcast     #38                 // class java/lang/Iterable
     144: invokestatic  #80                 // Method kotlin/collections/CollectionsKt.toMutableSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     147: putfield      #84                 // Field cave:Ljava/util/Set;
     150: aload_0
     151: new           #69                 // class Point
     154: dup
     155: iconst_0
     156: iconst_1
     157: invokespecial #70                 // Method Point."<init>":(II)V
     160: putfield      #88                 // Field down:LPoint;
     163: aload_0
     164: new           #69                 // class Point
     167: dup
     168: iconst_0
     169: iconst_m1
     170: invokespecial #70                 // Method Point."<init>":(II)V
     173: putfield      #91                 // Field up:LPoint;
     176: return

  public final int part1();
    Code:
       0: sipush        2022
       3: istore_1
       4: iconst_0
       5: istore_2
       6: iload_2
       7: iload_1
       8: if_icmpge     27
      11: iload_2
      12: istore_3
      13: iconst_0
      14: istore        4
      16: aload_0
      17: invokespecial #111                // Method simulate:()V
      20: nop
      21: iinc          2, 1
      24: goto          6
      27: aload_0
      28: aload_0
      29: getfield      #84                 // Field cave:Ljava/util/Set;
      32: invokespecial #115                // Method height:(Ljava/util/Set;)I
      35: ireturn

  public final long part2();
    Code:
       0: aload_0
       1: ldc2_w        #119                // long 999999999999l
       4: invokespecial #124                // Method calculateHeight:(J)J
       7: lreturn

  private final void simulate();
    Code:
       0: aload_0
       1: aload_0
       2: getfield      #31                 // Field shapes:Ljava/util/List;
       5: aload_0
       6: getfield      #127                // Field blockCounter:I
       9: istore_2
      10: aload_0
      11: iload_2
      12: iconst_1
      13: iadd
      14: putfield      #127                // Field blockCounter:I
      17: iload_2
      18: invokestatic  #133                // Method UtilsKt.nth:(Ljava/util/List;I)Ljava/lang/Object;
      21: checkcast     #135                // class java/util/Set
      24: aload_0
      25: aload_0
      26: getfield      #84                 // Field cave:Ljava/util/Set;
      29: invokespecial #138                // Method minY:(Ljava/util/Set;)I
      32: invokespecial #142                // Method moveToStart:(Ljava/util/Set;I)Ljava/util/Set;
      35: astore_1
      36: aload_0
      37: aload_1
      38: aload_0
      39: getfield      #25                 // Field jets:Ljava/util/List;
      42: aload_0
      43: getfield      #145                // Field jetCounter:I
      46: istore_3
      47: aload_0
      48: iload_3
      49: iconst_1
      50: iadd
      51: putfield      #145                // Field jetCounter:I
      54: iload_3
      55: invokestatic  #133                // Method UtilsKt.nth:(Ljava/util/List;I)Ljava/lang/Object;
      58: checkcast     #69                 // class Point
      61: invokespecial #149                // Method times:(Ljava/util/Set;LPoint;)Ljava/util/Set;
      64: astore_2
      65: aload_0
      66: new           #33                 // class kotlin/ranges/IntRange
      69: dup
      70: iconst_0
      71: bipush        6
      73: invokespecial #36                 // Method kotlin/ranges/IntRange."<init>":(II)V
      76: aload_2
      77: invokespecial #153                // Method contains:(Lkotlin/ranges/IntRange;Ljava/util/Set;)Z
      80: ifeq          107
      83: aload_2
      84: checkcast     #38                 // class java/lang/Iterable
      87: aload_0
      88: getfield      #84                 // Field cave:Ljava/util/Set;
      91: checkcast     #38                 // class java/lang/Iterable
      94: invokestatic  #157                // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
      97: invokeinterface #160,  1          // InterfaceMethod java/util/Set.isEmpty:()Z
     102: ifeq          107
     105: aload_2
     106: astore_1
     107: aload_0
     108: aload_1
     109: aload_0
     110: getfield      #88                 // Field down:LPoint;
     113: invokespecial #149                // Method times:(Ljava/util/Set;LPoint;)Ljava/util/Set;
     116: astore_1
     117: aload_1
     118: checkcast     #38                 // class java/lang/Iterable
     121: aload_0
     122: getfield      #84                 // Field cave:Ljava/util/Set;
     125: checkcast     #38                 // class java/lang/Iterable
     128: invokestatic  #157                // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
     131: invokeinterface #160,  1          // InterfaceMethod java/util/Set.isEmpty:()Z
     136: ifne          36
     139: aload_0
     140: getfield      #84                 // Field cave:Ljava/util/Set;
     143: checkcast     #51                 // class java/util/Collection
     146: aload_0
     147: aload_1
     148: aload_0
     149: getfield      #91                 // Field up:LPoint;
     152: invokespecial #149                // Method times:(Ljava/util/Set;LPoint;)Ljava/util/Set;
     155: checkcast     #38                 // class java/lang/Iterable
     158: invokestatic  #164                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     161: pop
     162: return

  private final long calculateHeight(long);
    Code:
       0: new           #168                // class java/util/LinkedHashMap
       3: dup
       4: invokespecial #169                // Method java/util/LinkedHashMap."<init>":()V
       7: checkcast     #171                // class java/util/Map
      10: astore_3
      11: nop
      12: aload_0
      13: invokespecial #111                // Method simulate:()V
      16: new           #173                // class Day17$calculateHeight$State
      19: dup
      20: aload_0
      21: aload_0
      22: getfield      #84                 // Field cave:Ljava/util/Set;
      25: invokespecial #177                // Method heuristicPrevious:(Ljava/util/Set;)Ljava/util/List;
      28: aload_0
      29: getfield      #127                // Field blockCounter:I
      32: aload_0
      33: getfield      #31                 // Field shapes:Ljava/util/List;
      36: invokeinterface #180,  1          // InterfaceMethod java/util/List.size:()I
      41: irem
      42: aload_0
      43: getfield      #145                // Field jetCounter:I
      46: aload_0
      47: getfield      #25                 // Field jets:Ljava/util/List;
      50: invokeinterface #180,  1          // InterfaceMethod java/util/List.size:()I
      55: irem
      56: invokespecial #183                // Method Day17$calculateHeight$State."<init>":(Ljava/util/List;II)V
      59: astore        4
      61: aload_3
      62: aload         4
      64: invokeinterface #186,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
      69: ifeq          210
      72: aload_3
      73: aload         4
      75: invokestatic  #192                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
      78: checkcast     #194                // class kotlin/Pair
      81: astore        5
      83: aload         5
      85: invokevirtual #198                // Method kotlin/Pair.component1:()Ljava/lang/Object;
      88: checkcast     #200                // class java/lang/Number
      91: invokevirtual #203                // Method java/lang/Number.intValue:()I
      94: istore        6
      96: aload         5
      98: invokevirtual #206                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     101: checkcast     #200                // class java/lang/Number
     104: invokevirtual #203                // Method java/lang/Number.intValue:()I
     107: istore        7
     109: aload_0
     110: getfield      #127                // Field blockCounter:I
     113: i2l
     114: lconst_1
     115: lsub
     116: iload         6
     118: i2l
     119: lsub
     120: lstore        8
     122: lload_1
     123: iload         6
     125: i2l
     126: lsub
     127: lload         8
     129: ldiv
     130: lstore        10
     132: lload_1
     133: iload         6
     135: i2l
     136: lsub
     137: lload         10
     139: lload         8
     141: lmul
     142: lsub
     143: lstore        12
     145: aload_0
     146: aload_0
     147: getfield      #84                 // Field cave:Ljava/util/Set;
     150: invokespecial #115                // Method height:(Ljava/util/Set;)I
     153: iload         7
     155: isub
     156: istore        14
     158: lload         12
     160: l2i
     161: istore        15
     163: iconst_0
     164: istore        16
     166: iload         16
     168: iload         15
     170: if_icmpge     191
     173: iload         16
     175: istore        17
     177: iconst_0
     178: istore        18
     180: aload_0
     181: invokespecial #111                // Method simulate:()V
     184: nop
     185: iinc          16, 1
     188: goto          166
     191: aload_0
     192: aload_0
     193: getfield      #84                 // Field cave:Ljava/util/Set;
     196: invokespecial #115                // Method height:(Ljava/util/Set;)I
     199: i2l
     200: iload         14
     202: i2l
     203: lload         10
     205: lconst_1
     206: lsub
     207: lmul
     208: ladd
     209: lreturn
     210: aload_3
     211: aload         4
     213: aload_0
     214: getfield      #127                // Field blockCounter:I
     217: iconst_1
     218: isub
     219: invokestatic  #212                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     222: aload_0
     223: aload_0
     224: getfield      #84                 // Field cave:Ljava/util/Set;
     227: invokespecial #115                // Method height:(Ljava/util/Set;)I
     230: invokestatic  #212                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     233: invokestatic  #218                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     236: invokeinterface #222,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     241: pop
     242: goto          11

  private final boolean contains(kotlin.ranges.IntRange, java.util.Set<Point>);
    Code:
       0: aload_1
       1: ldc           #238                // String <this>
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: checkcast     #38                 // class java/lang/Iterable
      10: astore_3
      11: iconst_0
      12: istore        4
      14: aload_3
      15: instanceof    #51                 // class java/util/Collection
      18: ifeq          37
      21: aload_3
      22: checkcast     #51                 // class java/util/Collection
      25: invokeinterface #239,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      30: ifeq          37
      33: iconst_1
      34: goto          124
      37: aload_3
      38: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      43: astore        5
      45: aload         5
      47: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      52: ifeq          123
      55: aload         5
      57: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      62: astore        6
      64: aload         6
      66: checkcast     #69                 // class Point
      69: astore        7
      71: iconst_0
      72: istore        8
      74: aload_1
      75: invokevirtual #245                // Method kotlin/ranges/IntRange.getFirst:()I
      78: istore        9
      80: aload_1
      81: invokevirtual #248                // Method kotlin/ranges/IntRange.getLast:()I
      84: istore        10
      86: aload         7
      88: invokevirtual #251                // Method Point.getX:()I
      91: istore        11
      93: iload         9
      95: iload         11
      97: if_icmpgt     115
     100: iload         11
     102: iload         10
     104: if_icmpgt     111
     107: iconst_1
     108: goto          116
     111: iconst_0
     112: goto          116
     115: iconst_0
     116: ifne          45
     119: iconst_0
     120: goto          124
     123: iconst_1
     124: ireturn

  private final java.util.Set<Point> times(java.util.Set<Point>, Point);
    Code:
       0: aload_1
       1: ldc           #238                // String <this>
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #38                 // class java/lang/Iterable
      10: astore_3
      11: iconst_0
      12: istore        4
      14: aload_3
      15: astore        5
      17: new           #40                 // class java/util/ArrayList
      20: dup
      21: aload_3
      22: bipush        10
      24: invokestatic  #46                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      27: invokespecial #49                 // Method java/util/ArrayList."<init>":(I)V
      30: checkcast     #51                 // class java/util/Collection
      33: astore        6
      35: iconst_0
      36: istore        7
      38: aload         5
      40: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        8
      47: aload         8
      49: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          98
      57: aload         8
      59: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: astore        9
      66: aload         6
      68: aload         9
      70: checkcast     #69                 // class Point
      73: astore        10
      75: astore        12
      77: iconst_0
      78: istore        11
      80: aload         10
      82: aload_2
      83: invokevirtual #264                // Method Point.plus:(LPoint;)LPoint;
      86: aload         12
      88: swap
      89: invokeinterface #74,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      94: pop
      95: goto          47
      98: aload         6
     100: checkcast     #76                 // class java/util/List
     103: nop
     104: checkcast     #38                 // class java/lang/Iterable
     107: invokestatic  #267                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     110: areturn

  private final int minY(java.util.Set<Point>);
    Code:
       0: aload_1
       1: checkcast     #38                 // class java/lang/Iterable
       4: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
       9: astore_2
      10: aload_2
      11: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      16: ifne          27
      19: new           #273                // class java/util/NoSuchElementException
      22: dup
      23: invokespecial #274                // Method java/util/NoSuchElementException."<init>":()V
      26: athrow
      27: aload_2
      28: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      33: checkcast     #69                 // class Point
      36: astore_3
      37: iconst_0
      38: istore        4
      40: aload_3
      41: invokevirtual #277                // Method Point.getY:()I
      44: istore_3
      45: aload_2
      46: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          87
      54: aload_2
      55: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      60: checkcast     #69                 // class Point
      63: astore        4
      65: iconst_0
      66: istore        5
      68: aload         4
      70: invokevirtual #277                // Method Point.getY:()I
      73: istore        4
      75: iload_3
      76: iload         4
      78: if_icmple     45
      81: iload         4
      83: istore_3
      84: goto          45
      87: iload_3
      88: ireturn

  private final int height(java.util.Set<Point>);
    Code:
       0: aload_0
       1: aload_1
       2: invokespecial #138                // Method minY:(Ljava/util/Set;)I
       5: invokestatic  #285                // Method java/lang/Math.abs:(I)I
       8: ireturn

  private final java.util.List<java.lang.Integer> heuristicPrevious(java.util.Set<Point>);
    Code:
       0: aload_1
       1: checkcast     #38                 // class java/lang/Iterable
       4: astore_2
       5: iconst_0
       6: istore_3
       7: aload_2
       8: astore        4
      10: new           #168                // class java/util/LinkedHashMap
      13: dup
      14: invokespecial #169                // Method java/util/LinkedHashMap."<init>":()V
      17: checkcast     #171                // class java/util/Map
      20: astore        5
      22: iconst_0
      23: istore        6
      25: aload         4
      27: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      32: astore        7
      34: aload         7
      36: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      41: ifeq          149
      44: aload         7
      46: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      51: astore        8
      53: aload         8
      55: checkcast     #69                 // class Point
      58: astore        9
      60: iconst_0
      61: istore        10
      63: aload         9
      65: invokevirtual #251                // Method Point.getX:()I
      68: invokestatic  #212                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      71: astore        11
      73: aload         5
      75: astore        12
      77: iconst_0
      78: istore        13
      80: aload         12
      82: aload         11
      84: invokeinterface #291,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      89: astore        14
      91: aload         14
      93: ifnonnull     128
      96: iconst_0
      97: istore        15
      99: new           #40                 // class java/util/ArrayList
     102: dup
     103: invokespecial #292                // Method java/util/ArrayList."<init>":()V
     106: checkcast     #76                 // class java/util/List
     109: astore        15
     111: aload         12
     113: aload         11
     115: aload         15
     117: invokeinterface #222,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     122: pop
     123: aload         15
     125: goto          130
     128: aload         14
     130: nop
     131: checkcast     #76                 // class java/util/List
     134: astore        9
     136: aload         9
     138: aload         8
     140: invokeinterface #293,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     145: pop
     146: goto          34
     149: aload         5
     151: nop
     152: astore_2
     153: nop
     154: iconst_0
     155: istore_3
     156: aload_2
     157: astore        4
     159: new           #40                 // class java/util/ArrayList
     162: dup
     163: aload_2
     164: invokeinterface #294,  1          // InterfaceMethod java/util/Map.size:()I
     169: invokespecial #49                 // Method java/util/ArrayList."<init>":(I)V
     172: checkcast     #51                 // class java/util/Collection
     175: astore        5
     177: iconst_0
     178: istore        6
     180: aload         4
     182: invokeinterface #298,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
     187: invokeinterface #299,  1          // InterfaceMethod java/util/Set.iterator:()Ljava/util/Iterator;
     192: astore        7
     194: aload         7
     196: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     201: ifeq          379
     204: aload         7
     206: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     211: checkcast     #301                // class java/util/Map$Entry
     214: astore        8
     216: aload         5
     218: aload         8
     220: astore        9
     222: astore        19
     224: iconst_0
     225: istore        10
     227: aload         9
     229: invokeinterface #303,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     234: checkcast     #38                 // class java/lang/Iterable
     237: astore        11
     239: iconst_0
     240: istore        12
     242: aload         11
     244: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     249: astore        13
     251: aload         13
     253: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     258: ifne          269
     261: new           #273                // class java/util/NoSuchElementException
     264: dup
     265: invokespecial #274                // Method java/util/NoSuchElementException."<init>":()V
     268: athrow
     269: aload         13
     271: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     276: astore        14
     278: aload         13
     280: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     285: ifne          293
     288: aload         14
     290: goto          363
     293: aload         14
     295: checkcast     #69                 // class Point
     298: astore        15
     300: iconst_0
     301: istore        16
     303: aload         15
     305: invokevirtual #277                // Method Point.getY:()I
     308: istore        15
     310: aload         13
     312: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     317: astore        16
     319: aload         16
     321: checkcast     #69                 // class Point
     324: astore        17
     326: iconst_0
     327: istore        18
     329: aload         17
     331: invokevirtual #277                // Method Point.getY:()I
     334: istore        17
     336: iload         15
     338: iload         17
     340: if_icmple     351
     343: aload         16
     345: astore        14
     347: iload         17
     349: istore        15
     351: aload         13
     353: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     358: ifne          310
     361: aload         14
     363: checkcast     #69                 // class Point
     366: nop
     367: aload         19
     369: swap
     370: invokeinterface #74,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     375: pop
     376: goto          194
     379: aload         5
     381: checkcast     #76                 // class java/util/List
     384: nop
     385: astore_3
     386: iconst_0
     387: istore        4
     389: aload_0
     390: aload_1
     391: invokespecial #138                // Method minY:(Ljava/util/Set;)I
     394: istore        5
     396: aload_3
     397: checkcast     #38                 // class java/lang/Iterable
     400: astore        6
     402: iconst_0
     403: istore        7
     405: aload         6
     407: astore        8
     409: new           #40                 // class java/util/ArrayList
     412: dup
     413: aload         6
     415: bipush        10
     417: invokestatic  #46                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     420: invokespecial #49                 // Method java/util/ArrayList."<init>":(I)V
     423: checkcast     #51                 // class java/util/Collection
     426: astore        9
     428: iconst_0
     429: istore        10
     431: aload         8
     433: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     438: astore        11
     440: aload         11
     442: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     447: ifeq          496
     450: aload         11
     452: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     457: astore        12
     459: aload         9
     461: aload         12
     463: checkcast     #69                 // class Point
     466: astore        13
     468: astore        14
     470: iconst_0
     471: istore        15
     473: iload         5
     475: aload         13
     477: invokevirtual #277                // Method Point.getY:()I
     480: isub
     481: invokestatic  #212                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     484: aload         14
     486: swap
     487: invokeinterface #74,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     492: pop
     493: goto          440
     496: aload         9
     498: checkcast     #76                 // class java/util/List
     501: nop
     502: nop
     503: nop
     504: areturn

  private final java.util.Set<Point> moveToStart(java.util.Set<Point>, int);
    Code:
       0: aload_1
       1: checkcast     #38                 // class java/lang/Iterable
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: astore        5
      11: new           #40                 // class java/util/ArrayList
      14: dup
      15: aload_3
      16: bipush        10
      18: invokestatic  #46                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #49                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #51                 // class java/util/Collection
      27: astore        6
      29: iconst_0
      30: istore        7
      32: aload         5
      34: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      39: astore        8
      41: aload         8
      43: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      48: ifeq          102
      51: aload         8
      53: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      58: astore        9
      60: aload         6
      62: aload         9
      64: checkcast     #69                 // class Point
      67: astore        10
      69: astore        12
      71: iconst_0
      72: istore        11
      74: aload         10
      76: new           #69                 // class Point
      79: dup
      80: iconst_2
      81: iload_2
      82: iconst_4
      83: isub
      84: invokespecial #70                 // Method Point."<init>":(II)V
      87: invokevirtual #264                // Method Point.plus:(LPoint;)LPoint;
      90: aload         12
      92: swap
      93: invokeinterface #74,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      98: pop
      99: goto          41
     102: aload         6
     104: checkcast     #76                 // class java/util/List
     107: nop
     108: checkcast     #38                 // class java/lang/Iterable
     111: invokestatic  #267                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     114: areturn

  private final java.util.List<java.util.Set<Point>> shapes();
    Code:
       0: iconst_5
       1: anewarray     #135                // class java/util/Set
       4: astore_1
       5: aload_1
       6: iconst_0
       7: iconst_4
       8: anewarray     #69                 // class Point
      11: astore_2
      12: aload_2
      13: iconst_0
      14: new           #69                 // class Point
      17: dup
      18: iconst_0
      19: iconst_0
      20: invokespecial #70                 // Method Point."<init>":(II)V
      23: aastore
      24: aload_2
      25: iconst_1
      26: new           #69                 // class Point
      29: dup
      30: iconst_1
      31: iconst_0
      32: invokespecial #70                 // Method Point."<init>":(II)V
      35: aastore
      36: aload_2
      37: iconst_2
      38: new           #69                 // class Point
      41: dup
      42: iconst_2
      43: iconst_0
      44: invokespecial #70                 // Method Point."<init>":(II)V
      47: aastore
      48: aload_2
      49: iconst_3
      50: new           #69                 // class Point
      53: dup
      54: iconst_3
      55: iconst_0
      56: invokespecial #70                 // Method Point."<init>":(II)V
      59: aastore
      60: aload_2
      61: invokestatic  #343                // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
      64: aastore
      65: aload_1
      66: iconst_1
      67: iconst_5
      68: anewarray     #69                 // class Point
      71: astore_2
      72: aload_2
      73: iconst_0
      74: new           #69                 // class Point
      77: dup
      78: iconst_1
      79: iconst_0
      80: invokespecial #70                 // Method Point."<init>":(II)V
      83: aastore
      84: aload_2
      85: iconst_1
      86: new           #69                 // class Point
      89: dup
      90: iconst_0
      91: iconst_m1
      92: invokespecial #70                 // Method Point."<init>":(II)V
      95: aastore
      96: aload_2
      97: iconst_2
      98: new           #69                 // class Point
     101: dup
     102: iconst_1
     103: iconst_m1
     104: invokespecial #70                 // Method Point."<init>":(II)V
     107: aastore
     108: aload_2
     109: iconst_3
     110: new           #69                 // class Point
     113: dup
     114: iconst_2
     115: iconst_m1
     116: invokespecial #70                 // Method Point."<init>":(II)V
     119: aastore
     120: aload_2
     121: iconst_4
     122: new           #69                 // class Point
     125: dup
     126: iconst_1
     127: bipush        -2
     129: invokespecial #70                 // Method Point."<init>":(II)V
     132: aastore
     133: aload_2
     134: invokestatic  #343                // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
     137: aastore
     138: aload_1
     139: iconst_2
     140: iconst_5
     141: anewarray     #69                 // class Point
     144: astore_2
     145: aload_2
     146: iconst_0
     147: new           #69                 // class Point
     150: dup
     151: iconst_0
     152: iconst_0
     153: invokespecial #70                 // Method Point."<init>":(II)V
     156: aastore
     157: aload_2
     158: iconst_1
     159: new           #69                 // class Point
     162: dup
     163: iconst_1
     164: iconst_0
     165: invokespecial #70                 // Method Point."<init>":(II)V
     168: aastore
     169: aload_2
     170: iconst_2
     171: new           #69                 // class Point
     174: dup
     175: iconst_2
     176: iconst_0
     177: invokespecial #70                 // Method Point."<init>":(II)V
     180: aastore
     181: aload_2
     182: iconst_3
     183: new           #69                 // class Point
     186: dup
     187: iconst_2
     188: iconst_m1
     189: invokespecial #70                 // Method Point."<init>":(II)V
     192: aastore
     193: aload_2
     194: iconst_4
     195: new           #69                 // class Point
     198: dup
     199: iconst_2
     200: bipush        -2
     202: invokespecial #70                 // Method Point."<init>":(II)V
     205: aastore
     206: aload_2
     207: invokestatic  #343                // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
     210: aastore
     211: aload_1
     212: iconst_3
     213: iconst_4
     214: anewarray     #69                 // class Point
     217: astore_2
     218: aload_2
     219: iconst_0
     220: new           #69                 // class Point
     223: dup
     224: iconst_0
     225: iconst_0
     226: invokespecial #70                 // Method Point."<init>":(II)V
     229: aastore
     230: aload_2
     231: iconst_1
     232: new           #69                 // class Point
     235: dup
     236: iconst_0
     237: iconst_m1
     238: invokespecial #70                 // Method Point."<init>":(II)V
     241: aastore
     242: aload_2
     243: iconst_2
     244: new           #69                 // class Point
     247: dup
     248: iconst_0
     249: bipush        -2
     251: invokespecial #70                 // Method Point."<init>":(II)V
     254: aastore
     255: aload_2
     256: iconst_3
     257: new           #69                 // class Point
     260: dup
     261: iconst_0
     262: bipush        -3
     264: invokespecial #70                 // Method Point."<init>":(II)V
     267: aastore
     268: aload_2
     269: invokestatic  #343                // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
     272: aastore
     273: aload_1
     274: iconst_4
     275: iconst_4
     276: anewarray     #69                 // class Point
     279: astore_2
     280: aload_2
     281: iconst_0
     282: new           #69                 // class Point
     285: dup
     286: iconst_0
     287: iconst_0
     288: invokespecial #70                 // Method Point."<init>":(II)V
     291: aastore
     292: aload_2
     293: iconst_1
     294: new           #69                 // class Point
     297: dup
     298: iconst_1
     299: iconst_0
     300: invokespecial #70                 // Method Point."<init>":(II)V
     303: aastore
     304: aload_2
     305: iconst_2
     306: new           #69                 // class Point
     309: dup
     310: iconst_0
     311: iconst_m1
     312: invokespecial #70                 // Method Point."<init>":(II)V
     315: aastore
     316: aload_2
     317: iconst_3
     318: new           #69                 // class Point
     321: dup
     322: iconst_1
     323: iconst_m1
     324: invokespecial #70                 // Method Point."<init>":(II)V
     327: aastore
     328: aload_2
     329: invokestatic  #343                // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
     332: aastore
     333: aload_1
     334: invokestatic  #347                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     337: areturn

  private final java.util.List<Point> jets(java.lang.String);
    Code:
       0: aload_1
       1: checkcast     #350                // class java/lang/CharSequence
       4: astore_2
       5: iconst_0
       6: istore_3
       7: aload_2
       8: astore        4
      10: new           #40                 // class java/util/ArrayList
      13: dup
      14: aload_2
      15: invokeinterface #353,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      20: invokespecial #49                 // Method java/util/ArrayList."<init>":(I)V
      23: checkcast     #51                 // class java/util/Collection
      26: astore        5
      28: iconst_0
      29: istore        6
      31: iconst_0
      32: istore        7
      34: iload         7
      36: aload         4
      38: invokeinterface #353,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      43: if_icmpge     165
      46: aload         4
      48: iload         7
      50: invokeinterface #357,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      55: istore        8
      57: aload         5
      59: iload         8
      61: istore        9
      63: astore        11
      65: iconst_0
      66: istore        10
      68: iload         9
      70: tableswitch   { // 60 to 62
                    60: 108
                    61: 120
                    62: 96
               default: 120
          }
      96: new           #69                 // class Point
      99: dup
     100: iconst_1
     101: iconst_0
     102: invokespecial #70                 // Method Point."<init>":(II)V
     105: goto          149
     108: new           #69                 // class Point
     111: dup
     112: iconst_m1
     113: iconst_0
     114: invokespecial #70                 // Method Point."<init>":(II)V
     117: goto          149
     120: new           #359                // class java/lang/IllegalStateException
     123: dup
     124: new           #361                // class java/lang/StringBuilder
     127: dup
     128: invokespecial #362                // Method java/lang/StringBuilder."<init>":()V
     131: ldc_w         #364                // String Wrong jet
     134: invokevirtual #368                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     137: iload         9
     139: invokevirtual #371                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     142: invokevirtual #375                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     145: invokespecial #377                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     148: athrow
     149: nop
     150: aload         11
     152: swap
     153: invokeinterface #74,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     158: pop
     159: iinc          7, 1
     162: goto          34
     165: aload         5
     167: checkcast     #76                 // class java/util/List
     170: nop
     171: areturn
}

Compiled from "Day17.kt"
public final class Day17Kt {
  public static final void main();
    Code:
       0: new           #8                  // class Day17
       3: dup
       4: new           #10                 // class java/io/File
       7: dup
       8: ldc           #12                 // String src/inputs/Day17.txt
      10: invokespecial #16                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      13: aconst_null
      14: iconst_1
      15: aconst_null
      16: invokestatic  #22                 // Method kotlin/io/FilesKt.readText$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
      19: invokespecial #23                 // Method Day17."<init>":(Ljava/lang/String;)V
      22: astore_0
      23: aload_0
      24: invokevirtual #27                 // Method Day17.part1:()I
      27: istore_1
      28: getstatic     #33                 // Field java/lang/System.out:Ljava/io/PrintStream;
      31: iload_1
      32: invokevirtual #39                 // Method java/io/PrintStream.println:(I)V
      35: aload_0
      36: invokevirtual #43                 // Method Day17.part2:()J
      39: lstore_1
      40: getstatic     #33                 // Field java/lang/System.out:Ljava/io/PrintStream;
      43: lload_1
      44: invokevirtual #46                 // Method java/io/PrintStream.println:(J)V
      47: return

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

Compiled from "Day17.kt"
public final class Day17$calculateHeight$State {
  private final java.util.List<java.lang.Integer> ceiling;

  private final int blockIdx;

  private final int jetIdx;

  public Day17$calculateHeight$State(java.util.List<java.lang.Integer>, int, int);
    Code:
       0: aload_1
       1: ldc           #9                  // String ceiling
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #18                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: putfield      #21                 // Field ceiling:Ljava/util/List;
      15: aload_0
      16: iload_2
      17: putfield      #25                 // Field blockIdx:I
      20: aload_0
      21: iload_3
      22: putfield      #28                 // Field jetIdx:I
      25: return

  public final java.util.List<java.lang.Integer> getCeiling();
    Code:
       0: aload_0
       1: getfield      #21                 // Field ceiling:Ljava/util/List;
       4: areturn

  public final int getBlockIdx();
    Code:
       0: aload_0
       1: getfield      #25                 // Field blockIdx:I
       4: ireturn

  public final int getJetIdx();
    Code:
       0: aload_0
       1: getfield      #28                 // Field jetIdx:I
       4: ireturn

  public final java.util.List<java.lang.Integer> component1();
    Code:
       0: aload_0
       1: getfield      #21                 // Field ceiling:Ljava/util/List;
       4: areturn

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

  public final int component3();
    Code:
       0: aload_0
       1: getfield      #28                 // Field jetIdx:I
       4: ireturn

  public final Day17$calculateHeight$State copy(java.util.List<java.lang.Integer>, int, int);
    Code:
       0: aload_1
       1: ldc           #9                  // String ceiling
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class Day17$calculateHeight$State
       9: dup
      10: aload_1
      11: iload_2
      12: iload_3
      13: invokespecial #44                 // Method "<init>":(Ljava/util/List;II)V
      16: areturn

  public static Day17$calculateHeight$State copy$default(Day17$calculateHeight$State, java.util.List, int, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #21                 // Field ceiling:Ljava/util/List;
      11: astore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #25                 // Field blockIdx:I
      23: istore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #28                 // Field jetIdx:I
      35: istore_3
      36: aload_0
      37: aload_1
      38: iload_2
      39: iload_3
      40: invokevirtual #48                 // Method copy:(Ljava/util/List;II)LDay17$calculateHeight$State;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #52                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #53                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #55                 // String State(ceiling=
       9: invokevirtual #59                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #21                 // Field ceiling:Ljava/util/List;
      16: invokevirtual #62                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #64                 // String , blockIdx=
      21: invokevirtual #59                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #25                 // Field blockIdx:I
      28: invokevirtual #67                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: ldc           #69                 // String , jetIdx=
      33: invokevirtual #59                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #28                 // Field jetIdx:I
      40: invokevirtual #67                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #72                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #74                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #21                 // Field ceiling:Ljava/util/List;
       4: invokevirtual #77                 // Method java/lang/Object.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #25                 // Field blockIdx:I
      16: invokestatic  #82                 // 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      #28                 // Field jetIdx:I
      29: invokestatic  #82                 // Method java/lang/Integer.hashCode:(I)I
      32: iadd
      33: istore_1
      34: iload_1
      35: 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 Day17$calculateHeight$State
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day17$calculateHeight$State
      20: astore_2
      21: aload_0
      22: getfield      #21                 // Field ceiling:Ljava/util/List;
      25: aload_2
      26: getfield      #21                 // Field ceiling:Ljava/util/List;
      29: invokestatic  #89                 // 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      #25                 // Field blockIdx:I
      41: aload_2
      42: getfield      #25                 // Field blockIdx:I
      45: if_icmpeq     50
      48: iconst_0
      49: ireturn
      50: aload_0
      51: getfield      #28                 // Field jetIdx:I
      54: aload_2
      55: getfield      #28                 // Field jetIdx:I
      58: if_icmpeq     63
      61: iconst_0
      62: ireturn
      63: iconst_1
      64: ireturn
}