package aoc2022

class Day11(input: List<String>) {
    private val monkeys = input.parseMonkeys()

    fun solvePart1(): Long {
        rounds(numRounds = 20) { it / 3 }
        return monkeys.business()
    }

    fun solvePart2(): Long {
        val testProduct = monkeys.map { it.test }.reduce(Long::times)
        rounds(numRounds = 10_000) { it % testProduct }
        return monkeys.business()
    }

    private fun List<Monkey>.business(): Long =
        sortedByDescending { it.interactions }.let { it[0].interactions * it[1].interactions }

    private fun rounds(numRounds: Int, changeToWorryLevel: (Long) -> Long) {
        repeat(numRounds) {
            monkeys.forEach { it.inspectItems(monkeys, changeToWorryLevel) }
        }
    }

    private fun List<String>.parseMonkeys(): List<Monkey> {
        return chunked(7).map { attribute ->

            val operationValue = attribute[2].substringAfterLast(" ")
            val operation: (Long) -> Long = when {
                operationValue == "old" -> ({ it * it })
                '*' in attribute[2] -> ({ it * operationValue.toLong() })
                else -> ({ it + operationValue.toLong() })
            }

            Monkey(
                items = attribute[1].substringAfter(": ").split(", ").map { it.toLong() }.toMutableList(),
                test = attribute[3].substringAfterLast(" ").toLong(),
                operation = operation,
                testTrue = attribute[4].split(" ").last().toInt(),
                testFalse = attribute[5].split(" ").last().toInt()
            )
        }
    }
}

data class Monkey(
    val items: MutableList<Long>, //Worry level
    val operation: (Long) -> Long,
    val test: Long,
    val testTrue: Int,
    val testFalse: Int
) {
    var interactions: Long = 0

    fun inspectItems(monkeys: List<Monkey>, changeToWorryLevel: (Long) -> Long) {
        items.forEach { item ->
            val worry = changeToWorryLevel(operation(item))
            val target = if (worry % test == 0L) testTrue else testFalse
            monkeys[target].items.add(worry)
        }
        interactions += items.size
        items.clear()
    }
}

Compiled from "Day11.kt"
public final class aoc2022.Day11 {
  private final java.util.List<aoc2022.Monkey> monkeys;

  public aoc2022.Day11(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #10                 // String input
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_0
      12: aload_1
      13: invokespecial #23                 // Method parseMonkeys:(Ljava/util/List;)Ljava/util/List;
      16: putfield      #27                 // Field monkeys:Ljava/util/List;
      19: return

  public final long solvePart1();
    Code:
       0: aload_0
       1: bipush        20
       3: invokedynamic #51,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
       8: invokespecial #55                 // Method rounds:(ILkotlin/jvm/functions/Function1;)V
      11: aload_0
      12: aload_0
      13: getfield      #27                 // Field monkeys:Ljava/util/List;
      16: invokespecial #59                 // Method business:(Ljava/util/List;)J
      19: lreturn

  public final long solvePart2();
    Code:
       0: aload_0
       1: getfield      #27                 // Field monkeys:Ljava/util/List;
       4: checkcast     #62                 // class java/lang/Iterable
       7: astore_3
       8: iconst_0
       9: istore        4
      11: aload_3
      12: astore        5
      14: new           #64                 // class java/util/ArrayList
      17: dup
      18: aload_3
      19: bipush        10
      21: invokestatic  #70                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      24: invokespecial #73                 // Method java/util/ArrayList."<init>":(I)V
      27: checkcast     #75                 // class java/util/Collection
      30: astore        6
      32: iconst_0
      33: istore        7
      35: aload         5
      37: invokeinterface #79,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        8
      44: aload         8
      46: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          97
      54: aload         8
      56: invokeinterface #89,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        9
      63: aload         6
      65: aload         9
      67: checkcast     #91                 // class aoc2022/Monkey
      70: astore        10
      72: astore        12
      74: iconst_0
      75: istore        11
      77: aload         10
      79: invokevirtual #94                 // Method aoc2022/Monkey.getTest:()J
      82: invokestatic  #100                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      85: aload         12
      87: swap
      88: invokeinterface #104,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      93: pop
      94: goto          44
      97: aload         6
      99: checkcast     #106                // class java/util/List
     102: nop
     103: checkcast     #62                 // class java/lang/Iterable
     106: astore_3
     107: nop
     108: iconst_0
     109: istore        4
     111: aload_3
     112: invokeinterface #79,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     117: astore        5
     119: aload         5
     121: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     126: ifne          139
     129: new           #108                // class java/lang/UnsupportedOperationException
     132: dup
     133: ldc           #110                // String Empty collection can\'t be reduced.
     135: invokespecial #113                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     138: athrow
     139: aload         5
     141: invokeinterface #89,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     146: astore        6
     148: aload         5
     150: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     155: ifeq          199
     158: aload         6
     160: aload         5
     162: invokeinterface #89,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     167: checkcast     #115                // class java/lang/Number
     170: invokevirtual #118                // Method java/lang/Number.longValue:()J
     173: lstore        7
     175: checkcast     #115                // class java/lang/Number
     178: invokevirtual #118                // Method java/lang/Number.longValue:()J
     181: lstore        9
     183: iconst_0
     184: istore        11
     186: lload         9
     188: lload         7
     190: lmul
     191: invokestatic  #100                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     194: astore        6
     196: goto          148
     199: aload         6
     201: checkcast     #115                // class java/lang/Number
     204: invokevirtual #118                // Method java/lang/Number.longValue:()J
     207: lstore_1
     208: aload_0
     209: sipush        10000
     212: lload_1
     213: invokedynamic #126,  0            // InvokeDynamic #1:invoke:(J)Lkotlin/jvm/functions/Function1;
     218: invokespecial #55                 // Method rounds:(ILkotlin/jvm/functions/Function1;)V
     221: aload_0
     222: aload_0
     223: getfield      #27                 // Field monkeys:Ljava/util/List;
     226: invokespecial #59                 // Method business:(Ljava/util/List;)J
     229: lreturn

  private final long business(java.util.List<aoc2022.Monkey>);
    Code:
       0: aload_1
       1: checkcast     #62                 // class java/lang/Iterable
       4: astore_2
       5: iconst_0
       6: istore_3
       7: aload_2
       8: new           #152                // class aoc2022/Day11$business$$inlined$sortedByDescending$1
      11: dup
      12: invokespecial #153                // Method aoc2022/Day11$business$$inlined$sortedByDescending$1."<init>":()V
      15: checkcast     #155                // class java/util/Comparator
      18: invokestatic  #159                // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
      21: astore_3
      22: iconst_0
      23: istore        4
      25: aload_3
      26: iconst_0
      27: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      32: checkcast     #91                 // class aoc2022/Monkey
      35: invokevirtual #166                // Method aoc2022/Monkey.getInteractions:()J
      38: aload_3
      39: iconst_1
      40: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      45: checkcast     #91                 // class aoc2022/Monkey
      48: invokevirtual #166                // Method aoc2022/Monkey.getInteractions:()J
      51: lmul
      52: nop
      53: lreturn

  private final void rounds(int, kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>);
    Code:
       0: iconst_0
       1: istore_3
       2: iload_3
       3: iload_1
       4: if_icmpge     85
       7: iload_3
       8: istore        4
      10: iconst_0
      11: istore        5
      13: aload_0
      14: getfield      #27                 // Field monkeys:Ljava/util/List;
      17: checkcast     #62                 // class java/lang/Iterable
      20: astore        6
      22: iconst_0
      23: istore        7
      25: aload         6
      27: invokeinterface #79,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      32: astore        8
      34: aload         8
      36: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      41: ifeq          77
      44: aload         8
      46: invokeinterface #89,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      51: astore        9
      53: aload         9
      55: checkcast     #91                 // class aoc2022/Monkey
      58: astore        10
      60: iconst_0
      61: istore        11
      63: aload         10
      65: aload_0
      66: getfield      #27                 // Field monkeys:Ljava/util/List;
      69: aload_2
      70: invokevirtual #175                // Method aoc2022/Monkey.inspectItems:(Ljava/util/List;Lkotlin/jvm/functions/Function1;)V
      73: nop
      74: goto          34
      77: nop
      78: nop
      79: iinc          3, 1
      82: goto          2
      85: return

  private final java.util.List<aoc2022.Monkey> parseMonkeys(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: checkcast     #62                 // class java/lang/Iterable
       4: bipush        7
       6: invokestatic  #190                // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
       9: checkcast     #62                 // class java/lang/Iterable
      12: astore_2
      13: iconst_0
      14: istore_3
      15: aload_2
      16: astore        4
      18: new           #64                 // class java/util/ArrayList
      21: dup
      22: aload_2
      23: bipush        10
      25: invokestatic  #70                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      28: invokespecial #73                 // Method java/util/ArrayList."<init>":(I)V
      31: checkcast     #75                 // class java/util/Collection
      34: astore        5
      36: iconst_0
      37: istore        6
      39: aload         4
      41: invokeinterface #79,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      46: astore        7
      48: aload         7
      50: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      55: ifeq          459
      58: aload         7
      60: invokeinterface #89,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      65: astore        8
      67: aload         5
      69: aload         8
      71: checkcast     #106                // class java/util/List
      74: astore        9
      76: astore        26
      78: iconst_0
      79: istore        10
      81: aload         9
      83: iconst_2
      84: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      89: checkcast     #192                // class java/lang/String
      92: ldc           #194                // String
      94: aconst_null
      95: iconst_2
      96: aconst_null
      97: invokestatic  #200                // Method kotlin/text/StringsKt.substringAfterLast$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
     100: astore        11
     102: nop
     103: aload         11
     105: ldc           #202                // String old
     107: invokestatic  #206                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     110: ifeq          121
     113: invokedynamic #211,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function1;
     118: goto          160
     121: aload         9
     123: iconst_2
     124: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     129: checkcast     #213                // class java/lang/CharSequence
     132: bipush        42
     134: iconst_0
     135: iconst_2
     136: aconst_null
     137: invokestatic  #217                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;CZILjava/lang/Object;)Z
     140: ifeq          153
     143: aload         11
     145: invokedynamic #225,  0            // InvokeDynamic #3:invoke:(Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
     150: goto          160
     153: aload         11
     155: invokedynamic #230,  0            // InvokeDynamic #4:invoke:(Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
     160: astore        12
     162: aload         9
     164: iconst_1
     165: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     170: checkcast     #192                // class java/lang/String
     173: ldc           #232                // String :
     175: aconst_null
     176: iconst_2
     177: aconst_null
     178: invokestatic  #235                // Method kotlin/text/StringsKt.substringAfter$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
     181: checkcast     #213                // class java/lang/CharSequence
     184: iconst_1
     185: anewarray     #192                // class java/lang/String
     188: astore        13
     190: aload         13
     192: iconst_0
     193: ldc           #237                // String ,
     195: aastore
     196: aload         13
     198: iconst_0
     199: iconst_0
     200: bipush        6
     202: aconst_null
     203: invokestatic  #241                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     206: checkcast     #62                 // class java/lang/Iterable
     209: astore        13
     211: iconst_0
     212: istore        14
     214: aload         13
     216: astore        15
     218: new           #64                 // class java/util/ArrayList
     221: dup
     222: aload         13
     224: bipush        10
     226: invokestatic  #70                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     229: invokespecial #73                 // Method java/util/ArrayList."<init>":(I)V
     232: checkcast     #75                 // class java/util/Collection
     235: astore        16
     237: iconst_0
     238: istore        17
     240: aload         15
     242: invokeinterface #79,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     247: astore        18
     249: aload         18
     251: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     256: ifeq          303
     259: aload         18
     261: invokeinterface #89,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     266: astore        19
     268: aload         16
     270: aload         19
     272: checkcast     #192                // class java/lang/String
     275: astore        20
     277: astore        21
     279: iconst_0
     280: istore        22
     282: aload         20
     284: invokestatic  #245                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     287: nop
     288: invokestatic  #100                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     291: aload         21
     293: swap
     294: invokeinterface #104,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     299: pop
     300: goto          249
     303: aload         16
     305: checkcast     #106                // class java/util/List
     308: nop
     309: checkcast     #75                 // class java/util/Collection
     312: invokestatic  #249                // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
     315: astore        23
     317: aload         9
     319: iconst_3
     320: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     325: checkcast     #192                // class java/lang/String
     328: ldc           #194                // String
     330: aconst_null
     331: iconst_2
     332: aconst_null
     333: invokestatic  #200                // Method kotlin/text/StringsKt.substringAfterLast$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
     336: invokestatic  #245                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     339: lstore        24
     341: aload         9
     343: iconst_4
     344: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     349: checkcast     #213                // class java/lang/CharSequence
     352: iconst_1
     353: anewarray     #192                // class java/lang/String
     356: astore        16
     358: aload         16
     360: iconst_0
     361: ldc           #194                // String
     363: aastore
     364: aload         16
     366: iconst_0
     367: iconst_0
     368: bipush        6
     370: aconst_null
     371: invokestatic  #241                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     374: invokestatic  #253                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     377: checkcast     #192                // class java/lang/String
     380: invokestatic  #259                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     383: istore        15
     385: aload         9
     387: iconst_5
     388: invokeinterface #163,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     393: checkcast     #213                // class java/lang/CharSequence
     396: iconst_1
     397: anewarray     #192                // class java/lang/String
     400: astore        17
     402: aload         17
     404: iconst_0
     405: ldc           #194                // String
     407: aastore
     408: aload         17
     410: iconst_0
     411: iconst_0
     412: bipush        6
     414: aconst_null
     415: invokestatic  #241                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     418: invokestatic  #253                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     421: checkcast     #192                // class java/lang/String
     424: invokestatic  #259                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     427: istore        16
     429: new           #91                 // class aoc2022/Monkey
     432: dup
     433: aload         23
     435: aload         12
     437: lload         24
     439: iload         15
     441: iload         16
     443: invokespecial #262                // Method aoc2022/Monkey."<init>":(Ljava/util/List;Lkotlin/jvm/functions/Function1;JII)V
     446: nop
     447: aload         26
     449: swap
     450: invokeinterface #104,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     455: pop
     456: goto          48
     459: aload         5
     461: checkcast     #106                // class java/util/List
     464: nop
     465: areturn

  private static final long solvePart1$lambda$0(long);
    Code:
       0: lload_0
       1: iconst_3
       2: i2l
       3: ldiv
       4: lreturn

  private static final long solvePart2$lambda$2(long, long);
    Code:
       0: lload_2
       1: lload_0
       2: lrem
       3: lreturn

  private static final long parseMonkeys$lambda$11$lambda$7(long);
    Code:
       0: lload_0
       1: lload_0
       2: lmul
       3: lreturn

  private static final long parseMonkeys$lambda$11$lambda$8(java.lang.String, long);
    Code:
       0: lload_1
       1: aload_0
       2: invokestatic  #245                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
       5: lmul
       6: lreturn

  private static final long parseMonkeys$lambda$11$lambda$9(java.lang.String, long);
    Code:
       0: lload_1
       1: aload_0
       2: invokestatic  #245                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
       5: ladd
       6: lreturn
}

Compiled from "Comparisons.kt"
public final class aoc2022.Day11$business$$inlined$sortedByDescending$1<T> implements java.util.Comparator {
  public aoc2022.Day11$business$$inlined$sortedByDescending$1();
    Code:
       0: aload_0
       1: invokespecial #16                 // Method java/lang/Object."<init>":()V
       4: return

  public final int compare(T, T);
    Code:
       0: aload_2
       1: checkcast     #23                 // class aoc2022/Monkey
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: invokevirtual #27                 // Method aoc2022/Monkey.getInteractions:()J
      12: invokestatic  #33                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      15: checkcast     #35                 // class java/lang/Comparable
      18: aload_1
      19: checkcast     #23                 // class aoc2022/Monkey
      22: astore_3
      23: astore        5
      25: iconst_0
      26: istore        4
      28: aload_3
      29: invokevirtual #27                 // Method aoc2022/Monkey.getInteractions:()J
      32: invokestatic  #33                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      35: aload         5
      37: swap
      38: checkcast     #35                 // class java/lang/Comparable
      41: invokestatic  #41                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      44: ireturn
}


package aoc2023

class Day02(input: List<String>) {

    private val parsedInput = input.map {
        val gameId = it.substringBefore(":").split(" ").last().toInt()
        println("GameID: $gameId")
        val rawThrows = it.substringAfter(": ")
        val reveals = rawThrows.split("; ")
        val cubesInReveals = reveals.map {
            it.split(", ").map {
                val reveal = it.split(" ")
                reveal.first().toInt() to reveal.last()
            }
        }
        Game(gameId, cubesInReveals)
    }

    data class Game(
        val id: Int,
        val throws: List<List<Pair<Int, String>>>
    )

    // Rules: only 12 red cubes, 13 green cubes, and 14 blue cubes
    fun solvePart1(): Int {
        val result = parsedInput.sumOf { game ->

            val possible = game.throws.all { t ->

                t.all { t1 ->
                    when {
                        t1.second == "red" -> t1.first <= 12
                        t1.second == "green" -> t1.first <= 13
                        t1.second == "blue" -> t1.first <= 14
                        else -> {
                            println("Lel"); false
                        }
                    }
                }
            }
            if (possible) game.id else 0
        }

        return result
    }

    fun solvePart2(): Int {

        return parsedInput.sumOf { game ->
            val flat = game.throws.flatten()

            val r = flat.filter { it.second == "red" }.maxOf { it.first }
            val g = flat.filter { it.second == "green" }.maxOf { it.first }
            val b = flat.filter { it.second == "blue" }.maxOf { it.first }

            r * g * b
        }
    }
}

Compiled from "Day02.kt"
public final class aoc2023.Day02$Game {
  private final int id;

  private final java.util.List<java.util.List<kotlin.Pair<java.lang.Integer, java.lang.String>>> throws;

  public aoc2023.Day02$Game(int, java.util.List<? extends java.util.List<kotlin.Pair<java.lang.Integer, java.lang.String>>>);
    Code:
       0: aload_2
       1: ldc           #10                 // String throws
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: iload_1
      12: putfield      #23                 // Field id:I
      15: aload_0
      16: aload_2
      17: putfield      #26                 // Field throws:Ljava/util/List;
      20: return

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

  public final java.util.List<java.util.List<kotlin.Pair<java.lang.Integer, java.lang.String>>> getThrows();
    Code:
       0: aload_0
       1: getfield      #26                 // Field throws:Ljava/util/List;
       4: areturn

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

  public final java.util.List<java.util.List<kotlin.Pair<java.lang.Integer, java.lang.String>>> component2();
    Code:
       0: aload_0
       1: getfield      #26                 // Field throws:Ljava/util/List;
       4: areturn

  public final aoc2023.Day02$Game copy(int, java.util.List<? extends java.util.List<kotlin.Pair<java.lang.Integer, java.lang.String>>>);
    Code:
       0: aload_2
       1: ldc           #10                 // String throws
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class aoc2023/Day02$Game
       9: dup
      10: iload_1
      11: aload_2
      12: invokespecial #40                 // Method "<init>":(ILjava/util/List;)V
      15: areturn

  public static aoc2023.Day02$Game copy$default(aoc2023.Day02$Game, int, java.util.List, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #23                 // Field id:I
      10: istore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #26                 // Field throws:Ljava/util/List;
      21: astore_2
      22: aload_0
      23: iload_1
      24: aload_2
      25: invokevirtual #44                 // Method copy:(ILjava/util/List;)Laoc2023/Day02$Game;
      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 Game(id=
       9: invokevirtual #55                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #23                 // Field id:I
      16: invokevirtual #58                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #60                 // String , throws=
      21: invokevirtual #55                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #26                 // Field throws:Ljava/util/List;
      28: invokevirtual #63                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #66                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #68                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #23                 // Field id:I
       4: invokestatic  #74                 // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #26                 // Field throws:Ljava/util/List;
      16: invokevirtual #76                 // 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 aoc2023/Day02$Game
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class aoc2023/Day02$Game
      20: astore_2
      21: aload_0
      22: getfield      #23                 // Field id:I
      25: aload_2
      26: getfield      #23                 // Field id:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #26                 // Field throws:Ljava/util/List;
      38: aload_2
      39: getfield      #26                 // Field throws:Ljava/util/List;
      42: invokestatic  #84                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      45: ifne          50
      48: iconst_0
      49: ireturn
      50: iconst_1
      51: ireturn
}

Compiled from "Day02.kt"
public final class aoc2023.Day02 {
  private final java.util.List<aoc2023.Day02$Game> parsedInput;

  public aoc2023.Day02(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #10                 // String input
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: checkcast     #21                 // class java/lang/Iterable
      15: astore_2
      16: astore        37
      18: iconst_0
      19: istore_3
      20: aload_2
      21: astore        4
      23: new           #23                 // class java/util/ArrayList
      26: dup
      27: aload_2
      28: bipush        10
      30: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      33: invokespecial #32                 // Method java/util/ArrayList."<init>":(I)V
      36: checkcast     #34                 // class java/util/Collection
      39: astore        5
      41: iconst_0
      42: istore        6
      44: aload         4
      46: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      51: astore        7
      53: aload         7
      55: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      60: ifeq          494
      63: aload         7
      65: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      70: astore        8
      72: aload         5
      74: aload         8
      76: checkcast     #50                 // class java/lang/String
      79: astore        9
      81: astore        38
      83: iconst_0
      84: istore        10
      86: aload         9
      88: ldc           #52                 // String :
      90: aconst_null
      91: iconst_2
      92: aconst_null
      93: invokestatic  #58                 // Method kotlin/text/StringsKt.substringBefore$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
      96: checkcast     #60                 // class java/lang/CharSequence
      99: iconst_1
     100: anewarray     #50                 // class java/lang/String
     103: astore        11
     105: aload         11
     107: iconst_0
     108: ldc           #62                 // String
     110: aastore
     111: aload         11
     113: iconst_0
     114: iconst_0
     115: bipush        6
     117: aconst_null
     118: invokestatic  #66                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     121: invokestatic  #70                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     124: checkcast     #50                 // class java/lang/String
     127: invokestatic  #76                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     130: istore        12
     132: new           #78                 // class java/lang/StringBuilder
     135: dup
     136: invokespecial #79                 // Method java/lang/StringBuilder."<init>":()V
     139: ldc           #81                 // String GameID:
     141: invokevirtual #85                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     144: iload         12
     146: invokevirtual #88                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     149: invokevirtual #92                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     152: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     155: swap
     156: invokevirtual #104                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     159: aload         9
     161: ldc           #106                // String :
     163: aconst_null
     164: iconst_2
     165: aconst_null
     166: invokestatic  #109                // Method kotlin/text/StringsKt.substringAfter$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
     169: astore        11
     171: aload         11
     173: checkcast     #60                 // class java/lang/CharSequence
     176: iconst_1
     177: anewarray     #50                 // class java/lang/String
     180: astore        13
     182: aload         13
     184: iconst_0
     185: ldc           #111                // String ;
     187: aastore
     188: aload         13
     190: iconst_0
     191: iconst_0
     192: bipush        6
     194: aconst_null
     195: invokestatic  #66                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     198: astore        14
     200: aload         14
     202: checkcast     #21                 // class java/lang/Iterable
     205: astore        15
     207: iconst_0
     208: istore        16
     210: aload         15
     212: astore        17
     214: new           #23                 // class java/util/ArrayList
     217: dup
     218: aload         15
     220: bipush        10
     222: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     225: invokespecial #32                 // Method java/util/ArrayList."<init>":(I)V
     228: checkcast     #34                 // class java/util/Collection
     231: astore        18
     233: iconst_0
     234: istore        19
     236: aload         17
     238: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     243: astore        20
     245: aload         20
     247: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     252: ifeq          463
     255: aload         20
     257: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     262: astore        21
     264: aload         18
     266: aload         21
     268: checkcast     #50                 // class java/lang/String
     271: astore        22
     273: astore        23
     275: iconst_0
     276: istore        24
     278: aload         22
     280: checkcast     #60                 // class java/lang/CharSequence
     283: iconst_1
     284: anewarray     #50                 // class java/lang/String
     287: astore        25
     289: aload         25
     291: iconst_0
     292: ldc           #113                // String ,
     294: aastore
     295: aload         25
     297: iconst_0
     298: iconst_0
     299: bipush        6
     301: aconst_null
     302: invokestatic  #66                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     305: checkcast     #21                 // class java/lang/Iterable
     308: astore        25
     310: iconst_0
     311: istore        26
     313: aload         25
     315: astore        27
     317: new           #23                 // class java/util/ArrayList
     320: dup
     321: aload         25
     323: bipush        10
     325: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     328: invokespecial #32                 // Method java/util/ArrayList."<init>":(I)V
     331: checkcast     #34                 // class java/util/Collection
     334: astore        28
     336: iconst_0
     337: istore        29
     339: aload         27
     341: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     346: astore        30
     348: aload         30
     350: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     355: ifeq          444
     358: aload         30
     360: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     365: astore        31
     367: aload         28
     369: aload         31
     371: checkcast     #50                 // class java/lang/String
     374: astore        32
     376: astore        33
     378: iconst_0
     379: istore        34
     381: aload         32
     383: checkcast     #60                 // class java/lang/CharSequence
     386: iconst_1
     387: anewarray     #50                 // class java/lang/String
     390: astore        35
     392: aload         35
     394: iconst_0
     395: ldc           #62                 // String
     397: aastore
     398: aload         35
     400: iconst_0
     401: iconst_0
     402: bipush        6
     404: aconst_null
     405: invokestatic  #66                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     408: astore        36
     410: aload         36
     412: invokestatic  #116                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     415: checkcast     #50                 // class java/lang/String
     418: invokestatic  #76                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     421: invokestatic  #120                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     424: aload         36
     426: invokestatic  #70                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     429: invokestatic  #126                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     432: aload         33
     434: swap
     435: invokeinterface #130,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     440: pop
     441: goto          348
     444: aload         28
     446: checkcast     #132                // class java/util/List
     449: nop
     450: nop
     451: aload         23
     453: swap
     454: invokeinterface #130,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     459: pop
     460: goto          245
     463: aload         18
     465: checkcast     #132                // class java/util/List
     468: nop
     469: astore        13
     471: new           #134                // class aoc2023/Day02$Game
     474: dup
     475: iload         12
     477: aload         13
     479: invokespecial #137                // Method aoc2023/Day02$Game."<init>":(ILjava/util/List;)V
     482: aload         38
     484: swap
     485: invokeinterface #130,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     490: pop
     491: goto          53
     494: aload         5
     496: checkcast     #132                // class java/util/List
     499: nop
     500: aload         37
     502: swap
     503: putfield      #141                // Field parsedInput:Ljava/util/List;
     506: return

  public final int solvePart1();
    Code:
       0: aload_0
       1: getfield      #141                // Field parsedInput:Ljava/util/List;
       4: checkcast     #21                 // class java/lang/Iterable
       7: astore_2
       8: iconst_0
       9: istore_3
      10: aload_2
      11: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      16: astore        4
      18: aload         4
      20: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      25: ifeq          366
      28: aload         4
      30: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      35: astore        5
      37: iload_3
      38: aload         5
      40: checkcast     #134                // class aoc2023/Day02$Game
      43: astore        6
      45: istore        21
      47: iconst_0
      48: istore        7
      50: aload         6
      52: invokevirtual #171                // Method aoc2023/Day02$Game.getThrows:()Ljava/util/List;
      55: checkcast     #21                 // class java/lang/Iterable
      58: astore        8
      60: iconst_0
      61: istore        9
      63: aload         8
      65: instanceof    #34                 // class java/util/Collection
      68: ifeq          88
      71: aload         8
      73: checkcast     #34                 // class java/util/Collection
      76: invokeinterface #174,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      81: ifeq          88
      84: iconst_1
      85: goto          339
      88: aload         8
      90: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      95: astore        10
      97: aload         10
      99: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     104: ifeq          338
     107: aload         10
     109: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     114: astore        11
     116: aload         11
     118: checkcast     #132                // class java/util/List
     121: astore        12
     123: iconst_0
     124: istore        13
     126: aload         12
     128: checkcast     #21                 // class java/lang/Iterable
     131: astore        14
     133: iconst_0
     134: istore        15
     136: aload         14
     138: instanceof    #34                 // class java/util/Collection
     141: ifeq          161
     144: aload         14
     146: checkcast     #34                 // class java/util/Collection
     149: invokeinterface #174,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     154: ifeq          161
     157: iconst_1
     158: goto          330
     161: aload         14
     163: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     168: astore        16
     170: aload         16
     172: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     177: ifeq          329
     180: aload         16
     182: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     187: astore        17
     189: aload         17
     191: checkcast     #176                // class kotlin/Pair
     194: astore        18
     196: iconst_0
     197: istore        19
     199: nop
     200: aload         18
     202: invokevirtual #179                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     205: ldc           #181                // String red
     207: invokestatic  #185                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     210: ifeq          237
     213: aload         18
     215: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     218: checkcast     #190                // class java/lang/Number
     221: invokevirtual #193                // Method java/lang/Number.intValue:()I
     224: bipush        12
     226: if_icmpgt     233
     229: iconst_1
     230: goto          321
     233: iconst_0
     234: goto          321
     237: aload         18
     239: invokevirtual #179                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     242: ldc           #195                // String green
     244: invokestatic  #185                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     247: ifeq          274
     250: aload         18
     252: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     255: checkcast     #190                // class java/lang/Number
     258: invokevirtual #193                // Method java/lang/Number.intValue:()I
     261: bipush        13
     263: if_icmpgt     270
     266: iconst_1
     267: goto          321
     270: iconst_0
     271: goto          321
     274: aload         18
     276: invokevirtual #179                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     279: ldc           #197                // String blue
     281: invokestatic  #185                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     284: ifeq          311
     287: aload         18
     289: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     292: checkcast     #190                // class java/lang/Number
     295: invokevirtual #193                // Method java/lang/Number.intValue:()I
     298: bipush        14
     300: if_icmpgt     307
     303: iconst_1
     304: goto          321
     307: iconst_0
     308: goto          321
     311: ldc           #199                // String Lel
     313: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     316: swap
     317: invokevirtual #104                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     320: iconst_0
     321: nop
     322: ifne          170
     325: iconst_0
     326: goto          330
     329: iconst_1
     330: nop
     331: ifne          97
     334: iconst_0
     335: goto          339
     338: iconst_1
     339: istore        20
     341: iload         20
     343: ifeq          354
     346: aload         6
     348: invokevirtual #202                // Method aoc2023/Day02$Game.getId:()I
     351: goto          355
     354: iconst_0
     355: istore        22
     357: iload         21
     359: iload         22
     361: iadd
     362: istore_3
     363: goto          18
     366: iload_3
     367: istore_1
     368: iload_1
     369: ireturn

  public final int solvePart2();
    Code:
       0: aload_0
       1: getfield      #141                // Field parsedInput:Ljava/util/List;
       4: checkcast     #21                 // class java/lang/Iterable
       7: astore_1
       8: iconst_0
       9: istore_2
      10: aload_1
      11: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      16: astore_3
      17: aload_3
      18: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      23: ifeq          712
      26: aload_3
      27: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      32: astore        4
      34: iload_2
      35: aload         4
      37: checkcast     #134                // class aoc2023/Day02$Game
      40: astore        5
      42: istore        20
      44: iconst_0
      45: istore        6
      47: aload         5
      49: invokevirtual #171                // Method aoc2023/Day02$Game.getThrows:()Ljava/util/List;
      52: checkcast     #21                 // class java/lang/Iterable
      55: invokestatic  #221                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
      58: astore        7
      60: aload         7
      62: checkcast     #21                 // class java/lang/Iterable
      65: astore        8
      67: iconst_0
      68: istore        9
      70: aload         8
      72: astore        10
      74: new           #23                 // class java/util/ArrayList
      77: dup
      78: invokespecial #222                // Method java/util/ArrayList."<init>":()V
      81: checkcast     #34                 // class java/util/Collection
      84: astore        11
      86: iconst_0
      87: istore        12
      89: aload         10
      91: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      96: astore        13
      98: aload         13
     100: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     105: ifeq          153
     108: aload         13
     110: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     115: astore        14
     117: aload         14
     119: checkcast     #176                // class kotlin/Pair
     122: astore        15
     124: iconst_0
     125: istore        16
     127: aload         15
     129: invokevirtual #179                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     132: ldc           #181                // String red
     134: invokestatic  #185                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     137: ifeq          98
     140: aload         11
     142: aload         14
     144: invokeinterface #130,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     149: pop
     150: goto          98
     153: aload         11
     155: checkcast     #132                // class java/util/List
     158: nop
     159: checkcast     #21                 // class java/lang/Iterable
     162: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     167: astore        9
     169: aload         9
     171: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     176: ifne          187
     179: new           #224                // class java/util/NoSuchElementException
     182: dup
     183: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
     186: athrow
     187: aload         9
     189: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     194: checkcast     #176                // class kotlin/Pair
     197: astore        10
     199: iconst_0
     200: istore        11
     202: aload         10
     204: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     207: checkcast     #190                // class java/lang/Number
     210: invokevirtual #193                // Method java/lang/Number.intValue:()I
     213: istore        10
     215: aload         9
     217: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     222: ifeq          267
     225: aload         9
     227: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     232: checkcast     #176                // class kotlin/Pair
     235: astore        11
     237: iconst_0
     238: istore        12
     240: aload         11
     242: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     245: checkcast     #190                // class java/lang/Number
     248: invokevirtual #193                // Method java/lang/Number.intValue:()I
     251: istore        11
     253: iload         10
     255: iload         11
     257: if_icmpge     215
     260: iload         11
     262: istore        10
     264: goto          215
     267: iload         10
     269: istore        17
     271: aload         7
     273: checkcast     #21                 // class java/lang/Iterable
     276: astore        9
     278: iconst_0
     279: istore        10
     281: aload         9
     283: astore        11
     285: new           #23                 // class java/util/ArrayList
     288: dup
     289: invokespecial #222                // Method java/util/ArrayList."<init>":()V
     292: checkcast     #34                 // class java/util/Collection
     295: astore        12
     297: iconst_0
     298: istore        13
     300: aload         11
     302: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     307: astore        14
     309: aload         14
     311: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     316: ifeq          364
     319: aload         14
     321: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     326: astore        15
     328: aload         15
     330: checkcast     #176                // class kotlin/Pair
     333: astore        16
     335: iconst_0
     336: istore        18
     338: aload         16
     340: invokevirtual #179                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     343: ldc           #195                // String green
     345: invokestatic  #185                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     348: ifeq          309
     351: aload         12
     353: aload         15
     355: invokeinterface #130,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     360: pop
     361: goto          309
     364: aload         12
     366: checkcast     #132                // class java/util/List
     369: nop
     370: checkcast     #21                 // class java/lang/Iterable
     373: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     378: astore        10
     380: aload         10
     382: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     387: ifne          398
     390: new           #224                // class java/util/NoSuchElementException
     393: dup
     394: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
     397: athrow
     398: aload         10
     400: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     405: checkcast     #176                // class kotlin/Pair
     408: astore        11
     410: iconst_0
     411: istore        12
     413: aload         11
     415: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     418: checkcast     #190                // class java/lang/Number
     421: invokevirtual #193                // Method java/lang/Number.intValue:()I
     424: istore        11
     426: aload         10
     428: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     433: ifeq          478
     436: aload         10
     438: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     443: checkcast     #176                // class kotlin/Pair
     446: astore        12
     448: iconst_0
     449: istore        13
     451: aload         12
     453: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     456: checkcast     #190                // class java/lang/Number
     459: invokevirtual #193                // Method java/lang/Number.intValue:()I
     462: istore        12
     464: iload         11
     466: iload         12
     468: if_icmpge     426
     471: iload         12
     473: istore        11
     475: goto          426
     478: iload         11
     480: istore        8
     482: aload         7
     484: checkcast     #21                 // class java/lang/Iterable
     487: astore        10
     489: iconst_0
     490: istore        11
     492: aload         10
     494: astore        12
     496: new           #23                 // class java/util/ArrayList
     499: dup
     500: invokespecial #222                // Method java/util/ArrayList."<init>":()V
     503: checkcast     #34                 // class java/util/Collection
     506: astore        13
     508: iconst_0
     509: istore        14
     511: aload         12
     513: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     518: astore        15
     520: aload         15
     522: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     527: ifeq          575
     530: aload         15
     532: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     537: astore        16
     539: aload         16
     541: checkcast     #176                // class kotlin/Pair
     544: astore        18
     546: iconst_0
     547: istore        19
     549: aload         18
     551: invokevirtual #179                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     554: ldc           #197                // String blue
     556: invokestatic  #185                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     559: ifeq          520
     562: aload         13
     564: aload         16
     566: invokeinterface #130,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     571: pop
     572: goto          520
     575: aload         13
     577: checkcast     #132                // class java/util/List
     580: nop
     581: checkcast     #21                 // class java/lang/Iterable
     584: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     589: astore        11
     591: aload         11
     593: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     598: ifne          609
     601: new           #224                // class java/util/NoSuchElementException
     604: dup
     605: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
     608: athrow
     609: aload         11
     611: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     616: checkcast     #176                // class kotlin/Pair
     619: astore        12
     621: iconst_0
     622: istore        13
     624: aload         12
     626: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     629: checkcast     #190                // class java/lang/Number
     632: invokevirtual #193                // Method java/lang/Number.intValue:()I
     635: istore        12
     637: aload         11
     639: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     644: ifeq          689
     647: aload         11
     649: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     654: checkcast     #176                // class kotlin/Pair
     657: astore        13
     659: iconst_0
     660: istore        14
     662: aload         13
     664: invokevirtual #188                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     667: checkcast     #190                // class java/lang/Number
     670: invokevirtual #193                // Method java/lang/Number.intValue:()I
     673: istore        13
     675: iload         12
     677: iload         13
     679: if_icmpge     637
     682: iload         13
     684: istore        12
     686: goto          637
     689: iload         12
     691: istore        9
     693: iload         17
     695: iload         8
     697: imul
     698: iload         9
     700: imul
     701: istore        21
     703: iload         20
     705: iload         21
     707: iadd
     708: istore_2
     709: goto          17
     712: iload_2
     713: ireturn
}


package aoc2023

class Day01(val input: List<String>) {
    fun solvePart1(): Int {
        val sum = input.sumOf {
            addFirstAndLastDigit(it)
        }
        return sum
    }

    private fun addFirstAndLastDigit(line: String): Int {
        val first = line.first { it.isDigit() }
        val last = line.last { it.isDigit() }
        return "$first$last".toInt()
    }

    val words = mapOf(
        "one" to 1,
        "two" to 2,
        "three" to 3,
        "four" to 4,
        "five" to 5,
        "six" to 6,
        "seven" to 7,
        "eight" to 8,
        "nine" to 9
    )

    private fun String.possibleWordsAt(startingAt: Int): List<String> =
        (3..5).map { len ->
            substring(startingAt, (startingAt + len).coerceAtMost(length))
        }

    fun solvePart2(): Int {
        val sum = input.sumOf {
            addFirstAndLastDigit(
                it.mapIndexedNotNull { index, c ->
                    if (c.isDigit()) c
                    else
                        it.possibleWordsAt(index).firstNotNullOfOrNull {candidate ->
                            words[candidate]
                        }
                }.joinToString()
            )
        }
        return sum
    }
}

Compiled from "Day01.kt"
public final class aoc2023.Day01 {
  private final java.util.List<java.lang.String> input;

  private final java.util.Map<java.lang.String, java.lang.Integer> words;

  public aoc2023.Day01(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #10                 // String input
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: putfield      #22                 // Field input:Ljava/util/List;
      15: aload_0
      16: bipush        9
      18: anewarray     #24                 // class kotlin/Pair
      21: astore_2
      22: aload_2
      23: iconst_0
      24: ldc           #26                 // String one
      26: iconst_1
      27: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      30: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      33: aastore
      34: aload_2
      35: iconst_1
      36: ldc           #40                 // String two
      38: iconst_2
      39: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      42: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      45: aastore
      46: aload_2
      47: iconst_2
      48: ldc           #42                 // String three
      50: iconst_3
      51: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      54: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      57: aastore
      58: aload_2
      59: iconst_3
      60: ldc           #44                 // String four
      62: iconst_4
      63: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      66: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      69: aastore
      70: aload_2
      71: iconst_4
      72: ldc           #46                 // String five
      74: iconst_5
      75: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      78: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      81: aastore
      82: aload_2
      83: iconst_5
      84: ldc           #48                 // String six
      86: bipush        6
      88: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      91: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      94: aastore
      95: aload_2
      96: bipush        6
      98: ldc           #50                 // String seven
     100: bipush        7
     102: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     105: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     108: aastore
     109: aload_2
     110: bipush        7
     112: ldc           #52                 // String eight
     114: bipush        8
     116: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     119: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     122: aastore
     123: aload_2
     124: bipush        8
     126: ldc           #54                 // String nine
     128: bipush        9
     130: invokestatic  #32                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     133: invokestatic  #38                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     136: aastore
     137: aload_2
     138: invokestatic  #60                 // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
     141: putfield      #64                 // Field words:Ljava/util/Map;
     144: return

  public final java.util.List<java.lang.String> getInput();
    Code:
       0: aload_0
       1: getfield      #22                 // Field input:Ljava/util/List;
       4: areturn

  public final int solvePart1();
    Code:
       0: aload_0
       1: getfield      #22                 // Field input:Ljava/util/List;
       4: checkcast     #73                 // class java/lang/Iterable
       7: astore_2
       8: iconst_0
       9: istore_3
      10: aload_2
      11: invokeinterface #77,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      16: astore        4
      18: aload         4
      20: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      25: ifeq          67
      28: aload         4
      30: invokeinterface #87,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      35: astore        5
      37: iload_3
      38: aload         5
      40: checkcast     #89                 // class java/lang/String
      43: astore        6
      45: istore        8
      47: iconst_0
      48: istore        7
      50: aload_0
      51: aload         6
      53: invokespecial #93                 // Method addFirstAndLastDigit:(Ljava/lang/String;)I
      56: istore        9
      58: iload         8
      60: iload         9
      62: iadd
      63: istore_3
      64: goto          18
      67: iload_3
      68: istore_1
      69: iload_1
      70: ireturn

  private final int addFirstAndLastDigit(java.lang.String);
    Code:
       0: aload_1
       1: checkcast     #100                // class java/lang/CharSequence
       4: astore_3
       5: iconst_0
       6: istore        4
       8: iconst_0
       9: istore        5
      11: iload         5
      13: aload_3
      14: invokeinterface #103,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      19: if_icmpge     59
      22: aload_3
      23: iload         5
      25: invokeinterface #107,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      30: istore        6
      32: iload         6
      34: istore        7
      36: iconst_0
      37: istore        8
      39: iload         7
      41: invokestatic  #113                // Method java/lang/Character.isDigit:(C)Z
      44: nop
      45: ifeq          53
      48: iload         6
      50: goto          69
      53: iinc          5, 1
      56: goto          11
      59: new           #115                // class java/util/NoSuchElementException
      62: dup
      63: ldc           #117                // String Char sequence contains no character matching the predicate.
      65: invokespecial #120                // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
      68: athrow
      69: istore_2
      70: aload_1
      71: checkcast     #100                // class java/lang/CharSequence
      74: astore        4
      76: iconst_0
      77: istore        5
      79: aload         4
      81: invokeinterface #103,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      86: iconst_m1
      87: iadd
      88: istore        6
      90: iconst_0
      91: iload         6
      93: if_icmpgt     141
      96: iload         6
      98: istore        7
     100: iinc          6, -1
     103: aload         4
     105: iload         7
     107: invokeinterface #107,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     112: istore        8
     114: iload         8
     116: istore        9
     118: iconst_0
     119: istore        10
     121: iload         9
     123: invokestatic  #113                // Method java/lang/Character.isDigit:(C)Z
     126: nop
     127: ifeq          135
     130: iload         8
     132: goto          151
     135: iconst_0
     136: iload         6
     138: if_icmple     96
     141: new           #115                // class java/util/NoSuchElementException
     144: dup
     145: ldc           #117                // String Char sequence contains no character matching the predicate.
     147: invokespecial #120                // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
     150: athrow
     151: istore_3
     152: new           #122                // class java/lang/StringBuilder
     155: dup
     156: invokespecial #123                // Method java/lang/StringBuilder."<init>":()V
     159: iload_2
     160: invokevirtual #127                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     163: iload_3
     164: invokevirtual #127                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     167: invokevirtual #131                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     170: invokestatic  #134                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     173: ireturn

  public final java.util.Map<java.lang.String, java.lang.Integer> getWords();
    Code:
       0: aload_0
       1: getfield      #64                 // Field words:Ljava/util/Map;
       4: areturn

  private final java.util.List<java.lang.String> possibleWordsAt(java.lang.String, int);
    Code:
       0: new           #155                // class kotlin/ranges/IntRange
       3: dup
       4: iconst_3
       5: iconst_5
       6: invokespecial #158                // Method kotlin/ranges/IntRange."<init>":(II)V
       9: checkcast     #73                 // class java/lang/Iterable
      12: astore_3
      13: iconst_0
      14: istore        4
      16: aload_3
      17: astore        5
      19: new           #160                // class java/util/ArrayList
      22: dup
      23: aload_3
      24: bipush        10
      26: invokestatic  #166                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      29: invokespecial #169                // Method java/util/ArrayList."<init>":(I)V
      32: checkcast     #171                // class java/util/Collection
      35: astore        6
      37: iconst_0
      38: istore        7
      40: aload         5
      42: invokeinterface #77,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      47: astore        8
      49: aload         8
      51: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      56: ifeq          115
      59: aload         8
      61: checkcast     #173                // class kotlin/collections/IntIterator
      64: invokevirtual #176                // Method kotlin/collections/IntIterator.nextInt:()I
      67: istore        9
      69: aload         6
      71: iload         9
      73: istore        10
      75: astore        12
      77: iconst_0
      78: istore        11
      80: aload_1
      81: iload_2
      82: iload_2
      83: iload         10
      85: iadd
      86: aload_1
      87: invokevirtual #177                // Method java/lang/String.length:()I
      90: invokestatic  #183                // Method kotlin/ranges/RangesKt.coerceAtMost:(II)I
      93: invokevirtual #187                // Method java/lang/String.substring:(II)Ljava/lang/String;
      96: dup
      97: ldc           #189                // String substring(...)
      99: invokestatic  #192                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     102: nop
     103: aload         12
     105: swap
     106: invokeinterface #196,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     111: pop
     112: goto          49
     115: aload         6
     117: checkcast     #198                // class java/util/List
     120: nop
     121: areturn

  public final int solvePart2();
    Code:
       0: aload_0
       1: getfield      #22                 // Field input:Ljava/util/List;
       4: checkcast     #73                 // class java/lang/Iterable
       7: astore_2
       8: iconst_0
       9: istore_3
      10: aload_2
      11: invokeinterface #77,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      16: astore        4
      18: aload         4
      20: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      25: ifeq          300
      28: aload         4
      30: invokeinterface #87,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      35: astore        5
      37: iload_3
      38: aload         5
      40: checkcast     #89                 // class java/lang/String
      43: astore        6
      45: istore        30
      47: iconst_0
      48: istore        7
      50: aload_0
      51: aload         6
      53: checkcast     #100                // class java/lang/CharSequence
      56: astore        8
      58: astore        9
      60: iconst_0
      61: istore        10
      63: aload         8
      65: astore        11
      67: new           #160                // class java/util/ArrayList
      70: dup
      71: invokespecial #212                // Method java/util/ArrayList."<init>":()V
      74: checkcast     #171                // class java/util/Collection
      77: astore        12
      79: iconst_0
      80: istore        13
      82: aload         11
      84: astore        14
      86: iconst_0
      87: istore        15
      89: iconst_0
      90: istore        16
      92: iconst_0
      93: istore        17
      95: iload         17
      97: aload         14
      99: invokeinterface #103,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     104: if_icmpge     260
     107: aload         14
     109: iload         17
     111: invokeinterface #107,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     116: istore        18
     118: iload         16
     120: iinc          16, 1
     123: iload         18
     125: istore        19
     127: istore        20
     129: iconst_0
     130: istore        21
     132: iload         20
     134: iload         19
     136: istore        22
     138: istore        23
     140: iconst_0
     141: istore        24
     143: iload         22
     145: invokestatic  #113                // Method java/lang/Character.isDigit:(C)Z
     148: ifeq          159
     151: iload         22
     153: invokestatic  #215                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     156: goto          229
     159: aload_0
     160: aload         6
     162: iload         23
     164: invokespecial #217                // Method possibleWordsAt:(Ljava/lang/String;I)Ljava/util/List;
     167: checkcast     #73                 // class java/lang/Iterable
     170: invokeinterface #77,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     175: astore        25
     177: aload         25
     179: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     184: ifeq          228
     187: aload         25
     189: invokeinterface #87,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     194: checkcast     #89                 // class java/lang/String
     197: astore        26
     199: iconst_0
     200: istore        27
     202: aload_0
     203: getfield      #64                 // Field words:Ljava/util/Map;
     206: aload         26
     208: invokeinterface #223,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     213: checkcast     #28                 // class java/lang/Integer
     216: astore        26
     218: aload         26
     220: ifnull        177
     223: aload         26
     225: goto          229
     228: aconst_null
     229: nop
     230: dup
     231: ifnull        252
     234: astore        28
     236: iconst_0
     237: istore        29
     239: aload         12
     241: aload         28
     243: invokeinterface #196,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     248: pop
     249: goto          253
     252: pop
     253: nop
     254: iinc          17, 1
     257: goto          95
     260: nop
     261: aload         12
     263: checkcast     #198                // class java/util/List
     266: nop
     267: aload         9
     269: swap
     270: checkcast     #73                 // class java/lang/Iterable
     273: aconst_null
     274: aconst_null
     275: aconst_null
     276: iconst_0
     277: aconst_null
     278: aconst_null
     279: bipush        63
     281: aconst_null
     282: invokestatic  #227                // Method kotlin/collections/CollectionsKt.joinToString$default:(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
     285: invokespecial #93                 // Method addFirstAndLastDigit:(Ljava/lang/String;)I
     288: nop
     289: istore        31
     291: iload         30
     293: iload         31
     295: iadd
     296: istore_3
     297: goto          18
     300: iload_3
     301: istore_1
     302: iload_1
     303: ireturn
}