fun main() {
    val input = readInput("Day03")
    println(Day03.part1(input))
    println(Day03.part2(input))
}

class Day03 {
    companion object {
        fun part1(input: List<String>): Int {
            return input.map { it.chunked(it.length / 2) }
                .map { it[0].filter { x -> it[1].contains(x) }.toCharArray().first() }
                .sumOf { it.code - if (it.isUpperCase()) 38 else 96 }
        }

        fun part2(input: List<String>): Int {
            return input.chunked(3).map {
                it[0].filter { x -> it[1].contains(x) && it[2].contains(x) }.toCharArray().first()
            }.sumOf { it.code - if (it.isUpperCase()) 38 else 96 }
        }
    }
}

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

  public final int part1(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: astore        4
      16: new           #26                 // class java/util/ArrayList
      19: dup
      20: aload_2
      21: bipush        10
      23: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      26: invokespecial #35                 // Method java/util/ArrayList."<init>":(I)V
      29: checkcast     #37                 // class java/util/Collection
      32: astore        5
      34: iconst_0
      35: istore        6
      37: aload         4
      39: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        7
      46: aload         7
      48: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          106
      56: aload         7
      58: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        8
      65: aload         5
      67: aload         8
      69: checkcast     #53                 // class java/lang/String
      72: astore        9
      74: astore        21
      76: iconst_0
      77: istore        10
      79: aload         9
      81: checkcast     #55                 // class java/lang/CharSequence
      84: aload         9
      86: invokevirtual #59                 // Method java/lang/String.length:()I
      89: iconst_2
      90: idiv
      91: invokestatic  #65                 // Method kotlin/text/StringsKt.chunked:(Ljava/lang/CharSequence;I)Ljava/util/List;
      94: aload         21
      96: swap
      97: invokeinterface #69,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     102: pop
     103: goto          46
     106: aload         5
     108: checkcast     #71                 // class java/util/List
     111: nop
     112: checkcast     #24                 // class java/lang/Iterable
     115: astore_2
     116: nop
     117: iconst_0
     118: istore_3
     119: aload_2
     120: astore        4
     122: new           #26                 // class java/util/ArrayList
     125: dup
     126: aload_2
     127: bipush        10
     129: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     132: invokespecial #35                 // Method java/util/ArrayList."<init>":(I)V
     135: checkcast     #37                 // class java/util/Collection
     138: astore        5
     140: iconst_0
     141: istore        6
     143: aload         4
     145: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     150: astore        7
     152: aload         7
     154: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     159: ifeq          333
     162: aload         7
     164: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     169: astore        8
     171: aload         5
     173: aload         8
     175: checkcast     #71                 // class java/util/List
     178: astore        9
     180: astore        21
     182: iconst_0
     183: istore        10
     185: aload         9
     187: iconst_0
     188: invokeinterface #75,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     193: checkcast     #53                 // class java/lang/String
     196: astore        11
     198: iconst_0
     199: istore        12
     201: aload         11
     203: checkcast     #55                 // class java/lang/CharSequence
     206: astore        13
     208: new           #77                 // class java/lang/StringBuilder
     211: dup
     212: invokespecial #78                 // Method java/lang/StringBuilder."<init>":()V
     215: checkcast     #80                 // class java/lang/Appendable
     218: astore        14
     220: iconst_0
     221: istore        15
     223: iconst_0
     224: istore        16
     226: aload         13
     228: invokeinterface #81,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     233: istore        17
     235: iload         16
     237: iload         17
     239: if_icmpge     298
     242: aload         13
     244: iload         16
     246: invokeinterface #85,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     251: istore        18
     253: iload         18
     255: istore        19
     257: iconst_0
     258: istore        20
     260: aload         9
     262: iconst_1
     263: invokeinterface #75,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     268: checkcast     #55                 // class java/lang/CharSequence
     271: iload         19
     273: iconst_0
     274: iconst_2
     275: aconst_null
     276: invokestatic  #89                 // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;CZILjava/lang/Object;)Z
     279: ifeq          292
     282: aload         14
     284: iload         18
     286: invokeinterface #93,  2           // InterfaceMethod java/lang/Appendable.append:(C)Ljava/lang/Appendable;
     291: pop
     292: iinc          16, 1
     295: goto          235
     298: aload         14
     300: checkcast     #77                 // class java/lang/StringBuilder
     303: invokevirtual #97                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     306: invokevirtual #101                // Method java/lang/String.toCharArray:()[C
     309: dup
     310: ldc           #103                // String toCharArray(...)
     312: invokestatic  #106                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     315: invokestatic  #112                // Method kotlin/collections/ArraysKt.first:([C)C
     318: invokestatic  #118                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     321: aload         21
     323: swap
     324: invokeinterface #69,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     329: pop
     330: goto          152
     333: aload         5
     335: checkcast     #71                 // class java/util/List
     338: nop
     339: checkcast     #24                 // class java/lang/Iterable
     342: astore_2
     343: iconst_0
     344: istore_3
     345: aload_2
     346: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     351: astore        4
     353: aload         4
     355: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     360: ifeq          417
     363: aload         4
     365: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     370: astore        5
     372: iload_3
     373: aload         5
     375: checkcast     #114                // class java/lang/Character
     378: invokevirtual #122                // Method java/lang/Character.charValue:()C
     381: istore        6
     383: istore        21
     385: iconst_0
     386: istore        7
     388: iload         6
     390: iload         6
     392: invokestatic  #126                // Method java/lang/Character.isUpperCase:(C)Z
     395: ifeq          403
     398: bipush        38
     400: goto          405
     403: bipush        96
     405: isub
     406: istore        22
     408: iload         21
     410: iload         22
     412: iadd
     413: istore_3
     414: goto          353
     417: iload_3
     418: ireturn

  public final int part2(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/Iterable
      10: iconst_3
      11: invokestatic  #157                // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
      14: checkcast     #24                 // class java/lang/Iterable
      17: astore_2
      18: iconst_0
      19: istore_3
      20: aload_2
      21: astore        4
      23: new           #26                 // class java/util/ArrayList
      26: dup
      27: aload_2
      28: bipush        10
      30: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      33: invokespecial #35                 // Method java/util/ArrayList."<init>":(I)V
      36: checkcast     #37                 // class java/util/Collection
      39: astore        5
      41: iconst_0
      42: istore        6
      44: aload         4
      46: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      51: astore        7
      53: aload         7
      55: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      60: ifeq          264
      63: aload         7
      65: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      70: astore        8
      72: aload         5
      74: aload         8
      76: checkcast     #71                 // class java/util/List
      79: astore        9
      81: astore        21
      83: iconst_0
      84: istore        10
      86: aload         9
      88: iconst_0
      89: invokeinterface #75,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      94: checkcast     #53                 // class java/lang/String
      97: astore        11
      99: iconst_0
     100: istore        12
     102: aload         11
     104: checkcast     #55                 // class java/lang/CharSequence
     107: astore        13
     109: new           #77                 // class java/lang/StringBuilder
     112: dup
     113: invokespecial #78                 // Method java/lang/StringBuilder."<init>":()V
     116: checkcast     #80                 // class java/lang/Appendable
     119: astore        14
     121: iconst_0
     122: istore        15
     124: iconst_0
     125: istore        16
     127: aload         13
     129: invokeinterface #81,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     134: istore        17
     136: iload         16
     138: iload         17
     140: if_icmpge     229
     143: aload         13
     145: iload         16
     147: invokeinterface #85,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     152: istore        18
     154: iload         18
     156: istore        19
     158: iconst_0
     159: istore        20
     161: aload         9
     163: iconst_1
     164: invokeinterface #75,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     169: checkcast     #55                 // class java/lang/CharSequence
     172: iload         19
     174: iconst_0
     175: iconst_2
     176: aconst_null
     177: invokestatic  #89                 // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;CZILjava/lang/Object;)Z
     180: ifeq          209
     183: aload         9
     185: iconst_2
     186: invokeinterface #75,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     191: checkcast     #55                 // class java/lang/CharSequence
     194: iload         19
     196: iconst_0
     197: iconst_2
     198: aconst_null
     199: invokestatic  #89                 // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;CZILjava/lang/Object;)Z
     202: ifeq          209
     205: iconst_1
     206: goto          210
     209: iconst_0
     210: ifeq          223
     213: aload         14
     215: iload         18
     217: invokeinterface #93,  2           // InterfaceMethod java/lang/Appendable.append:(C)Ljava/lang/Appendable;
     222: pop
     223: iinc          16, 1
     226: goto          136
     229: aload         14
     231: checkcast     #77                 // class java/lang/StringBuilder
     234: invokevirtual #97                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     237: invokevirtual #101                // Method java/lang/String.toCharArray:()[C
     240: dup
     241: ldc           #103                // String toCharArray(...)
     243: invokestatic  #106                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     246: invokestatic  #112                // Method kotlin/collections/ArraysKt.first:([C)C
     249: invokestatic  #118                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     252: aload         21
     254: swap
     255: invokeinterface #69,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     260: pop
     261: goto          53
     264: aload         5
     266: checkcast     #71                 // class java/util/List
     269: nop
     270: checkcast     #24                 // class java/lang/Iterable
     273: astore_2
     274: iconst_0
     275: istore_3
     276: aload_2
     277: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     282: astore        4
     284: aload         4
     286: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     291: ifeq          348
     294: aload         4
     296: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     301: astore        5
     303: iload_3
     304: aload         5
     306: checkcast     #114                // class java/lang/Character
     309: invokevirtual #122                // Method java/lang/Character.charValue:()C
     312: istore        6
     314: istore        21
     316: iconst_0
     317: istore        7
     319: iload         6
     321: iload         6
     323: invokestatic  #126                // Method java/lang/Character.isUpperCase:(C)Z
     326: ifeq          334
     329: bipush        38
     331: goto          336
     334: bipush        96
     336: isub
     337: istore        22
     339: iload         21
     341: iload         22
     343: iadd
     344: istore_3
     345: goto          284
     348: iload_3
     349: ireturn

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

Compiled from "Day03.kt"
public final class Day03Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String Day03
       2: invokestatic  #14                 // Method UtilsKt.readInput:(Ljava/lang/String;)Ljava/util/List;
       5: astore_0
       6: getstatic     #19                 // Field Day03.Companion:LDay03$Companion;
       9: aload_0
      10: invokevirtual #25                 // Method Day03$Companion.part1:(Ljava/util/List;)I
      13: istore_1
      14: getstatic     #31                 // Field java/lang/System.out:Ljava/io/PrintStream;
      17: iload_1
      18: invokevirtual #37                 // Method java/io/PrintStream.println:(I)V
      21: getstatic     #19                 // Field Day03.Companion:LDay03$Companion;
      24: aload_0
      25: invokevirtual #40                 // Method Day03$Companion.part2:(Ljava/util/List;)I
      28: istore_1
      29: getstatic     #31                 // Field java/lang/System.out:Ljava/io/PrintStream;
      32: iload_1
      33: invokevirtual #37                 // Method java/io/PrintStream.println:(I)V
      36: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #45                 // Method main:()V
       3: return
}

Compiled from "Day03.kt"
public final class Day03 {
  public static final Day03$Companion Companion;

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

  static {};
    Code:
       0: new           #13                 // class Day03$Companion
       3: dup
       4: aconst_null
       5: invokespecial #16                 // Method Day03$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #20                 // Field Companion:LDay03$Companion;
      11: return
}


fun main() {
    val input = readInput("Day11")
    printTime { println(Day11.part1(input)) }
    printTime { println(Day11.part2(input)) }
}

class Day11 {
    companion object {
        fun part1(input: List<String>): Long {
            val monkeys = input.toMonkeys()
            monkeys.playKeepAway { it.floorDiv(3) }
            return monkeys.getMonkeyBusiness()
        }

        fun part2(input: List<String>): Long {
            val monkeys = input.toMonkeys()
            val commonMod = monkeys.map { it.divideBy }.lcm().toInt()
            monkeys.playKeepAway(10000) { it % commonMod }
            return monkeys.getMonkeyBusiness()
        }
    }
}

data class Monkey(
    val divideBy: Long,
    val trueTo: Int,
    val falseTo: Int,
    val items: MutableList<Long> = mutableListOf(),
    val operation: (Long) -> Long
) {
    var inspections = 0L
}

fun Long.doOperation(charOperator: Char, x: Long) = when (charOperator) {
    '+' -> this + x
    '*' -> this * x
    else -> throw IllegalArgumentException("Not supported")
}

fun List<String>.toMonkeys(): List<Monkey> {
    return this.chunked(7).map {
        val items: MutableList<Long> = it[1].substring(18).split(", ").map { item -> item.toLong() }.toMutableList()
        val (operator, operand) = it[2].substring(23).split(" ")
        val operation: (Long) -> Long = { old: Long ->
            old.doOperation(
                operator.toCharArray().first(), if (operand == "old") old else operand.toLong()
            )
        }
        val divideBy = it[3].substring(21).toLong()
        val trueTo = it[4].substring(29).toInt()
        val falseTo = it[5].substring(30).toInt()

        Monkey(divideBy, trueTo, falseTo, items, operation)
    }
}

fun List<Monkey>.playKeepAway(rounds: Int = 20, escalationPrevention: (Long) -> Long) {
    repeat(rounds) {
        for (monkey in this) {
            for (item in monkey.items) {
                monkey.inspections++
                val worry = escalationPrevention(monkey.operation(item))
                val toMonkey = if (worry isDivisibleBy monkey.divideBy) monkey.trueTo else monkey.falseTo
                this[toMonkey].items.add(worry)
            }
            monkey.items.clear()
        }
    }
}

fun List<Monkey>.getMonkeyBusiness() = this.map { it.inspections }.sortedDescending().take(2).product()

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

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

  static {};
    Code:
       0: new           #13                 // class Day11$Companion
       3: dup
       4: aconst_null
       5: invokespecial #16                 // Method Day11$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #20                 // Field Companion:LDay11$Companion;
      11: return
}

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

  public final long part1(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokestatic  #28                 // Method Day11Kt.toMonkeys:(Ljava/util/List;)Ljava/util/List;
      10: astore_2
      11: aload_2
      12: iconst_0
      13: invokedynamic #48,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      18: iconst_1
      19: aconst_null
      20: invokestatic  #52                 // Method Day11Kt.playKeepAway$default:(Ljava/util/List;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
      23: aload_2
      24: invokestatic  #55                 // Method Day11Kt.getMonkeyBusiness:(Ljava/util/List;)J
      27: lreturn

  public final long part2(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokestatic  #28                 // Method Day11Kt.toMonkeys:(Ljava/util/List;)Ljava/util/List;
      10: astore_2
      11: aload_2
      12: checkcast     #60                 // class java/lang/Iterable
      15: astore        4
      17: iconst_0
      18: istore        5
      20: aload         4
      22: astore        6
      24: new           #62                 // class java/util/ArrayList
      27: dup
      28: aload         4
      30: bipush        10
      32: invokestatic  #68                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      35: invokespecial #71                 // Method java/util/ArrayList."<init>":(I)V
      38: checkcast     #73                 // class java/util/Collection
      41: astore        7
      43: iconst_0
      44: istore        8
      46: aload         6
      48: invokeinterface #77,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      53: astore        9
      55: aload         9
      57: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      62: ifeq          108
      65: aload         9
      67: invokeinterface #87,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      72: astore        10
      74: aload         7
      76: aload         10
      78: checkcast     #89                 // class Monkey
      81: astore        11
      83: astore        13
      85: iconst_0
      86: istore        12
      88: aload         11
      90: invokevirtual #93                 // Method Monkey.getDivideBy:()J
      93: invokestatic  #99                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      96: aload         13
      98: swap
      99: invokeinterface #103,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     104: pop
     105: goto          55
     108: aload         7
     110: checkcast     #105                // class java/util/List
     113: nop
     114: checkcast     #60                 // class java/lang/Iterable
     117: invokestatic  #111                // Method UtilsKt.lcm:(Ljava/lang/Iterable;)J
     120: l2i
     121: istore_3
     122: aload_2
     123: sipush        10000
     126: iload_3
     127: invokedynamic #119,  0            // InvokeDynamic #1:invoke:(I)Lkotlin/jvm/functions/Function1;
     132: invokestatic  #123                // Method Day11Kt.playKeepAway:(Ljava/util/List;ILkotlin/jvm/functions/Function1;)V
     135: aload_2
     136: invokestatic  #55                 // Method Day11Kt.getMonkeyBusiness:(Ljava/util/List;)J
     139: lreturn

  private static final long part1$lambda$0(long);
    Code:
       0: lload_0
       1: lstore_2
       2: iconst_3
       3: i2l
       4: lstore        4
       6: lload_2
       7: lload         4
       9: ldiv
      10: lstore        6
      12: lload_2
      13: lload         4
      15: lxor
      16: lconst_0
      17: lcmp
      18: ifge          39
      21: lload         6
      23: lload         4
      25: lmul
      26: lload_2
      27: lcmp
      28: ifeq          39
      31: lload         6
      33: ldc2_w        #138                // long -1l
      36: ladd
      37: lstore        6
      39: lload         6
      41: lreturn

  private static final long part2$lambda$2(int, long);
    Code:
       0: lload_1
       1: iload_0
       2: i2l
       3: lrem
       4: lreturn

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

Compiled from "Day11.kt"
public final class Day11Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String Day11
       2: invokestatic  #14                 // Method UtilsKt.readInput:(Ljava/lang/String;)Ljava/util/List;
       5: astore_0
       6: aconst_null
       7: aconst_null
       8: aload_0
       9: invokedynamic #34,  0             // InvokeDynamic #0:invoke:(Ljava/util/List;)Lkotlin/jvm/functions/Function0;
      14: iconst_3
      15: aconst_null
      16: invokestatic  #38                 // Method UtilsKt.printTime$default:(Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
      19: aconst_null
      20: aconst_null
      21: aload_0
      22: invokedynamic #43,  0             // InvokeDynamic #1:invoke:(Ljava/util/List;)Lkotlin/jvm/functions/Function0;
      27: iconst_3
      28: aconst_null
      29: invokestatic  #38                 // Method UtilsKt.printTime$default:(Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
      32: return

  public static final long doOperation(long, char, long);
    Code:
       0: iload_2
       1: tableswitch   { // 42 to 43
                    42: 30
                    43: 24
               default: 36
          }
      24: lload_0
      25: lload_3
      26: ladd
      27: goto          46
      30: lload_0
      31: lload_3
      32: lmul
      33: goto          46
      36: new           #49                 // class java/lang/IllegalArgumentException
      39: dup
      40: ldc           #51                 // String Not supported
      42: invokespecial #55                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      45: athrow
      46: lreturn

  public static final java.util.List<Monkey> toMonkeys(java.util.List<java.lang.String>);
    Code:
       0: aload_0
       1: ldc           #66                 // String <this>
       3: invokestatic  #72                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #74                 // class java/lang/Iterable
      10: bipush        7
      12: invokestatic  #80                 // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
      15: checkcast     #74                 // class java/lang/Iterable
      18: astore_1
      19: iconst_0
      20: istore_2
      21: aload_1
      22: astore_3
      23: new           #82                 // class java/util/ArrayList
      26: dup
      27: aload_1
      28: bipush        10
      30: invokestatic  #86                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      33: invokespecial #89                 // Method java/util/ArrayList."<init>":(I)V
      36: checkcast     #91                 // class java/util/Collection
      39: astore        4
      41: iconst_0
      42: istore        5
      44: aload_3
      45: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      50: astore        6
      52: aload         6
      54: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      59: ifeq          442
      62: aload         6
      64: invokeinterface #104,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      69: astore        7
      71: aload         4
      73: aload         7
      75: checkcast     #106                // class java/util/List
      78: astore        8
      80: astore        23
      82: iconst_0
      83: istore        9
      85: aload         8
      87: iconst_1
      88: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      93: checkcast     #112                // class java/lang/String
      96: bipush        18
      98: invokevirtual #116                // Method java/lang/String.substring:(I)Ljava/lang/String;
     101: dup
     102: ldc           #118                // String substring(...)
     104: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     107: checkcast     #123                // class java/lang/CharSequence
     110: iconst_1
     111: anewarray     #112                // class java/lang/String
     114: astore        10
     116: aload         10
     118: iconst_0
     119: ldc           #125                // String ,
     121: aastore
     122: aload         10
     124: iconst_0
     125: iconst_0
     126: bipush        6
     128: aconst_null
     129: invokestatic  #131                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     132: checkcast     #74                 // class java/lang/Iterable
     135: astore        10
     137: iconst_0
     138: istore        11
     140: aload         10
     142: astore        12
     144: new           #82                 // class java/util/ArrayList
     147: dup
     148: aload         10
     150: bipush        10
     152: invokestatic  #86                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     155: invokespecial #89                 // Method java/util/ArrayList."<init>":(I)V
     158: checkcast     #91                 // class java/util/Collection
     161: astore        13
     163: iconst_0
     164: istore        14
     166: aload         12
     168: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     173: astore        15
     175: aload         15
     177: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     182: ifeq          229
     185: aload         15
     187: invokeinterface #104,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     192: astore        16
     194: aload         13
     196: aload         16
     198: checkcast     #112                // class java/lang/String
     201: astore        17
     203: astore        18
     205: iconst_0
     206: istore        19
     208: aload         17
     210: invokestatic  #137                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     213: nop
     214: invokestatic  #141                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     217: aload         18
     219: swap
     220: invokeinterface #145,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     225: pop
     226: goto          175
     229: aload         13
     231: checkcast     #106                // class java/util/List
     234: nop
     235: checkcast     #91                 // class java/util/Collection
     238: invokestatic  #149                // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
     241: astore        20
     243: aload         8
     245: iconst_2
     246: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     251: checkcast     #112                // class java/lang/String
     254: bipush        23
     256: invokevirtual #116                // Method java/lang/String.substring:(I)Ljava/lang/String;
     259: dup
     260: ldc           #118                // String substring(...)
     262: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     265: checkcast     #123                // class java/lang/CharSequence
     268: iconst_1
     269: anewarray     #112                // class java/lang/String
     272: astore        11
     274: aload         11
     276: iconst_0
     277: ldc           #151                // String
     279: aastore
     280: aload         11
     282: iconst_0
     283: iconst_0
     284: bipush        6
     286: aconst_null
     287: invokestatic  #131                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     290: astore        10
     292: aload         10
     294: iconst_0
     295: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     300: checkcast     #112                // class java/lang/String
     303: astore        11
     305: aload         10
     307: iconst_1
     308: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     313: checkcast     #112                // class java/lang/String
     316: astore        12
     318: aload         11
     320: aload         12
     322: invokedynamic #163,  0            // InvokeDynamic #2:invoke:(Ljava/lang/String;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
     327: astore        13
     329: nop
     330: aload         8
     332: iconst_3
     333: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     338: checkcast     #112                // class java/lang/String
     341: bipush        21
     343: invokevirtual #116                // Method java/lang/String.substring:(I)Ljava/lang/String;
     346: dup
     347: ldc           #118                // String substring(...)
     349: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     352: invokestatic  #137                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     355: lstore        21
     357: nop
     358: aload         8
     360: iconst_4
     361: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     366: checkcast     #112                // class java/lang/String
     369: bipush        29
     371: invokevirtual #116                // Method java/lang/String.substring:(I)Ljava/lang/String;
     374: dup
     375: ldc           #118                // String substring(...)
     377: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     380: invokestatic  #169                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     383: istore        16
     385: nop
     386: aload         8
     388: iconst_5
     389: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     394: checkcast     #112                // class java/lang/String
     397: bipush        30
     399: invokevirtual #116                // Method java/lang/String.substring:(I)Ljava/lang/String;
     402: dup
     403: ldc           #118                // String substring(...)
     405: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     408: invokestatic  #169                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     411: istore        17
     413: new           #171                // class Monkey
     416: dup
     417: lload         21
     419: iload         16
     421: iload         17
     423: aload         20
     425: aload         13
     427: invokespecial #174                // Method Monkey."<init>":(JIILjava/util/List;Lkotlin/jvm/functions/Function1;)V
     430: aload         23
     432: swap
     433: invokeinterface #145,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     438: pop
     439: goto          52
     442: aload         4
     444: checkcast     #106                // class java/util/List
     447: nop
     448: areturn

  public static final void playKeepAway(java.util.List<Monkey>, int, kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>);
    Code:
       0: aload_0
       1: ldc           #66                 // String <this>
       3: invokestatic  #72                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #203                // String escalationPrevention
       9: invokestatic  #72                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: iconst_0
      13: istore_3
      14: iload_3
      15: iload_1
      16: if_icmpge     213
      19: iload_3
      20: istore        4
      22: iconst_0
      23: istore        5
      25: aload_0
      26: invokeinterface #204,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      31: astore        6
      33: aload         6
      35: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      40: ifeq          206
      43: aload         6
      45: invokeinterface #104,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      50: checkcast     #171                // class Monkey
      53: astore        7
      55: aload         7
      57: invokevirtual #208                // Method Monkey.getItems:()Ljava/util/List;
      60: invokeinterface #204,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      65: astore        8
      67: aload         8
      69: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          193
      77: aload         8
      79: invokeinterface #104,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      84: checkcast     #210                // class java/lang/Number
      87: invokevirtual #214                // Method java/lang/Number.longValue:()J
      90: lstore        9
      92: aload         7
      94: invokevirtual #217                // Method Monkey.getInspections:()J
      97: lstore        11
      99: aload         7
     101: lload         11
     103: lconst_1
     104: ladd
     105: invokevirtual #221                // Method Monkey.setInspections:(J)V
     108: aload_2
     109: aload         7
     111: invokevirtual #225                // Method Monkey.getOperation:()Lkotlin/jvm/functions/Function1;
     114: lload         9
     116: invokestatic  #141                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     119: invokeinterface #229,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     124: invokeinterface #229,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     129: checkcast     #210                // class java/lang/Number
     132: invokevirtual #214                // Method java/lang/Number.longValue:()J
     135: lstore        11
     137: lload         11
     139: aload         7
     141: invokevirtual #232                // Method Monkey.getDivideBy:()J
     144: invokestatic  #236                // Method UtilsKt.isDivisibleBy:(JJ)Z
     147: ifeq          158
     150: aload         7
     152: invokevirtual #240                // Method Monkey.getTrueTo:()I
     155: goto          163
     158: aload         7
     160: invokevirtual #243                // Method Monkey.getFalseTo:()I
     163: istore        13
     165: aload_0
     166: iload         13
     168: invokeinterface #110,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     173: checkcast     #171                // class Monkey
     176: invokevirtual #208                // Method Monkey.getItems:()Ljava/util/List;
     179: lload         11
     181: invokestatic  #141                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     184: invokeinterface #244,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     189: pop
     190: goto          67
     193: aload         7
     195: invokevirtual #208                // Method Monkey.getItems:()Ljava/util/List;
     198: invokeinterface #247,  1          // InterfaceMethod java/util/List.clear:()V
     203: goto          33
     206: nop
     207: iinc          3, 1
     210: goto          14
     213: return

  public static void playKeepAway$default(java.util.List, int, kotlin.jvm.functions.Function1, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          9
       6: bipush        20
       8: istore_1
       9: aload_0
      10: iload_1
      11: aload_2
      12: invokestatic  #258                // Method playKeepAway:(Ljava/util/List;ILkotlin/jvm/functions/Function1;)V
      15: return

  public static final long getMonkeyBusiness(java.util.List<Monkey>);
    Code:
       0: aload_0
       1: ldc           #66                 // String <this>
       3: invokestatic  #72                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #74                 // class java/lang/Iterable
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: astore_3
      15: new           #82                 // class java/util/ArrayList
      18: dup
      19: aload_1
      20: bipush        10
      22: invokestatic  #86                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #89                 // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #91                 // class java/util/Collection
      31: astore        4
      33: iconst_0
      34: istore        5
      36: aload_3
      37: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        6
      44: aload         6
      46: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          97
      54: aload         6
      56: invokeinterface #104,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        7
      63: aload         4
      65: aload         7
      67: checkcast     #171                // class Monkey
      70: astore        8
      72: astore        10
      74: iconst_0
      75: istore        9
      77: aload         8
      79: invokevirtual #217                // Method Monkey.getInspections:()J
      82: invokestatic  #141                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      85: aload         10
      87: swap
      88: invokeinterface #145,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      93: pop
      94: goto          44
      97: aload         4
      99: checkcast     #106                // class java/util/List
     102: nop
     103: checkcast     #74                 // class java/lang/Iterable
     106: invokestatic  #265                // Method kotlin/collections/CollectionsKt.sortedDescending:(Ljava/lang/Iterable;)Ljava/util/List;
     109: checkcast     #74                 // class java/lang/Iterable
     112: iconst_2
     113: invokestatic  #268                // Method kotlin/collections/CollectionsKt.take:(Ljava/lang/Iterable;I)Ljava/util/List;
     116: checkcast     #74                 // class java/lang/Iterable
     119: invokestatic  #272                // Method UtilsKt.product:(Ljava/lang/Iterable;)J
     122: lreturn

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #277                // Method main:()V
       3: return

  private static final kotlin.Unit main$lambda$0(java.util.List);
    Code:
       0: getstatic     #284                // Field Day11.Companion:LDay11$Companion;
       3: aload_0
       4: invokevirtual #289                // Method Day11$Companion.part1:(Ljava/util/List;)J
       7: lstore_1
       8: getstatic     #295                // Field java/lang/System.out:Ljava/io/PrintStream;
      11: lload_1
      12: invokevirtual #300                // Method java/io/PrintStream.println:(J)V
      15: getstatic     #306                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      18: areturn

  private static final kotlin.Unit main$lambda$1(java.util.List);
    Code:
       0: getstatic     #284                // Field Day11.Companion:LDay11$Companion;
       3: aload_0
       4: invokevirtual #310                // Method Day11$Companion.part2:(Ljava/util/List;)J
       7: lstore_1
       8: getstatic     #295                // Field java/lang/System.out:Ljava/io/PrintStream;
      11: lload_1
      12: invokevirtual #300                // Method java/io/PrintStream.println:(J)V
      15: getstatic     #306                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      18: areturn

  private static final long toMonkeys$lambda$4$lambda$3(java.lang.String, java.lang.String, long);
    Code:
       0: lload_2
       1: aload_0
       2: invokevirtual #314                // Method java/lang/String.toCharArray:()[C
       5: dup
       6: ldc_w         #316                // String toCharArray(...)
       9: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      12: invokestatic  #322                // Method kotlin/collections/ArraysKt.first:([C)C
      15: aload_1
      16: ldc_w         #324                // String old
      19: invokestatic  #328                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      22: ifeq          29
      25: lload_2
      26: goto          33
      29: aload_1
      30: invokestatic  #137                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
      33: invokestatic  #330                // Method doOperation:(JCJ)J
      36: lreturn
}


fun main() {
    val input = readInput("Day02")
    println(Day02.part1(input))
    println(Day02.part2(input))
}

class Day02 {
    companion object {
        private fun checkGuessRound(it: String): Int {
            val (a, b) = it.split(" ").map { it.toCharArray().first() }
            val selectionPoints = b.code - 87
            val score = when (selectionPoints == a.code - 64) {
                true -> 1
                false -> when (b) {
                    'X' -> when (a) {
                        'C' -> 2
                        else -> 0
                    }

                    'Y' -> when (a) {
                        'A' -> 2
                        else -> 0
                    }

                    'Z' -> when (a) {
                        'B' -> 2
                        else -> 0
                    }

                    else -> 0
                }
            }

            return selectionPoints + (score * 3)
        }

        fun part1(input: List<String>): Int {
            return input.sumOf { checkGuessRound(it) }
        }

        private fun checkExpectedRound(it: String): Int {
            val (a, b) = it.split(" ").map { it.toCharArray().first() }
            val score = (b.code - 88)
            val selectionPoints = when (score) {
                0 -> when (a) {
                    'A' -> 3
                    'B' -> 1
                    else -> 2
                }

                1 -> when (a) {
                    'A' -> 1
                    'B' -> 2
                    else -> 3
                }

                2 -> when (a) {
                    'A' -> 2
                    'B' -> 3
                    else -> 1
                }

                else -> 0
            }

            return selectionPoints + (score * 3)
        }

        fun part2(input: List<String>): Int {
            return input.sumOf { checkExpectedRound(it) }
        }
    }
}

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

  private final int checkGuessRound(java.lang.String);
    Code:
       0: aload_1
       1: checkcast     #14                 // class java/lang/CharSequence
       4: iconst_1
       5: anewarray     #16                 // class java/lang/String
       8: astore_3
       9: aload_3
      10: iconst_0
      11: ldc           #18                 // String
      13: aastore
      14: aload_3
      15: iconst_0
      16: iconst_0
      17: bipush        6
      19: aconst_null
      20: invokestatic  #24                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      23: checkcast     #26                 // class java/lang/Iterable
      26: astore_3
      27: iconst_0
      28: istore        4
      30: aload_3
      31: astore        5
      33: new           #28                 // class java/util/ArrayList
      36: dup
      37: aload_3
      38: bipush        10
      40: invokestatic  #34                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      43: invokespecial #37                 // Method java/util/ArrayList."<init>":(I)V
      46: checkcast     #39                 // class java/util/Collection
      49: astore        6
      51: iconst_0
      52: istore        7
      54: aload         5
      56: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      61: astore        8
      63: aload         8
      65: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      70: ifeq          125
      73: aload         8
      75: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      80: astore        9
      82: aload         6
      84: aload         9
      86: checkcast     #16                 // class java/lang/String
      89: astore        10
      91: astore        12
      93: iconst_0
      94: istore        11
      96: aload         10
      98: invokevirtual #57                 // Method java/lang/String.toCharArray:()[C
     101: dup
     102: ldc           #59                 // String toCharArray(...)
     104: invokestatic  #65                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     107: invokestatic  #71                 // Method kotlin/collections/ArraysKt.first:([C)C
     110: invokestatic  #77                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     113: aload         12
     115: swap
     116: invokeinterface #81,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     121: pop
     122: goto          63
     125: aload         6
     127: checkcast     #83                 // class java/util/List
     130: nop
     131: astore_2
     132: aload_2
     133: iconst_0
     134: invokeinterface #87,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     139: checkcast     #73                 // class java/lang/Character
     142: invokevirtual #91                 // Method java/lang/Character.charValue:()C
     145: istore_3
     146: aload_2
     147: iconst_1
     148: invokeinterface #87,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     153: checkcast     #73                 // class java/lang/Character
     156: invokevirtual #91                 // Method java/lang/Character.charValue:()C
     159: istore        4
     161: iload         4
     163: bipush        87
     165: isub
     166: istore        5
     168: iload         5
     170: iload_3
     171: bipush        64
     173: isub
     174: if_icmpne     181
     177: iconst_1
     178: goto          182
     181: iconst_0
     182: istore        7
     184: iload         7
     186: iconst_1
     187: if_icmpne     194
     190: iconst_1
     191: goto          282
     194: iload         7
     196: ifne          274
     199: iload         4
     201: tableswitch   { // 88 to 90
                    88: 228
                    89: 242
                    90: 256
               default: 270
          }
     228: iload_3
     229: bipush        67
     231: if_icmpne     238
     234: iconst_2
     235: goto          282
     238: iconst_0
     239: goto          282
     242: iload_3
     243: bipush        65
     245: if_icmpne     252
     248: iconst_2
     249: goto          282
     252: iconst_0
     253: goto          282
     256: iload_3
     257: bipush        66
     259: if_icmpne     266
     262: iconst_2
     263: goto          282
     266: iconst_0
     267: goto          282
     270: iconst_0
     271: goto          282
     274: new           #93                 // class kotlin/NoWhenBranchMatchedException
     277: dup
     278: invokespecial #94                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     281: athrow
     282: istore        6
     284: iload         5
     286: iload         6
     288: iconst_3
     289: imul
     290: iadd
     291: ireturn

  public final int part1(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #118                // String input
       3: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #26                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      19: astore        4
      21: aload         4
      23: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      28: ifeq          72
      31: aload         4
      33: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      38: astore        5
      40: iload_3
      41: aload         5
      43: checkcast     #16                 // class java/lang/String
      46: astore        6
      48: istore        8
      50: iconst_0
      51: istore        7
      53: getstatic     #126                // Field Day02.Companion:LDay02$Companion;
      56: aload         6
      58: invokespecial #128                // Method checkGuessRound:(Ljava/lang/String;)I
      61: istore        9
      63: iload         8
      65: iload         9
      67: iadd
      68: istore_3
      69: goto          21
      72: iload_3
      73: ireturn

  private final int checkExpectedRound(java.lang.String);
    Code:
       0: aload_1
       1: checkcast     #14                 // class java/lang/CharSequence
       4: iconst_1
       5: anewarray     #16                 // class java/lang/String
       8: astore_3
       9: aload_3
      10: iconst_0
      11: ldc           #18                 // String
      13: aastore
      14: aload_3
      15: iconst_0
      16: iconst_0
      17: bipush        6
      19: aconst_null
      20: invokestatic  #24                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      23: checkcast     #26                 // class java/lang/Iterable
      26: astore_3
      27: iconst_0
      28: istore        4
      30: aload_3
      31: astore        5
      33: new           #28                 // class java/util/ArrayList
      36: dup
      37: aload_3
      38: bipush        10
      40: invokestatic  #34                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      43: invokespecial #37                 // Method java/util/ArrayList."<init>":(I)V
      46: checkcast     #39                 // class java/util/Collection
      49: astore        6
      51: iconst_0
      52: istore        7
      54: aload         5
      56: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      61: astore        8
      63: aload         8
      65: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      70: ifeq          125
      73: aload         8
      75: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      80: astore        9
      82: aload         6
      84: aload         9
      86: checkcast     #16                 // class java/lang/String
      89: astore        10
      91: astore        12
      93: iconst_0
      94: istore        11
      96: aload         10
      98: invokevirtual #57                 // Method java/lang/String.toCharArray:()[C
     101: dup
     102: ldc           #59                 // String toCharArray(...)
     104: invokestatic  #65                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     107: invokestatic  #71                 // Method kotlin/collections/ArraysKt.first:([C)C
     110: invokestatic  #77                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     113: aload         12
     115: swap
     116: invokeinterface #81,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     121: pop
     122: goto          63
     125: aload         6
     127: checkcast     #83                 // class java/util/List
     130: nop
     131: astore_2
     132: aload_2
     133: iconst_0
     134: invokeinterface #87,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     139: checkcast     #73                 // class java/lang/Character
     142: invokevirtual #91                 // Method java/lang/Character.charValue:()C
     145: istore_3
     146: aload_2
     147: iconst_1
     148: invokeinterface #87,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     153: checkcast     #73                 // class java/lang/Character
     156: invokevirtual #91                 // Method java/lang/Character.charValue:()C
     159: istore        4
     161: iload         4
     163: bipush        88
     165: isub
     166: istore        5
     168: iload         5
     170: tableswitch   { // 0 to 2
                     0: 196
                     1: 232
                     2: 268
               default: 304
          }
     196: iload_3
     197: tableswitch   { // 65 to 66
                    65: 220
                    66: 224
               default: 228
          }
     220: iconst_3
     221: goto          305
     224: iconst_1
     225: goto          305
     228: iconst_2
     229: goto          305
     232: iload_3
     233: tableswitch   { // 65 to 66
                    65: 256
                    66: 260
               default: 264
          }
     256: iconst_1
     257: goto          305
     260: iconst_2
     261: goto          305
     264: iconst_3
     265: goto          305
     268: iload_3
     269: tableswitch   { // 65 to 66
                    65: 292
                    66: 296
               default: 300
          }
     292: iconst_2
     293: goto          305
     296: iconst_3
     297: goto          305
     300: iconst_1
     301: goto          305
     304: iconst_0
     305: istore        6
     307: iload         6
     309: iload         5
     311: iconst_3
     312: imul
     313: iadd
     314: ireturn

  public final int part2(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #118                // String input
       3: invokestatic  #121                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #26                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      19: astore        4
      21: aload         4
      23: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      28: ifeq          72
      31: aload         4
      33: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      38: astore        5
      40: iload_3
      41: aload         5
      43: checkcast     #16                 // class java/lang/String
      46: astore        6
      48: istore        8
      50: iconst_0
      51: istore        7
      53: getstatic     #126                // Field Day02.Companion:LDay02$Companion;
      56: aload         6
      58: invokespecial #135                // Method checkExpectedRound:(Ljava/lang/String;)I
      61: istore        9
      63: iload         8
      65: iload         9
      67: iadd
      68: istore_3
      69: goto          21
      72: iload_3
      73: ireturn

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

Compiled from "Day02.kt"
public final class Day02Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String Day02
       2: invokestatic  #14                 // Method UtilsKt.readInput:(Ljava/lang/String;)Ljava/util/List;
       5: astore_0
       6: getstatic     #19                 // Field Day02.Companion:LDay02$Companion;
       9: aload_0
      10: invokevirtual #25                 // Method Day02$Companion.part1:(Ljava/util/List;)I
      13: istore_1
      14: getstatic     #31                 // Field java/lang/System.out:Ljava/io/PrintStream;
      17: iload_1
      18: invokevirtual #37                 // Method java/io/PrintStream.println:(I)V
      21: getstatic     #19                 // Field Day02.Companion:LDay02$Companion;
      24: aload_0
      25: invokevirtual #40                 // Method Day02$Companion.part2:(Ljava/util/List;)I
      28: istore_1
      29: getstatic     #31                 // Field java/lang/System.out:Ljava/io/PrintStream;
      32: iload_1
      33: invokevirtual #37                 // Method java/io/PrintStream.println:(I)V
      36: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #45                 // Method main:()V
       3: return
}

Compiled from "Day02.kt"
public final class Day02 {
  public static final Day02$Companion Companion;

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

  static {};
    Code:
       0: new           #13                 // class Day02$Companion
       3: dup
       4: aconst_null
       5: invokespecial #16                 // Method Day02$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #20                 // Field Companion:LDay02$Companion;
      11: return
}


fun main() {
    val input = readInput("Day07")
    println(Day07.part1(input))
    println(Day07.part2(input))
}

class Day07 {
    companion object {

        fun getFolderSizes(input: List<String>): MutableMap<String, Int> {
            val folders: MutableMap<String, Int> = mutableMapOf()
            val stack: ArrayDeque<String> = ArrayDeque()

            input.filterNot { it == "$ ls" || it.startsWith("dir") }.forEach {
                if (it.startsWith("$ cd")) {
                    val cdParam = it.subSequence(5, it.length).toString()
                    if (cdParam == "..") {
                        stack.removeLast()
                    } else {
                        val folderRoute = stack.joinToString("/") + "/$cdParam"
                        stack.addLast(folderRoute)
                        if (!folders.containsKey(folderRoute)) {
                            folders[folderRoute] = 0
                        }
                    }
                } else {
                    val fileSize = it.split(" ").first().toInt()
                    for (parent in stack) {
                        folders[parent] = folders[parent]?.plus(fileSize) ?: fileSize
                    }
                }
            }
            return folders
        }

        fun part1(input: List<String>): Int {
            val folders: MutableMap<String, Int> = getFolderSizes(input)

            return folders.values.filter { it <= 100000 }.sum()
        }

        fun part2(input: List<String>): Int {
            val folders: MutableMap<String, Int> = getFolderSizes(input)

            val totalSize = folders["//"]
            val requiredCleanup = -40000000 + totalSize!!

            return folders.values.sorted().first { it >= requiredCleanup }
        }
    }
}

Compiled from "Day07.kt"
public final class Day07Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String Day07
       2: invokestatic  #14                 // Method UtilsKt.readInput:(Ljava/lang/String;)Ljava/util/List;
       5: astore_0
       6: getstatic     #19                 // Field Day07.Companion:LDay07$Companion;
       9: aload_0
      10: invokevirtual #25                 // Method Day07$Companion.part1:(Ljava/util/List;)I
      13: istore_1
      14: getstatic     #31                 // Field java/lang/System.out:Ljava/io/PrintStream;
      17: iload_1
      18: invokevirtual #37                 // Method java/io/PrintStream.println:(I)V
      21: getstatic     #19                 // Field Day07.Companion:LDay07$Companion;
      24: aload_0
      25: invokevirtual #40                 // Method Day07$Companion.part2:(Ljava/util/List;)I
      28: istore_1
      29: getstatic     #31                 // Field java/lang/System.out:Ljava/io/PrintStream;
      32: iload_1
      33: invokevirtual #37                 // Method java/io/PrintStream.println:(I)V
      36: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #45                 // Method main:()V
       3: return
}

Compiled from "Day07.kt"
public final class Day07 {
  public static final Day07$Companion Companion;

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

  static {};
    Code:
       0: new           #13                 // class Day07$Companion
       3: dup
       4: aconst_null
       5: invokespecial #16                 // Method Day07$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #20                 // Field Companion:LDay07$Companion;
      11: return
}

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

  public final java.util.Map<java.lang.String, java.lang.Integer> getFolderSizes(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #24                 // class java/util/LinkedHashMap
       9: dup
      10: invokespecial #25                 // Method java/util/LinkedHashMap."<init>":()V
      13: checkcast     #27                 // class java/util/Map
      16: astore_2
      17: new           #29                 // class kotlin/collections/ArrayDeque
      20: dup
      21: invokespecial #30                 // Method kotlin/collections/ArrayDeque."<init>":()V
      24: astore_3
      25: aload_1
      26: checkcast     #32                 // class java/lang/Iterable
      29: astore        4
      31: iconst_0
      32: istore        5
      34: aload         4
      36: astore        6
      38: new           #34                 // class java/util/ArrayList
      41: dup
      42: invokespecial #35                 // Method java/util/ArrayList."<init>":()V
      45: checkcast     #37                 // class java/util/Collection
      48: astore        7
      50: iconst_0
      51: istore        8
      53: aload         6
      55: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      60: astore        9
      62: aload         9
      64: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      69: ifeq          135
      72: aload         9
      74: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      79: astore        10
      81: aload         10
      83: checkcast     #53                 // class java/lang/String
      86: astore        11
      88: iconst_0
      89: istore        12
      91: aload         11
      93: ldc           #55                 // String $ ls
      95: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      98: ifne          114
     101: aload         11
     103: ldc           #61                 // String dir
     105: iconst_0
     106: iconst_2
     107: aconst_null
     108: invokestatic  #67                 // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
     111: ifeq          118
     114: iconst_1
     115: goto          119
     118: iconst_0
     119: ifne          62
     122: aload         7
     124: aload         10
     126: invokeinterface #71,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     131: pop
     132: goto          62
     135: aload         7
     137: checkcast     #73                 // class java/util/List
     140: nop
     141: checkcast     #32                 // class java/lang/Iterable
     144: astore        4
     146: nop
     147: iconst_0
     148: istore        5
     150: aload         4
     152: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     157: astore        6
     159: aload         6
     161: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     166: ifeq          434
     169: aload         6
     171: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     176: astore        7
     178: aload         7
     180: checkcast     #53                 // class java/lang/String
     183: astore        8
     185: iconst_0
     186: istore        9
     188: aload         8
     190: ldc           #75                 // String $ cd
     192: iconst_0
     193: iconst_2
     194: aconst_null
     195: invokestatic  #67                 // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
     198: ifeq          313
     201: aload         8
     203: iconst_5
     204: aload         8
     206: invokevirtual #79                 // Method java/lang/String.length:()I
     209: invokevirtual #83                 // Method java/lang/String.subSequence:(II)Ljava/lang/CharSequence;
     212: invokevirtual #87                 // Method java/lang/Object.toString:()Ljava/lang/String;
     215: astore        10
     217: aload         10
     219: ldc           #89                 // String ..
     221: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     224: ifeq          235
     227: aload_3
     228: invokevirtual #92                 // Method kotlin/collections/ArrayDeque.removeLast:()Ljava/lang/Object;
     231: pop
     232: goto          429
     235: new           #94                 // class java/lang/StringBuilder
     238: dup
     239: invokespecial #95                 // Method java/lang/StringBuilder."<init>":()V
     242: aload_3
     243: checkcast     #32                 // class java/lang/Iterable
     246: ldc           #97                 // String /
     248: checkcast     #99                 // class java/lang/CharSequence
     251: aconst_null
     252: aconst_null
     253: iconst_0
     254: aconst_null
     255: aconst_null
     256: bipush        62
     258: aconst_null
     259: invokestatic  #105                // 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;
     262: invokevirtual #109                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     265: bipush        47
     267: invokevirtual #112                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     270: aload         10
     272: invokevirtual #109                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     275: invokevirtual #113                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     278: astore        11
     280: aload_3
     281: aload         11
     283: invokevirtual #117                // Method kotlin/collections/ArrayDeque.addLast:(Ljava/lang/Object;)V
     286: aload_2
     287: aload         11
     289: invokeinterface #120,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     294: ifne          429
     297: aload_2
     298: aload         11
     300: iconst_0
     301: invokestatic  #126                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     304: invokeinterface #130,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     309: pop
     310: goto          429
     313: aload         8
     315: checkcast     #99                 // class java/lang/CharSequence
     318: iconst_1
     319: anewarray     #53                 // class java/lang/String
     322: astore        11
     324: aload         11
     326: iconst_0
     327: ldc           #132                // String
     329: aastore
     330: aload         11
     332: iconst_0
     333: iconst_0
     334: bipush        6
     336: aconst_null
     337: invokestatic  #136                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     340: invokestatic  #140                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     343: checkcast     #53                 // class java/lang/String
     346: invokestatic  #144                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     349: istore        10
     351: aload_3
     352: invokevirtual #145                // Method kotlin/collections/ArrayDeque.iterator:()Ljava/util/Iterator;
     355: astore        11
     357: aload         11
     359: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     364: ifeq          429
     367: aload         11
     369: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     374: checkcast     #53                 // class java/lang/String
     377: astore        12
     379: aload_2
     380: astore        13
     382: aload_2
     383: aload         12
     385: invokeinterface #149,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     390: checkcast     #122                // class java/lang/Integer
     393: dup
     394: ifnull        406
     397: invokevirtual #152                // Method java/lang/Integer.intValue:()I
     400: iload         10
     402: iadd
     403: goto          409
     406: pop
     407: iload         10
     409: invokestatic  #126                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     412: astore        14
     414: aload         13
     416: aload         12
     418: aload         14
     420: invokeinterface #130,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     425: pop
     426: goto          357
     429: nop
     430: nop
     431: goto          159
     434: nop
     435: aload_2
     436: areturn

  public final int part1(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: invokevirtual #183                // Method getFolderSizes:(Ljava/util/List;)Ljava/util/Map;
      11: astore_2
      12: aload_2
      13: invokeinterface #187,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
      18: checkcast     #32                 // class java/lang/Iterable
      21: astore_3
      22: iconst_0
      23: istore        4
      25: aload_3
      26: astore        5
      28: new           #34                 // class java/util/ArrayList
      31: dup
      32: invokespecial #35                 // Method java/util/ArrayList."<init>":()V
      35: checkcast     #37                 // class java/util/Collection
      38: astore        6
      40: iconst_0
      41: istore        7
      43: aload         5
      45: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      50: astore        8
      52: aload         8
      54: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      59: ifeq          112
      62: aload         8
      64: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      69: astore        9
      71: aload         9
      73: checkcast     #189                // class java/lang/Number
      76: invokevirtual #190                // Method java/lang/Number.intValue:()I
      79: istore        10
      81: iconst_0
      82: istore        11
      84: iload         10
      86: ldc           #191                // int 100000
      88: if_icmpgt     95
      91: iconst_1
      92: goto          96
      95: iconst_0
      96: ifeq          52
      99: aload         6
     101: aload         9
     103: invokeinterface #71,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     108: pop
     109: goto          52
     112: aload         6
     114: checkcast     #73                 // class java/util/List
     117: nop
     118: checkcast     #32                 // class java/lang/Iterable
     121: invokestatic  #195                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     124: ireturn

  public final int part2(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: invokevirtual #183                // Method getFolderSizes:(Ljava/util/List;)Ljava/util/Map;
      11: astore_2
      12: aload_2
      13: ldc           #203                // String //
      15: invokeinterface #149,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      20: checkcast     #122                // class java/lang/Integer
      23: astore_3
      24: ldc           #204                // int -40000000
      26: aload_3
      27: dup
      28: invokestatic  #207                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      31: invokevirtual #152                // Method java/lang/Integer.intValue:()I
      34: iadd
      35: istore        4
      37: aload_2
      38: invokeinterface #187,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
      43: checkcast     #32                 // class java/lang/Iterable
      46: invokestatic  #211                // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
      49: checkcast     #32                 // class java/lang/Iterable
      52: astore        5
      54: iconst_0
      55: istore        6
      57: aload         5
      59: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      64: astore        7
      66: aload         7
      68: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      73: ifeq          118
      76: aload         7
      78: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      83: astore        8
      85: aload         8
      87: checkcast     #189                // class java/lang/Number
      90: invokevirtual #190                // Method java/lang/Number.intValue:()I
      93: istore        9
      95: iconst_0
      96: istore        10
      98: iload         9
     100: iload         4
     102: if_icmplt     109
     105: iconst_1
     106: goto          110
     109: iconst_0
     110: ifeq          66
     113: aload         8
     115: goto          128
     118: new           #213                // class java/util/NoSuchElementException
     121: dup
     122: ldc           #215                // String Collection contains no element matching the predicate.
     124: invokespecial #218                // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
     127: athrow
     128: checkcast     #189                // class java/lang/Number
     131: invokevirtual #190                // Method java/lang/Number.intValue:()I
     134: ireturn

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