import kotlin.String
import kotlin.collections.List

public object Day16 {
    enum class Direction {
        UP,
        DOWN,
        LEFT,
        RIGHT
    }

    public fun part1(input: List<String>): String {
        val startCoordinate = Day10.Coordinate(0, 0)
        val startDirection = Direction.RIGHT
        return energizeCount(startCoordinate, startDirection, input).toString()
    }

    private fun energizeCount(startCoordinate: Day10.Coordinate, startDirection: Direction, grid: List<String>): Int {
        val seenCoordinates = mutableSetOf<Pair<Day10.Coordinate, Direction>>()
        val queue = ArrayDeque<Pair<Day10.Coordinate, Direction>>()
        queue.add(startCoordinate to startDirection)
        while (queue.isNotEmpty()) {
            val (currentCoordinate, currentDirection) = queue.removeFirst()
            if (currentCoordinate.x < 0 || currentCoordinate.y < 0 || currentCoordinate.y >= grid.size || currentCoordinate.x >= grid[currentCoordinate.y].length) {
                continue
            }
            if (seenCoordinates.contains(currentCoordinate to currentDirection)) {
                continue
            }
            seenCoordinates.add(currentCoordinate to currentDirection)
            val nextCoordinates = next(currentCoordinate, currentDirection, grid)
            queue.addAll(nextCoordinates)
        }
        return seenCoordinates.map { (coordinate, _) -> coordinate }.distinct().count()
    }

    private fun next(
        currentCoordinate: Day10.Coordinate,
        direction: Direction,
        grid: List<String>
    ): List<Pair<Day10.Coordinate, Direction>> {
        val currentMarker = grid[currentCoordinate.y][currentCoordinate.x]
        when (currentMarker) {
            '|' -> {
                if (direction == Direction.UP || direction == Direction.DOWN) {
                    val nextCoordinate = when (direction) {
                        Direction.UP -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y - 1)
                        Direction.DOWN -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y + 1)
                        else -> throw IllegalStateException("Should not happen")
                    }
                    // Keep going the same direction
                    return listOf(nextCoordinate to direction)
                } else {
                    return listOf(
                        Day10.Coordinate(currentCoordinate.x, currentCoordinate.y - 1) to Direction.UP,
                        Day10.Coordinate(currentCoordinate.x, currentCoordinate.y + 1) to Direction.DOWN
                    )
                }
            }

            '-' -> {
                if (direction == Direction.LEFT || direction == Direction.RIGHT) {
                    val nextCoordinate = when (direction) {
                        Direction.LEFT -> Day10.Coordinate(currentCoordinate.x - 1, currentCoordinate.y)
                        Direction.RIGHT -> Day10.Coordinate(currentCoordinate.x + 1, currentCoordinate.y)
                        else -> throw IllegalStateException("Should not happen")
                    }
                    // Keep going the same direction
                    return listOf(nextCoordinate to direction)
                } else {
                    return listOf(
                        Day10.Coordinate(currentCoordinate.x - 1, currentCoordinate.y) to Direction.LEFT,
                        Day10.Coordinate(currentCoordinate.x + 1, currentCoordinate.y) to Direction.RIGHT
                    )
                }
            }

            '\\' -> {
                val (nextCoordinate, nextDirection) = when (direction) {
                    Direction.RIGHT -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y + 1) to Direction.DOWN
                    Direction.LEFT -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y - 1) to Direction.UP
                    Direction.UP -> Day10.Coordinate(currentCoordinate.x - 1, currentCoordinate.y) to Direction.LEFT
                    Direction.DOWN -> Day10.Coordinate(currentCoordinate.x + 1, currentCoordinate.y) to Direction.RIGHT
                }
                return listOf(nextCoordinate to nextDirection)
            }

            '/' -> {
                val (nextCoordinate, nextDirection) = when (direction) {
                    Direction.LEFT -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y + 1) to Direction.DOWN
                    Direction.RIGHT -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y - 1) to Direction.UP
                    Direction.DOWN -> Day10.Coordinate(currentCoordinate.x - 1, currentCoordinate.y) to Direction.LEFT
                    Direction.UP -> Day10.Coordinate(currentCoordinate.x + 1, currentCoordinate.y) to Direction.RIGHT
                }
                return listOf(nextCoordinate to nextDirection)
            }

            '.' -> {
                val nextCoordinate = when (direction) {
                    Direction.UP -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y - 1)
                    Direction.DOWN -> Day10.Coordinate(currentCoordinate.x, currentCoordinate.y + 1)
                    Direction.LEFT -> Day10.Coordinate(currentCoordinate.x - 1, currentCoordinate.y)
                    Direction.RIGHT -> Day10.Coordinate(currentCoordinate.x + 1, currentCoordinate.y)
                }
                return listOf(nextCoordinate to direction)
            }

            else -> throw IllegalStateException("Should not happen")
        }
    }

    public fun part2(input: List<String>): String {
        val leftStarts = (0 until input.size).map { y ->
            Day10.Coordinate(0, y) to Direction.RIGHT
        }

        val rightStarts = (0 until input.size).map { y ->
            Day10.Coordinate(input[y].length - 1, y) to Direction.LEFT
        }
        val topStarts = (0 until input[0].length).map { x ->
            Day10.Coordinate(x, 0) to Direction.DOWN
        }
        val bottomStarts = (0 until input[0].length).map { x ->
            Day10.Coordinate(x, input.size - 1) to Direction.UP
        }
        val allStarts = leftStarts + rightStarts + topStarts + bottomStarts
        return allStarts.maxOf { (coordinate, direction) ->
            energizeCount(coordinate, direction, input)
        }.toString()
    }
}

Compiled from "Day16.kt"
public final class Day16$Direction extends java.lang.Enum<Day16$Direction> {
  public static final Day16$Direction UP;

  public static final Day16$Direction DOWN;

  public static final Day16$Direction LEFT;

  public static final Day16$Direction RIGHT;

  private static final Day16$Direction[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private Day16$Direction();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #10                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: return

  public static Day16$Direction[] values();
    Code:
       0: getstatic     #22                 // Field $VALUES:[LDay16$Direction;
       3: invokevirtual #28                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #29                 // class "[LDay16$Direction;"
       9: areturn

  public static Day16$Direction valueOf(java.lang.String);
    Code:
       0: ldc           #2                  // class Day16$Direction
       2: aload_0
       3: invokestatic  #34                 // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
       6: checkcast     #2                  // class Day16$Direction
       9: areturn

  public static kotlin.enums.EnumEntries<Day16$Direction> getEntries();
    Code:
       0: getstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final Day16$Direction[] $values();
    Code:
       0: iconst_4
       1: anewarray     #2                  // class Day16$Direction
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #47                 // Field UP:LDay16$Direction;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #50                 // Field DOWN:LDay16$Direction;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #53                 // Field LEFT:LDay16$Direction;
      22: aastore
      23: aload_0
      24: iconst_3
      25: getstatic     #56                 // Field RIGHT:LDay16$Direction;
      28: aastore
      29: aload_0
      30: areturn

  static {};
    Code:
       0: new           #2                  // class Day16$Direction
       3: dup
       4: ldc           #58                 // String UP
       6: iconst_0
       7: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      10: putstatic     #47                 // Field UP:LDay16$Direction;
      13: new           #2                  // class Day16$Direction
      16: dup
      17: ldc           #60                 // String DOWN
      19: iconst_1
      20: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      23: putstatic     #50                 // Field DOWN:LDay16$Direction;
      26: new           #2                  // class Day16$Direction
      29: dup
      30: ldc           #61                 // String LEFT
      32: iconst_2
      33: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      36: putstatic     #53                 // Field LEFT:LDay16$Direction;
      39: new           #2                  // class Day16$Direction
      42: dup
      43: ldc           #62                 // String RIGHT
      45: iconst_3
      46: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      49: putstatic     #56                 // Field RIGHT:LDay16$Direction;
      52: invokestatic  #64                 // Method $values:()[LDay16$Direction;
      55: putstatic     #22                 // Field $VALUES:[LDay16$Direction;
      58: getstatic     #22                 // Field $VALUES:[LDay16$Direction;
      61: checkcast     #66                 // class "[Ljava/lang/Enum;"
      64: invokestatic  #72                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      67: putstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      70: return
}

Compiled from "Day16.kt"
public final class Day16 {
  public static final Day16 INSTANCE;

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

  public final java.lang.String 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: new           #24                 // class Day10$Coordinate
       9: dup
      10: iconst_0
      11: iconst_0
      12: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
      15: astore_2
      16: getstatic     #33                 // Field Day16$Direction.RIGHT:LDay16$Direction;
      19: astore_3
      20: aload_0
      21: aload_2
      22: aload_3
      23: aload_1
      24: invokespecial #37                 // Method energizeCount:(LDay10$Coordinate;LDay16$Direction;Ljava/util/List;)I
      27: invokestatic  #43                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
      30: areturn

  private final int energizeCount(Day10$Coordinate, Day16$Direction, java.util.List<java.lang.String>);
    Code:
       0: new           #50                 // class java/util/LinkedHashSet
       3: dup
       4: invokespecial #51                 // Method java/util/LinkedHashSet."<init>":()V
       7: checkcast     #53                 // class java/util/Set
      10: astore        4
      12: new           #55                 // class kotlin/collections/ArrayDeque
      15: dup
      16: invokespecial #56                 // Method kotlin/collections/ArrayDeque."<init>":()V
      19: astore        5
      21: aload         5
      23: aload_1
      24: aload_2
      25: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      28: invokevirtual #66                 // Method kotlin/collections/ArrayDeque.add:(Ljava/lang/Object;)Z
      31: pop
      32: aload         5
      34: checkcast     #68                 // class java/util/Collection
      37: invokeinterface #72,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
      42: ifne          49
      45: iconst_1
      46: goto          50
      49: iconst_0
      50: ifeq          201
      53: aload         5
      55: invokevirtual #76                 // Method kotlin/collections/ArrayDeque.removeFirst:()Ljava/lang/Object;
      58: checkcast     #78                 // class kotlin/Pair
      61: astore        6
      63: aload         6
      65: invokevirtual #81                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
      68: checkcast     #24                 // class Day10$Coordinate
      71: astore        7
      73: aload         6
      75: invokevirtual #84                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      78: checkcast     #29                 // class Day16$Direction
      81: astore        8
      83: aload         7
      85: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
      88: iflt          138
      91: aload         7
      93: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
      96: iflt          138
      99: aload         7
     101: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     104: aload_3
     105: invokeinterface #96,  1           // InterfaceMethod java/util/List.size:()I
     110: if_icmpge     138
     113: aload         7
     115: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     118: aload_3
     119: aload         7
     121: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     124: invokeinterface #100,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     129: checkcast     #39                 // class java/lang/String
     132: invokevirtual #103                // Method java/lang/String.length:()I
     135: if_icmplt     141
     138: goto          32
     141: aload         4
     143: aload         7
     145: aload         8
     147: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     150: invokeinterface #106,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     155: ifeq          161
     158: goto          32
     161: aload         4
     163: aload         7
     165: aload         8
     167: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     170: invokeinterface #107,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     175: pop
     176: aload_0
     177: aload         7
     179: aload         8
     181: aload_3
     182: invokespecial #111                // Method next:(LDay10$Coordinate;LDay16$Direction;Ljava/util/List;)Ljava/util/List;
     185: astore        9
     187: aload         5
     189: aload         9
     191: checkcast     #68                 // class java/util/Collection
     194: invokevirtual #115                // Method kotlin/collections/ArrayDeque.addAll:(Ljava/util/Collection;)Z
     197: pop
     198: goto          32
     201: aload         4
     203: checkcast     #117                // class java/lang/Iterable
     206: astore        6
     208: iconst_0
     209: istore        7
     211: aload         6
     213: astore        8
     215: new           #119                // class java/util/ArrayList
     218: dup
     219: aload         6
     221: bipush        10
     223: invokestatic  #125                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     226: invokespecial #128                // Method java/util/ArrayList."<init>":(I)V
     229: checkcast     #68                 // class java/util/Collection
     232: astore        9
     234: iconst_0
     235: istore        10
     237: aload         8
     239: invokeinterface #132,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     244: astore        11
     246: aload         11
     248: invokeinterface #137,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     253: ifeq          303
     256: aload         11
     258: invokeinterface #139,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     263: astore        12
     265: aload         9
     267: aload         12
     269: checkcast     #78                 // class kotlin/Pair
     272: astore        13
     274: astore        16
     276: iconst_0
     277: istore        14
     279: aload         13
     281: invokevirtual #81                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     284: checkcast     #24                 // class Day10$Coordinate
     287: astore        15
     289: aload         15
     291: aload         16
     293: swap
     294: invokeinterface #140,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     299: pop
     300: goto          246
     303: aload         9
     305: checkcast     #93                 // class java/util/List
     308: nop
     309: checkcast     #117                // class java/lang/Iterable
     312: invokestatic  #144                // Method kotlin/collections/CollectionsKt.distinct:(Ljava/lang/Iterable;)Ljava/util/List;
     315: checkcast     #68                 // class java/util/Collection
     318: invokeinterface #145,  1          // InterfaceMethod java/util/Collection.size:()I
     323: ireturn

  private final java.util.List<kotlin.Pair<Day10$Coordinate, Day16$Direction>> next(Day10$Coordinate, Day16$Direction, java.util.List<java.lang.String>);
    Code:
       0: aload_3
       1: aload_1
       2: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
       5: invokeinterface #100,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      10: checkcast     #39                 // class java/lang/String
      13: aload_1
      14: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
      17: invokevirtual #170                // Method java/lang/String.charAt:(I)C
      20: istore        4
      22: iload         4
      24: lookupswitch  { // 5
                    45: 248
                    46: 789
                    47: 605
                    92: 420
                   124: 76
               default: 928
          }
      76: aload_2
      77: getstatic     #173                // Field Day16$Direction.UP:LDay16$Direction;
      80: if_acmpeq     90
      83: aload_2
      84: getstatic     #176                // Field Day16$Direction.DOWN:LDay16$Direction;
      87: if_acmpne     182
      90: aload_2
      91: getstatic     #182                // Field Day16$WhenMappings.$EnumSwitchMapping$0:[I
      94: swap
      95: invokevirtual #185                // Method Day16$Direction.ordinal:()I
      98: iaload
      99: tableswitch   { // 1 to 2
                     1: 120
                     2: 140
               default: 160
          }
     120: new           #24                 // class Day10$Coordinate
     123: dup
     124: aload_1
     125: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     128: aload_1
     129: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     132: iconst_1
     133: isub
     134: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     137: goto          170
     140: new           #24                 // class Day10$Coordinate
     143: dup
     144: aload_1
     145: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     148: aload_1
     149: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     152: iconst_1
     153: iadd
     154: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     157: goto          170
     160: new           #187                // class java/lang/IllegalStateException
     163: dup
     164: ldc           #189                // String Should not happen
     166: invokespecial #192                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     169: athrow
     170: astore        5
     172: aload         5
     174: aload_2
     175: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     178: invokestatic  #196                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     181: areturn
     182: iconst_2
     183: anewarray     #78                 // class kotlin/Pair
     186: astore        5
     188: aload         5
     190: iconst_0
     191: new           #24                 // class Day10$Coordinate
     194: dup
     195: aload_1
     196: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     199: aload_1
     200: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     203: iconst_1
     204: isub
     205: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     208: getstatic     #173                // Field Day16$Direction.UP:LDay16$Direction;
     211: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     214: aastore
     215: aload         5
     217: iconst_1
     218: new           #24                 // class Day10$Coordinate
     221: dup
     222: aload_1
     223: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     226: aload_1
     227: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     230: iconst_1
     231: iadd
     232: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     235: getstatic     #176                // Field Day16$Direction.DOWN:LDay16$Direction;
     238: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     241: aastore
     242: aload         5
     244: invokestatic  #199                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     247: areturn
     248: aload_2
     249: getstatic     #202                // Field Day16$Direction.LEFT:LDay16$Direction;
     252: if_acmpeq     262
     255: aload_2
     256: getstatic     #33                 // Field Day16$Direction.RIGHT:LDay16$Direction;
     259: if_acmpne     354
     262: aload_2
     263: getstatic     #182                // Field Day16$WhenMappings.$EnumSwitchMapping$0:[I
     266: swap
     267: invokevirtual #185                // Method Day16$Direction.ordinal:()I
     270: iaload
     271: tableswitch   { // 3 to 4
                     3: 292
                     4: 312
               default: 332
          }
     292: new           #24                 // class Day10$Coordinate
     295: dup
     296: aload_1
     297: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     300: iconst_1
     301: isub
     302: aload_1
     303: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     306: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     309: goto          342
     312: new           #24                 // class Day10$Coordinate
     315: dup
     316: aload_1
     317: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     320: iconst_1
     321: iadd
     322: aload_1
     323: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     326: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     329: goto          342
     332: new           #187                // class java/lang/IllegalStateException
     335: dup
     336: ldc           #189                // String Should not happen
     338: invokespecial #192                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     341: athrow
     342: astore        5
     344: aload         5
     346: aload_2
     347: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     350: invokestatic  #196                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     353: areturn
     354: iconst_2
     355: anewarray     #78                 // class kotlin/Pair
     358: astore        5
     360: aload         5
     362: iconst_0
     363: new           #24                 // class Day10$Coordinate
     366: dup
     367: aload_1
     368: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     371: iconst_1
     372: isub
     373: aload_1
     374: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     377: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     380: getstatic     #202                // Field Day16$Direction.LEFT:LDay16$Direction;
     383: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     386: aastore
     387: aload         5
     389: iconst_1
     390: new           #24                 // class Day10$Coordinate
     393: dup
     394: aload_1
     395: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     398: iconst_1
     399: iadd
     400: aload_1
     401: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     404: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     407: getstatic     #33                 // Field Day16$Direction.RIGHT:LDay16$Direction;
     410: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     413: aastore
     414: aload         5
     416: invokestatic  #199                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     419: areturn
     420: aload_2
     421: getstatic     #182                // Field Day16$WhenMappings.$EnumSwitchMapping$0:[I
     424: swap
     425: invokevirtual #185                // Method Day16$Direction.ordinal:()I
     428: iaload
     429: tableswitch   { // 1 to 4
                     1: 512
                     2: 538
                     3: 486
                     4: 460
               default: 564
          }
     460: new           #24                 // class Day10$Coordinate
     463: dup
     464: aload_1
     465: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     468: aload_1
     469: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     472: iconst_1
     473: iadd
     474: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     477: getstatic     #176                // Field Day16$Direction.DOWN:LDay16$Direction;
     480: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     483: goto          572
     486: new           #24                 // class Day10$Coordinate
     489: dup
     490: aload_1
     491: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     494: aload_1
     495: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     498: iconst_1
     499: isub
     500: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     503: getstatic     #173                // Field Day16$Direction.UP:LDay16$Direction;
     506: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     509: goto          572
     512: new           #24                 // class Day10$Coordinate
     515: dup
     516: aload_1
     517: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     520: iconst_1
     521: isub
     522: aload_1
     523: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     526: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     529: getstatic     #202                // Field Day16$Direction.LEFT:LDay16$Direction;
     532: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     535: goto          572
     538: new           #24                 // class Day10$Coordinate
     541: dup
     542: aload_1
     543: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     546: iconst_1
     547: iadd
     548: aload_1
     549: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     552: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     555: getstatic     #33                 // Field Day16$Direction.RIGHT:LDay16$Direction;
     558: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     561: goto          572
     564: new           #204                // class kotlin/NoWhenBranchMatchedException
     567: dup
     568: invokespecial #205                // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     571: athrow
     572: astore        5
     574: aload         5
     576: invokevirtual #81                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     579: checkcast     #24                 // class Day10$Coordinate
     582: astore        6
     584: aload         5
     586: invokevirtual #84                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
     589: checkcast     #29                 // class Day16$Direction
     592: astore        7
     594: aload         6
     596: aload         7
     598: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     601: invokestatic  #196                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     604: areturn
     605: aload_2
     606: getstatic     #182                // Field Day16$WhenMappings.$EnumSwitchMapping$0:[I
     609: swap
     610: invokevirtual #185                // Method Day16$Direction.ordinal:()I
     613: iaload
     614: tableswitch   { // 1 to 4
                     1: 722
                     2: 696
                     3: 644
                     4: 670
               default: 748
          }
     644: new           #24                 // class Day10$Coordinate
     647: dup
     648: aload_1
     649: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     652: aload_1
     653: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     656: iconst_1
     657: iadd
     658: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     661: getstatic     #176                // Field Day16$Direction.DOWN:LDay16$Direction;
     664: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     667: goto          756
     670: new           #24                 // class Day10$Coordinate
     673: dup
     674: aload_1
     675: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     678: aload_1
     679: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     682: iconst_1
     683: isub
     684: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     687: getstatic     #173                // Field Day16$Direction.UP:LDay16$Direction;
     690: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     693: goto          756
     696: new           #24                 // class Day10$Coordinate
     699: dup
     700: aload_1
     701: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     704: iconst_1
     705: isub
     706: aload_1
     707: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     710: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     713: getstatic     #202                // Field Day16$Direction.LEFT:LDay16$Direction;
     716: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     719: goto          756
     722: new           #24                 // class Day10$Coordinate
     725: dup
     726: aload_1
     727: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     730: iconst_1
     731: iadd
     732: aload_1
     733: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     736: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     739: getstatic     #33                 // Field Day16$Direction.RIGHT:LDay16$Direction;
     742: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     745: goto          756
     748: new           #204                // class kotlin/NoWhenBranchMatchedException
     751: dup
     752: invokespecial #205                // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     755: athrow
     756: astore        5
     758: aload         5
     760: invokevirtual #81                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     763: checkcast     #24                 // class Day10$Coordinate
     766: astore        6
     768: aload         5
     770: invokevirtual #84                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
     773: checkcast     #29                 // class Day16$Direction
     776: astore        7
     778: aload         6
     780: aload         7
     782: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     785: invokestatic  #196                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     788: areturn
     789: aload_2
     790: getstatic     #182                // Field Day16$WhenMappings.$EnumSwitchMapping$0:[I
     793: swap
     794: invokevirtual #185                // Method Day16$Direction.ordinal:()I
     797: iaload
     798: tableswitch   { // 1 to 4
                     1: 828
                     2: 848
                     3: 868
                     4: 888
               default: 908
          }
     828: new           #24                 // class Day10$Coordinate
     831: dup
     832: aload_1
     833: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     836: aload_1
     837: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     840: iconst_1
     841: isub
     842: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     845: goto          916
     848: new           #24                 // class Day10$Coordinate
     851: dup
     852: aload_1
     853: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     856: aload_1
     857: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     860: iconst_1
     861: iadd
     862: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     865: goto          916
     868: new           #24                 // class Day10$Coordinate
     871: dup
     872: aload_1
     873: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     876: iconst_1
     877: isub
     878: aload_1
     879: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     882: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     885: goto          916
     888: new           #24                 // class Day10$Coordinate
     891: dup
     892: aload_1
     893: invokevirtual #88                 // Method Day10$Coordinate.getX:()I
     896: iconst_1
     897: iadd
     898: aload_1
     899: invokevirtual #91                 // Method Day10$Coordinate.getY:()I
     902: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     905: goto          916
     908: new           #204                // class kotlin/NoWhenBranchMatchedException
     911: dup
     912: invokespecial #205                // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     915: athrow
     916: astore        5
     918: aload         5
     920: aload_2
     921: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     924: invokestatic  #196                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     927: areturn
     928: new           #187                // class java/lang/IllegalStateException
     931: dup
     932: ldc           #189                // String Should not happen
     934: invokespecial #192                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     937: athrow

  public final java.lang.String 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: iconst_0
       7: aload_1
       8: invokeinterface #96,  1           // InterfaceMethod java/util/List.size:()I
      13: invokestatic  #217                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
      16: checkcast     #117                // class java/lang/Iterable
      19: astore_3
      20: iconst_0
      21: istore        4
      23: aload_3
      24: astore        5
      26: new           #119                // class java/util/ArrayList
      29: dup
      30: aload_3
      31: bipush        10
      33: invokestatic  #125                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      36: invokespecial #128                // Method java/util/ArrayList."<init>":(I)V
      39: checkcast     #68                 // class java/util/Collection
      42: astore        6
      44: iconst_0
      45: istore        7
      47: aload         5
      49: invokeinterface #132,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      54: astore        8
      56: aload         8
      58: invokeinterface #137,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      63: ifeq          115
      66: aload         8
      68: checkcast     #219                // class kotlin/collections/IntIterator
      71: invokevirtual #222                // Method kotlin/collections/IntIterator.nextInt:()I
      74: istore        9
      76: aload         6
      78: iload         9
      80: istore        10
      82: astore        15
      84: iconst_0
      85: istore        11
      87: new           #24                 // class Day10$Coordinate
      90: dup
      91: iconst_0
      92: iload         10
      94: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
      97: getstatic     #33                 // Field Day16$Direction.RIGHT:LDay16$Direction;
     100: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     103: aload         15
     105: swap
     106: invokeinterface #140,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     111: pop
     112: goto          56
     115: aload         6
     117: checkcast     #93                 // class java/util/List
     120: nop
     121: astore_2
     122: iconst_0
     123: aload_1
     124: invokeinterface #96,  1           // InterfaceMethod java/util/List.size:()I
     129: invokestatic  #217                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     132: checkcast     #117                // class java/lang/Iterable
     135: astore        4
     137: iconst_0
     138: istore        5
     140: aload         4
     142: astore        6
     144: new           #119                // class java/util/ArrayList
     147: dup
     148: aload         4
     150: bipush        10
     152: invokestatic  #125                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     155: invokespecial #128                // Method java/util/ArrayList."<init>":(I)V
     158: checkcast     #68                 // class java/util/Collection
     161: astore        7
     163: iconst_0
     164: istore        8
     166: aload         6
     168: invokeinterface #132,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     173: astore        9
     175: aload         9
     177: invokeinterface #137,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     182: ifeq          249
     185: aload         9
     187: checkcast     #219                // class kotlin/collections/IntIterator
     190: invokevirtual #222                // Method kotlin/collections/IntIterator.nextInt:()I
     193: istore        10
     195: aload         7
     197: iload         10
     199: istore        11
     201: astore        15
     203: iconst_0
     204: istore        12
     206: new           #24                 // class Day10$Coordinate
     209: dup
     210: aload_1
     211: iload         11
     213: invokeinterface #100,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     218: checkcast     #39                 // class java/lang/String
     221: invokevirtual #103                // Method java/lang/String.length:()I
     224: iconst_1
     225: isub
     226: iload         11
     228: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     231: getstatic     #202                // Field Day16$Direction.LEFT:LDay16$Direction;
     234: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     237: aload         15
     239: swap
     240: invokeinterface #140,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     245: pop
     246: goto          175
     249: aload         7
     251: checkcast     #93                 // class java/util/List
     254: nop
     255: astore_3
     256: iconst_0
     257: aload_1
     258: iconst_0
     259: invokeinterface #100,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     264: checkcast     #39                 // class java/lang/String
     267: invokevirtual #103                // Method java/lang/String.length:()I
     270: invokestatic  #217                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     273: checkcast     #117                // class java/lang/Iterable
     276: astore        5
     278: iconst_0
     279: istore        6
     281: aload         5
     283: astore        7
     285: new           #119                // class java/util/ArrayList
     288: dup
     289: aload         5
     291: bipush        10
     293: invokestatic  #125                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     296: invokespecial #128                // Method java/util/ArrayList."<init>":(I)V
     299: checkcast     #68                 // class java/util/Collection
     302: astore        8
     304: iconst_0
     305: istore        9
     307: aload         7
     309: invokeinterface #132,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     314: astore        10
     316: aload         10
     318: invokeinterface #137,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     323: ifeq          375
     326: aload         10
     328: checkcast     #219                // class kotlin/collections/IntIterator
     331: invokevirtual #222                // Method kotlin/collections/IntIterator.nextInt:()I
     334: istore        11
     336: aload         8
     338: iload         11
     340: istore        12
     342: astore        15
     344: iconst_0
     345: istore        13
     347: new           #24                 // class Day10$Coordinate
     350: dup
     351: iload         12
     353: iconst_0
     354: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     357: getstatic     #176                // Field Day16$Direction.DOWN:LDay16$Direction;
     360: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     363: aload         15
     365: swap
     366: invokeinterface #140,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     371: pop
     372: goto          316
     375: aload         8
     377: checkcast     #93                 // class java/util/List
     380: nop
     381: astore        4
     383: iconst_0
     384: aload_1
     385: iconst_0
     386: invokeinterface #100,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     391: checkcast     #39                 // class java/lang/String
     394: invokevirtual #103                // Method java/lang/String.length:()I
     397: invokestatic  #217                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     400: checkcast     #117                // class java/lang/Iterable
     403: astore        6
     405: iconst_0
     406: istore        7
     408: aload         6
     410: astore        8
     412: new           #119                // class java/util/ArrayList
     415: dup
     416: aload         6
     418: bipush        10
     420: invokestatic  #125                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     423: invokespecial #128                // Method java/util/ArrayList."<init>":(I)V
     426: checkcast     #68                 // class java/util/Collection
     429: astore        9
     431: iconst_0
     432: istore        10
     434: aload         8
     436: invokeinterface #132,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     441: astore        11
     443: aload         11
     445: invokeinterface #137,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     450: ifeq          509
     453: aload         11
     455: checkcast     #219                // class kotlin/collections/IntIterator
     458: invokevirtual #222                // Method kotlin/collections/IntIterator.nextInt:()I
     461: istore        12
     463: aload         9
     465: iload         12
     467: istore        13
     469: astore        15
     471: iconst_0
     472: istore        14
     474: new           #24                 // class Day10$Coordinate
     477: dup
     478: iload         13
     480: aload_1
     481: invokeinterface #96,  1           // InterfaceMethod java/util/List.size:()I
     486: iconst_1
     487: isub
     488: invokespecial #27                 // Method Day10$Coordinate."<init>":(II)V
     491: getstatic     #173                // Field Day16$Direction.UP:LDay16$Direction;
     494: invokestatic  #62                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     497: aload         15
     499: swap
     500: invokeinterface #140,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     505: pop
     506: goto          443
     509: aload         9
     511: checkcast     #93                 // class java/util/List
     514: nop
     515: astore        5
     517: aload_2
     518: checkcast     #68                 // class java/util/Collection
     521: aload_3
     522: checkcast     #117                // class java/lang/Iterable
     525: invokestatic  #226                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     528: checkcast     #68                 // class java/util/Collection
     531: aload         4
     533: checkcast     #117                // class java/lang/Iterable
     536: invokestatic  #226                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     539: checkcast     #68                 // class java/util/Collection
     542: aload         5
     544: checkcast     #117                // class java/lang/Iterable
     547: invokestatic  #226                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     550: astore        6
     552: aload         6
     554: checkcast     #117                // class java/lang/Iterable
     557: invokeinterface #132,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     562: astore        8
     564: aload         8
     566: invokeinterface #137,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     571: ifne          582
     574: new           #228                // class java/util/NoSuchElementException
     577: dup
     578: invokespecial #229                // Method java/util/NoSuchElementException."<init>":()V
     581: athrow
     582: aload         8
     584: invokeinterface #139,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     589: checkcast     #78                 // class kotlin/Pair
     592: astore        9
     594: iconst_0
     595: istore        10
     597: aload         9
     599: invokevirtual #81                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     602: checkcast     #24                 // class Day10$Coordinate
     605: astore        11
     607: aload         9
     609: invokevirtual #84                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
     612: checkcast     #29                 // class Day16$Direction
     615: astore        12
     617: getstatic     #232                // Field INSTANCE:LDay16;
     620: aload         11
     622: aload         12
     624: aload_1
     625: invokespecial #37                 // Method energizeCount:(LDay10$Coordinate;LDay16$Direction;Ljava/util/List;)I
     628: istore        9
     630: aload         8
     632: invokeinterface #137,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     637: ifeq          702
     640: aload         8
     642: invokeinterface #139,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     647: checkcast     #78                 // class kotlin/Pair
     650: astore        10
     652: iconst_0
     653: istore        11
     655: aload         10
     657: invokevirtual #81                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     660: checkcast     #24                 // class Day10$Coordinate
     663: astore        12
     665: aload         10
     667: invokevirtual #84                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
     670: checkcast     #29                 // class Day16$Direction
     673: astore        13
     675: getstatic     #232                // Field INSTANCE:LDay16;
     678: aload         12
     680: aload         13
     682: aload_1
     683: invokespecial #37                 // Method energizeCount:(LDay10$Coordinate;LDay16$Direction;Ljava/util/List;)I
     686: istore        10
     688: iload         9
     690: iload         10
     692: if_icmpge     630
     695: iload         10
     697: istore        9
     699: goto          630
     702: iload         9
     704: invokestatic  #43                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
     707: areturn

  static {};
    Code:
       0: new           #2                  // class Day16
       3: dup
       4: invokespecial #246                // Method "<init>":()V
       7: putstatic     #232                // Field INSTANCE:LDay16;
      10: return
}

Compiled from "Day16.kt"
public final class Day16$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method Day16$Direction.values:()[LDay16$Direction;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field Day16$Direction.UP:LDay16$Direction;
      12: invokevirtual #22                 // Method Day16$Direction.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field Day16$Direction.DOWN:LDay16$Direction;
      26: invokevirtual #22                 // Method Day16$Direction.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field Day16$Direction.LEFT:LDay16$Direction;
      40: invokevirtual #22                 // Method Day16$Direction.ordinal:()I
      43: iconst_3
      44: iastore
      45: goto          49
      48: astore_1
      49: nop
      50: aload_0
      51: getstatic     #31                 // Field Day16$Direction.RIGHT:LDay16$Direction;
      54: invokevirtual #22                 // Method Day16$Direction.ordinal:()I
      57: iconst_4
      58: iastore
      59: goto          63
      62: astore_1
      63: aload_0
      64: putstatic     #35                 // Field $EnumSwitchMapping$0:[I
      67: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
          35    45    48   Class java/lang/NoSuchFieldError
          49    59    62   Class java/lang/NoSuchFieldError
}


import kotlin.String
import kotlin.collections.List

object Day11 {
    fun part1(input: List<String>): String {
        val pairs = generatePairs(input)
        val emptyRows = generateEmptyRows(input)
        val emptyColumns = generateEmptyColumns(input)

        return pairs.sumOf { (a, b) ->
            manhattanDistance(a, b) + crossingRows(a, b, emptyRows) + crossingColumns(a, b, emptyColumns)
        }.toString()
    }

    private fun crossingColumns(a: Day10.Coordinate, b: Day10.Coordinate, emptyColumns: Set<Int>): Long {
        return emptyColumns.count { a.x < it && b.x > it || a.x > it && b.x < it }.toLong()
    }

    private fun crossingRows(a: Day10.Coordinate, b: Day10.Coordinate, emptyRows: Set<Int>): Long {
        return emptyRows.count { a.y < it && b.y > it || a.y > it && b.y < it }.toLong()
    }

    private fun manhattanDistance(a: Day10.Coordinate, b: Day10.Coordinate): Long {
        return (Math.abs(a.x - b.x) + Math.abs(a.y - b.y)).toLong()
    }

    fun part2(input: List<String>): String {
        val pairs = generatePairs(input)
        val emptyRows = generateEmptyRows(input)
        val emptyColumns = generateEmptyColumns(input)

        return pairs.sumOf { (a, b) ->
            manhattanDistance(a, b) + crossingRows(a, b, emptyRows) * 999_999L + crossingColumns(
                a,
                b,
                emptyColumns
            ) * 999_999L
        }.toString()
    }

    private fun generatePairs(input: List<String>): List<Pair<Day10.Coordinate, Day10.Coordinate>> {
        val coordinates = input.mapIndexed { y, line ->
            line.mapIndexedNotNull { x, c ->
                if (c == '#') {
                    Day10.Coordinate(x, y)
                } else {
                    null
                }
            }
        }.flatten()
        return coordinates.indices.flatMap { i ->
            (i + 1..<coordinates.size).map { j ->
                Pair(coordinates[i], coordinates[j])
            }
        }
    }

    private fun generateEmptyColumns(input: List<String>): Set<Int> {
        return (0..<input[0].length).filter { col ->
            input.all { it[col] == '.' }
        }.toSet()
    }

    private fun generateEmptyRows(input: List<String>): Set<Int> {
        return input.mapIndexedNotNull { y, line ->
            if (line.all { it == '.' }) {
                y
            } else {
                null
            }
        }.toSet()
    }
}

Compiled from "Day11.kt"
public final class Day11 {
  public static final Day11 INSTANCE;

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

  public final java.lang.String 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 generatePairs:(Ljava/util/List;)Ljava/util/List;
      11: astore_2
      12: aload_0
      13: aload_1
      14: invokespecial #30                 // Method generateEmptyRows:(Ljava/util/List;)Ljava/util/Set;
      17: astore_3
      18: aload_0
      19: aload_1
      20: invokespecial #33                 // Method generateEmptyColumns:(Ljava/util/List;)Ljava/util/Set;
      23: astore        4
      25: aload_2
      26: checkcast     #35                 // class java/lang/Iterable
      29: astore        5
      31: lconst_0
      32: lstore        6
      34: aload         5
      36: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      41: astore        8
      43: aload         8
      45: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      50: ifeq          143
      53: aload         8
      55: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      60: astore        9
      62: lload         6
      64: aload         9
      66: checkcast     #51                 // class kotlin/Pair
      69: astore        10
      71: lstore        14
      73: iconst_0
      74: istore        11
      76: aload         10
      78: invokevirtual #54                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
      81: checkcast     #56                 // class Day10$Coordinate
      84: astore        12
      86: aload         10
      88: invokevirtual #59                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      91: checkcast     #56                 // class Day10$Coordinate
      94: astore        13
      96: getstatic     #62                 // Field INSTANCE:LDay11;
      99: aload         12
     101: aload         13
     103: invokespecial #66                 // Method manhattanDistance:(LDay10$Coordinate;LDay10$Coordinate;)J
     106: getstatic     #62                 // Field INSTANCE:LDay11;
     109: aload         12
     111: aload         13
     113: aload_3
     114: invokespecial #70                 // Method crossingRows:(LDay10$Coordinate;LDay10$Coordinate;Ljava/util/Set;)J
     117: ladd
     118: getstatic     #62                 // Field INSTANCE:LDay11;
     121: aload         12
     123: aload         13
     125: aload         4
     127: invokespecial #73                 // Method crossingColumns:(LDay10$Coordinate;LDay10$Coordinate;Ljava/util/Set;)J
     130: ladd
     131: lstore        16
     133: lload         14
     135: lload         16
     137: ladd
     138: lstore        6
     140: goto          43
     143: lload         6
     145: invokestatic  #79                 // Method java/lang/String.valueOf:(J)Ljava/lang/String;
     148: areturn

  private final long crossingColumns(Day10$Coordinate, Day10$Coordinate, java.util.Set<java.lang.Integer>);
    Code:
       0: aload_3
       1: checkcast     #35                 // class java/lang/Iterable
       4: astore        4
       6: iconst_0
       7: istore        5
       9: aload         4
      11: instanceof    #96                 // class java/util/Collection
      14: ifeq          34
      17: aload         4
      19: checkcast     #96                 // class java/util/Collection
      22: invokeinterface #99,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
      27: ifeq          34
      30: iconst_0
      31: goto          138
      34: iconst_0
      35: istore        6
      37: aload         4
      39: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        7
      46: aload         7
      48: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          136
      56: aload         7
      58: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        8
      65: aload         8
      67: checkcast     #101                // class java/lang/Number
      70: invokevirtual #105                // Method java/lang/Number.intValue:()I
      73: istore        9
      75: iconst_0
      76: istore        10
      78: aload_1
      79: invokevirtual #108                // Method Day10$Coordinate.getX:()I
      82: iload         9
      84: if_icmpge     96
      87: aload_2
      88: invokevirtual #108                // Method Day10$Coordinate.getX:()I
      91: iload         9
      93: if_icmpgt     114
      96: aload_1
      97: invokevirtual #108                // Method Day10$Coordinate.getX:()I
     100: iload         9
     102: if_icmple     118
     105: aload_2
     106: invokevirtual #108                // Method Day10$Coordinate.getX:()I
     109: iload         9
     111: if_icmpge     118
     114: iconst_1
     115: goto          119
     118: iconst_0
     119: ifeq          46
     122: iinc          6, 1
     125: iload         6
     127: ifge          46
     130: invokestatic  #113                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
     133: goto          46
     136: iload         6
     138: i2l
     139: lreturn

  private final long crossingRows(Day10$Coordinate, Day10$Coordinate, java.util.Set<java.lang.Integer>);
    Code:
       0: aload_3
       1: checkcast     #35                 // class java/lang/Iterable
       4: astore        4
       6: iconst_0
       7: istore        5
       9: aload         4
      11: instanceof    #96                 // class java/util/Collection
      14: ifeq          34
      17: aload         4
      19: checkcast     #96                 // class java/util/Collection
      22: invokeinterface #99,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
      27: ifeq          34
      30: iconst_0
      31: goto          138
      34: iconst_0
      35: istore        6
      37: aload         4
      39: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        7
      46: aload         7
      48: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          136
      56: aload         7
      58: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        8
      65: aload         8
      67: checkcast     #101                // class java/lang/Number
      70: invokevirtual #105                // Method java/lang/Number.intValue:()I
      73: istore        9
      75: iconst_0
      76: istore        10
      78: aload_1
      79: invokevirtual #124                // Method Day10$Coordinate.getY:()I
      82: iload         9
      84: if_icmpge     96
      87: aload_2
      88: invokevirtual #124                // Method Day10$Coordinate.getY:()I
      91: iload         9
      93: if_icmpgt     114
      96: aload_1
      97: invokevirtual #124                // Method Day10$Coordinate.getY:()I
     100: iload         9
     102: if_icmple     118
     105: aload_2
     106: invokevirtual #124                // Method Day10$Coordinate.getY:()I
     109: iload         9
     111: if_icmpge     118
     114: iconst_1
     115: goto          119
     118: iconst_0
     119: ifeq          46
     122: iinc          6, 1
     125: iload         6
     127: ifge          46
     130: invokestatic  #113                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
     133: goto          46
     136: iload         6
     138: i2l
     139: lreturn

  private final long manhattanDistance(Day10$Coordinate, Day10$Coordinate);
    Code:
       0: aload_1
       1: invokevirtual #108                // Method Day10$Coordinate.getX:()I
       4: aload_2
       5: invokevirtual #108                // Method Day10$Coordinate.getX:()I
       8: isub
       9: invokestatic  #131                // Method java/lang/Math.abs:(I)I
      12: aload_1
      13: invokevirtual #124                // Method Day10$Coordinate.getY:()I
      16: aload_2
      17: invokevirtual #124                // Method Day10$Coordinate.getY:()I
      20: isub
      21: invokestatic  #131                // Method java/lang/Math.abs:(I)I
      24: iadd
      25: i2l
      26: lreturn

  public final java.lang.String 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 generatePairs:(Ljava/util/List;)Ljava/util/List;
      11: astore_2
      12: aload_0
      13: aload_1
      14: invokespecial #30                 // Method generateEmptyRows:(Ljava/util/List;)Ljava/util/Set;
      17: astore_3
      18: aload_0
      19: aload_1
      20: invokespecial #33                 // Method generateEmptyColumns:(Ljava/util/List;)Ljava/util/Set;
      23: astore        4
      25: aload_2
      26: checkcast     #35                 // class java/lang/Iterable
      29: astore        5
      31: lconst_0
      32: lstore        6
      34: aload         5
      36: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      41: astore        8
      43: aload         8
      45: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      50: ifeq          152
      53: aload         8
      55: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      60: astore        9
      62: lload         6
      64: aload         9
      66: checkcast     #51                 // class kotlin/Pair
      69: astore        10
      71: lstore        14
      73: iconst_0
      74: istore        11
      76: aload         10
      78: invokevirtual #54                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
      81: checkcast     #56                 // class Day10$Coordinate
      84: astore        12
      86: aload         10
      88: invokevirtual #59                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      91: checkcast     #56                 // class Day10$Coordinate
      94: astore        13
      96: getstatic     #62                 // Field INSTANCE:LDay11;
      99: aload         12
     101: aload         13
     103: invokespecial #66                 // Method manhattanDistance:(LDay10$Coordinate;LDay10$Coordinate;)J
     106: getstatic     #62                 // Field INSTANCE:LDay11;
     109: aload         12
     111: aload         13
     113: aload_3
     114: invokespecial #70                 // Method crossingRows:(LDay10$Coordinate;LDay10$Coordinate;Ljava/util/Set;)J
     117: ldc2_w        #133                // long 999999l
     120: lmul
     121: ladd
     122: getstatic     #62                 // Field INSTANCE:LDay11;
     125: aload         12
     127: aload         13
     129: aload         4
     131: invokespecial #73                 // Method crossingColumns:(LDay10$Coordinate;LDay10$Coordinate;Ljava/util/Set;)J
     134: ldc2_w        #133                // long 999999l
     137: lmul
     138: ladd
     139: nop
     140: lstore        16
     142: lload         14
     144: lload         16
     146: ladd
     147: lstore        6
     149: goto          43
     152: lload         6
     154: invokestatic  #79                 // Method java/lang/String.valueOf:(J)Ljava/lang/String;
     157: areturn

  private final java.util.List<kotlin.Pair<Day10$Coordinate, Day10$Coordinate>> generatePairs(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: checkcast     #35                 // class java/lang/Iterable
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: astore        5
      11: new           #138                // class java/util/ArrayList
      14: dup
      15: aload_3
      16: bipush        10
      18: invokestatic  #142                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #145                // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #96                 // class java/util/Collection
      27: astore        6
      29: iconst_0
      30: istore        7
      32: iconst_0
      33: istore        8
      35: aload         5
      37: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        9
      44: aload         9
      46: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          259
      54: aload         9
      56: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        10
      63: aload         6
      65: iload         8
      67: iinc          8, 1
      70: istore        11
      72: iload         11
      74: ifge          80
      77: invokestatic  #148                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      80: iload         11
      82: aload         10
      84: checkcast     #75                 // class java/lang/String
      87: astore        12
      89: istore        13
      91: astore        33
      93: iconst_0
      94: istore        14
      96: aload         12
      98: checkcast     #150                // class java/lang/CharSequence
     101: astore        15
     103: iconst_0
     104: istore        16
     106: aload         15
     108: astore        17
     110: new           #138                // class java/util/ArrayList
     113: dup
     114: invokespecial #151                // Method java/util/ArrayList."<init>":()V
     117: checkcast     #96                 // class java/util/Collection
     120: astore        18
     122: iconst_0
     123: istore        19
     125: aload         17
     127: astore        20
     129: iconst_0
     130: istore        21
     132: iconst_0
     133: istore        22
     135: iconst_0
     136: istore        23
     138: iload         23
     140: aload         20
     142: invokeinterface #154,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     147: if_icmpge     239
     150: aload         20
     152: iload         23
     154: invokeinterface #158,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     159: istore        24
     161: iload         22
     163: iinc          22, 1
     166: iload         24
     168: istore        25
     170: istore        26
     172: iconst_0
     173: istore        27
     175: iload         26
     177: iload         25
     179: istore        28
     181: istore        29
     183: iconst_0
     184: istore        30
     186: iload         28
     188: bipush        35
     190: if_icmpne     207
     193: new           #56                 // class Day10$Coordinate
     196: dup
     197: iload         29
     199: iload         13
     201: invokespecial #161                // Method Day10$Coordinate."<init>":(II)V
     204: goto          208
     207: aconst_null
     208: nop
     209: dup
     210: ifnull        231
     213: astore        31
     215: iconst_0
     216: istore        32
     218: aload         18
     220: aload         31
     222: invokeinterface #165,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     227: pop
     228: goto          232
     231: pop
     232: nop
     233: iinc          23, 1
     236: goto          138
     239: nop
     240: aload         18
     242: checkcast     #91                 // class java/util/List
     245: nop
     246: nop
     247: aload         33
     249: swap
     250: invokeinterface #165,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     255: pop
     256: goto          44
     259: aload         6
     261: checkcast     #91                 // class java/util/List
     264: nop
     265: checkcast     #35                 // class java/lang/Iterable
     268: invokestatic  #169                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
     271: astore_2
     272: aload_2
     273: checkcast     #96                 // class java/util/Collection
     276: invokestatic  #173                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
     279: checkcast     #35                 // class java/lang/Iterable
     282: astore_3
     283: iconst_0
     284: istore        4
     286: aload_3
     287: astore        5
     289: new           #138                // class java/util/ArrayList
     292: dup
     293: invokespecial #151                // Method java/util/ArrayList."<init>":()V
     296: checkcast     #96                 // class java/util/Collection
     299: astore        6
     301: iconst_0
     302: istore        7
     304: aload         5
     306: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     311: astore        8
     313: aload         8
     315: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     320: ifeq          485
     323: aload         8
     325: checkcast     #175                // class kotlin/collections/IntIterator
     328: invokevirtual #178                // Method kotlin/collections/IntIterator.nextInt:()I
     331: istore        9
     333: iload         9
     335: istore        10
     337: iconst_0
     338: istore        11
     340: iload         10
     342: iconst_1
     343: iadd
     344: aload_2
     345: invokeinterface #181,  1          // InterfaceMethod java/util/List.size:()I
     350: invokestatic  #187                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     353: checkcast     #35                 // class java/lang/Iterable
     356: astore        12
     358: iconst_0
     359: istore        13
     361: aload         12
     363: astore        14
     365: new           #138                // class java/util/ArrayList
     368: dup
     369: aload         12
     371: bipush        10
     373: invokestatic  #142                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     376: invokespecial #145                // Method java/util/ArrayList."<init>":(I)V
     379: checkcast     #96                 // class java/util/Collection
     382: astore        15
     384: iconst_0
     385: istore        16
     387: aload         14
     389: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     394: astore        17
     396: aload         17
     398: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     403: ifeq          462
     406: aload         17
     408: checkcast     #175                // class kotlin/collections/IntIterator
     411: invokevirtual #178                // Method kotlin/collections/IntIterator.nextInt:()I
     414: istore        18
     416: aload         15
     418: iload         18
     420: istore        19
     422: astore        20
     424: iconst_0
     425: istore        21
     427: new           #51                 // class kotlin/Pair
     430: dup
     431: aload_2
     432: iload         10
     434: invokeinterface #191,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     439: aload_2
     440: iload         19
     442: invokeinterface #191,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     447: invokespecial #194                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     450: aload         20
     452: swap
     453: invokeinterface #165,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     458: pop
     459: goto          396
     462: aload         15
     464: checkcast     #91                 // class java/util/List
     467: nop
     468: checkcast     #35                 // class java/lang/Iterable
     471: nop
     472: astore        10
     474: aload         6
     476: aload         10
     478: invokestatic  #198                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     481: pop
     482: goto          313
     485: aload         6
     487: checkcast     #91                 // class java/util/List
     490: nop
     491: areturn

  private final java.util.Set<java.lang.Integer> generateEmptyColumns(java.util.List<java.lang.String>);
    Code:
       0: iconst_0
       1: aload_1
       2: iconst_0
       3: invokeinterface #191,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
       8: checkcast     #75                 // class java/lang/String
      11: invokevirtual #243                // Method java/lang/String.length:()I
      14: invokestatic  #187                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
      17: checkcast     #35                 // class java/lang/Iterable
      20: astore_2
      21: iconst_0
      22: istore_3
      23: aload_2
      24: astore        4
      26: new           #138                // class java/util/ArrayList
      29: dup
      30: invokespecial #151                // Method java/util/ArrayList."<init>":()V
      33: checkcast     #96                 // class java/util/Collection
      36: astore        5
      38: iconst_0
      39: istore        6
      41: aload         4
      43: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      48: astore        7
      50: aload         7
      52: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      57: ifeq          196
      60: aload         7
      62: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      67: astore        8
      69: aload         8
      71: checkcast     #101                // class java/lang/Number
      74: invokevirtual #105                // Method java/lang/Number.intValue:()I
      77: istore        9
      79: iconst_0
      80: istore        10
      82: aload_1
      83: checkcast     #35                 // class java/lang/Iterable
      86: astore        11
      88: iconst_0
      89: istore        12
      91: aload         11
      93: instanceof    #96                 // class java/util/Collection
      96: ifeq          116
      99: aload         11
     101: checkcast     #96                 // class java/util/Collection
     104: invokeinterface #99,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
     109: ifeq          116
     112: iconst_1
     113: goto          179
     116: aload         11
     118: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     123: astore        13
     125: aload         13
     127: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     132: ifeq          178
     135: aload         13
     137: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     142: astore        14
     144: aload         14
     146: checkcast     #75                 // class java/lang/String
     149: astore        15
     151: iconst_0
     152: istore        16
     154: aload         15
     156: iload         9
     158: invokevirtual #244                // Method java/lang/String.charAt:(I)C
     161: bipush        46
     163: if_icmpne     170
     166: iconst_1
     167: goto          171
     170: iconst_0
     171: ifne          125
     174: iconst_0
     175: goto          179
     178: iconst_1
     179: nop
     180: ifeq          50
     183: aload         5
     185: aload         8
     187: invokeinterface #165,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     192: pop
     193: goto          50
     196: aload         5
     198: checkcast     #91                 // class java/util/List
     201: nop
     202: checkcast     #35                 // class java/lang/Iterable
     205: invokestatic  #248                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     208: areturn

  private final java.util.Set<java.lang.Integer> generateEmptyRows(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: checkcast     #35                 // class java/lang/Iterable
       4: astore_2
       5: iconst_0
       6: istore_3
       7: aload_2
       8: astore        4
      10: new           #138                // class java/util/ArrayList
      13: dup
      14: invokespecial #151                // Method java/util/ArrayList."<init>":()V
      17: checkcast     #96                 // class java/util/Collection
      20: astore        5
      22: iconst_0
      23: istore        6
      25: aload         4
      27: astore        7
      29: iconst_0
      30: istore        8
      32: iconst_0
      33: istore        9
      35: aload         7
      37: invokeinterface #39,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        10
      44: aload         10
      46: invokeinterface #45,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          212
      54: aload         10
      56: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        11
      63: iload         9
      65: iinc          9, 1
      68: istore        12
      70: iload         12
      72: ifge          78
      75: invokestatic  #148                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      78: iload         12
      80: aload         11
      82: astore        13
      84: istore        14
      86: iconst_0
      87: istore        15
      89: iload         14
      91: aload         13
      93: checkcast     #75                 // class java/lang/String
      96: astore        16
      98: istore        17
     100: iconst_0
     101: istore        18
     103: aload         16
     105: checkcast     #150                // class java/lang/CharSequence
     108: astore        19
     110: iconst_0
     111: istore        20
     113: iconst_0
     114: istore        21
     116: iload         21
     118: aload         19
     120: invokeinterface #154,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     125: if_icmpge     171
     128: aload         19
     130: iload         21
     132: invokeinterface #158,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     137: istore        22
     139: iload         22
     141: istore        23
     143: iconst_0
     144: istore        24
     146: iload         23
     148: bipush        46
     150: if_icmpne     157
     153: iconst_1
     154: goto          158
     157: iconst_0
     158: ifne          165
     161: iconst_0
     162: goto          172
     165: iinc          21, 1
     168: goto          116
     171: iconst_1
     172: ifeq          183
     175: iload         17
     177: invokestatic  #262                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     180: goto          184
     183: aconst_null
     184: nop
     185: dup
     186: ifnull        207
     189: astore        25
     191: iconst_0
     192: istore        26
     194: aload         5
     196: aload         25
     198: invokeinterface #165,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     203: pop
     204: goto          208
     207: pop
     208: nop
     209: goto          44
     212: nop
     213: aload         5
     215: checkcast     #91                 // class java/util/List
     218: nop
     219: checkcast     #35                 // class java/lang/Iterable
     222: invokestatic  #248                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     225: areturn

  static {};
    Code:
       0: new           #2                  // class Day11
       3: dup
       4: invokespecial #268                // Method "<init>":()V
       7: putstatic     #62                 // Field INSTANCE:LDay11;
      10: return
}