import java.util.*

class Day12 {

    fun part1(input: List<String>): Int {
        val area = mapToArea(input)
        return area.traverseFromStart()
    }

    fun part2(input: List<String>): Int {
        return mapToArea(input).traverseFromEnd()
    }

    private fun mapToArea(input: List<String>): Area {
        var finishPoint: Point? = null
        var startingPoint: Point? = null
        val field: Map<Point, Int> = input.flatMapIndexed { y, row ->
            row.mapIndexed { x, heightCode ->
                val point = Point(x, y)
                val height = heightCode.decodeHeight()
                when (heightCode) {
                    'E' -> point to height.also { finishPoint = point }
                    'S' -> point to height.also { startingPoint = point }
                    else -> point to height
                }
            }
        }.toMap()
        return Area(startingPoint!!, finishPoint!!, field)
    }

    private fun Char.decodeHeight(): Int {
        return when (this) {
            'S' -> 'a' - 'a'
            'E' -> 'z' - 'a'
            in 'a'..'z' -> this - 'a'
            else -> error("Wrong level value $this")
        }
    }

    data class Area(
        val startingPoint: Point,
        val destination: Point,
        val field: Map<Point, Int>
    ) {
        fun traverseFromStart(): Int {
            val canMove: (Int, Int) -> Boolean = { nextPlace, currentPlace -> nextPlace - currentPlace <= 1 }
            val isDestination: (Path) -> Boolean = { it.point == destination }
            return traverse(canMove, isDestination, startingPoint)
        }

        fun traverseFromEnd(): Int {
            val canMove: (Int, Int) -> Boolean = { nextPlace, currentPlace -> currentPlace - nextPlace <= 1 }
            val isDestination: (Path) -> Boolean = { field[it.point] == 0 }
            return traverse(canMove, isDestination, destination)
        }

        private fun traverse(
            canMove: (Int, Int) -> Boolean,
            isDestination: (Path) -> Boolean,
            startingPoint: Point
        ): Int {
            val toBeEvaluated = PriorityQueue<Path>().apply { add(Path(startingPoint, 0)) }
            val visited = mutableSetOf<Point>()

            while (toBeEvaluated.isNotEmpty()) {
                val currentPlace = toBeEvaluated.poll()
                if (isDestination(currentPlace)) {
                    return currentPlace.distanceSoFar
                }
                if (currentPlace.point !in visited) {
                    visited.add(currentPlace.point)
                    currentPlace.point
                        .neighbors()
                        .filter { nextPlace -> nextPlace in field }
                        .filter { nextPlace -> canMove(field.getValue(nextPlace), field.getValue(currentPlace.point)) }
                        .map { nextPlace -> Path(nextPlace, currentPlace.distanceSoFar + 1) }
                        .forEach { path -> toBeEvaluated.offer(path) }
                }
            }
            error("No path found to destination")
        }
    }

    data class Path(val point: Point, val distanceSoFar: Int) : Comparable<Path> {
        override fun compareTo(other: Path): Int {
            return distanceSoFar - other.distanceSoFar
        }
    }

    data class Point(val x: Int, val y: Int) {
        fun neighbors(): List<Point> {
            return listOf(
                Point(x, y + 1),
                Point(x, y - 1),
                Point(x + 1, y),
                Point(x - 1, y)
            )
        }
    }
}

Compiled from "Day12.kt"
public final class Day12$Area {
  private final Day12$Point startingPoint;

  private final Day12$Point destination;

  private final java.util.Map<Day12$Point, java.lang.Integer> field;

  public Day12$Area(Day12$Point, Day12$Point, java.util.Map<Day12$Point, java.lang.Integer>);
    Code:
       0: aload_1
       1: ldc           #10                 // String startingPoint
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String destination
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_3
      13: ldc           #20                 // String field
      15: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: aload_0
      19: invokespecial #23                 // Method java/lang/Object."<init>":()V
      22: aload_0
      23: aload_1
      24: putfield      #26                 // Field startingPoint:LDay12$Point;
      27: aload_0
      28: aload_2
      29: putfield      #28                 // Field destination:LDay12$Point;
      32: aload_0
      33: aload_3
      34: putfield      #31                 // Field field:Ljava/util/Map;
      37: return

  public final Day12$Point getStartingPoint();
    Code:
       0: aload_0
       1: getfield      #26                 // Field startingPoint:LDay12$Point;
       4: areturn

  public final Day12$Point getDestination();
    Code:
       0: aload_0
       1: getfield      #28                 // Field destination:LDay12$Point;
       4: areturn

  public final java.util.Map<Day12$Point, java.lang.Integer> getField();
    Code:
       0: aload_0
       1: getfield      #31                 // Field field:Ljava/util/Map;
       4: areturn

  public final int traverseFromStart();
    Code:
       0: invokedynamic #61,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function2;
       5: astore_1
       6: aload_0
       7: invokedynamic #73,  0             // InvokeDynamic #1:invoke:(LDay12$Area;)Lkotlin/jvm/functions/Function1;
      12: astore_2
      13: aload_0
      14: aload_1
      15: aload_2
      16: aload_0
      17: getfield      #26                 // Field startingPoint:LDay12$Point;
      20: invokespecial #77                 // Method traverse:(Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;LDay12$Point;)I
      23: ireturn

  public final int traverseFromEnd();
    Code:
       0: invokedynamic #87,  0             // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function2;
       5: astore_1
       6: aload_0
       7: invokedynamic #92,  0             // InvokeDynamic #3:invoke:(LDay12$Area;)Lkotlin/jvm/functions/Function1;
      12: astore_2
      13: aload_0
      14: aload_1
      15: aload_2
      16: aload_0
      17: getfield      #28                 // Field destination:LDay12$Point;
      20: invokespecial #77                 // Method traverse:(Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;LDay12$Point;)I
      23: ireturn

  private final int traverse(kotlin.jvm.functions.Function2<? super java.lang.Integer, ? super java.lang.Integer, java.lang.Boolean>, kotlin.jvm.functions.Function1<? super Day12$Path, java.lang.Boolean>, Day12$Point);
    Code:
       0: new           #95                 // class java/util/PriorityQueue
       3: dup
       4: invokespecial #96                 // Method java/util/PriorityQueue."<init>":()V
       7: astore        5
       9: aload         5
      11: astore        6
      13: iconst_0
      14: istore        7
      16: aload         6
      18: new           #98                 // class Day12$Path
      21: dup
      22: aload_3
      23: iconst_0
      24: invokespecial #101                // Method Day12$Path."<init>":(LDay12$Point;I)V
      27: invokevirtual #105                // Method java/util/PriorityQueue.add:(Ljava/lang/Object;)Z
      30: pop
      31: aload         5
      33: astore        4
      35: new           #107                // class java/util/LinkedHashSet
      38: dup
      39: invokespecial #108                // Method java/util/LinkedHashSet."<init>":()V
      42: checkcast     #110                // class java/util/Set
      45: astore        5
      47: aload         4
      49: checkcast     #112                // class java/util/Collection
      52: invokeinterface #116,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      57: ifne          64
      60: iconst_1
      61: goto          65
      64: iconst_0
      65: ifeq          537
      68: aload         4
      70: invokevirtual #120                // Method java/util/PriorityQueue.poll:()Ljava/lang/Object;
      73: checkcast     #98                 // class Day12$Path
      76: astore        6
      78: aload_2
      79: aload         6
      81: invokestatic  #124                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      84: aload         6
      86: invokeinterface #128,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
      91: checkcast     #130                // class java/lang/Boolean
      94: invokevirtual #133                // Method java/lang/Boolean.booleanValue:()Z
      97: ifeq          106
     100: aload         6
     102: invokevirtual #136                // Method Day12$Path.getDistanceSoFar:()I
     105: ireturn
     106: aload         5
     108: aload         6
     110: invokevirtual #139                // Method Day12$Path.getPoint:()LDay12$Point;
     113: invokeinterface #142,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     118: ifne          47
     121: aload         5
     123: aload         6
     125: invokevirtual #139                // Method Day12$Path.getPoint:()LDay12$Point;
     128: invokeinterface #143,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     133: pop
     134: aload         6
     136: invokevirtual #139                // Method Day12$Path.getPoint:()LDay12$Point;
     139: invokevirtual #149                // Method Day12$Point.neighbors:()Ljava/util/List;
     142: checkcast     #151                // class java/lang/Iterable
     145: astore        7
     147: nop
     148: iconst_0
     149: istore        8
     151: aload         7
     153: astore        9
     155: new           #153                // class java/util/ArrayList
     158: dup
     159: invokespecial #154                // Method java/util/ArrayList."<init>":()V
     162: checkcast     #112                // class java/util/Collection
     165: astore        10
     167: iconst_0
     168: istore        11
     170: aload         9
     172: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     177: astore        12
     179: aload         12
     181: invokeinterface #163,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     186: ifeq          236
     189: aload         12
     191: invokeinterface #166,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     196: astore        13
     198: aload         13
     200: checkcast     #145                // class Day12$Point
     203: astore        14
     205: iconst_0
     206: istore        15
     208: aload_0
     209: getfield      #31                 // Field field:Ljava/util/Map;
     212: aload         14
     214: invokeinterface #171,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     219: nop
     220: ifeq          179
     223: aload         10
     225: aload         13
     227: invokeinterface #172,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     232: pop
     233: goto          179
     236: aload         10
     238: checkcast     #174                // class java/util/List
     241: nop
     242: checkcast     #151                // class java/lang/Iterable
     245: astore        7
     247: nop
     248: iconst_0
     249: istore        8
     251: aload         7
     253: astore        9
     255: new           #153                // class java/util/ArrayList
     258: dup
     259: invokespecial #154                // Method java/util/ArrayList."<init>":()V
     262: checkcast     #112                // class java/util/Collection
     265: astore        10
     267: iconst_0
     268: istore        11
     270: aload         9
     272: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     277: astore        12
     279: aload         12
     281: invokeinterface #163,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     286: ifeq          357
     289: aload         12
     291: invokeinterface #166,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     296: astore        13
     298: aload         13
     300: checkcast     #145                // class Day12$Point
     303: astore        14
     305: iconst_0
     306: istore        15
     308: aload_1
     309: aload_0
     310: getfield      #31                 // Field field:Ljava/util/Map;
     313: aload         14
     315: invokestatic  #180                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
     318: aload_0
     319: getfield      #31                 // Field field:Ljava/util/Map;
     322: aload         6
     324: invokevirtual #139                // Method Day12$Path.getPoint:()LDay12$Point;
     327: invokestatic  #180                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
     330: invokeinterface #184,  3          // InterfaceMethod kotlin/jvm/functions/Function2.invoke:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     335: checkcast     #130                // class java/lang/Boolean
     338: invokevirtual #133                // Method java/lang/Boolean.booleanValue:()Z
     341: ifeq          279
     344: aload         10
     346: aload         13
     348: invokeinterface #172,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     353: pop
     354: goto          279
     357: aload         10
     359: checkcast     #174                // class java/util/List
     362: nop
     363: checkcast     #151                // class java/lang/Iterable
     366: astore        7
     368: nop
     369: iconst_0
     370: istore        8
     372: aload         7
     374: astore        9
     376: new           #153                // class java/util/ArrayList
     379: dup
     380: aload         7
     382: bipush        10
     384: invokestatic  #190                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     387: invokespecial #193                // Method java/util/ArrayList."<init>":(I)V
     390: checkcast     #112                // class java/util/Collection
     393: astore        10
     395: iconst_0
     396: istore        11
     398: aload         9
     400: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     405: astore        12
     407: aload         12
     409: invokeinterface #163,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     414: ifeq          468
     417: aload         12
     419: invokeinterface #166,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     424: astore        13
     426: aload         10
     428: aload         13
     430: checkcast     #145                // class Day12$Point
     433: astore        14
     435: astore        16
     437: iconst_0
     438: istore        15
     440: new           #98                 // class Day12$Path
     443: dup
     444: aload         14
     446: aload         6
     448: invokevirtual #136                // Method Day12$Path.getDistanceSoFar:()I
     451: iconst_1
     452: iadd
     453: invokespecial #101                // Method Day12$Path."<init>":(LDay12$Point;I)V
     456: aload         16
     458: swap
     459: invokeinterface #172,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     464: pop
     465: goto          407
     468: aload         10
     470: checkcast     #174                // class java/util/List
     473: nop
     474: checkcast     #151                // class java/lang/Iterable
     477: astore        7
     479: nop
     480: iconst_0
     481: istore        8
     483: aload         7
     485: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     490: astore        9
     492: aload         9
     494: invokeinterface #163,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     499: ifeq          533
     502: aload         9
     504: invokeinterface #166,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     509: astore        10
     511: aload         10
     513: checkcast     #98                 // class Day12$Path
     516: astore        11
     518: iconst_0
     519: istore        12
     521: aload         4
     523: aload         11
     525: invokevirtual #196                // Method java/util/PriorityQueue.offer:(Ljava/lang/Object;)Z
     528: pop
     529: nop
     530: goto          492
     533: nop
     534: goto          47
     537: new           #198                // class java/lang/IllegalStateException
     540: dup
     541: ldc           #200                // String No path found to destination
     543: invokevirtual #204                // Method java/lang/Object.toString:()Ljava/lang/String;
     546: invokespecial #207                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     549: athrow

  public final Day12$Point component1();
    Code:
       0: aload_0
       1: getfield      #26                 // Field startingPoint:LDay12$Point;
       4: areturn

  public final Day12$Point component2();
    Code:
       0: aload_0
       1: getfield      #28                 // Field destination:LDay12$Point;
       4: areturn

  public final java.util.Map<Day12$Point, java.lang.Integer> component3();
    Code:
       0: aload_0
       1: getfield      #31                 // Field field:Ljava/util/Map;
       4: areturn

  public final Day12$Area copy(Day12$Point, Day12$Point, java.util.Map<Day12$Point, java.lang.Integer>);
    Code:
       0: aload_1
       1: ldc           #10                 // String startingPoint
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String destination
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_3
      13: ldc           #20                 // String field
      15: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: new           #2                  // class Day12$Area
      21: dup
      22: aload_1
      23: aload_2
      24: aload_3
      25: invokespecial #247                // Method "<init>":(LDay12$Point;LDay12$Point;Ljava/util/Map;)V
      28: areturn

  public static Day12$Area copy$default(Day12$Area, Day12$Point, Day12$Point, java.util.Map, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #26                 // Field startingPoint:LDay12$Point;
      11: astore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #28                 // Field destination:LDay12$Point;
      23: astore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #31                 // Field field:Ljava/util/Map;
      35: astore_3
      36: aload_0
      37: aload_1
      38: aload_2
      39: aload_3
      40: invokevirtual #251                // Method copy:(LDay12$Point;LDay12$Point;Ljava/util/Map;)LDay12$Area;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #253                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #254                // Method java/lang/StringBuilder."<init>":()V
       7: ldc_w         #256                // String Area(startingPoint=
      10: invokevirtual #260                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      13: aload_0
      14: getfield      #26                 // Field startingPoint:LDay12$Point;
      17: invokevirtual #263                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      20: ldc_w         #265                // String , destination=
      23: invokevirtual #260                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      26: aload_0
      27: getfield      #28                 // Field destination:LDay12$Point;
      30: invokevirtual #263                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      33: ldc_w         #267                // String , field=
      36: invokevirtual #260                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      39: aload_0
      40: getfield      #31                 // Field field:Ljava/util/Map;
      43: invokevirtual #263                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      46: bipush        41
      48: invokevirtual #270                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      51: invokevirtual #271                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      54: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #26                 // Field startingPoint:LDay12$Point;
       4: invokevirtual #274                // Method Day12$Point.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #28                 // Field destination:LDay12$Point;
      16: invokevirtual #274                // Method Day12$Point.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #31                 // Field field:Ljava/util/Map;
      29: invokevirtual #275                // Method java/lang/Object.hashCode:()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 Day12$Area
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day12$Area
      20: astore_2
      21: aload_0
      22: getfield      #26                 // Field startingPoint:LDay12$Point;
      25: aload_2
      26: getfield      #26                 // Field startingPoint:LDay12$Point;
      29: invokestatic  #282                // 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      #28                 // Field destination:LDay12$Point;
      41: aload_2
      42: getfield      #28                 // Field destination:LDay12$Point;
      45: invokestatic  #282                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: aload_0
      54: getfield      #31                 // Field field:Ljava/util/Map;
      57: aload_2
      58: getfield      #31                 // Field field:Ljava/util/Map;
      61: invokestatic  #282                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      64: ifne          69
      67: iconst_0
      68: ireturn
      69: iconst_1
      70: ireturn

  private static final boolean traverseFromStart$lambda$0(int, int);
    Code:
       0: iload_0
       1: iload_1
       2: isub
       3: iconst_1
       4: if_icmpgt     11
       7: iconst_1
       8: goto          12
      11: iconst_0
      12: ireturn

  private static final boolean traverseFromStart$lambda$1(Day12$Area, Day12$Path);
    Code:
       0: aload_1
       1: ldc_w         #285                // String it
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: invokevirtual #139                // Method Day12$Path.getPoint:()LDay12$Point;
      11: aload_0
      12: getfield      #28                 // Field destination:LDay12$Point;
      15: invokestatic  #282                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      18: ireturn

  private static final boolean traverseFromEnd$lambda$2(int, int);
    Code:
       0: iload_1
       1: iload_0
       2: isub
       3: iconst_1
       4: if_icmpgt     11
       7: iconst_1
       8: goto          12
      11: iconst_0
      12: ireturn

  private static final boolean traverseFromEnd$lambda$3(Day12$Area, Day12$Path);
    Code:
       0: aload_1
       1: ldc_w         #285                // String it
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: getfield      #31                 // Field field:Ljava/util/Map;
      11: aload_1
      12: invokevirtual #139                // Method Day12$Path.getPoint:()LDay12$Point;
      15: invokeinterface #289,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      20: checkcast     #291                // class java/lang/Integer
      23: dup
      24: ifnonnull     31
      27: pop
      28: goto          41
      31: invokevirtual #294                // Method java/lang/Integer.intValue:()I
      34: ifne          41
      37: iconst_1
      38: goto          42
      41: iconst_0
      42: ireturn
}

Compiled from "Day12.kt"
public final class Day12$Path implements java.lang.Comparable<Day12$Path> {
  private final Day12$Point point;

  private final int distanceSoFar;

  public Day12$Path(Day12$Point, int);
    Code:
       0: aload_1
       1: ldc           #12                 // String point
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #21                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: putfield      #24                 // Field point:LDay12$Point;
      15: aload_0
      16: iload_2
      17: putfield      #28                 // Field distanceSoFar:I
      20: return

  public final Day12$Point getPoint();
    Code:
       0: aload_0
       1: getfield      #24                 // Field point:LDay12$Point;
       4: areturn

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

  public int compareTo(Day12$Path);
    Code:
       0: aload_1
       1: ldc           #38                 // String other
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #28                 // Field distanceSoFar:I
      10: aload_1
      11: getfield      #28                 // Field distanceSoFar:I
      14: isub
      15: ireturn

  public final Day12$Point component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field point:LDay12$Point;
       4: areturn

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

  public final Day12$Path copy(Day12$Point, int);
    Code:
       0: aload_1
       1: ldc           #12                 // String point
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class Day12$Path
       9: dup
      10: aload_1
      11: iload_2
      12: invokespecial #44                 // Method "<init>":(LDay12$Point;I)V
      15: areturn

  public static Day12$Path copy$default(Day12$Path, Day12$Point, int, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #24                 // Field point:LDay12$Point;
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #28                 // Field distanceSoFar:I
      21: istore_2
      22: aload_0
      23: aload_1
      24: iload_2
      25: invokevirtual #48                 // Method copy:(LDay12$Point;I)LDay12$Path;
      28: 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 Path(point=
       9: invokevirtual #59                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field point:LDay12$Point;
      16: invokevirtual #62                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #64                 // String , distanceSoFar=
      21: invokevirtual #59                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #28                 // Field distanceSoFar:I
      28: invokevirtual #67                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #70                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #72                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field point:LDay12$Point;
       4: invokevirtual #77                 // Method Day12$Point.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #28                 // Field distanceSoFar:I
      16: invokestatic  #82                 // Method java/lang/Integer.hashCode:(I)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 Day12$Path
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day12$Path
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field point:LDay12$Point;
      25: aload_2
      26: getfield      #24                 // Field point:LDay12$Point;
      29: invokestatic  #90                 // 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      #28                 // Field distanceSoFar:I
      41: aload_2
      42: getfield      #28                 // Field distanceSoFar:I
      45: if_icmpeq     50
      48: iconst_0
      49: ireturn
      50: iconst_1
      51: ireturn

  public int compareTo(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #2                  // class Day12$Path
       5: invokevirtual #94                 // Method compareTo:(LDay12$Path;)I
       8: ireturn
}

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

  public final int part1(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_0
       7: aload_1
       8: invokespecial #26                 // Method mapToArea:(Ljava/util/List;)LDay12$Area;
      11: astore_2
      12: aload_2
      13: invokevirtual #32                 // Method Day12$Area.traverseFromStart:()I
      16: ireturn

  public final int part2(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_0
       7: aload_1
       8: invokespecial #26                 // Method mapToArea:(Ljava/util/List;)LDay12$Area;
      11: invokevirtual #39                 // Method Day12$Area.traverseFromEnd:()I
      14: ireturn

  private final Day12$Area mapToArea(java.util.List<java.lang.String>);
    Code:
       0: aconst_null
       1: astore_2
       2: aconst_null
       3: astore_3
       4: aload_1
       5: checkcast     #42                 // class java/lang/Iterable
       8: astore        5
      10: new           #44                 // class java/util/ArrayList
      13: dup
      14: invokespecial #45                 // Method java/util/ArrayList."<init>":()V
      17: checkcast     #47                 // class java/util/Collection
      20: astore        6
      22: iconst_0
      23: istore        7
      25: aload         5
      27: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      32: astore        8
      34: aload         8
      36: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      41: ifeq          336
      44: aload         8
      46: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      51: astore        9
      53: iload         7
      55: iinc          7, 1
      58: istore        10
      60: iload         10
      62: ifge          68
      65: invokestatic  #66                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      68: iload         10
      70: aload         9
      72: checkcast     #68                 // class java/lang/String
      75: astore        11
      77: istore        12
      79: iconst_0
      80: istore        13
      82: aload         11
      84: checkcast     #70                 // class java/lang/CharSequence
      87: astore        14
      89: iconst_0
      90: istore        15
      92: aload         14
      94: astore        16
      96: new           #44                 // class java/util/ArrayList
      99: dup
     100: aload         14
     102: invokeinterface #73,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     107: invokespecial #76                 // Method java/util/ArrayList."<init>":(I)V
     110: checkcast     #47                 // class java/util/Collection
     113: astore        17
     115: iconst_0
     116: istore        18
     118: iconst_0
     119: istore        19
     121: iconst_0
     122: istore        20
     124: iload         20
     126: aload         16
     128: invokeinterface #73,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     133: if_icmpge     316
     136: aload         16
     138: iload         20
     140: invokeinterface #80,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     145: istore        21
     147: aload         17
     149: iload         19
     151: iinc          19, 1
     154: iload         21
     156: istore        22
     158: istore        23
     160: astore        24
     162: iconst_0
     163: istore        25
     165: new           #82                 // class Day12$Point
     168: dup
     169: iload         23
     171: iload         12
     173: invokespecial #85                 // Method Day12$Point."<init>":(II)V
     176: astore        26
     178: aload_0
     179: iload         22
     181: invokespecial #89                 // Method decodeHeight:(C)I
     184: istore        27
     186: iload         22
     188: lookupswitch  { // 2
                    69: 216
                    83: 253
               default: 290
          }
     216: aload         26
     218: iload         27
     220: invokestatic  #95                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     223: astore        28
     225: aload         28
     227: checkcast     #97                 // class java/lang/Number
     230: invokevirtual #100                // Method java/lang/Number.intValue:()I
     233: istore        29
     235: astore        30
     237: iconst_0
     238: istore        31
     240: aload         26
     242: astore_2
     243: aload         30
     245: aload         28
     247: invokestatic  #106                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     250: goto          300
     253: aload         26
     255: iload         27
     257: invokestatic  #95                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     260: astore        28
     262: aload         28
     264: checkcast     #97                 // class java/lang/Number
     267: invokevirtual #100                // Method java/lang/Number.intValue:()I
     270: istore        29
     272: astore        30
     274: iconst_0
     275: istore        31
     277: aload         26
     279: astore_3
     280: aload         30
     282: aload         28
     284: invokestatic  #106                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     287: goto          300
     290: aload         26
     292: iload         27
     294: invokestatic  #95                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     297: invokestatic  #106                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     300: nop
     301: aload         24
     303: swap
     304: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     309: pop
     310: iinc          20, 1
     313: goto          124
     316: aload         17
     318: checkcast     #112                // class java/util/List
     321: nop
     322: checkcast     #42                 // class java/lang/Iterable
     325: nop
     326: aload         6
     328: swap
     329: invokestatic  #116                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     332: pop
     333: goto          34
     336: aload         6
     338: checkcast     #112                // class java/util/List
     341: checkcast     #42                 // class java/lang/Iterable
     344: invokestatic  #122                // Method kotlin/collections/MapsKt.toMap:(Ljava/lang/Iterable;)Ljava/util/Map;
     347: astore        4
     349: new           #28                 // class Day12$Area
     352: dup
     353: aload_3
     354: dup
     355: invokestatic  #126                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     358: aload_2
     359: dup
     360: invokestatic  #126                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     363: aload         4
     365: invokespecial #129                // Method Day12$Area."<init>":(LDay12$Point;LDay12$Point;Ljava/util/Map;)V
     368: areturn

  private final int decodeHeight(char);
    Code:
       0: iload_1
       1: istore_2
       2: iload_2
       3: bipush        83
       5: if_icmpne     12
       8: iconst_0
       9: goto          84
      12: iload_2
      13: bipush        69
      15: if_icmpne     23
      18: bipush        25
      20: goto          84
      23: bipush        97
      25: iload_2
      26: if_icmpgt     43
      29: iload_2
      30: bipush        123
      32: if_icmpge     39
      35: iconst_1
      36: goto          44
      39: iconst_0
      40: goto          44
      43: iconst_0
      44: ifeq          54
      47: iload_1
      48: bipush        97
      50: isub
      51: goto          84
      54: new           #162                // class java/lang/IllegalStateException
      57: dup
      58: new           #164                // class java/lang/StringBuilder
      61: dup
      62: invokespecial #165                // Method java/lang/StringBuilder."<init>":()V
      65: ldc           #167                // String Wrong level value
      67: invokevirtual #171                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      70: iload_1
      71: invokevirtual #174                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      74: invokevirtual #178                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      77: invokevirtual #179                // Method java/lang/Object.toString:()Ljava/lang/String;
      80: invokespecial #182                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
      83: athrow
      84: ireturn
}

Compiled from "Day12.kt"
public final class Day12$Point {
  private final int x;

  private final int y;

  public Day12$Point(int, int);
    Code:
       0: aload_0
       1: invokespecial #9                  // Method java/lang/Object."<init>":()V
       4: aload_0
       5: iload_1
       6: putfield      #13                 // Field x:I
       9: aload_0
      10: iload_2
      11: putfield      #16                 // Field y:I
      14: return

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

  public final int getY();
    Code:
       0: aload_0
       1: getfield      #16                 // Field y:I
       4: ireturn

  public final java.util.List<Day12$Point> neighbors();
    Code:
       0: iconst_4
       1: anewarray     #2                  // class Day12$Point
       4: astore_1
       5: aload_1
       6: iconst_0
       7: new           #2                  // class Day12$Point
      10: dup
      11: aload_0
      12: getfield      #13                 // Field x:I
      15: aload_0
      16: getfield      #16                 // Field y:I
      19: iconst_1
      20: iadd
      21: invokespecial #27                 // Method "<init>":(II)V
      24: aastore
      25: aload_1
      26: iconst_1
      27: new           #2                  // class Day12$Point
      30: dup
      31: aload_0
      32: getfield      #13                 // Field x:I
      35: aload_0
      36: getfield      #16                 // Field y:I
      39: iconst_1
      40: isub
      41: invokespecial #27                 // Method "<init>":(II)V
      44: aastore
      45: aload_1
      46: iconst_2
      47: new           #2                  // class Day12$Point
      50: dup
      51: aload_0
      52: getfield      #13                 // Field x:I
      55: iconst_1
      56: iadd
      57: aload_0
      58: getfield      #16                 // Field y:I
      61: invokespecial #27                 // Method "<init>":(II)V
      64: aastore
      65: aload_1
      66: iconst_3
      67: new           #2                  // class Day12$Point
      70: dup
      71: aload_0
      72: getfield      #13                 // Field x:I
      75: iconst_1
      76: isub
      77: aload_0
      78: getfield      #16                 // Field y:I
      81: invokespecial #27                 // Method "<init>":(II)V
      84: aastore
      85: aload_1
      86: invokestatic  #33                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      89: areturn

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

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

  public final Day12$Point copy(int, int);
    Code:
       0: new           #2                  // class Day12$Point
       3: dup
       4: iload_1
       5: iload_2
       6: invokespecial #27                 // Method "<init>":(II)V
       9: areturn

  public static Day12$Point copy$default(Day12$Point, int, int, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #13                 // Field x:I
      10: istore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #16                 // Field y:I
      21: istore_2
      22: aload_0
      23: iload_1
      24: iload_2
      25: invokevirtual #41                 // Method copy:(II)LDay12$Point;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #45                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #46                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #48                 // String Point(x=
       9: invokevirtual #52                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #13                 // Field x:I
      16: invokevirtual #55                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #57                 // String , y=
      21: invokevirtual #52                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #16                 // Field y:I
      28: invokevirtual #55                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #60                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #62                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #13                 // Field x:I
       4: invokestatic  #68                 // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #16                 // Field y:I
      16: invokestatic  #68                 // Method java/lang/Integer.hashCode:(I)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 Day12$Point
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day12$Point
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field x:I
      25: aload_2
      26: getfield      #13                 // Field x:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #16                 // Field y:I
      38: aload_2
      39: getfield      #16                 // Field y:I
      42: if_icmpeq     47
      45: iconst_0
      46: ireturn
      47: iconst_1
      48: ireturn
}


class Day13 {

    fun part1(input: String): Int {
        return input.split("\n\n").map { it.lines() }
            .map { (packet, other) -> packet.mapToPacketData() to other.mapToPacketData() }
            .mapIndexed { index, pair -> if (pair.first.compareTo(pair.second) < 1) index + 1 else 0 }
            .sum()
    }

    fun part2(input: String): Int {
        val packets = input.split("\n\n").map { it.lines() }
            .flatMap { (packet, other) -> listOf(packet.mapToPacketData(), other.mapToPacketData()) }
        val dividerPacket2 = "[[6]]".mapToPacketData()
        val dividerPacket1 = "[[2]]".mapToPacketData()
        val ordered = (packets + dividerPacket1 + dividerPacket2).sorted()
        return (ordered.indexOf(dividerPacket1) + 1) * (ordered.indexOf(dividerPacket2) + 1)
    }

    private fun String.mapToPacketData(): PacketData {
        val bracketsAndNumbers = split(Regex("((?<=[\\[\\],])|(?=[\\[\\],]))"))
            .filter { it.isNotBlank() }
            .filter { it != "," }
            .iterator()
        return mapIteratorToPacketData(bracketsAndNumbers)
    }

    private fun mapIteratorToPacketData(input: Iterator<String>): PacketData {
        val packets = mutableListOf<PacketData>()
        while (input.hasNext()) {
            when (val symbol = input.next()) {
                "]" -> return ListPacketData(packets)
                "[" -> packets.add(mapIteratorToPacketData(input))
                else -> packets.add(IntPacketData(symbol.toInt()))
            }
        }
        return ListPacketData(packets)
    }

    sealed class PacketData : Comparable<PacketData>
    data class IntPacketData(val data: Int) : PacketData() {
        override fun compareTo(other: PacketData): Int {
            return when (other) {
                is IntPacketData -> data.compareTo(other.data)
                is ListPacketData -> ListPacketData(listOf(this)).compareTo(other)
            }
        }
    }

    data class ListPacketData(val data: List<PacketData>) : PacketData() {
        override fun compareTo(other: PacketData): Int {
            return when (other) {
                is IntPacketData -> compareTo(ListPacketData(listOf(other)))
                is ListPacketData -> data.zip(other.data)
                    .map { (packet1, packet2) -> packet1.compareTo(packet2) }
                    .firstOrNull { it != 0 } ?: data.size.compareTo(other.data.size)
            }
        }
    }

}

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

  public final int part1(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #23                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #25                 // class java/lang/String
      14: astore_2
      15: aload_2
      16: iconst_0
      17: ldc           #27                 // String \n\n
      19: aastore
      20: aload_2
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #33                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #35                 // class java/lang/Iterable
      32: astore_2
      33: iconst_0
      34: istore_3
      35: aload_2
      36: astore        4
      38: new           #37                 // class java/util/ArrayList
      41: dup
      42: aload_2
      43: bipush        10
      45: invokestatic  #43                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      48: invokespecial #46                 // Method java/util/ArrayList."<init>":(I)V
      51: checkcast     #48                 // class java/util/Collection
      54: astore        5
      56: iconst_0
      57: istore        6
      59: aload         4
      61: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      66: astore        7
      68: aload         7
      70: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      75: ifeq          121
      78: aload         7
      80: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      85: astore        8
      87: aload         5
      89: aload         8
      91: checkcast     #25                 // class java/lang/String
      94: astore        9
      96: astore        14
      98: iconst_0
      99: istore        10
     101: aload         9
     103: checkcast     #23                 // class java/lang/CharSequence
     106: invokestatic  #66                 // Method kotlin/text/StringsKt.lines:(Ljava/lang/CharSequence;)Ljava/util/List;
     109: aload         14
     111: swap
     112: invokeinterface #70,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     117: pop
     118: goto          68
     121: aload         5
     123: checkcast     #72                 // class java/util/List
     126: nop
     127: checkcast     #35                 // class java/lang/Iterable
     130: astore_2
     131: nop
     132: iconst_0
     133: istore_3
     134: aload_2
     135: astore        4
     137: new           #37                 // class java/util/ArrayList
     140: dup
     141: aload_2
     142: bipush        10
     144: invokestatic  #43                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     147: invokespecial #46                 // Method java/util/ArrayList."<init>":(I)V
     150: checkcast     #48                 // class java/util/Collection
     153: astore        5
     155: iconst_0
     156: istore        6
     158: aload         4
     160: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     165: astore        7
     167: aload         7
     169: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     174: ifeq          253
     177: aload         7
     179: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     184: astore        8
     186: aload         5
     188: aload         8
     190: checkcast     #72                 // class java/util/List
     193: astore        9
     195: astore        14
     197: iconst_0
     198: istore        10
     200: aload         9
     202: iconst_0
     203: invokeinterface #76,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     208: checkcast     #25                 // class java/lang/String
     211: astore        11
     213: aload         9
     215: iconst_1
     216: invokeinterface #76,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     221: checkcast     #25                 // class java/lang/String
     224: astore        12
     226: aload_0
     227: aload         11
     229: invokespecial #80                 // Method mapToPacketData:(Ljava/lang/String;)LDay13$PacketData;
     232: aload_0
     233: aload         12
     235: invokespecial #80                 // Method mapToPacketData:(Ljava/lang/String;)LDay13$PacketData;
     238: invokestatic  #86                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     241: aload         14
     243: swap
     244: invokeinterface #70,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     249: pop
     250: goto          167
     253: aload         5
     255: checkcast     #72                 // class java/util/List
     258: nop
     259: checkcast     #35                 // class java/lang/Iterable
     262: astore_2
     263: nop
     264: iconst_0
     265: istore_3
     266: aload_2
     267: astore        4
     269: new           #37                 // class java/util/ArrayList
     272: dup
     273: aload_2
     274: bipush        10
     276: invokestatic  #43                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     279: invokespecial #46                 // Method java/util/ArrayList."<init>":(I)V
     282: checkcast     #48                 // class java/util/Collection
     285: astore        5
     287: iconst_0
     288: istore        6
     290: iconst_0
     291: istore        7
     293: aload         4
     295: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     300: astore        8
     302: aload         8
     304: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     309: ifeq          397
     312: aload         8
     314: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     319: astore        9
     321: aload         5
     323: iload         7
     325: iinc          7, 1
     328: istore        10
     330: iload         10
     332: ifge          338
     335: invokestatic  #89                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     338: iload         10
     340: aload         9
     342: checkcast     #91                 // class kotlin/Pair
     345: astore        11
     347: istore        12
     349: astore        14
     351: iconst_0
     352: istore        13
     354: aload         11
     356: invokevirtual #94                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     359: checkcast     #96                 // class Day13$PacketData
     362: aload         11
     364: invokevirtual #99                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     367: invokevirtual #103                // Method Day13$PacketData.compareTo:(Ljava/lang/Object;)I
     370: iconst_1
     371: if_icmpge     381
     374: iload         12
     376: iconst_1
     377: iadd
     378: goto          382
     381: iconst_0
     382: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     385: aload         14
     387: swap
     388: invokeinterface #70,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     393: pop
     394: goto          302
     397: aload         5
     399: checkcast     #72                 // class java/util/List
     402: nop
     403: checkcast     #35                 // class java/lang/Iterable
     406: invokestatic  #113                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     409: ireturn

  public final int part2(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #23                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #25                 // class java/lang/String
      14: astore_3
      15: aload_3
      16: iconst_0
      17: ldc           #27                 // String \n\n
      19: aastore
      20: aload_3
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #33                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #35                 // class java/lang/Iterable
      32: astore_3
      33: iconst_0
      34: istore        4
      36: aload_3
      37: astore        5
      39: new           #37                 // class java/util/ArrayList
      42: dup
      43: aload_3
      44: bipush        10
      46: invokestatic  #43                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      49: invokespecial #46                 // Method java/util/ArrayList."<init>":(I)V
      52: checkcast     #48                 // class java/util/Collection
      55: astore        6
      57: iconst_0
      58: istore        7
      60: aload         5
      62: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      67: astore        8
      69: aload         8
      71: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      76: ifeq          122
      79: aload         8
      81: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      86: astore        9
      88: aload         6
      90: aload         9
      92: checkcast     #25                 // class java/lang/String
      95: astore        10
      97: astore        15
      99: iconst_0
     100: istore        11
     102: aload         10
     104: checkcast     #23                 // class java/lang/CharSequence
     107: invokestatic  #66                 // Method kotlin/text/StringsKt.lines:(Ljava/lang/CharSequence;)Ljava/util/List;
     110: aload         15
     112: swap
     113: invokeinterface #70,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     118: pop
     119: goto          69
     122: aload         6
     124: checkcast     #72                 // class java/util/List
     127: nop
     128: checkcast     #35                 // class java/lang/Iterable
     131: astore_3
     132: nop
     133: iconst_0
     134: istore        4
     136: aload_3
     137: astore        5
     139: new           #37                 // class java/util/ArrayList
     142: dup
     143: invokespecial #140                // Method java/util/ArrayList."<init>":()V
     146: checkcast     #48                 // class java/util/Collection
     149: astore        6
     151: iconst_0
     152: istore        7
     154: aload         5
     156: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     161: astore        8
     163: aload         8
     165: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     170: ifeq          265
     173: aload         8
     175: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     180: astore        9
     182: aload         9
     184: checkcast     #72                 // class java/util/List
     187: astore        10
     189: iconst_0
     190: istore        11
     192: aload         10
     194: iconst_0
     195: invokeinterface #76,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     200: checkcast     #25                 // class java/lang/String
     203: astore        12
     205: aload         10
     207: iconst_1
     208: invokeinterface #76,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     213: checkcast     #25                 // class java/lang/String
     216: astore        13
     218: iconst_2
     219: anewarray     #96                 // class Day13$PacketData
     222: astore        14
     224: aload         14
     226: iconst_0
     227: aload_0
     228: aload         12
     230: invokespecial #80                 // Method mapToPacketData:(Ljava/lang/String;)LDay13$PacketData;
     233: aastore
     234: aload         14
     236: iconst_1
     237: aload_0
     238: aload         13
     240: invokespecial #80                 // Method mapToPacketData:(Ljava/lang/String;)LDay13$PacketData;
     243: aastore
     244: aload         14
     246: invokestatic  #144                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     249: checkcast     #35                 // class java/lang/Iterable
     252: astore        10
     254: aload         6
     256: aload         10
     258: invokestatic  #148                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     261: pop
     262: goto          163
     265: aload         6
     267: checkcast     #72                 // class java/util/List
     270: nop
     271: astore_2
     272: aload_0
     273: ldc           #150                // String [[6]]
     275: invokespecial #80                 // Method mapToPacketData:(Ljava/lang/String;)LDay13$PacketData;
     278: astore_3
     279: aload_0
     280: ldc           #152                // String [[2]]
     282: invokespecial #80                 // Method mapToPacketData:(Ljava/lang/String;)LDay13$PacketData;
     285: astore        4
     287: aload_2
     288: checkcast     #48                 // class java/util/Collection
     291: aload         4
     293: invokestatic  #156                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     296: checkcast     #48                 // class java/util/Collection
     299: aload_3
     300: invokestatic  #156                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     303: checkcast     #35                 // class java/lang/Iterable
     306: invokestatic  #160                // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
     309: astore        5
     311: aload         5
     313: aload         4
     315: invokeinterface #163,  2          // InterfaceMethod java/util/List.indexOf:(Ljava/lang/Object;)I
     320: iconst_1
     321: iadd
     322: aload         5
     324: aload_3
     325: invokeinterface #163,  2          // InterfaceMethod java/util/List.indexOf:(Ljava/lang/Object;)I
     330: iconst_1
     331: iadd
     332: imul
     333: ireturn

  private final Day13$PacketData mapToPacketData(java.lang.String);
    Code:
       0: aload_1
       1: checkcast     #23                 // class java/lang/CharSequence
       4: astore_3
       5: new           #179                // class kotlin/text/Regex
       8: dup
       9: ldc           #181                // String ((?<=[\\[\\],])|(?=[\\[\\],]))
      11: invokespecial #184                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
      14: astore        4
      16: iconst_0
      17: istore        5
      19: aload         4
      21: aload_3
      22: iload         5
      24: invokevirtual #188                // Method kotlin/text/Regex.split:(Ljava/lang/CharSequence;I)Ljava/util/List;
      27: checkcast     #35                 // class java/lang/Iterable
      30: astore_3
      31: nop
      32: iconst_0
      33: istore        4
      35: aload_3
      36: astore        5
      38: new           #37                 // class java/util/ArrayList
      41: dup
      42: invokespecial #140                // Method java/util/ArrayList."<init>":()V
      45: checkcast     #48                 // class java/util/Collection
      48: astore        6
      50: iconst_0
      51: istore        7
      53: aload         5
      55: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      60: astore        8
      62: aload         8
      64: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      69: ifeq          124
      72: aload         8
      74: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      79: astore        9
      81: aload         9
      83: checkcast     #25                 // class java/lang/String
      86: astore        10
      88: iconst_0
      89: istore        11
      91: aload         10
      93: checkcast     #23                 // class java/lang/CharSequence
      96: invokestatic  #192                // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
      99: ifne          106
     102: iconst_1
     103: goto          107
     106: iconst_0
     107: nop
     108: ifeq          62
     111: aload         6
     113: aload         9
     115: invokeinterface #70,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     120: pop
     121: goto          62
     124: aload         6
     126: checkcast     #72                 // class java/util/List
     129: nop
     130: checkcast     #35                 // class java/lang/Iterable
     133: astore_3
     134: nop
     135: iconst_0
     136: istore        4
     138: aload_3
     139: astore        5
     141: new           #37                 // class java/util/ArrayList
     144: dup
     145: invokespecial #140                // Method java/util/ArrayList."<init>":()V
     148: checkcast     #48                 // class java/util/Collection
     151: astore        6
     153: iconst_0
     154: istore        7
     156: aload         5
     158: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     163: astore        8
     165: aload         8
     167: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     172: ifeq          225
     175: aload         8
     177: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     182: astore        9
     184: aload         9
     186: checkcast     #25                 // class java/lang/String
     189: astore        10
     191: iconst_0
     192: istore        11
     194: aload         10
     196: ldc           #194                // String ,
     198: invokestatic  #198                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     201: ifne          208
     204: iconst_1
     205: goto          209
     208: iconst_0
     209: ifeq          165
     212: aload         6
     214: aload         9
     216: invokeinterface #70,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     221: pop
     222: goto          165
     225: aload         6
     227: checkcast     #72                 // class java/util/List
     230: nop
     231: invokeinterface #199,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     236: astore_2
     237: aload_0
     238: aload_2
     239: invokespecial #203                // Method mapIteratorToPacketData:(Ljava/util/Iterator;)LDay13$PacketData;
     242: areturn

  private final Day13$PacketData mapIteratorToPacketData(java.util.Iterator<java.lang.String>);
    Code:
       0: new           #37                 // class java/util/ArrayList
       3: dup
       4: invokespecial #140                // Method java/util/ArrayList."<init>":()V
       7: checkcast     #72                 // class java/util/List
      10: astore_2
      11: aload_1
      12: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      17: ifeq          95
      20: aload_1
      21: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      26: checkcast     #25                 // class java/lang/String
      29: astore_3
      30: aload_3
      31: ldc           #215                // String ]
      33: invokestatic  #198                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      36: ifeq          51
      39: new           #217                // class Day13$ListPacketData
      42: dup
      43: aload_2
      44: invokespecial #220                // Method Day13$ListPacketData."<init>":(Ljava/util/List;)V
      47: checkcast     #96                 // class Day13$PacketData
      50: areturn
      51: aload_3
      52: ldc           #222                // String [
      54: invokestatic  #198                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      57: ifeq          74
      60: aload_2
      61: aload_0
      62: aload_1
      63: invokespecial #203                // Method mapIteratorToPacketData:(Ljava/util/Iterator;)LDay13$PacketData;
      66: invokeinterface #223,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      71: goto          91
      74: aload_2
      75: new           #225                // class Day13$IntPacketData
      78: dup
      79: aload_3
      80: invokestatic  #228                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      83: invokespecial #229                // Method Day13$IntPacketData."<init>":(I)V
      86: invokeinterface #223,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      91: pop
      92: goto          11
      95: new           #217                // class Day13$ListPacketData
      98: dup
      99: aload_2
     100: invokespecial #220                // Method Day13$ListPacketData."<init>":(Ljava/util/List;)V
     103: checkcast     #96                 // class Day13$PacketData
     106: areturn
}

Compiled from "Day13.kt"
public final class Day13$IntPacketData extends Day13$PacketData {
  private final int data;

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

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

  public int compareTo(Day13$PacketData);
    Code:
       0: aload_1
       1: ldc           #22                 // String other
       3: invokestatic  #28                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: astore_2
       8: aload_2
       9: instanceof    #2                  // class Day13$IntPacketData
      12: ifeq          32
      15: aload_0
      16: getfield      #13                 // Field data:I
      19: aload_1
      20: checkcast     #2                  // class Day13$IntPacketData
      23: getfield      #13                 // Field data:I
      26: invokestatic  #32                 // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
      29: goto          65
      32: aload_2
      33: instanceof    #34                 // class Day13$ListPacketData
      36: ifeq          57
      39: new           #34                 // class Day13$ListPacketData
      42: dup
      43: aload_0
      44: invokestatic  #40                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      47: invokespecial #43                 // Method Day13$ListPacketData."<init>":(Ljava/util/List;)V
      50: aload_1
      51: invokevirtual #45                 // Method Day13$ListPacketData.compareTo:(LDay13$PacketData;)I
      54: goto          65
      57: new           #47                 // class kotlin/NoWhenBranchMatchedException
      60: dup
      61: invokespecial #50                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      64: athrow
      65: ireturn

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

  public final Day13$IntPacketData copy(int);
    Code:
       0: new           #2                  // class Day13$IntPacketData
       3: dup
       4: iload_1
       5: invokespecial #56                 // Method "<init>":(I)V
       8: areturn

  public static Day13$IntPacketData copy$default(Day13$IntPacketData, int, int, java.lang.Object);
    Code:
       0: iload_2
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #13                 // Field data:I
      10: istore_1
      11: aload_0
      12: iload_1
      13: invokevirtual #60                 // Method copy:(I)LDay13$IntPacketData;
      16: areturn

  public java.lang.String toString();
    Code:
       0: new           #64                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #65                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #67                 // String IntPacketData(data=
       9: invokevirtual #71                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #13                 // Field data:I
      16: invokevirtual #74                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: bipush        41
      21: invokevirtual #77                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      24: invokevirtual #79                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      27: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #13                 // Field data:I
       4: invokestatic  #85                 // Method java/lang/Integer.hashCode:(I)I
       7: 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 Day13$IntPacketData
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day13$IntPacketData
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field data:I
      25: aload_2
      26: getfield      #13                 // Field data:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: iconst_1
      35: ireturn

  public int compareTo(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #4                  // class Day13$PacketData
       5: invokevirtual #91                 // Method compareTo:(LDay13$PacketData;)I
       8: ireturn
}

Compiled from "Day13.kt"
public abstract class Day13$PacketData implements java.lang.Comparable<Day13$PacketData> {
  private Day13$PacketData();
    Code:
       0: aload_0
       1: invokespecial #11                 // Method java/lang/Object."<init>":()V
       4: return

  public Day13$PacketData(kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: invokespecial #15                 // Method "<init>":()V
       4: return
}

Compiled from "Day13.kt"
public final class Day13$ListPacketData extends Day13$PacketData {
  private final java.util.List<Day13$PacketData> data;

  public Day13$ListPacketData(java.util.List<? extends Day13$PacketData>);
    Code:
       0: aload_1
       1: ldc           #10                 // String data
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aconst_null
       8: invokespecial #19                 // Method Day13$PacketData."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      11: aload_0
      12: aload_1
      13: putfield      #22                 // Field data:Ljava/util/List;
      16: return

  public final java.util.List<Day13$PacketData> getData();
    Code:
       0: aload_0
       1: getfield      #22                 // Field data:Ljava/util/List;
       4: areturn

  public int compareTo(Day13$PacketData);
    Code:
       0: aload_1
       1: ldc           #31                 // String other
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: astore_2
       8: aload_2
       9: instanceof    #33                 // class Day13$IntPacketData
      12: ifeq          36
      15: aload_0
      16: new           #2                  // class Day13$ListPacketData
      19: dup
      20: aload_1
      21: invokestatic  #39                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      24: invokespecial #41                 // Method "<init>":(Ljava/util/List;)V
      27: checkcast     #4                  // class Day13$PacketData
      30: invokevirtual #43                 // Method compareTo:(LDay13$PacketData;)I
      33: goto          301
      36: aload_2
      37: instanceof    #2                  // class Day13$ListPacketData
      40: ifeq          293
      43: aload_0
      44: getfield      #22                 // Field data:Ljava/util/List;
      47: checkcast     #45                 // class java/lang/Iterable
      50: aload_1
      51: checkcast     #2                  // class Day13$ListPacketData
      54: getfield      #22                 // Field data:Ljava/util/List;
      57: checkcast     #45                 // class java/lang/Iterable
      60: invokestatic  #49                 // Method kotlin/collections/CollectionsKt.zip:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/List;
      63: checkcast     #45                 // class java/lang/Iterable
      66: astore_3
      67: nop
      68: iconst_0
      69: istore        4
      71: aload_3
      72: astore        5
      74: new           #51                 // class java/util/ArrayList
      77: dup
      78: aload_3
      79: bipush        10
      81: invokestatic  #55                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      84: invokespecial #58                 // Method java/util/ArrayList."<init>":(I)V
      87: checkcast     #60                 // class java/util/Collection
      90: astore        6
      92: iconst_0
      93: istore        7
      95: aload         5
      97: invokeinterface #64,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     102: astore        8
     104: aload         8
     106: invokeinterface #70,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     111: ifeq          179
     114: aload         8
     116: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     121: astore        9
     123: aload         6
     125: aload         9
     127: checkcast     #76                 // class kotlin/Pair
     130: astore        10
     132: astore        14
     134: iconst_0
     135: istore        11
     137: aload         10
     139: invokevirtual #79                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     142: checkcast     #4                  // class Day13$PacketData
     145: astore        12
     147: aload         10
     149: invokevirtual #82                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
     152: checkcast     #4                  // class Day13$PacketData
     155: astore        13
     157: aload         12
     159: aload         13
     161: invokevirtual #85                 // Method Day13$PacketData.compareTo:(Ljava/lang/Object;)I
     164: invokestatic  #91                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     167: aload         14
     169: swap
     170: invokeinterface #95,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     175: pop
     176: goto          104
     179: aload         6
     181: checkcast     #97                 // class java/util/List
     184: nop
     185: checkcast     #45                 // class java/lang/Iterable
     188: astore_3
     189: nop
     190: iconst_0
     191: istore        4
     193: aload_3
     194: invokeinterface #64,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     199: astore        5
     201: aload         5
     203: invokeinterface #70,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     208: ifeq          251
     211: aload         5
     213: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     218: astore        6
     220: aload         6
     222: checkcast     #99                 // class java/lang/Number
     225: invokevirtual #103                // Method java/lang/Number.intValue:()I
     228: istore        7
     230: iconst_0
     231: istore        8
     233: iload         7
     235: ifeq          242
     238: iconst_1
     239: goto          243
     242: iconst_0
     243: ifeq          201
     246: aload         6
     248: goto          252
     251: aconst_null
     252: checkcast     #87                 // class java/lang/Integer
     255: dup
     256: ifnull        265
     259: invokevirtual #104                // Method java/lang/Integer.intValue:()I
     262: goto          301
     265: pop
     266: aload_0
     267: getfield      #22                 // Field data:Ljava/util/List;
     270: invokeinterface #107,  1          // InterfaceMethod java/util/List.size:()I
     275: aload_1
     276: checkcast     #2                  // class Day13$ListPacketData
     279: getfield      #22                 // Field data:Ljava/util/List;
     282: invokeinterface #107,  1          // InterfaceMethod java/util/List.size:()I
     287: invokestatic  #111                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     290: goto          301
     293: new           #113                // class kotlin/NoWhenBranchMatchedException
     296: dup
     297: invokespecial #116                // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     300: athrow
     301: ireturn

  public final java.util.List<Day13$PacketData> component1();
    Code:
       0: aload_0
       1: getfield      #22                 // Field data:Ljava/util/List;
       4: areturn

  public final Day13$ListPacketData copy(java.util.List<? extends Day13$PacketData>);
    Code:
       0: aload_1
       1: ldc           #10                 // String data
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class Day13$ListPacketData
       9: dup
      10: aload_1
      11: invokespecial #41                 // Method "<init>":(Ljava/util/List;)V
      14: areturn

  public static Day13$ListPacketData copy$default(Day13$ListPacketData, java.util.List, int, java.lang.Object);
    Code:
       0: iload_2
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #22                 // Field data:Ljava/util/List;
      10: astore_1
      11: aload_0
      12: aload_1
      13: invokevirtual #144                // Method copy:(Ljava/util/List;)LDay13$ListPacketData;
      16: areturn

  public java.lang.String toString();
    Code:
       0: new           #148                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #149                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #151                // String ListPacketData(data=
       9: invokevirtual #155                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #22                 // Field data:Ljava/util/List;
      16: invokevirtual #158                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: bipush        41
      21: invokevirtual #161                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      24: invokevirtual #163                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      27: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #22                 // Field data:Ljava/util/List;
       4: invokevirtual #166                // Method java/lang/Object.hashCode:()I
       7: 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 Day13$ListPacketData
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day13$ListPacketData
      20: astore_2
      21: aload_0
      22: getfield      #22                 // Field data:Ljava/util/List;
      25: aload_2
      26: getfield      #22                 // Field data:Ljava/util/List;
      29: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: iconst_1
      38: ireturn

  public int compareTo(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #4                  // class Day13$PacketData
       5: invokevirtual #43                 // Method compareTo:(LDay13$PacketData;)I
       8: ireturn
}