package com.github.afranken.aoc

object Day202104 {

    fun part1(inputs: Array<String>): Int {
        val draws = inputs[0].split(',')
        val boards = inputs
            .drop(1)
            .filter { it.isNotEmpty() }
            .chunked(5)
            .map {
                Board.of(it.map {
                    it.split("  ", " ")
                        .filter { it.isNotBlank() } // Leading whitespace
                        .map { it.toInt() }
                })
            }

        for (draw in draws) {
            boards.forEach { it.markField(Integer.valueOf(draw)) }
            val bingoBoard = boards.firstOrNull { it.isBingo() }
            if (bingoBoard != null) {
                return bingoBoard.getUnmarked().sum() * Integer.valueOf(draw)
            }
        }

        return -1
    }

    fun part2(inputs: Array<String>): Int {
        val draws = inputs[0].split(',')
        var boards = inputs
            .drop(1)
            .filter { it.isNotEmpty() }
            .chunked(5)
            .map {
                Board.of(it.map {
                    it.split("  ", " ")
                        .filter { it.isNotBlank() } // Leading whitespace
                        .map { it.toInt() }
                })
            }

        for ((count, draw) in draws.withIndex()) {
            boards.forEach { it.markField(Integer.valueOf(draw)) }
            boards.filter { it.isBingo() }
                .forEach {
                    // there are 100 draws. If this is not the last board, it's still the last one to win.
                    if (boards.size == 1 || count == 100) {
                        return it.getUnmarked().sum() * Integer.valueOf(draw)
                    }
                    boards = boards - it
                }
        }

        return -1
    }

    data class Field(val value: Int, var marked: Boolean = false)

    data class Board(val fields: List<MutableList<Field>>) {
        private val widthIndices = fields[0].indices
        private val heightIndices = fields.indices

        companion object {
            fun of(lines: List<List<Int>>): Board {
                return Board(lines.map { it.map { Field(it) }.toMutableList() })
            }
        }

        fun markField(value: Int) {
            fields.forEach { it.filter { it.value == value }.forEach { it.marked = true } }
        }

        fun getUnmarked(): List<Int> {
            return fields.flatten().filter { !it.marked }.map { it.value }
        }

        fun isBingo(): Boolean {
            return checkColumnMarked() || checkRowMarked()
        }

        private fun checkRowMarked(): Boolean {
            return fields.any { it.all { it.marked } }
        }

        private fun checkColumnMarked(): Boolean {
            for (column in widthIndices) {
                var columnMarked = true
                for (row in heightIndices) {
                    if (!fields[row][column].marked) {
                        columnMarked = false
                        continue
                    }
                }
                if (columnMarked) return true
            }
            return false
        }
    }
}

Compiled from "Day202104.kt"
public final class com.github.afranken.aoc.Day202104$Board {
  public static final com.github.afranken.aoc.Day202104$Board$Companion Companion;

  private final java.util.List<java.util.List<com.github.afranken.aoc.Day202104$Field>> fields;

  private final kotlin.ranges.IntRange widthIndices;

  private final kotlin.ranges.IntRange heightIndices;

  public com.github.afranken.aoc.Day202104$Board(java.util.List<? extends java.util.List<com.github.afranken.aoc.Day202104$Field>>);
    Code:
       0: aload_1
       1: ldc           #10                 // String fields
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: putfield      #22                 // Field fields:Ljava/util/List;
      15: aload_0
      16: aload_0
      17: getfield      #22                 // Field fields:Ljava/util/List;
      20: iconst_0
      21: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      26: checkcast     #30                 // class java/util/Collection
      29: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
      32: putfield      #40                 // Field widthIndices:Lkotlin/ranges/IntRange;
      35: aload_0
      36: aload_0
      37: getfield      #22                 // Field fields:Ljava/util/List;
      40: checkcast     #30                 // class java/util/Collection
      43: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
      46: putfield      #43                 // Field heightIndices:Lkotlin/ranges/IntRange;
      49: return

  public final java.util.List<java.util.List<com.github.afranken.aoc.Day202104$Field>> getFields();
    Code:
       0: aload_0
       1: getfield      #22                 // Field fields:Ljava/util/List;
       4: areturn

  public final void markField(int);
    Code:
       0: aload_0
       1: getfield      #22                 // Field fields:Ljava/util/List;
       4: checkcast     #52                 // class java/lang/Iterable
       7: astore_2
       8: iconst_0
       9: istore_3
      10: aload_2
      11: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      16: astore        4
      18: aload         4
      20: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      25: ifeq          213
      28: aload         4
      30: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      35: astore        5
      37: aload         5
      39: checkcast     #24                 // class java/util/List
      42: astore        6
      44: iconst_0
      45: istore        7
      47: aload         6
      49: checkcast     #52                 // class java/lang/Iterable
      52: astore        8
      54: iconst_0
      55: istore        9
      57: aload         8
      59: astore        10
      61: new           #68                 // class java/util/ArrayList
      64: dup
      65: invokespecial #69                 // Method java/util/ArrayList."<init>":()V
      68: checkcast     #30                 // class java/util/Collection
      71: astore        11
      73: iconst_0
      74: istore        12
      76: aload         10
      78: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      83: astore        13
      85: aload         13
      87: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      92: ifeq          144
      95: aload         13
      97: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     102: astore        14
     104: aload         14
     106: checkcast     #71                 // class com/github/afranken/aoc/Day202104$Field
     109: astore        15
     111: iconst_0
     112: istore        16
     114: aload         15
     116: invokevirtual #75                 // Method com/github/afranken/aoc/Day202104$Field.getValue:()I
     119: iload_1
     120: if_icmpne     127
     123: iconst_1
     124: goto          128
     127: iconst_0
     128: ifeq          85
     131: aload         11
     133: aload         14
     135: invokeinterface #79,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     140: pop
     141: goto          85
     144: aload         11
     146: checkcast     #24                 // class java/util/List
     149: nop
     150: checkcast     #52                 // class java/lang/Iterable
     153: astore        8
     155: nop
     156: iconst_0
     157: istore        9
     159: aload         8
     161: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     166: astore        10
     168: aload         10
     170: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     175: ifeq          207
     178: aload         10
     180: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     185: astore        11
     187: aload         11
     189: checkcast     #71                 // class com/github/afranken/aoc/Day202104$Field
     192: astore        12
     194: iconst_0
     195: istore        13
     197: aload         12
     199: iconst_1
     200: invokevirtual #83                 // Method com/github/afranken/aoc/Day202104$Field.setMarked:(Z)V
     203: nop
     204: goto          168
     207: nop
     208: nop
     209: nop
     210: goto          18
     213: nop
     214: return

  public final java.util.List<java.lang.Integer> getUnmarked();
    Code:
       0: aload_0
       1: getfield      #22                 // Field fields:Ljava/util/List;
       4: checkcast     #52                 // class java/lang/Iterable
       7: invokestatic  #108                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
      10: checkcast     #52                 // class java/lang/Iterable
      13: astore_1
      14: iconst_0
      15: istore_2
      16: aload_1
      17: astore_3
      18: new           #68                 // class java/util/ArrayList
      21: dup
      22: invokespecial #69                 // Method java/util/ArrayList."<init>":()V
      25: checkcast     #30                 // class java/util/Collection
      28: astore        4
      30: iconst_0
      31: istore        5
      33: aload_3
      34: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      39: astore        6
      41: aload         6
      43: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      48: ifeq          99
      51: aload         6
      53: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      58: astore        7
      60: aload         7
      62: checkcast     #71                 // class com/github/afranken/aoc/Day202104$Field
      65: astore        8
      67: iconst_0
      68: istore        9
      70: aload         8
      72: invokevirtual #111                // Method com/github/afranken/aoc/Day202104$Field.getMarked:()Z
      75: ifne          82
      78: iconst_1
      79: goto          83
      82: iconst_0
      83: ifeq          41
      86: aload         4
      88: aload         7
      90: invokeinterface #79,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      95: pop
      96: goto          41
      99: aload         4
     101: checkcast     #24                 // class java/util/List
     104: nop
     105: checkcast     #52                 // class java/lang/Iterable
     108: astore_1
     109: nop
     110: iconst_0
     111: istore_2
     112: aload_1
     113: astore_3
     114: new           #68                 // class java/util/ArrayList
     117: dup
     118: aload_1
     119: bipush        10
     121: invokestatic  #115                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     124: invokespecial #117                // Method java/util/ArrayList."<init>":(I)V
     127: checkcast     #30                 // class java/util/Collection
     130: astore        4
     132: iconst_0
     133: istore        5
     135: aload_3
     136: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     141: astore        6
     143: aload         6
     145: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     150: ifeq          196
     153: aload         6
     155: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     160: astore        7
     162: aload         4
     164: aload         7
     166: checkcast     #71                 // class com/github/afranken/aoc/Day202104$Field
     169: astore        8
     171: astore        10
     173: iconst_0
     174: istore        9
     176: aload         8
     178: invokevirtual #75                 // Method com/github/afranken/aoc/Day202104$Field.getValue:()I
     181: invokestatic  #123                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     184: aload         10
     186: swap
     187: invokeinterface #79,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     192: pop
     193: goto          143
     196: aload         4
     198: checkcast     #24                 // class java/util/List
     201: nop
     202: areturn

  public final boolean isBingo();
    Code:
       0: aload_0
       1: invokespecial #134                // Method checkColumnMarked:()Z
       4: ifne          14
       7: aload_0
       8: invokespecial #137                // Method checkRowMarked:()Z
      11: ifeq          18
      14: iconst_1
      15: goto          19
      18: iconst_0
      19: ireturn

  private final boolean checkRowMarked();
    Code:
       0: aload_0
       1: getfield      #22                 // Field fields:Ljava/util/List;
       4: checkcast     #52                 // class java/lang/Iterable
       7: astore_1
       8: iconst_0
       9: istore_2
      10: aload_1
      11: instanceof    #30                 // class java/util/Collection
      14: ifeq          33
      17: aload_1
      18: checkcast     #30                 // class java/util/Collection
      21: invokeinterface #140,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      26: ifeq          33
      29: iconst_0
      30: goto          162
      33: aload_1
      34: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      39: astore_3
      40: aload_3
      41: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          161
      49: aload_3
      50: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      55: astore        4
      57: aload         4
      59: checkcast     #24                 // class java/util/List
      62: astore        5
      64: iconst_0
      65: istore        6
      67: aload         5
      69: checkcast     #52                 // class java/lang/Iterable
      72: astore        7
      74: iconst_0
      75: istore        8
      77: aload         7
      79: instanceof    #30                 // class java/util/Collection
      82: ifeq          102
      85: aload         7
      87: checkcast     #30                 // class java/util/Collection
      90: invokeinterface #140,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      95: ifeq          102
      98: iconst_1
      99: goto          153
     102: aload         7
     104: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     109: astore        9
     111: aload         9
     113: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     118: ifeq          152
     121: aload         9
     123: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     128: astore        10
     130: aload         10
     132: checkcast     #71                 // class com/github/afranken/aoc/Day202104$Field
     135: astore        11
     137: iconst_0
     138: istore        12
     140: aload         11
     142: invokevirtual #111                // Method com/github/afranken/aoc/Day202104$Field.getMarked:()Z
     145: ifne          111
     148: iconst_0
     149: goto          153
     152: iconst_1
     153: nop
     154: ifeq          40
     157: iconst_1
     158: goto          162
     161: iconst_0
     162: ireturn

  private final boolean checkColumnMarked();
    Code:
       0: aload_0
       1: getfield      #40                 // Field widthIndices:Lkotlin/ranges/IntRange;
       4: astore_1
       5: aload_1
       6: invokevirtual #151                // Method kotlin/ranges/IntRange.getFirst:()I
       9: istore_2
      10: aload_1
      11: invokevirtual #154                // Method kotlin/ranges/IntRange.getLast:()I
      14: istore_3
      15: iload_2
      16: iload_3
      17: if_icmpgt     114
      20: iconst_1
      21: istore        4
      23: aload_0
      24: getfield      #43                 // Field heightIndices:Lkotlin/ranges/IntRange;
      27: astore        5
      29: aload         5
      31: invokevirtual #151                // Method kotlin/ranges/IntRange.getFirst:()I
      34: istore        6
      36: aload         5
      38: invokevirtual #154                // Method kotlin/ranges/IntRange.getLast:()I
      41: istore        7
      43: iload         6
      45: iload         7
      47: if_icmpgt     96
      50: aload_0
      51: getfield      #22                 // Field fields:Ljava/util/List;
      54: iload         6
      56: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      61: checkcast     #24                 // class java/util/List
      64: iload_2
      65: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      70: checkcast     #71                 // class com/github/afranken/aoc/Day202104$Field
      73: invokevirtual #111                // Method com/github/afranken/aoc/Day202104$Field.getMarked:()Z
      76: ifne          83
      79: iconst_0
      80: istore        4
      82: nop
      83: iload         6
      85: iload         7
      87: if_icmpeq     96
      90: iinc          6, 1
      93: goto          50
      96: iload         4
      98: ifeq          103
     101: iconst_1
     102: ireturn
     103: iload_2
     104: iload_3
     105: if_icmpeq     114
     108: iinc          2, 1
     111: goto          20
     114: iconst_0
     115: ireturn

  public final java.util.List<java.util.List<com.github.afranken.aoc.Day202104$Field>> component1();
    Code:
       0: aload_0
       1: getfield      #22                 // Field fields:Ljava/util/List;
       4: areturn

  public final com.github.afranken.aoc.Day202104$Board copy(java.util.List<? extends java.util.List<com.github.afranken.aoc.Day202104$Field>>);
    Code:
       0: aload_1
       1: ldc           #10                 // String fields
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class com/github/afranken/aoc/Day202104$Board
       9: dup
      10: aload_1
      11: invokespecial #164                // Method "<init>":(Ljava/util/List;)V
      14: areturn

  public static com.github.afranken.aoc.Day202104$Board copy$default(com.github.afranken.aoc.Day202104$Board, 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 fields:Ljava/util/List;
      10: astore_1
      11: aload_0
      12: aload_1
      13: invokevirtual #168                // Method copy:(Ljava/util/List;)Lcom/github/afranken/aoc/Day202104$Board;
      16: areturn

  public java.lang.String toString();
    Code:
       0: new           #172                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #173                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #175                // String Board(fields=
       9: invokevirtual #179                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #22                 // Field fields:Ljava/util/List;
      16: invokevirtual #182                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: bipush        41
      21: invokevirtual #185                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      24: invokevirtual #187                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      27: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #22                 // Field fields:Ljava/util/List;
       4: invokevirtual #190                // 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 com/github/afranken/aoc/Day202104$Board
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class com/github/afranken/aoc/Day202104$Board
      20: astore_2
      21: aload_0
      22: getfield      #22                 // Field fields:Ljava/util/List;
      25: aload_2
      26: getfield      #22                 // Field fields:Ljava/util/List;
      29: invokestatic  #196                // 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

  static {};
    Code:
       0: new           #200                // class com/github/afranken/aoc/Day202104$Board$Companion
       3: dup
       4: aconst_null
       5: invokespecial #203                // Method com/github/afranken/aoc/Day202104$Board$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #207                // Field Companion:Lcom/github/afranken/aoc/Day202104$Board$Companion;
      11: return
}

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

  public final com.github.afranken.aoc.Day202104$Board of(java.util.List<? extends java.util.List<java.lang.Integer>>);
    Code:
       0: aload_1
       1: ldc           #16                 // String lines
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: astore        4
      16: new           #26                 // class java/util/ArrayList
      19: dup
      20: aload_2
      21: bipush        10
      23: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      26: invokespecial #35                 // Method java/util/ArrayList."<init>":(I)V
      29: checkcast     #37                 // class java/util/Collection
      32: astore        5
      34: iconst_0
      35: istore        6
      37: aload         4
      39: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        7
      46: aload         7
      48: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          208
      56: aload         7
      58: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        8
      65: aload         5
      67: aload         8
      69: checkcast     #53                 // class java/util/List
      72: astore        9
      74: astore        21
      76: iconst_0
      77: istore        10
      79: aload         9
      81: checkcast     #24                 // class java/lang/Iterable
      84: astore        11
      86: iconst_0
      87: istore        12
      89: aload         11
      91: astore        13
      93: new           #26                 // class java/util/ArrayList
      96: dup
      97: aload         11
      99: bipush        10
     101: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     104: invokespecial #35                 // Method java/util/ArrayList."<init>":(I)V
     107: checkcast     #37                 // class java/util/Collection
     110: astore        14
     112: iconst_0
     113: istore        15
     115: aload         13
     117: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     122: astore        16
     124: aload         16
     126: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     131: ifeq          184
     134: aload         16
     136: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     141: astore        17
     143: aload         14
     145: aload         17
     147: checkcast     #55                 // class java/lang/Number
     150: invokevirtual #59                 // Method java/lang/Number.intValue:()I
     153: istore        18
     155: astore        19
     157: iconst_0
     158: istore        20
     160: new           #61                 // class com/github/afranken/aoc/Day202104$Field
     163: dup
     164: iload         18
     166: iconst_0
     167: iconst_2
     168: aconst_null
     169: invokespecial #64                 // Method com/github/afranken/aoc/Day202104$Field."<init>":(IZILkotlin/jvm/internal/DefaultConstructorMarker;)V
     172: aload         19
     174: swap
     175: invokeinterface #68,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     180: pop
     181: goto          124
     184: aload         14
     186: checkcast     #53                 // class java/util/List
     189: nop
     190: checkcast     #37                 // class java/util/Collection
     193: invokestatic  #72                 // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
     196: aload         21
     198: swap
     199: invokeinterface #68,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     204: pop
     205: goto          46
     208: aload         5
     210: checkcast     #53                 // class java/util/List
     213: nop
     214: astore        22
     216: new           #74                 // class com/github/afranken/aoc/Day202104$Board
     219: dup
     220: aload         22
     222: invokespecial #77                 // Method com/github/afranken/aoc/Day202104$Board."<init>":(Ljava/util/List;)V
     225: areturn

  public com.github.afranken.aoc.Day202104$Board$Companion(kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: invokespecial #93                 // Method "<init>":()V
       4: return
}

Compiled from "Day202104.kt"
public final class com.github.afranken.aoc.Day202104 {
  public static final com.github.afranken.aoc.Day202104 INSTANCE;

  private com.github.afranken.aoc.Day202104();
    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 inputs
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: iconst_0
       8: aaload
       9: checkcast     #23                 // class java/lang/CharSequence
      12: iconst_1
      13: newarray       char
      15: astore_3
      16: aload_3
      17: iconst_0
      18: bipush        44
      20: castore
      21: aload_3
      22: iconst_0
      23: iconst_0
      24: bipush        6
      26: aconst_null
      27: invokestatic  #29                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
      30: astore_2
      31: aload_1
      32: iconst_1
      33: invokestatic  #35                 // Method kotlin/collections/ArraysKt.drop:([Ljava/lang/Object;I)Ljava/util/List;
      36: checkcast     #37                 // class java/lang/Iterable
      39: astore        4
      41: nop
      42: iconst_0
      43: istore        5
      45: aload         4
      47: astore        6
      49: new           #39                 // class java/util/ArrayList
      52: dup
      53: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
      56: checkcast     #42                 // class java/util/Collection
      59: astore        7
      61: iconst_0
      62: istore        8
      64: aload         6
      66: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      71: astore        9
      73: aload         9
      75: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      80: ifeq          137
      83: aload         9
      85: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      90: astore        10
      92: aload         10
      94: checkcast     #58                 // class java/lang/String
      97: astore        11
      99: iconst_0
     100: istore        12
     102: aload         11
     104: checkcast     #23                 // class java/lang/CharSequence
     107: invokeinterface #62,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     112: ifle          119
     115: iconst_1
     116: goto          120
     119: iconst_0
     120: nop
     121: ifeq          73
     124: aload         7
     126: aload         10
     128: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     133: pop
     134: goto          73
     137: aload         7
     139: checkcast     #68                 // class java/util/List
     142: nop
     143: checkcast     #37                 // class java/lang/Iterable
     146: iconst_5
     147: invokestatic  #74                 // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
     150: checkcast     #37                 // class java/lang/Iterable
     153: astore        4
     155: nop
     156: iconst_0
     157: istore        5
     159: aload         4
     161: astore        6
     163: new           #39                 // class java/util/ArrayList
     166: dup
     167: aload         4
     169: bipush        10
     171: invokestatic  #78                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     174: invokespecial #81                 // Method java/util/ArrayList."<init>":(I)V
     177: checkcast     #42                 // class java/util/Collection
     180: astore        7
     182: iconst_0
     183: istore        8
     185: aload         6
     187: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     192: astore        9
     194: aload         9
     196: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     201: ifeq          590
     204: aload         9
     206: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     211: astore        10
     213: aload         7
     215: aload         10
     217: checkcast     #68                 // class java/util/List
     220: astore        11
     222: astore        34
     224: iconst_0
     225: istore        12
     227: getstatic     #87                 // Field com/github/afranken/aoc/Day202104$Board.Companion:Lcom/github/afranken/aoc/Day202104$Board$Companion;
     230: aload         11
     232: checkcast     #37                 // class java/lang/Iterable
     235: astore        13
     237: astore        14
     239: iconst_0
     240: istore        15
     242: aload         13
     244: astore        16
     246: new           #39                 // class java/util/ArrayList
     249: dup
     250: aload         13
     252: bipush        10
     254: invokestatic  #78                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     257: invokespecial #81                 // Method java/util/ArrayList."<init>":(I)V
     260: checkcast     #42                 // class java/util/Collection
     263: astore        17
     265: iconst_0
     266: istore        18
     268: aload         16
     270: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     275: astore        19
     277: aload         19
     279: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     284: ifeq          565
     287: aload         19
     289: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     294: astore        20
     296: aload         17
     298: aload         20
     300: checkcast     #58                 // class java/lang/String
     303: astore        21
     305: astore        22
     307: iconst_0
     308: istore        23
     310: aload         21
     312: checkcast     #23                 // class java/lang/CharSequence
     315: iconst_2
     316: anewarray     #58                 // class java/lang/String
     319: astore        24
     321: aload         24
     323: iconst_0
     324: ldc           #89                 // String
     326: aastore
     327: aload         24
     329: iconst_1
     330: ldc           #91                 // String
     332: aastore
     333: aload         24
     335: iconst_0
     336: iconst_0
     337: bipush        6
     339: aconst_null
     340: invokestatic  #94                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     343: checkcast     #37                 // class java/lang/Iterable
     346: astore        24
     348: nop
     349: iconst_0
     350: istore        25
     352: aload         24
     354: astore        26
     356: new           #39                 // class java/util/ArrayList
     359: dup
     360: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
     363: checkcast     #42                 // class java/util/Collection
     366: astore        27
     368: iconst_0
     369: istore        28
     371: aload         26
     373: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     378: astore        29
     380: aload         29
     382: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     387: ifeq          442
     390: aload         29
     392: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     397: astore        30
     399: aload         30
     401: checkcast     #58                 // class java/lang/String
     404: astore        31
     406: iconst_0
     407: istore        32
     409: aload         31
     411: checkcast     #23                 // class java/lang/CharSequence
     414: invokestatic  #98                 // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
     417: ifne          424
     420: iconst_1
     421: goto          425
     424: iconst_0
     425: nop
     426: ifeq          380
     429: aload         27
     431: aload         30
     433: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     438: pop
     439: goto          380
     442: aload         27
     444: checkcast     #68                 // class java/util/List
     447: nop
     448: checkcast     #37                 // class java/lang/Iterable
     451: astore        24
     453: nop
     454: iconst_0
     455: istore        25
     457: aload         24
     459: astore        26
     461: new           #39                 // class java/util/ArrayList
     464: dup
     465: aload         24
     467: bipush        10
     469: invokestatic  #78                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     472: invokespecial #81                 // Method java/util/ArrayList."<init>":(I)V
     475: checkcast     #42                 // class java/util/Collection
     478: astore        27
     480: iconst_0
     481: istore        28
     483: aload         26
     485: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     490: astore        29
     492: aload         29
     494: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     499: ifeq          546
     502: aload         29
     504: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     509: astore        30
     511: aload         27
     513: aload         30
     515: checkcast     #58                 // class java/lang/String
     518: astore        31
     520: astore        33
     522: iconst_0
     523: istore        32
     525: aload         31
     527: invokestatic  #104                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     530: nop
     531: invokestatic  #108                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     534: aload         33
     536: swap
     537: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     542: pop
     543: goto          492
     546: aload         27
     548: checkcast     #68                 // class java/util/List
     551: nop
     552: nop
     553: aload         22
     555: swap
     556: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     561: pop
     562: goto          277
     565: aload         17
     567: checkcast     #68                 // class java/util/List
     570: nop
     571: aload         14
     573: swap
     574: invokevirtual #114                // Method com/github/afranken/aoc/Day202104$Board$Companion.of:(Ljava/util/List;)Lcom/github/afranken/aoc/Day202104$Board;
     577: nop
     578: aload         34
     580: swap
     581: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     586: pop
     587: goto          194
     590: aload         7
     592: checkcast     #68                 // class java/util/List
     595: nop
     596: astore_3
     597: aload_2
     598: invokeinterface #115,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     603: astore        4
     605: aload         4
     607: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     612: ifeq          802
     615: aload         4
     617: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     622: checkcast     #58                 // class java/lang/String
     625: astore        5
     627: aload_3
     628: checkcast     #37                 // class java/lang/Iterable
     631: astore        6
     633: iconst_0
     634: istore        7
     636: aload         6
     638: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     643: astore        8
     645: aload         8
     647: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     652: ifeq          700
     655: aload         8
     657: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     662: astore        9
     664: aload         9
     666: checkcast     #83                 // class com/github/afranken/aoc/Day202104$Board
     669: astore        10
     671: iconst_0
     672: istore        11
     674: aload         10
     676: aload         5
     678: invokestatic  #118                // Method java/lang/Integer.valueOf:(Ljava/lang/String;)Ljava/lang/Integer;
     681: dup
     682: ldc           #120                // String valueOf(...)
     684: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     687: checkcast     #125                // class java/lang/Number
     690: invokevirtual #128                // Method java/lang/Number.intValue:()I
     693: invokevirtual #131                // Method com/github/afranken/aoc/Day202104$Board.markField:(I)V
     696: nop
     697: goto          645
     700: nop
     701: aload_3
     702: checkcast     #37                 // class java/lang/Iterable
     705: astore        7
     707: iconst_0
     708: istore        8
     710: aload         7
     712: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     717: astore        9
     719: aload         9
     721: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     726: ifeq          761
     729: aload         9
     731: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     736: astore        10
     738: aload         10
     740: checkcast     #83                 // class com/github/afranken/aoc/Day202104$Board
     743: astore        11
     745: iconst_0
     746: istore        12
     748: aload         11
     750: invokevirtual #134                // Method com/github/afranken/aoc/Day202104$Board.isBingo:()Z
     753: ifeq          719
     756: aload         10
     758: goto          762
     761: aconst_null
     762: checkcast     #83                 // class com/github/afranken/aoc/Day202104$Board
     765: astore        6
     767: aload         6
     769: ifnull        605
     772: aload         6
     774: invokevirtual #138                // Method com/github/afranken/aoc/Day202104$Board.getUnmarked:()Ljava/util/List;
     777: checkcast     #37                 // class java/lang/Iterable
     780: invokestatic  #142                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     783: aload         5
     785: invokestatic  #118                // Method java/lang/Integer.valueOf:(Ljava/lang/String;)Ljava/lang/Integer;
     788: dup
     789: ldc           #120                // String valueOf(...)
     791: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     794: checkcast     #125                // class java/lang/Number
     797: invokevirtual #128                // Method java/lang/Number.intValue:()I
     800: imul
     801: ireturn
     802: iconst_m1
     803: ireturn

  public final int part2(java.lang.String[]);
    Code:
       0: aload_1
       1: ldc           #15                 // String inputs
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: iconst_0
       8: aaload
       9: checkcast     #23                 // class java/lang/CharSequence
      12: iconst_1
      13: newarray       char
      15: astore_3
      16: aload_3
      17: iconst_0
      18: bipush        44
      20: castore
      21: aload_3
      22: iconst_0
      23: iconst_0
      24: bipush        6
      26: aconst_null
      27: invokestatic  #29                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
      30: astore_2
      31: aconst_null
      32: astore_3
      33: aload_1
      34: iconst_1
      35: invokestatic  #35                 // Method kotlin/collections/ArraysKt.drop:([Ljava/lang/Object;I)Ljava/util/List;
      38: checkcast     #37                 // class java/lang/Iterable
      41: astore        4
      43: nop
      44: iconst_0
      45: istore        5
      47: aload         4
      49: astore        6
      51: new           #39                 // class java/util/ArrayList
      54: dup
      55: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
      58: checkcast     #42                 // class java/util/Collection
      61: astore        7
      63: iconst_0
      64: istore        8
      66: aload         6
      68: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      73: astore        9
      75: aload         9
      77: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      82: ifeq          139
      85: aload         9
      87: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      92: astore        10
      94: aload         10
      96: checkcast     #58                 // class java/lang/String
      99: astore        11
     101: iconst_0
     102: istore        12
     104: aload         11
     106: checkcast     #23                 // class java/lang/CharSequence
     109: invokeinterface #62,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     114: ifle          121
     117: iconst_1
     118: goto          122
     121: iconst_0
     122: nop
     123: ifeq          75
     126: aload         7
     128: aload         10
     130: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     135: pop
     136: goto          75
     139: aload         7
     141: checkcast     #68                 // class java/util/List
     144: nop
     145: checkcast     #37                 // class java/lang/Iterable
     148: iconst_5
     149: invokestatic  #74                 // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
     152: checkcast     #37                 // class java/lang/Iterable
     155: astore        4
     157: nop
     158: iconst_0
     159: istore        5
     161: aload         4
     163: astore        6
     165: new           #39                 // class java/util/ArrayList
     168: dup
     169: aload         4
     171: bipush        10
     173: invokestatic  #78                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     176: invokespecial #81                 // Method java/util/ArrayList."<init>":(I)V
     179: checkcast     #42                 // class java/util/Collection
     182: astore        7
     184: iconst_0
     185: istore        8
     187: aload         6
     189: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     194: astore        9
     196: aload         9
     198: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     203: ifeq          592
     206: aload         9
     208: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     213: astore        10
     215: aload         7
     217: aload         10
     219: checkcast     #68                 // class java/util/List
     222: astore        11
     224: astore        34
     226: iconst_0
     227: istore        12
     229: getstatic     #87                 // Field com/github/afranken/aoc/Day202104$Board.Companion:Lcom/github/afranken/aoc/Day202104$Board$Companion;
     232: aload         11
     234: checkcast     #37                 // class java/lang/Iterable
     237: astore        13
     239: astore        14
     241: iconst_0
     242: istore        15
     244: aload         13
     246: astore        16
     248: new           #39                 // class java/util/ArrayList
     251: dup
     252: aload         13
     254: bipush        10
     256: invokestatic  #78                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     259: invokespecial #81                 // Method java/util/ArrayList."<init>":(I)V
     262: checkcast     #42                 // class java/util/Collection
     265: astore        17
     267: iconst_0
     268: istore        18
     270: aload         16
     272: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     277: astore        19
     279: aload         19
     281: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     286: ifeq          567
     289: aload         19
     291: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     296: astore        20
     298: aload         17
     300: aload         20
     302: checkcast     #58                 // class java/lang/String
     305: astore        21
     307: astore        22
     309: iconst_0
     310: istore        23
     312: aload         21
     314: checkcast     #23                 // class java/lang/CharSequence
     317: iconst_2
     318: anewarray     #58                 // class java/lang/String
     321: astore        24
     323: aload         24
     325: iconst_0
     326: ldc           #89                 // String
     328: aastore
     329: aload         24
     331: iconst_1
     332: ldc           #91                 // String
     334: aastore
     335: aload         24
     337: iconst_0
     338: iconst_0
     339: bipush        6
     341: aconst_null
     342: invokestatic  #94                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     345: checkcast     #37                 // class java/lang/Iterable
     348: astore        24
     350: nop
     351: iconst_0
     352: istore        25
     354: aload         24
     356: astore        26
     358: new           #39                 // class java/util/ArrayList
     361: dup
     362: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
     365: checkcast     #42                 // class java/util/Collection
     368: astore        27
     370: iconst_0
     371: istore        28
     373: aload         26
     375: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     380: astore        29
     382: aload         29
     384: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     389: ifeq          444
     392: aload         29
     394: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     399: astore        30
     401: aload         30
     403: checkcast     #58                 // class java/lang/String
     406: astore        31
     408: iconst_0
     409: istore        32
     411: aload         31
     413: checkcast     #23                 // class java/lang/CharSequence
     416: invokestatic  #98                 // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
     419: ifne          426
     422: iconst_1
     423: goto          427
     426: iconst_0
     427: nop
     428: ifeq          382
     431: aload         27
     433: aload         30
     435: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     440: pop
     441: goto          382
     444: aload         27
     446: checkcast     #68                 // class java/util/List
     449: nop
     450: checkcast     #37                 // class java/lang/Iterable
     453: astore        24
     455: nop
     456: iconst_0
     457: istore        25
     459: aload         24
     461: astore        26
     463: new           #39                 // class java/util/ArrayList
     466: dup
     467: aload         24
     469: bipush        10
     471: invokestatic  #78                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     474: invokespecial #81                 // Method java/util/ArrayList."<init>":(I)V
     477: checkcast     #42                 // class java/util/Collection
     480: astore        27
     482: iconst_0
     483: istore        28
     485: aload         26
     487: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     492: astore        29
     494: aload         29
     496: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     501: ifeq          548
     504: aload         29
     506: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     511: astore        30
     513: aload         27
     515: aload         30
     517: checkcast     #58                 // class java/lang/String
     520: astore        31
     522: astore        33
     524: iconst_0
     525: istore        32
     527: aload         31
     529: invokestatic  #104                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     532: nop
     533: invokestatic  #108                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     536: aload         33
     538: swap
     539: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     544: pop
     545: goto          494
     548: aload         27
     550: checkcast     #68                 // class java/util/List
     553: nop
     554: nop
     555: aload         22
     557: swap
     558: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     563: pop
     564: goto          279
     567: aload         17
     569: checkcast     #68                 // class java/util/List
     572: nop
     573: aload         14
     575: swap
     576: invokevirtual #114                // Method com/github/afranken/aoc/Day202104$Board$Companion.of:(Ljava/util/List;)Lcom/github/afranken/aoc/Day202104$Board;
     579: nop
     580: aload         34
     582: swap
     583: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     588: pop
     589: goto          196
     592: aload         7
     594: checkcast     #68                 // class java/util/List
     597: nop
     598: astore_3
     599: aload_2
     600: checkcast     #37                 // class java/lang/Iterable
     603: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     608: astore        4
     610: iconst_0
     611: istore        5
     613: aload         4
     615: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     620: ifeq          925
     623: iload         5
     625: istore        6
     627: iload         5
     629: iconst_1
     630: iadd
     631: istore        5
     633: aload         4
     635: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     640: checkcast     #58                 // class java/lang/String
     643: astore        7
     645: aload_3
     646: checkcast     #37                 // class java/lang/Iterable
     649: astore        8
     651: iconst_0
     652: istore        9
     654: aload         8
     656: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     661: astore        10
     663: aload         10
     665: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     670: ifeq          718
     673: aload         10
     675: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     680: astore        11
     682: aload         11
     684: checkcast     #83                 // class com/github/afranken/aoc/Day202104$Board
     687: astore        12
     689: iconst_0
     690: istore        13
     692: aload         12
     694: aload         7
     696: invokestatic  #118                // Method java/lang/Integer.valueOf:(Ljava/lang/String;)Ljava/lang/Integer;
     699: dup
     700: ldc           #120                // String valueOf(...)
     702: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     705: checkcast     #125                // class java/lang/Number
     708: invokevirtual #128                // Method java/lang/Number.intValue:()I
     711: invokevirtual #131                // Method com/github/afranken/aoc/Day202104$Board.markField:(I)V
     714: nop
     715: goto          663
     718: nop
     719: aload_3
     720: checkcast     #37                 // class java/lang/Iterable
     723: astore        8
     725: iconst_0
     726: istore        9
     728: aload         8
     730: astore        10
     732: new           #39                 // class java/util/ArrayList
     735: dup
     736: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
     739: checkcast     #42                 // class java/util/Collection
     742: astore        11
     744: iconst_0
     745: istore        12
     747: aload         10
     749: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     754: astore        13
     756: aload         13
     758: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     763: ifeq          806
     766: aload         13
     768: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     773: astore        14
     775: aload         14
     777: checkcast     #83                 // class com/github/afranken/aoc/Day202104$Board
     780: astore        15
     782: iconst_0
     783: istore        16
     785: aload         15
     787: invokevirtual #134                // Method com/github/afranken/aoc/Day202104$Board.isBingo:()Z
     790: ifeq          756
     793: aload         11
     795: aload         14
     797: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     802: pop
     803: goto          756
     806: aload         11
     808: checkcast     #68                 // class java/util/List
     811: nop
     812: checkcast     #37                 // class java/lang/Iterable
     815: astore        8
     817: nop
     818: iconst_0
     819: istore        9
     821: aload         8
     823: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     828: astore        10
     830: aload         10
     832: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     837: ifeq          921
     840: aload         10
     842: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     847: astore        11
     849: aload         11
     851: checkcast     #83                 // class com/github/afranken/aoc/Day202104$Board
     854: astore        12
     856: iconst_0
     857: istore        13
     859: aload_3
     860: invokeinterface #185,  1          // InterfaceMethod java/util/List.size:()I
     865: iconst_1
     866: if_icmpeq     876
     869: iload         6
     871: bipush        100
     873: if_icmpne     906
     876: aload         12
     878: invokevirtual #138                // Method com/github/afranken/aoc/Day202104$Board.getUnmarked:()Ljava/util/List;
     881: checkcast     #37                 // class java/lang/Iterable
     884: invokestatic  #142                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     887: aload         7
     889: invokestatic  #118                // Method java/lang/Integer.valueOf:(Ljava/lang/String;)Ljava/lang/Integer;
     892: dup
     893: ldc           #120                // String valueOf(...)
     895: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     898: checkcast     #125                // class java/lang/Number
     901: invokevirtual #128                // Method java/lang/Number.intValue:()I
     904: imul
     905: ireturn
     906: aload_3
     907: checkcast     #37                 // class java/lang/Iterable
     910: aload         12
     912: invokestatic  #189                // Method kotlin/collections/CollectionsKt.minus:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/util/List;
     915: astore_3
     916: nop
     917: nop
     918: goto          830
     921: nop
     922: goto          613
     925: iconst_m1
     926: ireturn

  static {};
    Code:
       0: new           #2                  // class com/github/afranken/aoc/Day202104
       3: dup
       4: invokespecial #200                // Method "<init>":()V
       7: putstatic     #203                // Field INSTANCE:Lcom/github/afranken/aoc/Day202104;
      10: return
}

Compiled from "Day202104.kt"
public final class com.github.afranken.aoc.Day202104$Field {
  private final int value;

  private boolean marked;

  public com.github.afranken.aoc.Day202104$Field(int, boolean);
    Code:
       0: aload_0
       1: invokespecial #9                  // Method java/lang/Object."<init>":()V
       4: aload_0
       5: iload_1
       6: putfield      #13                 // Field value:I
       9: aload_0
      10: iload_2
      11: putfield      #17                 // Field marked:Z
      14: return

  public com.github.afranken.aoc.Day202104$Field(int, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: iload_3
       1: iconst_2
       2: iand
       3: ifeq          8
       6: iconst_0
       7: istore_2
       8: aload_0
       9: iload_1
      10: iload_2
      11: invokespecial #22                 // Method "<init>":(IZ)V
      14: return

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

  public final boolean getMarked();
    Code:
       0: aload_0
       1: getfield      #17                 // Field marked:Z
       4: ireturn

  public final void setMarked(boolean);
    Code:
       0: aload_0
       1: iload_1
       2: putfield      #17                 // Field marked:Z
       5: return

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

  public final boolean component2();
    Code:
       0: aload_0
       1: getfield      #17                 // Field marked:Z
       4: ireturn

  public final com.github.afranken.aoc.Day202104$Field copy(int, boolean);
    Code:
       0: new           #2                  // class com/github/afranken/aoc/Day202104$Field
       3: dup
       4: iload_1
       5: iload_2
       6: invokespecial #22                 // Method "<init>":(IZ)V
       9: areturn

  public static com.github.afranken.aoc.Day202104$Field copy$default(com.github.afranken.aoc.Day202104$Field, int, boolean, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #13                 // Field value:I
      10: istore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #17                 // Field marked:Z
      21: istore_2
      22: aload_0
      23: iload_1
      24: iload_2
      25: invokevirtual #38                 // Method copy:(IZ)Lcom/github/afranken/aoc/Day202104$Field;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #42                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #43                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #45                 // String Field(value=
       9: invokevirtual #49                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #13                 // Field value:I
      16: invokevirtual #52                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #54                 // String , marked=
      21: invokevirtual #49                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #17                 // Field marked:Z
      28: invokevirtual #57                 // Method java/lang/StringBuilder.append:(Z)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 value: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      #17                 // Field marked:Z
      16: invokestatic  #73                 // Method java/lang/Boolean.hashCode:(Z)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 com/github/afranken/aoc/Day202104$Field
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class com/github/afranken/aoc/Day202104$Field
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field value:I
      25: aload_2
      26: getfield      #13                 // Field value:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #17                 // Field marked:Z
      38: aload_2
      39: getfield      #17                 // Field marked:Z
      42: if_icmpeq     47
      45: iconst_0
      46: ireturn
      47: iconst_1
      48: ireturn
}


package com.github.afranken.aoc

object Day202106 {

    fun part1(inputs: Array<String>): Long {
        val fish = fishMap(inputs.map { Integer.valueOf(it) })

        val agedFish = age(fish, 80)

        return agedFish.values.sum()
    }

    fun part2(inputs: Array<String>): Long {
        val fish = fishMap(inputs.map { Integer.valueOf(it) })

        val agedFish = age(fish, 256)

        return agedFish.values.sum()
    }

    private fun fishMap(inputs: List<Int>): MutableMap<Int, Long> {
        val fish = mutableMapOf<Int, Long>()

        inputs.forEach { fish.merge(it, 1, Long::plus) }

        return fish
    }

    private fun age(fish: MutableMap<Int, Long>, days: Int): Map<Int, Long> {
        repeat(days) {
            val eights = fish.getOrDefault(8, 0)
            val sevens = fish.getOrDefault(7, 0)
            val sixes = fish.getOrDefault(6, 0)
            val fives = fish.getOrDefault(5, 0)
            val fours = fish.getOrDefault(4, 0)
            val threes = fish.getOrDefault(3, 0)
            val twos = fish.getOrDefault(2, 0)
            val ones = fish.getOrDefault(1, 0)
            val zeroes = fish.getOrDefault(0, 0)

            //zeroes spawn new 8s
            fish[8] = zeroes
            fish[7] = eights
            //zeroes are set to 6s after spawning, 7s degrade to 6s
            fish[6] = zeroes + sevens
            fish[5] = sixes
            fish[4] = fives
            fish[3] = fours
            fish[2] = threes
            fish[1] = twos
            fish[0] = ones
        }
        return fish
    }
}

Compiled from "Day202106.kt"
public final class com.github.afranken.aoc.Day202106 {
  public static final com.github.afranken.aoc.Day202106 INSTANCE;

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

  public final long part1(java.lang.String[]);
    Code:
       0: aload_1
       1: ldc           #15                 // String inputs
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: astore_3
       9: astore        13
      11: iconst_0
      12: istore        4
      14: aload_3
      15: astore        5
      17: new           #23                 // class java/util/ArrayList
      20: dup
      21: aload_3
      22: arraylength
      23: invokespecial #26                 // Method java/util/ArrayList."<init>":(I)V
      26: checkcast     #28                 // class java/util/Collection
      29: astore        6
      31: iconst_0
      32: istore        7
      34: iconst_0
      35: istore        8
      37: aload         5
      39: arraylength
      40: istore        9
      42: iload         8
      44: iload         9
      46: if_icmpge     87
      49: aload         5
      51: iload         8
      53: aaload
      54: astore        10
      56: aload         6
      58: aload         10
      60: astore        11
      62: astore        14
      64: iconst_0
      65: istore        12
      67: aload         11
      69: invokestatic  #34                 // Method java/lang/Integer.valueOf:(Ljava/lang/String;)Ljava/lang/Integer;
      72: aload         14
      74: swap
      75: invokeinterface #38,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      80: pop
      81: iinc          8, 1
      84: goto          42
      87: aload         6
      89: checkcast     #40                 // class java/util/List
      92: nop
      93: aload         13
      95: swap
      96: invokespecial #44                 // Method fishMap:(Ljava/util/List;)Ljava/util/Map;
      99: astore_2
     100: aload_0
     101: aload_2
     102: bipush        80
     104: invokespecial #48                 // Method age:(Ljava/util/Map;I)Ljava/util/Map;
     107: astore_3
     108: aload_3
     109: invokeinterface #54,  1           // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
     114: checkcast     #56                 // class java/lang/Iterable
     117: invokestatic  #62                 // Method kotlin/collections/CollectionsKt.sumOfLong:(Ljava/lang/Iterable;)J
     120: lreturn

  public final long part2(java.lang.String[]);
    Code:
       0: aload_1
       1: ldc           #15                 // String inputs
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: astore_3
       9: astore        13
      11: iconst_0
      12: istore        4
      14: aload_3
      15: astore        5
      17: new           #23                 // class java/util/ArrayList
      20: dup
      21: aload_3
      22: arraylength
      23: invokespecial #26                 // Method java/util/ArrayList."<init>":(I)V
      26: checkcast     #28                 // class java/util/Collection
      29: astore        6
      31: iconst_0
      32: istore        7
      34: iconst_0
      35: istore        8
      37: aload         5
      39: arraylength
      40: istore        9
      42: iload         8
      44: iload         9
      46: if_icmpge     87
      49: aload         5
      51: iload         8
      53: aaload
      54: astore        10
      56: aload         6
      58: aload         10
      60: astore        11
      62: astore        14
      64: iconst_0
      65: istore        12
      67: aload         11
      69: invokestatic  #34                 // Method java/lang/Integer.valueOf:(Ljava/lang/String;)Ljava/lang/Integer;
      72: aload         14
      74: swap
      75: invokeinterface #38,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      80: pop
      81: iinc          8, 1
      84: goto          42
      87: aload         6
      89: checkcast     #40                 // class java/util/List
      92: nop
      93: aload         13
      95: swap
      96: invokespecial #44                 // Method fishMap:(Ljava/util/List;)Ljava/util/Map;
      99: astore_2
     100: aload_0
     101: aload_2
     102: sipush        256
     105: invokespecial #48                 // Method age:(Ljava/util/Map;I)Ljava/util/Map;
     108: astore_3
     109: aload_3
     110: invokeinterface #54,  1           // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
     115: checkcast     #56                 // class java/lang/Iterable
     118: invokestatic  #62                 // Method kotlin/collections/CollectionsKt.sumOfLong:(Ljava/lang/Iterable;)J
     121: lreturn

  private final java.util.Map<java.lang.Integer, java.lang.Long> fishMap(java.util.List<java.lang.Integer>);
    Code:
       0: new           #85                 // class java/util/LinkedHashMap
       3: dup
       4: invokespecial #86                 // Method java/util/LinkedHashMap."<init>":()V
       7: checkcast     #50                 // class java/util/Map
      10: astore_2
      11: aload_1
      12: checkcast     #56                 // class java/lang/Iterable
      15: astore_3
      16: iconst_0
      17: istore        4
      19: aload_3
      20: invokeinterface #90,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      25: astore        5
      27: aload         5
      29: invokeinterface #96,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      34: ifeq          90
      37: aload         5
      39: invokeinterface #100,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      44: astore        6
      46: aload         6
      48: checkcast     #102                // class java/lang/Number
      51: invokevirtual #106                // Method java/lang/Number.intValue:()I
      54: istore        7
      56: iconst_0
      57: istore        8
      59: aload_2
      60: iload         7
      62: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      65: lconst_1
      66: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      69: getstatic     #120                // Field com/github/afranken/aoc/Day202106$fishMap$1$1.INSTANCE:Lcom/github/afranken/aoc/Day202106$fishMap$1$1;
      72: checkcast     #122                // class kotlin/jvm/functions/Function2
      75: invokedynamic #142,  0            // InvokeDynamic #0:apply:(Lkotlin/jvm/functions/Function2;)Ljava/util/function/BiFunction;
      80: invokeinterface #146,  4          // InterfaceMethod java/util/Map.merge:(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
      85: pop
      86: nop
      87: goto          27
      90: nop
      91: aload_2
      92: areturn

  private final java.util.Map<java.lang.Integer, java.lang.Long> age(java.util.Map<java.lang.Integer, java.lang.Long>, int);
    Code:
       0: iconst_0
       1: istore_3
       2: iload_3
       3: iload_2
       4: if_icmpge     403
       7: iload_3
       8: istore        4
      10: iconst_0
      11: istore        5
      13: aload_1
      14: bipush        8
      16: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      19: lconst_0
      20: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      23: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      28: checkcast     #102                // class java/lang/Number
      31: invokevirtual #160                // Method java/lang/Number.longValue:()J
      34: lstore        6
      36: aload_1
      37: bipush        7
      39: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      42: lconst_0
      43: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      46: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      51: checkcast     #102                // class java/lang/Number
      54: invokevirtual #160                // Method java/lang/Number.longValue:()J
      57: lstore        8
      59: aload_1
      60: bipush        6
      62: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      65: lconst_0
      66: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      69: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      74: checkcast     #102                // class java/lang/Number
      77: invokevirtual #160                // Method java/lang/Number.longValue:()J
      80: lstore        10
      82: aload_1
      83: iconst_5
      84: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      87: lconst_0
      88: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      91: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      96: checkcast     #102                // class java/lang/Number
      99: invokevirtual #160                // Method java/lang/Number.longValue:()J
     102: lstore        12
     104: aload_1
     105: iconst_4
     106: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     109: lconst_0
     110: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     113: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     118: checkcast     #102                // class java/lang/Number
     121: invokevirtual #160                // Method java/lang/Number.longValue:()J
     124: lstore        14
     126: aload_1
     127: iconst_3
     128: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     131: lconst_0
     132: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     135: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     140: checkcast     #102                // class java/lang/Number
     143: invokevirtual #160                // Method java/lang/Number.longValue:()J
     146: lstore        16
     148: aload_1
     149: iconst_2
     150: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     153: lconst_0
     154: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     157: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     162: checkcast     #102                // class java/lang/Number
     165: invokevirtual #160                // Method java/lang/Number.longValue:()J
     168: lstore        18
     170: aload_1
     171: iconst_1
     172: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     175: lconst_0
     176: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     179: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     184: checkcast     #102                // class java/lang/Number
     187: invokevirtual #160                // Method java/lang/Number.longValue:()J
     190: lstore        20
     192: aload_1
     193: iconst_0
     194: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     197: lconst_0
     198: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     201: invokeinterface #156,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     206: checkcast     #102                // class java/lang/Number
     209: invokevirtual #160                // Method java/lang/Number.longValue:()J
     212: lstore        22
     214: lload         22
     216: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     219: astore        24
     221: aload_1
     222: bipush        8
     224: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     227: aload         24
     229: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     234: pop
     235: lload         6
     237: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     240: astore        24
     242: aload_1
     243: bipush        7
     245: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     248: aload         24
     250: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     255: pop
     256: aload_1
     257: bipush        6
     259: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     262: lload         22
     264: lload         8
     266: ladd
     267: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     270: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     275: pop
     276: lload         10
     278: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     281: astore        24
     283: aload_1
     284: iconst_5
     285: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     288: aload         24
     290: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     295: pop
     296: lload         12
     298: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     301: astore        24
     303: aload_1
     304: iconst_4
     305: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     308: aload         24
     310: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     315: pop
     316: lload         14
     318: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     321: astore        24
     323: aload_1
     324: iconst_3
     325: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     328: aload         24
     330: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     335: pop
     336: lload         16
     338: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     341: astore        24
     343: aload_1
     344: iconst_2
     345: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     348: aload         24
     350: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     355: pop
     356: lload         18
     358: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     361: astore        24
     363: aload_1
     364: iconst_1
     365: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     368: aload         24
     370: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     375: pop
     376: lload         20
     378: invokestatic  #114                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     381: astore        24
     383: aload_1
     384: iconst_0
     385: invokestatic  #109                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     388: aload         24
     390: invokeinterface #163,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     395: pop
     396: nop
     397: iinc          3, 1
     400: goto          2
     403: aload_1
     404: areturn

  private static final java.lang.Long fishMap$lambda$3$lambda$2(kotlin.jvm.functions.Function2, java.lang.Object, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: invokeinterface #178,  3          // InterfaceMethod kotlin/jvm/functions/Function2.invoke:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
       8: checkcast     #111                // class java/lang/Long
      11: areturn

  static {};
    Code:
       0: new           #2                  // class com/github/afranken/aoc/Day202106
       3: dup
       4: invokespecial #184                // Method "<init>":()V
       7: putstatic     #186                // Field INSTANCE:Lcom/github/afranken/aoc/Day202106;
      10: return
}

Compiled from "Day202106.kt"
final class com.github.afranken.aoc.Day202106$fishMap$1$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function2<java.lang.Long, java.lang.Long, java.lang.Long> {
  public static final com.github.afranken.aoc.Day202106$fishMap$1$1 INSTANCE;

  com.github.afranken.aoc.Day202106$fishMap$1$1();
    Code:
       0: aload_0
       1: iconst_2
       2: getstatic     #15                 // Field java/lang/Long.TYPE:Ljava/lang/Class;
       5: ldc           #17                 // String plus
       7: ldc           #19                 // String plus(J)J
       9: iconst_0
      10: invokespecial #22                 // Method kotlin/jvm/internal/FunctionReferenceImpl."<init>":(ILjava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V
      13: return

  public final java.lang.Long invoke(long, long);
    Code:
       0: lload_1
       1: lload_3
       2: ladd
       3: invokestatic  #30                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
       6: areturn

  public java.lang.Object invoke(java.lang.Object, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #36                 // class java/lang/Number
       5: invokevirtual #40                 // Method java/lang/Number.longValue:()J
       8: aload_2
       9: checkcast     #36                 // class java/lang/Number
      12: invokevirtual #40                 // Method java/lang/Number.longValue:()J
      15: invokevirtual #42                 // Method invoke:(JJ)Ljava/lang/Long;
      18: areturn

  static {};
    Code:
       0: new           #2                  // class com/github/afranken/aoc/Day202106$fishMap$1$1
       3: dup
       4: invokespecial #47                 // Method "<init>":()V
       7: putstatic     #50                 // Field INSTANCE:Lcom/github/afranken/aoc/Day202106$fishMap$1$1;
      10: return
}