import kotlin.math.max
import kotlin.math.min

object day3 {

    data class Number(val chars: String, val startIndex: Int, val row: Int) {
        fun toInt() = chars.toInt()
        val range by lazy { IntRange(startIndex, startIndex+chars.length-1) }
        fun isAdjacentToSymbol(world: List<Line>): Boolean =
            (-1 .. 1).fold(emptyList<Symbol>()) { acc, offset -> acc + getSymbolsInRange(world, row+offset, range) }.any()
    }
    data class Symbol(val char: Char, val col: Int, val row: Int) {
        fun isGearSymbol() = char == '*'
        val range by lazy { IntRange(col-1, col+1) }
        fun adjacentNumbers(world: List<Line>): List<Number> =
            (-1 .. 1).fold(emptyList()) { acc, offset -> acc + getNumbersInRange(world, row+offset, range) }
        fun gearRatio(world: List<Line>): Int {
            val nums = adjacentNumbers(world).map { it.toInt() }
            return nums.first() * nums.last()
        }
    }

    fun getNumbersInRange(world: List<Line>, row: Int, range: IntRange) = if (row < 0 || row >= world.size) emptyList() else world[row].numbers.filter { range.intersect(it.range).any() }
    fun getSymbolsInRange(world: List<Line>, row: Int, range: IntRange) = if (row < 0 || row >= world.size) emptyList() else world[row].symbols.filter { range.intersect(it.range).any() }

    data class Line(val numbers: List<Number>, val symbols: List<Symbol>)

    tailrec fun numbersFromLine(line: String, row: Int, res: List<Number> = emptyList(), currentNum: String = "", currentStart: Int = -1, index: Int = 0): List<Number> {
        if (index == line.length) return if (!currentNum.isEmpty()) res + Number(currentNum, currentStart, row) else res
        val atIndex = line[index]
        val newCurrentNum = if (atIndex.isDigit()) currentNum + atIndex else ""
        val newStart = if (currentNum == "" && atIndex.isDigit()) index else currentStart
        val newRes = if (!atIndex.isDigit() && !currentNum.isEmpty()) res + Number(currentNum, currentStart, row) else res
        return numbersFromLine(line, row, newRes, newCurrentNum, newStart, index+1)
    }

    fun parseInput(input: List<String>) = input.foldIndexed(emptyList<Line>()) { row, linesRes, line ->
        val nums = numbersFromLine(line, row)
        val symbols = line.foldIndexed(emptyList<Symbol>()) { col, acc, c ->
            if (!c.isDigit() && c != '.') acc + Symbol(c, col, row) else acc
        }
        linesRes + Line(nums, symbols)
    }

    fun pt1(input: List<String>): Int {
        val world = parseInput(input)
        return world.fold(0) { acc, line ->
            val hasAdjacent = line.numbers.filter { it.isAdjacentToSymbol(world) }
            acc + hasAdjacent.sumOf { it.toInt() }
        }
    }

    fun pt2(input: List<String>): Int {
        val world = parseInput(input)
        return world.fold(0) { acc, line ->
            val actualGears = line.symbols.filter {it.isGearSymbol() && it.adjacentNumbers(world).size == 2 }
            acc + actualGears.sumOf { it.gearRatio(world) }
        }
    }
}

Compiled from "day3.kt"
public final class day3$Line {
  private final java.util.List<day3$Number> numbers;

  private final java.util.List<day3$Symbol> symbols;

  public day3$Line(java.util.List<day3$Number>, java.util.List<day3$Symbol>);
    Code:
       0: aload_1
       1: ldc           #10                 // String numbers
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String symbols
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #21                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: aload_1
      18: putfield      #24                 // Field numbers:Ljava/util/List;
      21: aload_0
      22: aload_2
      23: putfield      #26                 // Field symbols:Ljava/util/List;
      26: return

  public final java.util.List<day3$Number> getNumbers();
    Code:
       0: aload_0
       1: getfield      #24                 // Field numbers:Ljava/util/List;
       4: areturn

  public final java.util.List<day3$Symbol> getSymbols();
    Code:
       0: aload_0
       1: getfield      #26                 // Field symbols:Ljava/util/List;
       4: areturn

  public final java.util.List<day3$Number> component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field numbers:Ljava/util/List;
       4: areturn

  public final java.util.List<day3$Symbol> component2();
    Code:
       0: aload_0
       1: getfield      #26                 // Field symbols:Ljava/util/List;
       4: areturn

  public final day3$Line copy(java.util.List<day3$Number>, java.util.List<day3$Symbol>);
    Code:
       0: aload_1
       1: ldc           #10                 // String numbers
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String symbols
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class day3$Line
      15: dup
      16: aload_1
      17: aload_2
      18: invokespecial #40                 // Method "<init>":(Ljava/util/List;Ljava/util/List;)V
      21: areturn

  public static day3$Line copy$default(day3$Line, java.util.List, java.util.List, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #24                 // Field numbers:Ljava/util/List;
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #26                 // Field symbols:Ljava/util/List;
      21: astore_2
      22: aload_0
      23: aload_1
      24: aload_2
      25: invokevirtual #44                 // Method copy:(Ljava/util/List;Ljava/util/List;)Lday3$Line;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #48                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #49                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #51                 // String Line(numbers=
       9: invokevirtual #55                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field numbers:Ljava/util/List;
      16: invokevirtual #58                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #60                 // String , symbols=
      21: invokevirtual #55                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #26                 // Field symbols:Ljava/util/List;
      28: invokevirtual #58                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #63                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #65                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field numbers:Ljava/util/List;
       4: invokevirtual #69                 // Method java/lang/Object.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #26                 // Field symbols:Ljava/util/List;
      16: invokevirtual #69                 // Method java/lang/Object.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: ireturn

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

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

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

  public final java.util.List<day3$Number> getNumbersInRange(java.util.List<day3$Line>, int, kotlin.ranges.IntRange);
    Code:
       0: aload_1
       1: ldc           #16                 // String world
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_3
       7: ldc           #24                 // String range
       9: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: iload_2
      13: iflt          26
      16: iload_2
      17: aload_1
      18: invokeinterface #30,  1           // InterfaceMethod java/util/List.size:()I
      23: if_icmplt     32
      26: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      29: goto          153
      32: aload_1
      33: iload_2
      34: invokeinterface #40,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      39: checkcast     #42                 // class day3$Line
      42: invokevirtual #45                 // Method day3$Line.getNumbers:()Ljava/util/List;
      45: checkcast     #47                 // class java/lang/Iterable
      48: astore        4
      50: iconst_0
      51: istore        5
      53: aload         4
      55: astore        6
      57: new           #49                 // class java/util/ArrayList
      60: dup
      61: invokespecial #50                 // Method java/util/ArrayList."<init>":()V
      64: checkcast     #52                 // class java/util/Collection
      67: astore        7
      69: iconst_0
      70: istore        8
      72: aload         6
      74: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      79: astore        9
      81: aload         9
      83: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      88: ifeq          147
      91: aload         9
      93: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      98: astore        10
     100: aload         10
     102: checkcast     #68                 // class day3$Number
     105: astore        11
     107: iconst_0
     108: istore        12
     110: aload_3
     111: checkcast     #47                 // class java/lang/Iterable
     114: aload         11
     116: invokevirtual #72                 // Method day3$Number.getRange:()Lkotlin/ranges/IntRange;
     119: checkcast     #47                 // class java/lang/Iterable
     122: invokestatic  #76                 // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
     125: checkcast     #47                 // class java/lang/Iterable
     128: invokestatic  #80                 // Method kotlin/collections/CollectionsKt.any:(Ljava/lang/Iterable;)Z
     131: ifeq          81
     134: aload         7
     136: aload         10
     138: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     143: pop
     144: goto          81
     147: aload         7
     149: checkcast     #26                 // class java/util/List
     152: nop
     153: areturn

  public final java.util.List<day3$Symbol> getSymbolsInRange(java.util.List<day3$Line>, int, kotlin.ranges.IntRange);
    Code:
       0: aload_1
       1: ldc           #16                 // String world
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_3
       7: ldc           #24                 // String range
       9: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: iload_2
      13: iflt          26
      16: iload_2
      17: aload_1
      18: invokeinterface #30,  1           // InterfaceMethod java/util/List.size:()I
      23: if_icmplt     32
      26: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      29: goto          153
      32: aload_1
      33: iload_2
      34: invokeinterface #40,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      39: checkcast     #42                 // class day3$Line
      42: invokevirtual #107                // Method day3$Line.getSymbols:()Ljava/util/List;
      45: checkcast     #47                 // class java/lang/Iterable
      48: astore        4
      50: iconst_0
      51: istore        5
      53: aload         4
      55: astore        6
      57: new           #49                 // class java/util/ArrayList
      60: dup
      61: invokespecial #50                 // Method java/util/ArrayList."<init>":()V
      64: checkcast     #52                 // class java/util/Collection
      67: astore        7
      69: iconst_0
      70: istore        8
      72: aload         6
      74: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      79: astore        9
      81: aload         9
      83: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      88: ifeq          147
      91: aload         9
      93: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      98: astore        10
     100: aload         10
     102: checkcast     #109                // class day3$Symbol
     105: astore        11
     107: iconst_0
     108: istore        12
     110: aload_3
     111: checkcast     #47                 // class java/lang/Iterable
     114: aload         11
     116: invokevirtual #110                // Method day3$Symbol.getRange:()Lkotlin/ranges/IntRange;
     119: checkcast     #47                 // class java/lang/Iterable
     122: invokestatic  #76                 // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
     125: checkcast     #47                 // class java/lang/Iterable
     128: invokestatic  #80                 // Method kotlin/collections/CollectionsKt.any:(Ljava/lang/Iterable;)Z
     131: ifeq          81
     134: aload         7
     136: aload         10
     138: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     143: pop
     144: goto          81
     147: aload         7
     149: checkcast     #26                 // class java/util/List
     152: nop
     153: areturn

  public final java.util.List<day3$Number> numbersFromLine(java.lang.String, int, java.util.List<day3$Number>, java.lang.String, int, int);
    Code:
       0: aload_1
       1: ldc           #117                // String line
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_3
       7: ldc           #119                // String res
       9: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload         4
      14: ldc           #121                // String currentNum
      16: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      19: aload_0
      20: astore        7
      22: iload         6
      24: aload_1
      25: invokevirtual #126                // Method java/lang/String.length:()I
      28: if_icmpne     76
      31: aload         4
      33: checkcast     #128                // class java/lang/CharSequence
      36: invokeinterface #129,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      41: ifne          48
      44: iconst_1
      45: goto          49
      48: iconst_0
      49: ifne          74
      52: aload_3
      53: checkcast     #52                 // class java/util/Collection
      56: new           #68                 // class day3$Number
      59: dup
      60: aload         4
      62: iload         5
      64: iload_2
      65: invokespecial #132                // Method day3$Number."<init>":(Ljava/lang/String;II)V
      68: invokestatic  #136                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      71: goto          75
      74: aload_3
      75: areturn
      76: aload_1
      77: iload         6
      79: invokevirtual #140                // Method java/lang/String.charAt:(I)C
      82: istore        8
      84: iload         8
      86: invokestatic  #146                // Method java/lang/Character.isDigit:(C)Z
      89: ifeq          115
      92: new           #148                // class java/lang/StringBuilder
      95: dup
      96: invokespecial #149                // Method java/lang/StringBuilder."<init>":()V
      99: aload         4
     101: invokevirtual #153                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     104: iload         8
     106: invokevirtual #156                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     109: invokevirtual #160                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     112: goto          117
     115: ldc           #162                // String
     117: astore        9
     119: aload         4
     121: ldc           #162                // String
     123: invokestatic  #166                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     126: ifeq          142
     129: iload         8
     131: invokestatic  #146                // Method java/lang/Character.isDigit:(C)Z
     134: ifeq          142
     137: iload         6
     139: goto          144
     142: iload         5
     144: istore        10
     146: iload         8
     148: invokestatic  #146                // Method java/lang/Character.isDigit:(C)Z
     151: ifne          197
     154: aload         4
     156: checkcast     #128                // class java/lang/CharSequence
     159: invokeinterface #129,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     164: ifne          171
     167: iconst_1
     168: goto          172
     171: iconst_0
     172: ifne          197
     175: aload_3
     176: checkcast     #52                 // class java/util/Collection
     179: new           #68                 // class day3$Number
     182: dup
     183: aload         4
     185: iload         5
     187: iload_2
     188: invokespecial #132                // Method day3$Number."<init>":(Ljava/lang/String;II)V
     191: invokestatic  #136                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     194: goto          198
     197: aload_3
     198: astore        11
     200: aload         7
     202: astore        12
     204: aload_1
     205: astore        13
     207: iload_2
     208: istore        14
     210: iload         6
     212: iconst_1
     213: iadd
     214: istore        15
     216: aload         12
     218: astore        7
     220: aload         13
     222: astore_1
     223: iload         14
     225: istore_2
     226: aload         11
     228: astore_3
     229: aload         9
     231: astore        4
     233: iload         10
     235: istore        5
     237: iload         15
     239: istore        6
     241: goto          22

  public static java.util.List numbersFromLine$default(day3, java.lang.String, int, java.util.List, java.lang.String, int, int, int, java.lang.Object);
    Code:
       0: iload         7
       2: iconst_4
       3: iand
       4: ifeq          11
       7: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      10: astore_3
      11: iload         7
      13: bipush        8
      15: iand
      16: ifeq          23
      19: ldc           #162                // String
      21: astore        4
      23: iload         7
      25: bipush        16
      27: iand
      28: ifeq          34
      31: iconst_m1
      32: istore        5
      34: iload         7
      36: bipush        32
      38: iand
      39: ifeq          45
      42: iconst_0
      43: istore        6
      45: aload_0
      46: aload_1
      47: iload_2
      48: aload_3
      49: aload         4
      51: iload         5
      53: iload         6
      55: invokevirtual #178                // Method numbersFromLine:(Ljava/lang/String;ILjava/util/List;Ljava/lang/String;II)Ljava/util/List;
      58: areturn

  public final java.util.List<day3$Line> parseInput(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #183                // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #47                 // class java/lang/Iterable
      10: astore_2
      11: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      14: astore_3
      15: iconst_0
      16: istore        4
      18: iconst_0
      19: istore        5
      21: aload_3
      22: astore        6
      24: aload_2
      25: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      30: astore        7
      32: aload         7
      34: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      39: ifeq          246
      42: aload         7
      44: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      49: astore        8
      51: iload         5
      53: iinc          5, 1
      56: istore        9
      58: iload         9
      60: ifge          66
      63: invokestatic  #186                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      66: iload         9
      68: aload         6
      70: aload         8
      72: checkcast     #123                // class java/lang/String
      75: astore        10
      77: astore        11
      79: istore        12
      81: iconst_0
      82: istore        13
      84: getstatic     #189                // Field INSTANCE:Lday3;
      87: aload         10
      89: iload         12
      91: aconst_null
      92: aconst_null
      93: iconst_0
      94: iconst_0
      95: bipush        60
      97: aconst_null
      98: invokestatic  #191                // Method numbersFromLine$default:(Lday3;Ljava/lang/String;ILjava/util/List;Ljava/lang/String;IIILjava/lang/Object;)Ljava/util/List;
     101: astore        14
     103: aload         10
     105: checkcast     #128                // class java/lang/CharSequence
     108: astore        15
     110: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
     113: astore        16
     115: iconst_0
     116: istore        17
     118: iconst_0
     119: istore        18
     121: aload         16
     123: astore        19
     125: iconst_0
     126: istore        20
     128: iload         20
     130: aload         15
     132: invokeinterface #129,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     137: if_icmpge     218
     140: aload         15
     142: iload         20
     144: invokeinterface #192,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     149: istore        21
     151: iload         18
     153: iinc          18, 1
     156: aload         19
     158: iload         21
     160: istore        22
     162: astore        23
     164: istore        24
     166: iconst_0
     167: istore        25
     169: iload         22
     171: invokestatic  #146                // Method java/lang/Character.isDigit:(C)Z
     174: ifne          208
     177: iload         22
     179: bipush        46
     181: if_icmpeq     208
     184: aload         23
     186: checkcast     #52                 // class java/util/Collection
     189: new           #109                // class day3$Symbol
     192: dup
     193: iload         22
     195: iload         24
     197: iload         12
     199: invokespecial #195                // Method day3$Symbol."<init>":(CII)V
     202: invokestatic  #136                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     205: goto          210
     208: aload         23
     210: astore        19
     212: iinc          20, 1
     215: goto          128
     218: aload         19
     220: astore        26
     222: aload         11
     224: checkcast     #52                 // class java/util/Collection
     227: new           #42                 // class day3$Line
     230: dup
     231: aload         14
     233: aload         26
     235: invokespecial #198                // Method day3$Line."<init>":(Ljava/util/List;Ljava/util/List;)V
     238: invokestatic  #136                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     241: astore        6
     243: goto          32
     246: aload         6
     248: areturn

  public final int pt1(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #183                // 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: invokevirtual #218                // Method parseInput:(Ljava/util/List;)Ljava/util/List;
      11: astore_2
      12: aload_2
      13: checkcast     #47                 // class java/lang/Iterable
      16: astore_3
      17: iconst_0
      18: istore        4
      20: iconst_0
      21: istore        5
      23: iload         4
      25: istore        6
      27: aload_3
      28: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      33: astore        7
      35: aload         7
      37: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      42: ifeq          255
      45: aload         7
      47: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      52: astore        8
      54: iload         6
      56: aload         8
      58: checkcast     #42                 // class day3$Line
      61: astore        9
      63: istore        10
      65: iconst_0
      66: istore        11
      68: aload         9
      70: invokevirtual #45                 // Method day3$Line.getNumbers:()Ljava/util/List;
      73: checkcast     #47                 // class java/lang/Iterable
      76: astore        12
      78: iconst_0
      79: istore        13
      81: aload         12
      83: astore        14
      85: new           #49                 // class java/util/ArrayList
      88: dup
      89: invokespecial #50                 // Method java/util/ArrayList."<init>":()V
      92: checkcast     #52                 // class java/util/Collection
      95: astore        15
      97: iconst_0
      98: istore        16
     100: aload         14
     102: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     107: astore        17
     109: aload         17
     111: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     116: ifeq          160
     119: aload         17
     121: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     126: astore        18
     128: aload         18
     130: checkcast     #68                 // class day3$Number
     133: astore        19
     135: iconst_0
     136: istore        20
     138: aload         19
     140: aload_2
     141: invokevirtual #222                // Method day3$Number.isAdjacentToSymbol:(Ljava/util/List;)Z
     144: ifeq          109
     147: aload         15
     149: aload         18
     151: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     156: pop
     157: goto          109
     160: aload         15
     162: checkcast     #26                 // class java/util/List
     165: nop
     166: astore        21
     168: iload         10
     170: aload         21
     172: checkcast     #47                 // class java/lang/Iterable
     175: astore        12
     177: istore        22
     179: iconst_0
     180: istore        13
     182: aload         12
     184: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     189: astore        14
     191: aload         14
     193: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     198: ifeq          241
     201: aload         14
     203: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     208: astore        15
     210: iload         13
     212: aload         15
     214: checkcast     #68                 // class day3$Number
     217: astore        16
     219: istore        23
     221: iconst_0
     222: istore        17
     224: aload         16
     226: invokevirtual #225                // Method day3$Number.toInt:()I
     229: istore        24
     231: iload         23
     233: iload         24
     235: iadd
     236: istore        13
     238: goto          191
     241: iload         13
     243: istore        23
     245: iload         22
     247: iload         23
     249: iadd
     250: istore        6
     252: goto          35
     255: iload         6
     257: ireturn

  public final int pt2(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #183                // 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: invokevirtual #218                // Method parseInput:(Ljava/util/List;)Ljava/util/List;
      11: astore_2
      12: aload_2
      13: checkcast     #47                 // class java/lang/Iterable
      16: astore_3
      17: iconst_0
      18: istore        4
      20: iconst_0
      21: istore        5
      23: iload         4
      25: istore        6
      27: aload_3
      28: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      33: astore        7
      35: aload         7
      37: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      42: ifeq          278
      45: aload         7
      47: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      52: astore        8
      54: iload         6
      56: aload         8
      58: checkcast     #42                 // class day3$Line
      61: astore        9
      63: istore        10
      65: iconst_0
      66: istore        11
      68: aload         9
      70: invokevirtual #107                // Method day3$Line.getSymbols:()Ljava/util/List;
      73: checkcast     #47                 // class java/lang/Iterable
      76: astore        12
      78: iconst_0
      79: istore        13
      81: aload         12
      83: astore        14
      85: new           #49                 // class java/util/ArrayList
      88: dup
      89: invokespecial #50                 // Method java/util/ArrayList."<init>":()V
      92: checkcast     #52                 // class java/util/Collection
      95: astore        15
      97: iconst_0
      98: istore        16
     100: aload         14
     102: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     107: astore        17
     109: aload         17
     111: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     116: ifeq          182
     119: aload         17
     121: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     126: astore        18
     128: aload         18
     130: checkcast     #109                // class day3$Symbol
     133: astore        19
     135: iconst_0
     136: istore        20
     138: aload         19
     140: invokevirtual #236                // Method day3$Symbol.isGearSymbol:()Z
     143: ifeq          165
     146: aload         19
     148: aload_2
     149: invokevirtual #239                // Method day3$Symbol.adjacentNumbers:(Ljava/util/List;)Ljava/util/List;
     152: invokeinterface #30,  1           // InterfaceMethod java/util/List.size:()I
     157: iconst_2
     158: if_icmpne     165
     161: iconst_1
     162: goto          166
     165: iconst_0
     166: ifeq          109
     169: aload         15
     171: aload         18
     173: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     178: pop
     179: goto          109
     182: aload         15
     184: checkcast     #26                 // class java/util/List
     187: nop
     188: astore        21
     190: iload         10
     192: aload         21
     194: checkcast     #47                 // class java/lang/Iterable
     197: astore        12
     199: istore        22
     201: iconst_0
     202: istore        13
     204: aload         12
     206: invokeinterface #56,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     211: astore        14
     213: aload         14
     215: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     220: ifeq          264
     223: aload         14
     225: invokeinterface #66,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     230: astore        15
     232: iload         13
     234: aload         15
     236: checkcast     #109                // class day3$Symbol
     239: astore        16
     241: istore        23
     243: iconst_0
     244: istore        17
     246: aload         16
     248: aload_2
     249: invokevirtual #242                // Method day3$Symbol.gearRatio:(Ljava/util/List;)I
     252: istore        24
     254: iload         23
     256: iload         24
     258: iadd
     259: istore        13
     261: goto          213
     264: iload         13
     266: istore        23
     268: iload         22
     270: iload         23
     272: iadd
     273: istore        6
     275: goto          35
     278: iload         6
     280: ireturn

  static {};
    Code:
       0: new           #2                  // class day3
       3: dup
       4: invokespecial #248                // Method "<init>":()V
       7: putstatic     #189                // Field INSTANCE:Lday3;
      10: return
}

Compiled from "day3.kt"
public final class day3$Number {
  private final java.lang.String chars;

  private final int startIndex;

  private final int row;

  private final kotlin.Lazy range$delegate;

  public day3$Number(java.lang.String, int, int);
    Code:
       0: aload_1
       1: ldc           #9                  // String chars
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #18                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: putfield      #21                 // Field chars:Ljava/lang/String;
      15: aload_0
      16: iload_2
      17: putfield      #25                 // Field startIndex:I
      20: aload_0
      21: iload_3
      22: putfield      #28                 // Field row:I
      25: aload_0
      26: aload_0
      27: invokedynamic #48,  0             // InvokeDynamic #0:invoke:(Lday3$Number;)Lkotlin/jvm/functions/Function0;
      32: invokestatic  #54                 // Method kotlin/LazyKt.lazy:(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
      35: putfield      #58                 // Field range$delegate:Lkotlin/Lazy;
      38: return

  public final java.lang.String getChars();
    Code:
       0: aload_0
       1: getfield      #21                 // Field chars:Ljava/lang/String;
       4: areturn

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

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

  public final int toInt();
    Code:
       0: aload_0
       1: getfield      #21                 // Field chars:Ljava/lang/String;
       4: invokestatic  #72                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
       7: ireturn

  public final kotlin.ranges.IntRange getRange();
    Code:
       0: aload_0
       1: getfield      #58                 // Field range$delegate:Lkotlin/Lazy;
       4: astore_1
       5: aload_1
       6: invokeinterface #78,  1           // InterfaceMethod kotlin/Lazy.getValue:()Ljava/lang/Object;
      11: checkcast     #80                 // class kotlin/ranges/IntRange
      14: areturn

  public final boolean isAdjacentToSymbol(java.util.List<day3$Line>);
    Code:
       0: aload_1
       1: ldc           #85                 // String world
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #80                 // class kotlin/ranges/IntRange
       9: dup
      10: iconst_m1
      11: iconst_1
      12: invokespecial #88                 // Method kotlin/ranges/IntRange."<init>":(II)V
      15: checkcast     #90                 // class java/lang/Iterable
      18: astore_2
      19: invokestatic  #96                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      22: astore_3
      23: iconst_0
      24: istore        4
      26: aload_3
      27: astore        5
      29: aload_2
      30: invokeinterface #100,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      35: astore        6
      37: aload         6
      39: invokeinterface #106,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      44: ifeq          102
      47: aload         6
      49: checkcast     #108                // class kotlin/collections/IntIterator
      52: invokevirtual #111                // Method kotlin/collections/IntIterator.nextInt:()I
      55: istore        7
      57: aload         5
      59: iload         7
      61: istore        8
      63: astore        9
      65: iconst_0
      66: istore        10
      68: aload         9
      70: checkcast     #113                // class java/util/Collection
      73: getstatic     #119                // Field day3.INSTANCE:Lday3;
      76: aload_1
      77: aload_0
      78: getfield      #28                 // Field row:I
      81: iload         8
      83: iadd
      84: aload_0
      85: invokevirtual #121                // Method getRange:()Lkotlin/ranges/IntRange;
      88: invokevirtual #125                // Method day3.getSymbolsInRange:(Ljava/util/List;ILkotlin/ranges/IntRange;)Ljava/util/List;
      91: checkcast     #90                 // class java/lang/Iterable
      94: invokestatic  #129                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
      97: astore        5
      99: goto          37
     102: aload         5
     104: checkcast     #90                 // class java/lang/Iterable
     107: invokestatic  #133                // Method kotlin/collections/CollectionsKt.any:(Ljava/lang/Iterable;)Z
     110: ireturn

  public final java.lang.String component1();
    Code:
       0: aload_0
       1: getfield      #21                 // Field chars:Ljava/lang/String;
       4: areturn

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

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

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

  public static day3$Number copy$default(day3$Number, java.lang.String, int, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #21                 // Field chars:Ljava/lang/String;
      11: astore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #25                 // Field startIndex:I
      23: istore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #28                 // Field row:I
      35: istore_3
      36: aload_0
      37: aload_1
      38: iload_2
      39: iload_3
      40: invokevirtual #157                // Method copy:(Ljava/lang/String;II)Lday3$Number;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #160                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #161                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #163                // String Number(chars=
       9: invokevirtual #167                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #21                 // Field chars:Ljava/lang/String;
      16: invokevirtual #167                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      19: ldc           #169                // String , startIndex=
      21: invokevirtual #167                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #25                 // Field startIndex:I
      28: invokevirtual #172                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: ldc           #174                // String , row=
      33: invokevirtual #167                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #28                 // Field row:I
      40: invokevirtual #172                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #177                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #179                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #21                 // Field chars:Ljava/lang/String;
       4: invokevirtual #184                // Method java/lang/String.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #25                 // Field startIndex:I
      16: invokestatic  #187                // Method java/lang/Integer.hashCode:(I)I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #28                 // Field row:I
      29: invokestatic  #187                // Method java/lang/Integer.hashCode:(I)I
      32: iadd
      33: istore_1
      34: iload_1
      35: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class day3$Number
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class day3$Number
      20: astore_2
      21: aload_0
      22: getfield      #21                 // Field chars:Ljava/lang/String;
      25: aload_2
      26: getfield      #21                 // Field chars:Ljava/lang/String;
      29: invokestatic  #195                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: aload_0
      38: getfield      #25                 // Field startIndex:I
      41: aload_2
      42: getfield      #25                 // Field startIndex:I
      45: if_icmpeq     50
      48: iconst_0
      49: ireturn
      50: aload_0
      51: getfield      #28                 // Field row:I
      54: aload_2
      55: getfield      #28                 // Field row:I
      58: if_icmpeq     63
      61: iconst_0
      62: ireturn
      63: iconst_1
      64: ireturn

  private static final kotlin.ranges.IntRange range_delegate$lambda$0(day3$Number);
    Code:
       0: new           #80                 // class kotlin/ranges/IntRange
       3: dup
       4: aload_0
       5: getfield      #25                 // Field startIndex:I
       8: aload_0
       9: getfield      #25                 // Field startIndex:I
      12: aload_0
      13: getfield      #21                 // Field chars:Ljava/lang/String;
      16: invokevirtual #199                // Method java/lang/String.length:()I
      19: iadd
      20: iconst_1
      21: isub
      22: invokespecial #88                 // Method kotlin/ranges/IntRange."<init>":(II)V
      25: areturn
}

Compiled from "day3.kt"
public final class day3$Symbol {
  private final char char;

  private final int col;

  private final int row;

  private final kotlin.Lazy range$delegate;

  public day3$Symbol(char, int, int);
    Code:
       0: aload_0
       1: invokespecial #9                  // Method java/lang/Object."<init>":()V
       4: aload_0
       5: iload_1
       6: putfield      #13                 // Field char:C
       9: aload_0
      10: iload_2
      11: putfield      #17                 // Field col:I
      14: aload_0
      15: iload_3
      16: putfield      #20                 // Field row:I
      19: aload_0
      20: aload_0
      21: invokedynamic #40,  0             // InvokeDynamic #0:invoke:(Lday3$Symbol;)Lkotlin/jvm/functions/Function0;
      26: invokestatic  #46                 // Method kotlin/LazyKt.lazy:(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
      29: putfield      #50                 // Field range$delegate:Lkotlin/Lazy;
      32: return

  public final char getChar();
    Code:
       0: aload_0
       1: getfield      #13                 // Field char:C
       4: ireturn

  public final int getCol();
    Code:
       0: aload_0
       1: getfield      #17                 // Field col:I
       4: ireturn

  public final int getRow();
    Code:
       0: aload_0
       1: getfield      #20                 // Field row:I
       4: ireturn

  public final boolean isGearSymbol();
    Code:
       0: aload_0
       1: getfield      #13                 // Field char:C
       4: bipush        42
       6: if_icmpne     13
       9: iconst_1
      10: goto          14
      13: iconst_0
      14: ireturn

  public final kotlin.ranges.IntRange getRange();
    Code:
       0: aload_0
       1: getfield      #50                 // Field range$delegate:Lkotlin/Lazy;
       4: astore_1
       5: aload_1
       6: invokeinterface #66,  1           // InterfaceMethod kotlin/Lazy.getValue:()Ljava/lang/Object;
      11: checkcast     #68                 // class kotlin/ranges/IntRange
      14: areturn

  public final java.util.List<day3$Number> adjacentNumbers(java.util.List<day3$Line>);
    Code:
       0: aload_1
       1: ldc           #73                 // String world
       3: invokestatic  #79                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #68                 // class kotlin/ranges/IntRange
       9: dup
      10: iconst_m1
      11: iconst_1
      12: invokespecial #82                 // Method kotlin/ranges/IntRange."<init>":(II)V
      15: checkcast     #84                 // class java/lang/Iterable
      18: astore_2
      19: invokestatic  #90                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      22: astore_3
      23: iconst_0
      24: istore        4
      26: aload_3
      27: astore        5
      29: aload_2
      30: invokeinterface #94,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      35: astore        6
      37: aload         6
      39: invokeinterface #99,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      44: ifeq          102
      47: aload         6
      49: checkcast     #101                // class kotlin/collections/IntIterator
      52: invokevirtual #104                // Method kotlin/collections/IntIterator.nextInt:()I
      55: istore        7
      57: aload         5
      59: iload         7
      61: istore        8
      63: astore        9
      65: iconst_0
      66: istore        10
      68: aload         9
      70: checkcast     #106                // class java/util/Collection
      73: getstatic     #112                // Field day3.INSTANCE:Lday3;
      76: aload_1
      77: aload_0
      78: getfield      #20                 // Field row:I
      81: iload         8
      83: iadd
      84: aload_0
      85: invokevirtual #114                // Method getRange:()Lkotlin/ranges/IntRange;
      88: invokevirtual #118                // Method day3.getNumbersInRange:(Ljava/util/List;ILkotlin/ranges/IntRange;)Ljava/util/List;
      91: checkcast     #84                 // class java/lang/Iterable
      94: invokestatic  #122                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
      97: astore        5
      99: goto          37
     102: aload         5
     104: areturn

  public final int gearRatio(java.util.List<day3$Line>);
    Code:
       0: aload_1
       1: ldc           #73                 // String world
       3: invokestatic  #79                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: invokevirtual #140                // Method adjacentNumbers:(Ljava/util/List;)Ljava/util/List;
      11: checkcast     #84                 // class java/lang/Iterable
      14: astore_3
      15: iconst_0
      16: istore        4
      18: aload_3
      19: astore        5
      21: new           #142                // class java/util/ArrayList
      24: dup
      25: aload_3
      26: bipush        10
      28: invokestatic  #146                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      31: invokespecial #149                // Method java/util/ArrayList."<init>":(I)V
      34: checkcast     #106                // class java/util/Collection
      37: astore        6
      39: iconst_0
      40: istore        7
      42: aload         5
      44: invokeinterface #94,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      49: astore        8
      51: aload         8
      53: invokeinterface #99,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      58: ifeq          104
      61: aload         8
      63: invokeinterface #152,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      68: astore        9
      70: aload         6
      72: aload         9
      74: checkcast     #154                // class day3$Number
      77: astore        10
      79: astore        12
      81: iconst_0
      82: istore        11
      84: aload         10
      86: invokevirtual #157                // Method day3$Number.toInt:()I
      89: invokestatic  #163                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      92: aload         12
      94: swap
      95: invokeinterface #167,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     100: pop
     101: goto          51
     104: aload         6
     106: checkcast     #135                // class java/util/List
     109: nop
     110: astore_2
     111: aload_2
     112: invokestatic  #171                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     115: checkcast     #173                // class java/lang/Number
     118: invokevirtual #176                // Method java/lang/Number.intValue:()I
     121: aload_2
     122: invokestatic  #179                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     125: checkcast     #173                // class java/lang/Number
     128: invokevirtual #176                // Method java/lang/Number.intValue:()I
     131: imul
     132: ireturn

  public final char component1();
    Code:
       0: aload_0
       1: getfield      #13                 // Field char:C
       4: ireturn

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

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

  public final day3$Symbol copy(char, int, int);
    Code:
       0: new           #2                  // class day3$Symbol
       3: dup
       4: iload_1
       5: iload_2
       6: iload_3
       7: invokespecial #197                // Method "<init>":(CII)V
      10: areturn

  public static day3$Symbol copy$default(day3$Symbol, char, int, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #13                 // Field char:C
      11: istore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #17                 // Field col:I
      23: istore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #20                 // Field row:I
      35: istore_3
      36: aload_0
      37: iload_1
      38: iload_2
      39: iload_3
      40: invokevirtual #201                // Method copy:(CII)Lday3$Symbol;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #205                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #206                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #208                // String Symbol(char=
       9: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #13                 // Field char:C
      16: invokevirtual #215                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      19: ldc           #217                // String , col=
      21: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #17                 // Field col:I
      28: invokevirtual #220                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: ldc           #222                // String , row=
      33: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #20                 // Field row:I
      40: invokevirtual #220                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #215                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #224                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #13                 // Field char:C
       4: invokestatic  #230                // Method java/lang/Character.hashCode:(C)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #17                 // Field col:I
      16: invokestatic  #233                // Method java/lang/Integer.hashCode:(I)I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #20                 // Field row:I
      29: invokestatic  #233                // Method java/lang/Integer.hashCode:(I)I
      32: iadd
      33: istore_1
      34: iload_1
      35: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class day3$Symbol
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class day3$Symbol
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field char:C
      25: aload_2
      26: getfield      #13                 // Field char:C
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #17                 // Field col:I
      38: aload_2
      39: getfield      #17                 // Field col:I
      42: if_icmpeq     47
      45: iconst_0
      46: ireturn
      47: aload_0
      48: getfield      #20                 // Field row:I
      51: aload_2
      52: getfield      #20                 // Field row:I
      55: if_icmpeq     60
      58: iconst_0
      59: ireturn
      60: iconst_1
      61: ireturn

  private static final kotlin.ranges.IntRange range_delegate$lambda$0(day3$Symbol);
    Code:
       0: new           #68                 // class kotlin/ranges/IntRange
       3: dup
       4: aload_0
       5: getfield      #17                 // Field col:I
       8: iconst_1
       9: isub
      10: aload_0
      11: getfield      #17                 // Field col:I
      14: iconst_1
      15: iadd
      16: invokespecial #82                 // Method kotlin/ranges/IntRange."<init>":(II)V
      19: areturn
}


object day4 {

    data class Card(val id: Int, val winning: List<Int>, val mine: List<Int>) {
        val matches by lazy { mine.intersect(winning) }
        val value by lazy {
            if (matches.isEmpty()) 0 else
                ( 0 until matches.size-1).fold(1) { acc, i -> acc * 2 }
        }
        val copies by lazy { matches.indices.fold(emptyList<Int>()) { acc, i -> acc.plus(id+i+1) } }
    }

    fun parseInput(input: List<String>): List<Card> = input.fold(emptyList<Card>()) { acc, line ->
        val (id) = Regex("""Card\s+(\d+):""").find(line)!!.destructured
        val parts = line.split(':').last().split('|')
        val winning = parts[0].split(' ').filterNot { it.isEmpty() }.map { it.toInt() }
        val mine = parts[1].split(' ').filterNot { it.isEmpty() }.map { it.toInt() }
        acc + Card(id.toInt(), winning, mine)
    }

    fun pt1(input: List<String>): Int = parseInput(input).sumOf { it.value }

    fun pt2(input: List<String>): Int = parseInput(input)
        .reversed()
        .fold(emptyMap<Int, Int>()) { res, card -> res + (card.id to (1 + card.copies.sumOf { res[it]!! }))}.values.sum()
}

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

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

  public final java.util.List<day4$Card> parseInput(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/Iterable
      10: astore_2
      11: invokestatic  #30                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      14: astore_3
      15: iconst_0
      16: istore        4
      18: aload_3
      19: astore        5
      21: aload_2
      22: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      27: astore        6
      29: aload         6
      31: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      36: ifeq          682
      39: aload         6
      41: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      46: astore        7
      48: aload         5
      50: aload         7
      52: checkcast     #46                 // class java/lang/String
      55: astore        8
      57: astore        9
      59: iconst_0
      60: istore        10
      62: new           #48                 // class kotlin/text/Regex
      65: dup
      66: ldc           #50                 // String Card\\s+(\\d+):
      68: invokespecial #53                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
      71: aload         8
      73: checkcast     #55                 // class java/lang/CharSequence
      76: iconst_0
      77: iconst_2
      78: aconst_null
      79: invokestatic  #59                 // Method kotlin/text/Regex.find$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/text/MatchResult;
      82: dup
      83: invokestatic  #63                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      86: invokeinterface #69,  1           // InterfaceMethod kotlin/text/MatchResult.getDestructured:()Lkotlin/text/MatchResult$Destructured;
      91: invokevirtual #75                 // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
      94: invokeinterface #78,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
      99: iconst_1
     100: invokeinterface #84,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     105: checkcast     #46                 // class java/lang/String
     108: astore        11
     110: aload         8
     112: checkcast     #55                 // class java/lang/CharSequence
     115: iconst_1
     116: newarray       char
     118: astore        12
     120: aload         12
     122: iconst_0
     123: bipush        58
     125: castore
     126: aload         12
     128: iconst_0
     129: iconst_0
     130: bipush        6
     132: aconst_null
     133: invokestatic  #90                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
     136: invokestatic  #94                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     139: checkcast     #55                 // class java/lang/CharSequence
     142: iconst_1
     143: newarray       char
     145: astore        12
     147: aload         12
     149: iconst_0
     150: bipush        124
     152: castore
     153: aload         12
     155: iconst_0
     156: iconst_0
     157: bipush        6
     159: aconst_null
     160: invokestatic  #90                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
     163: astore        13
     165: aload         13
     167: iconst_0
     168: invokeinterface #84,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     173: checkcast     #55                 // class java/lang/CharSequence
     176: iconst_1
     177: newarray       char
     179: astore        14
     181: aload         14
     183: iconst_0
     184: bipush        32
     186: castore
     187: aload         14
     189: iconst_0
     190: iconst_0
     191: bipush        6
     193: aconst_null
     194: invokestatic  #90                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
     197: checkcast     #24                 // class java/lang/Iterable
     200: astore        14
     202: iconst_0
     203: istore        15
     205: aload         14
     207: astore        16
     209: new           #96                 // class java/util/ArrayList
     212: dup
     213: invokespecial #97                 // Method java/util/ArrayList."<init>":()V
     216: checkcast     #99                 // class java/util/Collection
     219: astore        17
     221: iconst_0
     222: istore        18
     224: aload         16
     226: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     231: astore        19
     233: aload         19
     235: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     240: ifeq          297
     243: aload         19
     245: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     250: astore        20
     252: aload         20
     254: checkcast     #46                 // class java/lang/String
     257: astore        21
     259: iconst_0
     260: istore        22
     262: aload         21
     264: checkcast     #55                 // class java/lang/CharSequence
     267: invokeinterface #103,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     272: ifne          279
     275: iconst_1
     276: goto          280
     279: iconst_0
     280: nop
     281: ifne          233
     284: aload         17
     286: aload         20
     288: invokeinterface #107,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     293: pop
     294: goto          233
     297: aload         17
     299: checkcast     #80                 // class java/util/List
     302: nop
     303: checkcast     #24                 // class java/lang/Iterable
     306: astore        14
     308: nop
     309: iconst_0
     310: istore        15
     312: aload         14
     314: astore        16
     316: new           #96                 // class java/util/ArrayList
     319: dup
     320: aload         14
     322: bipush        10
     324: invokestatic  #111                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     327: invokespecial #114                // Method java/util/ArrayList."<init>":(I)V
     330: checkcast     #99                 // class java/util/Collection
     333: astore        17
     335: iconst_0
     336: istore        18
     338: aload         16
     340: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     345: astore        19
     347: aload         19
     349: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     354: ifeq          401
     357: aload         19
     359: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     364: astore        20
     366: aload         17
     368: aload         20
     370: checkcast     #46                 // class java/lang/String
     373: astore        21
     375: astore        23
     377: iconst_0
     378: istore        22
     380: aload         21
     382: invokestatic  #120                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     385: nop
     386: invokestatic  #124                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     389: aload         23
     391: swap
     392: invokeinterface #107,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     397: pop
     398: goto          347
     401: aload         17
     403: checkcast     #80                 // class java/util/List
     406: nop
     407: astore        12
     409: aload         13
     411: iconst_1
     412: invokeinterface #84,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     417: checkcast     #55                 // class java/lang/CharSequence
     420: iconst_1
     421: newarray       char
     423: astore        15
     425: aload         15
     427: iconst_0
     428: bipush        32
     430: castore
     431: aload         15
     433: iconst_0
     434: iconst_0
     435: bipush        6
     437: aconst_null
     438: invokestatic  #90                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
     441: checkcast     #24                 // class java/lang/Iterable
     444: astore        15
     446: iconst_0
     447: istore        16
     449: aload         15
     451: astore        17
     453: new           #96                 // class java/util/ArrayList
     456: dup
     457: invokespecial #97                 // Method java/util/ArrayList."<init>":()V
     460: checkcast     #99                 // class java/util/Collection
     463: astore        18
     465: iconst_0
     466: istore        19
     468: aload         17
     470: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     475: astore        20
     477: aload         20
     479: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     484: ifeq          541
     487: aload         20
     489: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     494: astore        21
     496: aload         21
     498: checkcast     #46                 // class java/lang/String
     501: astore        22
     503: iconst_0
     504: istore        24
     506: aload         22
     508: checkcast     #55                 // class java/lang/CharSequence
     511: invokeinterface #103,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     516: ifne          523
     519: iconst_1
     520: goto          524
     523: iconst_0
     524: nop
     525: ifne          477
     528: aload         18
     530: aload         21
     532: invokeinterface #107,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     537: pop
     538: goto          477
     541: aload         18
     543: checkcast     #80                 // class java/util/List
     546: nop
     547: checkcast     #24                 // class java/lang/Iterable
     550: astore        15
     552: nop
     553: iconst_0
     554: istore        16
     556: aload         15
     558: astore        17
     560: new           #96                 // class java/util/ArrayList
     563: dup
     564: aload         15
     566: bipush        10
     568: invokestatic  #111                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     571: invokespecial #114                // Method java/util/ArrayList."<init>":(I)V
     574: checkcast     #99                 // class java/util/Collection
     577: astore        18
     579: iconst_0
     580: istore        19
     582: aload         17
     584: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     589: astore        20
     591: aload         20
     593: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     598: ifeq          645
     601: aload         20
     603: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     608: astore        21
     610: aload         18
     612: aload         21
     614: checkcast     #46                 // class java/lang/String
     617: astore        22
     619: astore        23
     621: iconst_0
     622: istore        24
     624: aload         22
     626: invokestatic  #120                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     629: nop
     630: invokestatic  #124                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     633: aload         23
     635: swap
     636: invokeinterface #107,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     641: pop
     642: goto          591
     645: aload         18
     647: checkcast     #80                 // class java/util/List
     650: nop
     651: astore        14
     653: aload         9
     655: checkcast     #99                 // class java/util/Collection
     658: new           #126                // class day4$Card
     661: dup
     662: aload         11
     664: invokestatic  #120                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     667: aload         12
     669: aload         14
     671: invokespecial #129                // Method day4$Card."<init>":(ILjava/util/List;Ljava/util/List;)V
     674: invokestatic  #133                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     677: astore        5
     679: goto          29
     682: aload         5
     684: areturn

  public final int pt1(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: invokevirtual #174                // Method parseInput:(Ljava/util/List;)Ljava/util/List;
      11: checkcast     #24                 // class java/lang/Iterable
      14: astore_2
      15: iconst_0
      16: istore_3
      17: aload_2
      18: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      23: astore        4
      25: aload         4
      27: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      32: ifeq          73
      35: aload         4
      37: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      42: astore        5
      44: iload_3
      45: aload         5
      47: checkcast     #126                // class day4$Card
      50: astore        6
      52: istore        8
      54: iconst_0
      55: istore        7
      57: aload         6
      59: invokevirtual #177                // Method day4$Card.getValue:()I
      62: istore        9
      64: iload         8
      66: iload         9
      68: iadd
      69: istore_3
      70: goto          25
      73: iload_3
      74: ireturn

  public final int pt2(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: invokevirtual #174                // Method parseInput:(Ljava/util/List;)Ljava/util/List;
      11: checkcast     #24                 // class java/lang/Iterable
      14: invokestatic  #184                // Method kotlin/collections/CollectionsKt.reversed:(Ljava/lang/Iterable;)Ljava/util/List;
      17: checkcast     #24                 // class java/lang/Iterable
      20: astore_2
      21: invokestatic  #190                // Method kotlin/collections/MapsKt.emptyMap:()Ljava/util/Map;
      24: astore_3
      25: iconst_0
      26: istore        4
      28: aload_3
      29: astore        5
      31: aload_2
      32: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        6
      39: aload         6
      41: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          208
      49: aload         6
      51: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        7
      58: aload         5
      60: aload         7
      62: checkcast     #126                // class day4$Card
      65: astore        8
      67: astore        9
      69: iconst_0
      70: istore        10
      72: aload         9
      74: aload         8
      76: invokevirtual #193                // Method day4$Card.getId:()I
      79: invokestatic  #124                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      82: iconst_1
      83: aload         8
      85: invokevirtual #196                // Method day4$Card.getCopies:()Ljava/util/List;
      88: checkcast     #24                 // class java/lang/Iterable
      91: astore        11
      93: istore        12
      95: astore        13
      97: astore        14
      99: iconst_0
     100: istore        15
     102: aload         11
     104: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     109: astore        16
     111: aload         16
     113: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     118: ifeq          181
     121: aload         16
     123: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     128: astore        17
     130: iload         15
     132: aload         17
     134: checkcast     #198                // class java/lang/Number
     137: invokevirtual #201                // Method java/lang/Number.intValue:()I
     140: istore        18
     142: istore        19
     144: iconst_0
     145: istore        20
     147: aload         9
     149: iload         18
     151: invokestatic  #124                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     154: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     159: dup
     160: invokestatic  #63                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     163: checkcast     #198                // class java/lang/Number
     166: invokevirtual #201                // Method java/lang/Number.intValue:()I
     169: istore        21
     171: iload         19
     173: iload         21
     175: iadd
     176: istore        15
     178: goto          111
     181: iload         15
     183: istore        19
     185: aload         14
     187: aload         13
     189: iload         12
     191: iload         19
     193: iadd
     194: invokestatic  #124                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     197: invokestatic  #212                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     200: invokestatic  #215                // Method kotlin/collections/MapsKt.plus:(Ljava/util/Map;Lkotlin/Pair;)Ljava/util/Map;
     203: astore        5
     205: goto          39
     208: aload         5
     210: invokeinterface #219,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
     215: checkcast     #24                 // class java/lang/Iterable
     218: invokestatic  #223                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     221: ireturn

  static {};
    Code:
       0: new           #2                  // class day4
       3: dup
       4: invokespecial #230                // Method "<init>":()V
       7: putstatic     #233                // Field INSTANCE:Lday4;
      10: return
}

Compiled from "day4.kt"
public final class day4$Card {
  private final int id;

  private final java.util.List<java.lang.Integer> winning;

  private final java.util.List<java.lang.Integer> mine;

  private final kotlin.Lazy matches$delegate;

  private final kotlin.Lazy value$delegate;

  private final kotlin.Lazy copies$delegate;

  public day4$Card(int, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>);
    Code:
       0: aload_2
       1: ldc           #10                 // String winning
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_3
       7: ldc           #18                 // String mine
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #21                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: iload_1
      18: putfield      #25                 // Field id:I
      21: aload_0
      22: aload_2
      23: putfield      #28                 // Field winning:Ljava/util/List;
      26: aload_0
      27: aload_3
      28: putfield      #30                 // Field mine:Ljava/util/List;
      31: aload_0
      32: aload_0
      33: invokedynamic #50,  0             // InvokeDynamic #0:invoke:(Lday4$Card;)Lkotlin/jvm/functions/Function0;
      38: invokestatic  #56                 // Method kotlin/LazyKt.lazy:(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
      41: putfield      #60                 // Field matches$delegate:Lkotlin/Lazy;
      44: aload_0
      45: aload_0
      46: invokedynamic #68,  0             // InvokeDynamic #1:invoke:(Lday4$Card;)Lkotlin/jvm/functions/Function0;
      51: invokestatic  #56                 // Method kotlin/LazyKt.lazy:(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
      54: putfield      #71                 // Field value$delegate:Lkotlin/Lazy;
      57: aload_0
      58: aload_0
      59: invokedynamic #79,  0             // InvokeDynamic #2:invoke:(Lday4$Card;)Lkotlin/jvm/functions/Function0;
      64: invokestatic  #56                 // Method kotlin/LazyKt.lazy:(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
      67: putfield      #82                 // Field copies$delegate:Lkotlin/Lazy;
      70: return

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

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

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

  public final java.util.Set<java.lang.Integer> getMatches();
    Code:
       0: aload_0
       1: getfield      #60                 // Field matches$delegate:Lkotlin/Lazy;
       4: astore_1
       5: aload_1
       6: invokeinterface #96,  1           // InterfaceMethod kotlin/Lazy.getValue:()Ljava/lang/Object;
      11: checkcast     #98                 // class java/util/Set
      14: areturn

  public final int getValue();
    Code:
       0: aload_0
       1: getfield      #71                 // Field value$delegate:Lkotlin/Lazy;
       4: astore_1
       5: aload_1
       6: invokeinterface #96,  1           // InterfaceMethod kotlin/Lazy.getValue:()Ljava/lang/Object;
      11: checkcast     #100                // class java/lang/Number
      14: invokevirtual #103                // Method java/lang/Number.intValue:()I
      17: ireturn

  public final java.util.List<java.lang.Integer> getCopies();
    Code:
       0: aload_0
       1: getfield      #82                 // Field copies$delegate:Lkotlin/Lazy;
       4: astore_1
       5: aload_1
       6: invokeinterface #96,  1           // InterfaceMethod kotlin/Lazy.getValue:()Ljava/lang/Object;
      11: checkcast     #106                // class java/util/List
      14: areturn

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

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

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

  public final day4$Card copy(int, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>);
    Code:
       0: aload_2
       1: ldc           #10                 // String winning
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_3
       7: ldc           #18                 // String mine
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class day4$Card
      15: dup
      16: iload_1
      17: aload_2
      18: aload_3
      19: invokespecial #114                // Method "<init>":(ILjava/util/List;Ljava/util/List;)V
      22: areturn

  public static day4$Card copy$default(day4$Card, int, java.util.List, java.util.List, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #25                 // Field id:I
      11: istore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #28                 // Field winning:Ljava/util/List;
      23: astore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #30                 // Field mine:Ljava/util/List;
      35: astore_3
      36: aload_0
      37: iload_1
      38: aload_2
      39: aload_3
      40: invokevirtual #118                // Method copy:(ILjava/util/List;Ljava/util/List;)Lday4$Card;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #122                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #123                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #125                // String Card(id=
       9: invokevirtual #129                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #25                 // Field id:I
      16: invokevirtual #132                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #134                // String , winning=
      21: invokevirtual #129                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #28                 // Field winning:Ljava/util/List;
      28: invokevirtual #137                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: ldc           #139                // String , mine=
      33: invokevirtual #129                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #30                 // Field mine:Ljava/util/List;
      40: invokevirtual #137                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #142                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #144                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #25                 // Field id:I
       4: invokestatic  #150                // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #28                 // Field winning:Ljava/util/List;
      16: invokevirtual #152                // Method java/lang/Object.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #30                 // Field mine:Ljava/util/List;
      29: invokevirtual #152                // Method java/lang/Object.hashCode:()I
      32: iadd
      33: istore_1
      34: iload_1
      35: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class day4$Card
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class day4$Card
      20: astore_2
      21: aload_0
      22: getfield      #25                 // Field id:I
      25: aload_2
      26: getfield      #25                 // Field id:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #28                 // Field winning:Ljava/util/List;
      38: aload_2
      39: getfield      #28                 // Field winning:Ljava/util/List;
      42: invokestatic  #160                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      45: ifne          50
      48: iconst_0
      49: ireturn
      50: aload_0
      51: getfield      #30                 // Field mine:Ljava/util/List;
      54: aload_2
      55: getfield      #30                 // Field mine:Ljava/util/List;
      58: invokestatic  #160                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      61: ifne          66
      64: iconst_0
      65: ireturn
      66: iconst_1
      67: ireturn

  private static final java.util.Set matches_delegate$lambda$0(day4$Card);
    Code:
       0: aload_0
       1: getfield      #30                 // Field mine:Ljava/util/List;
       4: checkcast     #164                // class java/lang/Iterable
       7: aload_0
       8: getfield      #28                 // Field winning:Ljava/util/List;
      11: checkcast     #164                // class java/lang/Iterable
      14: invokestatic  #170                // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
      17: areturn

  private static final int value_delegate$lambda$2(day4$Card);
    Code:
       0: aload_0
       1: invokevirtual #173                // Method getMatches:()Ljava/util/Set;
       4: invokeinterface #177,  1          // InterfaceMethod java/util/Set.isEmpty:()Z
       9: ifeq          16
      12: iconst_0
      13: goto          92
      16: iconst_0
      17: aload_0
      18: invokevirtual #173                // Method getMatches:()Ljava/util/Set;
      21: invokeinterface #180,  1          // InterfaceMethod java/util/Set.size:()I
      26: iconst_1
      27: isub
      28: invokestatic  #186                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
      31: checkcast     #164                // class java/lang/Iterable
      34: astore_1
      35: iconst_1
      36: istore_2
      37: iconst_0
      38: istore_3
      39: iload_2
      40: istore        4
      42: aload_1
      43: invokeinterface #190,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      48: astore        5
      50: aload         5
      52: invokeinterface #195,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      57: ifeq          90
      60: aload         5
      62: checkcast     #197                // class kotlin/collections/IntIterator
      65: invokevirtual #200                // Method kotlin/collections/IntIterator.nextInt:()I
      68: istore        6
      70: iload         4
      72: iload         6
      74: istore        7
      76: istore        8
      78: iconst_0
      79: istore        9
      81: iload         8
      83: iconst_2
      84: imul
      85: istore        4
      87: goto          50
      90: iload         4
      92: ireturn

  private static final java.util.List copies_delegate$lambda$4(day4$Card);
    Code:
       0: aload_0
       1: invokevirtual #173                // Method getMatches:()Ljava/util/Set;
       4: checkcast     #211                // class java/util/Collection
       7: invokestatic  #215                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
      10: checkcast     #164                // class java/lang/Iterable
      13: astore_1
      14: invokestatic  #218                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      17: astore_2
      18: iconst_0
      19: istore_3
      20: aload_2
      21: astore        4
      23: aload_1
      24: invokeinterface #190,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      29: astore        5
      31: aload         5
      33: invokeinterface #195,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      38: ifeq          87
      41: aload         5
      43: checkcast     #197                // class kotlin/collections/IntIterator
      46: invokevirtual #200                // Method kotlin/collections/IntIterator.nextInt:()I
      49: istore        6
      51: aload         4
      53: iload         6
      55: istore        7
      57: astore        8
      59: iconst_0
      60: istore        9
      62: aload         8
      64: checkcast     #211                // class java/util/Collection
      67: aload_0
      68: getfield      #25                 // Field id:I
      71: iload         7
      73: iadd
      74: iconst_1
      75: iadd
      76: invokestatic  #222                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      79: invokestatic  #226                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      82: astore        4
      84: goto          31
      87: aload         4
      89: areturn
}