package days

import java.io.File

fun String.parseMonkeys() = this
    .split("\n\n")
    .map { it.split("\n").map { l -> l.trim() } }
    .map {
        Pair(
            it[0].replace("Monkey ", "").replace(":", "").toLong(),
            Triple(
                it[1].replace("Starting items: ", "").split(",").map { item -> item.trim().toLong() },
                it[2].replace("Operation: new = ", "").parseOp(),
                Triple(
                    it[3].replace("Test: divisible by ", "").toLong(),
                    it[4].replace("If true: throw to monkey ", "").toLong(),
                    it[5].replace("If false: throw to monkey ", "").toLong())))
    }
    .map { (monkey, monkeyData) -> (monkey to (monkeyData.first to 0L)) to (monkey to (monkeyData.second to monkeyData.third)) }
    .let { it.associate { p -> p.first } to it.associate { p -> p.second } }

fun String.parseOp() = when {
    this == "old * old" -> { old: Long -> old * old  }
    this.contains("old +") -> this.replace("old + ", "").toLong().let { { old: Long -> old + it } }
    else -> this.replace("old * ", "").toLong().let { { old: Long -> old * it } }
}

fun executeRound(
    monkeyItems: Map<Long, Pair<List<Long>, Long>>,
    monkeyBehaviour: Map<Long, Pair<(Long) -> Long, Triple<Long, Long, Long>>>,
    worryReduction: (Long) -> Long
) =
    monkeyItems.keys.fold(monkeyItems) { map, monkey -> monkeyInspect(map, monkeyBehaviour, worryReduction, monkey) }

fun monkeyInspect(
    monkeyItems: Map<Long, Pair<List<Long>, Long>>,
    monkeyBehaviour: Map<Long, Pair<(Long) -> Long, Triple<Long, Long, Long>>>,
    worryReduction: (Long) -> Long,
    monkey: Long
) =
    monkeyItems[monkey]!!.first.fold(monkeyItems) { map , item ->  inspectItem(map, monkeyBehaviour, worryReduction, monkey, item) }

fun inspectItem(
    monkeyItems: Map<Long, Pair<List<Long>, Long>>,
    monkeyBehaviour: Map<Long, Pair<(Long) -> Long, Triple<Long, Long, Long>>>,
    worryReduction: (Long) -> Long,
    monkey: Long,
    item: Long
) =
    monkeyItems.toMutableMap().let {
        it[monkey] = it[monkey]!!.first.drop(1) to it[monkey]!!.second + 1
        val newItem = monkeyBehaviour[monkey]!!.first(item)
        val newItemReduced = worryReduction(newItem)
        val newMonkey =
            if ((newItemReduced % monkeyBehaviour[monkey]!!.second.first) == 0L)
                monkeyBehaviour[monkey]!!.second.second
            else
                monkeyBehaviour[monkey]!!.second.third
        it[newMonkey] = it[newMonkey]!!.first.plus(newItemReduced) to it[newMonkey]!!.second
        it.toMap()
    }

fun monkeyBusiness(monkeyItems: Map<Long, Pair<List<Long>, Long>>) = monkeyItems
    .entries.map { it.value.second }
    .sortedDescending()
    .take(2)
    .reduce { acc, act -> acc * act }

fun day11part1() = File("input/11.txt").readText()
    .parseMonkeys()
    .let { (monkeyItems, monkeyBehaviour) ->
        (1 .. 20).fold(monkeyItems) { map, _ ->
            executeRound(map, monkeyBehaviour) { level -> level.div(3)}
        }
    }
    .let { monkeyBusiness(it) }

fun day11part2() = File("input/11.txt").readText()
    .parseMonkeys()
    .let { (monkeyItems, monkeyBehaviour) ->
        (1 .. 10000).fold(monkeyItems) { map, _ ->
            executeRound(map, monkeyBehaviour,
                monkeyBehaviour.values.map { mbv -> mbv.second.first }.reduce(Long::times).let {
                    { level: Long -> level.mod(it) }
                }
            )
        }
    }
    .let { monkeyBusiness(it) }

Compiled from "day11.kt"
public final class days.Day11Kt {
  public static final kotlin.Pair<java.util.Map<java.lang.Long, kotlin.Pair<java.util.List<java.lang.Long>, java.lang.Long>>, java.util.Map<java.lang.Long, kotlin.Pair<kotlin.jvm.functions.Function1<java.lang.Long, java.lang.Long>, kotlin.Triple<java.lang.Long, java.lang.Long, java.lang.Long>>>> parseMonkeys(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #18                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #20                 // class java/lang/String
      14: astore_1
      15: aload_1
      16: iconst_0
      17: ldc           #22                 // String \n\n
      19: aastore
      20: aload_1
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #28                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #30                 // class java/lang/Iterable
      32: astore_1
      33: nop
      34: iconst_0
      35: istore_2
      36: aload_1
      37: astore_3
      38: new           #32                 // class java/util/ArrayList
      41: dup
      42: aload_1
      43: bipush        10
      45: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      48: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
      51: checkcast     #44                 // class java/util/Collection
      54: astore        4
      56: iconst_0
      57: istore        5
      59: aload_3
      60: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      65: astore        6
      67: aload         6
      69: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          246
      77: aload         6
      79: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      84: astore        7
      86: aload         4
      88: aload         7
      90: checkcast     #20                 // class java/lang/String
      93: astore        8
      95: astore        25
      97: iconst_0
      98: istore        9
     100: aload         8
     102: checkcast     #18                 // class java/lang/CharSequence
     105: iconst_1
     106: anewarray     #20                 // class java/lang/String
     109: astore        10
     111: aload         10
     113: iconst_0
     114: ldc           #60                 // String \n
     116: aastore
     117: aload         10
     119: iconst_0
     120: iconst_0
     121: bipush        6
     123: aconst_null
     124: invokestatic  #28                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     127: checkcast     #30                 // class java/lang/Iterable
     130: astore        10
     132: iconst_0
     133: istore        11
     135: aload         10
     137: astore        12
     139: new           #32                 // class java/util/ArrayList
     142: dup
     143: aload         10
     145: bipush        10
     147: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     150: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
     153: checkcast     #44                 // class java/util/Collection
     156: astore        13
     158: iconst_0
     159: istore        14
     161: aload         12
     163: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     168: astore        15
     170: aload         15
     172: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     177: ifeq          227
     180: aload         15
     182: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     187: astore        16
     189: aload         13
     191: aload         16
     193: checkcast     #20                 // class java/lang/String
     196: astore        17
     198: astore        18
     200: iconst_0
     201: istore        19
     203: aload         17
     205: checkcast     #18                 // class java/lang/CharSequence
     208: invokestatic  #64                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     211: invokevirtual #68                 // Method java/lang/Object.toString:()Ljava/lang/String;
     214: nop
     215: aload         18
     217: swap
     218: invokeinterface #72,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     223: pop
     224: goto          170
     227: aload         13
     229: checkcast     #74                 // class java/util/List
     232: nop
     233: nop
     234: aload         25
     236: swap
     237: invokeinterface #72,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     242: pop
     243: goto          67
     246: aload         4
     248: checkcast     #74                 // class java/util/List
     251: nop
     252: checkcast     #30                 // class java/lang/Iterable
     255: astore_1
     256: nop
     257: iconst_0
     258: istore_2
     259: aload_1
     260: astore_3
     261: new           #32                 // class java/util/ArrayList
     264: dup
     265: aload_1
     266: bipush        10
     268: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     271: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
     274: checkcast     #44                 // class java/util/Collection
     277: astore        4
     279: iconst_0
     280: istore        5
     282: aload_3
     283: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     288: astore        6
     290: aload         6
     292: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     297: ifeq          683
     300: aload         6
     302: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     307: astore        7
     309: aload         4
     311: aload         7
     313: checkcast     #74                 // class java/util/List
     316: astore        8
     318: astore        25
     320: iconst_0
     321: istore        9
     323: aload         8
     325: iconst_0
     326: invokeinterface #78,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     331: checkcast     #20                 // class java/lang/String
     334: ldc           #80                 // String Monkey
     336: ldc           #82                 // String
     338: iconst_0
     339: iconst_4
     340: aconst_null
     341: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
     344: ldc           #88                 // String :
     346: ldc           #82                 // String
     348: iconst_0
     349: iconst_4
     350: aconst_null
     351: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
     354: invokestatic  #94                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     357: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     360: aload         8
     362: iconst_1
     363: invokeinterface #78,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     368: checkcast     #20                 // class java/lang/String
     371: ldc           #100                // String Starting items:
     373: ldc           #82                 // String
     375: iconst_0
     376: iconst_4
     377: aconst_null
     378: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
     381: checkcast     #18                 // class java/lang/CharSequence
     384: iconst_1
     385: anewarray     #20                 // class java/lang/String
     388: astore        10
     390: aload         10
     392: iconst_0
     393: ldc           #102                // String ,
     395: aastore
     396: aload         10
     398: iconst_0
     399: iconst_0
     400: bipush        6
     402: aconst_null
     403: invokestatic  #28                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     406: checkcast     #30                 // class java/lang/Iterable
     409: astore        10
     411: astore        13
     413: iconst_0
     414: istore        16
     416: aload         10
     418: astore        17
     420: new           #32                 // class java/util/ArrayList
     423: dup
     424: aload         10
     426: bipush        10
     428: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     431: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
     434: checkcast     #44                 // class java/util/Collection
     437: astore        18
     439: iconst_0
     440: istore        19
     442: aload         17
     444: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     449: astore        20
     451: aload         20
     453: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     458: ifeq          515
     461: aload         20
     463: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     468: astore        21
     470: aload         18
     472: aload         21
     474: checkcast     #20                 // class java/lang/String
     477: astore        22
     479: astore        23
     481: iconst_0
     482: istore        24
     484: nop
     485: aload         22
     487: checkcast     #18                 // class java/lang/CharSequence
     490: invokestatic  #64                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     493: invokevirtual #68                 // Method java/lang/Object.toString:()Ljava/lang/String;
     496: invokestatic  #94                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     499: nop
     500: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     503: aload         23
     505: swap
     506: invokeinterface #72,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     511: pop
     512: goto          451
     515: aload         18
     517: checkcast     #74                 // class java/util/List
     520: nop
     521: aload         13
     523: swap
     524: aload         8
     526: iconst_2
     527: invokeinterface #78,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     532: checkcast     #20                 // class java/lang/String
     535: ldc           #104                // String Operation: new =
     537: ldc           #82                 // String
     539: iconst_0
     540: iconst_4
     541: aconst_null
     542: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
     545: invokestatic  #108                // Method parseOp:(Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
     548: new           #110                // class kotlin/Triple
     551: dup
     552: aload         8
     554: iconst_3
     555: invokeinterface #78,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     560: checkcast     #20                 // class java/lang/String
     563: ldc           #112                // String Test: divisible by
     565: ldc           #82                 // String
     567: iconst_0
     568: iconst_4
     569: aconst_null
     570: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
     573: invokestatic  #94                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     576: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     579: aload         8
     581: iconst_4
     582: invokeinterface #78,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     587: checkcast     #20                 // class java/lang/String
     590: ldc           #114                // String If true: throw to monkey
     592: ldc           #82                 // String
     594: iconst_0
     595: iconst_4
     596: aconst_null
     597: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
     600: invokestatic  #94                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     603: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     606: aload         8
     608: iconst_5
     609: invokeinterface #78,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     614: checkcast     #20                 // class java/lang/String
     617: ldc           #116                // String If false: throw to monkey
     619: ldc           #82                 // String
     621: iconst_0
     622: iconst_4
     623: aconst_null
     624: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
     627: invokestatic  #94                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     630: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     633: invokespecial #119                // Method kotlin/Triple."<init>":(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
     636: astore        26
     638: astore        27
     640: astore        28
     642: new           #110                // class kotlin/Triple
     645: dup
     646: aload         28
     648: aload         27
     650: aload         26
     652: invokespecial #119                // Method kotlin/Triple."<init>":(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
     655: astore        29
     657: astore        30
     659: new           #121                // class kotlin/Pair
     662: dup
     663: aload         30
     665: aload         29
     667: invokespecial #124                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     670: nop
     671: aload         25
     673: swap
     674: invokeinterface #72,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     679: pop
     680: goto          290
     683: aload         4
     685: checkcast     #74                 // class java/util/List
     688: nop
     689: checkcast     #30                 // class java/lang/Iterable
     692: astore_1
     693: nop
     694: iconst_0
     695: istore_2
     696: aload_1
     697: astore_3
     698: new           #32                 // class java/util/ArrayList
     701: dup
     702: aload_1
     703: bipush        10
     705: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     708: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
     711: checkcast     #44                 // class java/util/Collection
     714: astore        4
     716: iconst_0
     717: istore        5
     719: aload_3
     720: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     725: astore        6
     727: aload         6
     729: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     734: ifeq          839
     737: aload         6
     739: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     744: astore        7
     746: aload         4
     748: aload         7
     750: checkcast     #121                // class kotlin/Pair
     753: astore        8
     755: astore        25
     757: iconst_0
     758: istore        9
     760: aload         8
     762: invokevirtual #127                // Method kotlin/Pair.component1:()Ljava/lang/Object;
     765: checkcast     #129                // class java/lang/Number
     768: invokevirtual #133                // Method java/lang/Number.longValue:()J
     771: lstore        10
     773: aload         8
     775: invokevirtual #136                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     778: checkcast     #110                // class kotlin/Triple
     781: astore        12
     783: lload         10
     785: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     788: aload         12
     790: invokevirtual #139                // Method kotlin/Triple.getFirst:()Ljava/lang/Object;
     793: lconst_0
     794: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     797: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     800: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     803: lload         10
     805: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     808: aload         12
     810: invokevirtual #148                // Method kotlin/Triple.getSecond:()Ljava/lang/Object;
     813: aload         12
     815: invokevirtual #151                // Method kotlin/Triple.getThird:()Ljava/lang/Object;
     818: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     821: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     824: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     827: aload         25
     829: swap
     830: invokeinterface #72,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     835: pop
     836: goto          727
     839: aload         4
     841: checkcast     #74                 // class java/util/List
     844: nop
     845: astore_2
     846: iconst_0
     847: istore_3
     848: aload_2
     849: checkcast     #30                 // class java/lang/Iterable
     852: astore        4
     854: iconst_0
     855: istore        5
     857: aload         4
     859: bipush        10
     861: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     864: invokestatic  #157                // Method kotlin/collections/MapsKt.mapCapacity:(I)I
     867: bipush        16
     869: invokestatic  #163                // Method kotlin/ranges/RangesKt.coerceAtLeast:(II)I
     872: istore        6
     874: aload         4
     876: astore        7
     878: new           #165                // class java/util/LinkedHashMap
     881: dup
     882: iload         6
     884: invokespecial #166                // Method java/util/LinkedHashMap."<init>":(I)V
     887: checkcast     #168                // class java/util/Map
     890: astore        8
     892: iconst_0
     893: istore        9
     895: aload         7
     897: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     902: astore        10
     904: aload         10
     906: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     911: ifeq          968
     914: aload         10
     916: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     921: astore        11
     923: aload         8
     925: astore        12
     927: aload         11
     929: checkcast     #121                // class kotlin/Pair
     932: astore        13
     934: iconst_0
     935: istore        14
     937: aload         13
     939: invokevirtual #169                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     942: checkcast     #121                // class kotlin/Pair
     945: astore        13
     947: aload         12
     949: aload         13
     951: invokevirtual #169                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     954: aload         13
     956: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     959: invokeinterface #174,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     964: pop
     965: goto          904
     968: aload         8
     970: nop
     971: aload_2
     972: checkcast     #30                 // class java/lang/Iterable
     975: astore        4
     977: astore        15
     979: iconst_0
     980: istore        5
     982: aload         4
     984: bipush        10
     986: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     989: invokestatic  #157                // Method kotlin/collections/MapsKt.mapCapacity:(I)I
     992: bipush        16
     994: invokestatic  #163                // Method kotlin/ranges/RangesKt.coerceAtLeast:(II)I
     997: istore        6
     999: aload         4
    1001: astore        7
    1003: new           #165                // class java/util/LinkedHashMap
    1006: dup
    1007: iload         6
    1009: invokespecial #166                // Method java/util/LinkedHashMap."<init>":(I)V
    1012: checkcast     #168                // class java/util/Map
    1015: astore        8
    1017: iconst_0
    1018: istore        9
    1020: aload         7
    1022: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1027: astore        10
    1029: aload         10
    1031: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1036: ifeq          1093
    1039: aload         10
    1041: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1046: astore        11
    1048: aload         8
    1050: astore        12
    1052: aload         11
    1054: checkcast     #121                // class kotlin/Pair
    1057: astore        13
    1059: iconst_0
    1060: istore        14
    1062: aload         13
    1064: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1067: checkcast     #121                // class kotlin/Pair
    1070: astore        13
    1072: aload         12
    1074: aload         13
    1076: invokevirtual #169                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1079: aload         13
    1081: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1084: invokeinterface #174,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    1089: pop
    1090: goto          1029
    1093: aload         8
    1095: nop
    1096: aload         15
    1098: swap
    1099: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
    1102: nop
    1103: areturn

  public static final kotlin.jvm.functions.Function1<java.lang.Long, java.lang.Long> parseOp(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: nop
       7: aload_0
       8: ldc           #214                // String old * old
      10: invokestatic  #218                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      13: ifeq          24
      16: invokedynamic #238,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      21: goto          93
      24: aload_0
      25: checkcast     #18                 // class java/lang/CharSequence
      28: ldc           #240                // String old +
      30: checkcast     #18                 // class java/lang/CharSequence
      33: iconst_0
      34: iconst_2
      35: aconst_null
      36: invokestatic  #244                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
      39: ifeq          68
      42: aload_0
      43: ldc           #246                // String old +
      45: ldc           #82                 // String
      47: iconst_0
      48: iconst_4
      49: aconst_null
      50: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
      53: invokestatic  #94                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
      56: lstore_1
      57: iconst_0
      58: istore_3
      59: lload_1
      60: invokedynamic #254,  0            // InvokeDynamic #1:invoke:(J)Lkotlin/jvm/functions/Function1;
      65: goto          93
      68: aload_0
      69: ldc_w         #256                // String old *
      72: ldc           #82                 // String
      74: iconst_0
      75: iconst_4
      76: aconst_null
      77: invokestatic  #86                 // Method kotlin/text/StringsKt.replace$default:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
      80: invokestatic  #94                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
      83: lstore_1
      84: iconst_0
      85: istore_3
      86: lload_1
      87: invokedynamic #261,  0            // InvokeDynamic #2:invoke:(J)Lkotlin/jvm/functions/Function1;
      92: nop
      93: areturn

  public static final java.util.Map<java.lang.Long, kotlin.Pair<java.util.List<java.lang.Long>, java.lang.Long>> executeRound(java.util.Map<java.lang.Long, ? extends kotlin.Pair<? extends java.util.List<java.lang.Long>, java.lang.Long>>, java.util.Map<java.lang.Long, ? extends kotlin.Pair<? extends kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>, kotlin.Triple<java.lang.Long, java.lang.Long, java.lang.Long>>>, kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>);
    Code:
       0: aload_0
       1: ldc_w         #271                // String monkeyItems
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: ldc_w         #273                // String monkeyBehaviour
      11: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      14: aload_2
      15: ldc_w         #275                // String worryReduction
      18: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      21: aload_0
      22: invokeinterface #279,  1          // InterfaceMethod java/util/Map.keySet:()Ljava/util/Set;
      27: checkcast     #30                 // class java/lang/Iterable
      30: astore_3
      31: iconst_0
      32: istore        4
      34: aload_0
      35: astore        5
      37: aload_3
      38: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      43: astore        6
      45: aload         6
      47: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      52: ifeq          95
      55: aload         6
      57: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      62: astore        7
      64: aload         5
      66: aload         7
      68: checkcast     #129                // class java/lang/Number
      71: invokevirtual #133                // Method java/lang/Number.longValue:()J
      74: lstore        8
      76: astore        10
      78: iconst_0
      79: istore        11
      81: aload         10
      83: aload_1
      84: aload_2
      85: lload         8
      87: invokestatic  #283                // Method monkeyInspect:(Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function1;J)Ljava/util/Map;
      90: astore        5
      92: goto          45
      95: aload         5
      97: areturn

  public static final java.util.Map<java.lang.Long, kotlin.Pair<java.util.List<java.lang.Long>, java.lang.Long>> monkeyInspect(java.util.Map<java.lang.Long, ? extends kotlin.Pair<? extends java.util.List<java.lang.Long>, java.lang.Long>>, java.util.Map<java.lang.Long, ? extends kotlin.Pair<? extends kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>, kotlin.Triple<java.lang.Long, java.lang.Long, java.lang.Long>>>, kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>, long);
    Code:
       0: aload_0
       1: ldc_w         #271                // String monkeyItems
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: ldc_w         #273                // String monkeyBehaviour
      11: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      14: aload_2
      15: ldc_w         #275                // String worryReduction
      18: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      21: aload_0
      22: lload_3
      23: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      26: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      31: dup
      32: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      35: checkcast     #121                // class kotlin/Pair
      38: invokevirtual #169                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      41: checkcast     #30                 // class java/lang/Iterable
      44: astore        5
      46: iconst_0
      47: istore        6
      49: aload_0
      50: astore        7
      52: aload         5
      54: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      59: astore        8
      61: aload         8
      63: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      68: ifeq          112
      71: aload         8
      73: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      78: astore        9
      80: aload         7
      82: aload         9
      84: checkcast     #129                // class java/lang/Number
      87: invokevirtual #133                // Method java/lang/Number.longValue:()J
      90: lstore        10
      92: astore        12
      94: iconst_0
      95: istore        13
      97: aload         12
      99: aload_1
     100: aload_2
     101: lload_3
     102: lload         10
     104: invokestatic  #301                // Method inspectItem:(Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function1;JJ)Ljava/util/Map;
     107: astore        7
     109: goto          61
     112: aload         7
     114: areturn

  public static final java.util.Map<java.lang.Long, kotlin.Pair<java.util.List<java.lang.Long>, java.lang.Long>> inspectItem(java.util.Map<java.lang.Long, ? extends kotlin.Pair<? extends java.util.List<java.lang.Long>, java.lang.Long>>, java.util.Map<java.lang.Long, ? extends kotlin.Pair<? extends kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>, kotlin.Triple<java.lang.Long, java.lang.Long, java.lang.Long>>>, kotlin.jvm.functions.Function1<? super java.lang.Long, java.lang.Long>, long, long);
    Code:
       0: aload_0
       1: ldc_w         #271                // String monkeyItems
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: ldc_w         #273                // String monkeyBehaviour
      11: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      14: aload_2
      15: ldc_w         #275                // String worryReduction
      18: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      21: aload_0
      22: invokestatic  #307                // Method kotlin/collections/MapsKt.toMutableMap:(Ljava/util/Map;)Ljava/util/Map;
      25: astore        7
      27: iconst_0
      28: istore        8
      30: lload_3
      31: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      34: astore        9
      36: aload         7
      38: aload         9
      40: aload         7
      42: lload_3
      43: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      46: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      51: dup
      52: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      55: checkcast     #121                // class kotlin/Pair
      58: invokevirtual #169                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      61: checkcast     #30                 // class java/lang/Iterable
      64: iconst_1
      65: invokestatic  #311                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
      68: aload         7
      70: lload_3
      71: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      74: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      79: dup
      80: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      83: checkcast     #121                // class kotlin/Pair
      86: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      89: checkcast     #129                // class java/lang/Number
      92: invokevirtual #133                // Method java/lang/Number.longValue:()J
      95: lconst_1
      96: ladd
      97: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     100: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     103: invokeinterface #174,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     108: pop
     109: aload_1
     110: lload_3
     111: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     114: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     119: dup
     120: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     123: checkcast     #121                // class kotlin/Pair
     126: invokevirtual #169                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     129: checkcast     #266                // class kotlin/jvm/functions/Function1
     132: lload         5
     134: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     137: invokeinterface #313,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     142: checkcast     #129                // class java/lang/Number
     145: invokevirtual #133                // Method java/lang/Number.longValue:()J
     148: lstore        10
     150: aload_2
     151: lload         10
     153: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     156: invokeinterface #313,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     161: checkcast     #129                // class java/lang/Number
     164: invokevirtual #133                // Method java/lang/Number.longValue:()J
     167: lstore        12
     169: lload         12
     171: aload_1
     172: lload_3
     173: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     176: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     181: dup
     182: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     185: checkcast     #121                // class kotlin/Pair
     188: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     191: checkcast     #110                // class kotlin/Triple
     194: invokevirtual #139                // Method kotlin/Triple.getFirst:()Ljava/lang/Object;
     197: checkcast     #129                // class java/lang/Number
     200: invokevirtual #133                // Method java/lang/Number.longValue:()J
     203: lrem
     204: lconst_0
     205: lcmp
     206: ifne          244
     209: aload_1
     210: lload_3
     211: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     214: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     219: dup
     220: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     223: checkcast     #121                // class kotlin/Pair
     226: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     229: checkcast     #110                // class kotlin/Triple
     232: invokevirtual #148                // Method kotlin/Triple.getSecond:()Ljava/lang/Object;
     235: checkcast     #129                // class java/lang/Number
     238: invokevirtual #133                // Method java/lang/Number.longValue:()J
     241: goto          276
     244: aload_1
     245: lload_3
     246: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     249: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     254: dup
     255: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     258: checkcast     #121                // class kotlin/Pair
     261: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     264: checkcast     #110                // class kotlin/Triple
     267: invokevirtual #151                // Method kotlin/Triple.getThird:()Ljava/lang/Object;
     270: checkcast     #129                // class java/lang/Number
     273: invokevirtual #133                // Method java/lang/Number.longValue:()J
     276: lstore        14
     278: lload         14
     280: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     283: astore        16
     285: aload         7
     287: aload         16
     289: aload         7
     291: lload         14
     293: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     296: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     301: dup
     302: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     305: checkcast     #121                // class kotlin/Pair
     308: invokevirtual #169                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     311: checkcast     #44                 // class java/util/Collection
     314: lload         12
     316: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     319: invokestatic  #317                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     322: aload         7
     324: lload         14
     326: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     329: invokeinterface #293,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     334: dup
     335: invokestatic  #297                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     338: checkcast     #121                // class kotlin/Pair
     341: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     344: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     347: invokeinterface #174,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     352: pop
     353: aload         7
     355: invokestatic  #320                // Method kotlin/collections/MapsKt.toMap:(Ljava/util/Map;)Ljava/util/Map;
     358: nop
     359: areturn

  public static final long monkeyBusiness(java.util.Map<java.lang.Long, ? extends kotlin.Pair<? extends java.util.List<java.lang.Long>, java.lang.Long>>);
    Code:
       0: aload_0
       1: ldc_w         #271                // String monkeyItems
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #330,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      13: checkcast     #30                 // class java/lang/Iterable
      16: astore_1
      17: iconst_0
      18: istore_2
      19: aload_1
      20: astore_3
      21: new           #32                 // class java/util/ArrayList
      24: dup
      25: aload_1
      26: bipush        10
      28: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      31: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
      34: checkcast     #44                 // class java/util/Collection
      37: astore        4
      39: iconst_0
      40: istore        5
      42: aload_3
      43: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      48: astore        6
      50: aload         6
      52: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      57: ifeq          117
      60: aload         6
      62: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      67: astore        7
      69: aload         4
      71: aload         7
      73: checkcast     #332                // class java/util/Map$Entry
      76: astore        8
      78: astore        10
      80: iconst_0
      81: istore        9
      83: aload         8
      85: invokeinterface #335,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
      90: checkcast     #121                // class kotlin/Pair
      93: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      96: checkcast     #129                // class java/lang/Number
      99: invokevirtual #133                // Method java/lang/Number.longValue:()J
     102: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     105: aload         10
     107: swap
     108: invokeinterface #72,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     113: pop
     114: goto          50
     117: aload         4
     119: checkcast     #74                 // class java/util/List
     122: nop
     123: checkcast     #30                 // class java/lang/Iterable
     126: invokestatic  #339                // Method kotlin/collections/CollectionsKt.sortedDescending:(Ljava/lang/Iterable;)Ljava/util/List;
     129: checkcast     #30                 // class java/lang/Iterable
     132: iconst_2
     133: invokestatic  #342                // Method kotlin/collections/CollectionsKt.take:(Ljava/lang/Iterable;I)Ljava/util/List;
     136: checkcast     #30                 // class java/lang/Iterable
     139: astore_1
     140: nop
     141: iconst_0
     142: istore_2
     143: aload_1
     144: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     149: astore_3
     150: aload_3
     151: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     156: ifne          170
     159: new           #344                // class java/lang/UnsupportedOperationException
     162: dup
     163: ldc_w         #346                // String Empty collection can\'t be reduced.
     166: invokespecial #349                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     169: athrow
     170: aload_3
     171: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     176: astore        4
     178: aload_3
     179: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     184: ifeq          227
     187: aload         4
     189: aload_3
     190: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     195: checkcast     #129                // class java/lang/Number
     198: invokevirtual #133                // Method java/lang/Number.longValue:()J
     201: lstore        5
     203: checkcast     #129                // class java/lang/Number
     206: invokevirtual #133                // Method java/lang/Number.longValue:()J
     209: lstore        7
     211: iconst_0
     212: istore        9
     214: lload         7
     216: lload         5
     218: lmul
     219: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     222: astore        4
     224: goto          178
     227: aload         4
     229: checkcast     #129                // class java/lang/Number
     232: invokevirtual #133                // Method java/lang/Number.longValue:()J
     235: lreturn

  public static final long day11part1();
    Code:
       0: new           #361                // class java/io/File
       3: dup
       4: ldc_w         #363                // String input/11.txt
       7: invokespecial #364                // Method java/io/File."<init>":(Ljava/lang/String;)V
      10: aconst_null
      11: iconst_1
      12: aconst_null
      13: invokestatic  #370                // Method kotlin/io/FilesKt.readText$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
      16: invokestatic  #372                // Method parseMonkeys:(Ljava/lang/String;)Lkotlin/Pair;
      19: astore_0
      20: iconst_0
      21: istore_1
      22: aload_0
      23: invokevirtual #127                // Method kotlin/Pair.component1:()Ljava/lang/Object;
      26: checkcast     #168                // class java/util/Map
      29: astore_2
      30: aload_0
      31: invokevirtual #136                // Method kotlin/Pair.component2:()Ljava/lang/Object;
      34: checkcast     #168                // class java/util/Map
      37: astore_3
      38: new           #374                // class kotlin/ranges/IntRange
      41: dup
      42: iconst_1
      43: bipush        20
      45: invokespecial #377                // Method kotlin/ranges/IntRange."<init>":(II)V
      48: checkcast     #30                 // class java/lang/Iterable
      51: astore        4
      53: iconst_0
      54: istore        5
      56: aload_2
      57: astore        6
      59: aload         4
      61: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      66: astore        7
      68: aload         7
      70: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      75: ifeq          111
      78: aload         7
      80: checkcast     #379                // class kotlin/collections/IntIterator
      83: invokevirtual #383                // Method kotlin/collections/IntIterator.nextInt:()I
      86: istore        8
      88: aload         6
      90: astore        9
      92: iconst_0
      93: istore        10
      95: aload         9
      97: aload_3
      98: invokedynamic #388,  0            // InvokeDynamic #3:invoke:()Lkotlin/jvm/functions/Function1;
     103: invokestatic  #390                // Method executeRound:(Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map;
     106: astore        6
     108: goto          68
     111: aload         6
     113: nop
     114: nop
     115: astore_0
     116: iconst_0
     117: istore_1
     118: aload_0
     119: invokestatic  #392                // Method monkeyBusiness:(Ljava/util/Map;)J
     122: nop
     123: lreturn

  public static final long day11part2();
    Code:
       0: new           #361                // class java/io/File
       3: dup
       4: ldc_w         #363                // String input/11.txt
       7: invokespecial #364                // Method java/io/File."<init>":(Ljava/lang/String;)V
      10: aconst_null
      11: iconst_1
      12: aconst_null
      13: invokestatic  #370                // Method kotlin/io/FilesKt.readText$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
      16: invokestatic  #372                // Method parseMonkeys:(Ljava/lang/String;)Lkotlin/Pair;
      19: astore_0
      20: iconst_0
      21: istore_1
      22: aload_0
      23: invokevirtual #127                // Method kotlin/Pair.component1:()Ljava/lang/Object;
      26: checkcast     #168                // class java/util/Map
      29: astore_2
      30: aload_0
      31: invokevirtual #136                // Method kotlin/Pair.component2:()Ljava/lang/Object;
      34: checkcast     #168                // class java/util/Map
      37: astore_3
      38: new           #374                // class kotlin/ranges/IntRange
      41: dup
      42: iconst_1
      43: sipush        10000
      46: invokespecial #377                // Method kotlin/ranges/IntRange."<init>":(II)V
      49: checkcast     #30                 // class java/lang/Iterable
      52: astore        4
      54: iconst_0
      55: istore        5
      57: aload_2
      58: astore        6
      60: aload         4
      62: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      67: astore        7
      69: aload         7
      71: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      76: ifeq          383
      79: aload         7
      81: checkcast     #379                // class kotlin/collections/IntIterator
      84: invokevirtual #383                // Method kotlin/collections/IntIterator.nextInt:()I
      87: istore        8
      89: aload         6
      91: astore        9
      93: iconst_0
      94: istore        10
      96: aload         9
      98: aload_3
      99: aload_3
     100: invokeinterface #400,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
     105: checkcast     #30                 // class java/lang/Iterable
     108: astore        11
     110: astore        12
     112: astore        13
     114: iconst_0
     115: istore        14
     117: aload         11
     119: astore        15
     121: new           #32                 // class java/util/ArrayList
     124: dup
     125: aload         11
     127: bipush        10
     129: invokestatic  #38                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     132: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
     135: checkcast     #44                 // class java/util/Collection
     138: astore        16
     140: iconst_0
     141: istore        17
     143: aload         15
     145: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     150: astore        18
     152: aload         18
     154: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     159: ifeq          217
     162: aload         18
     164: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     169: astore        19
     171: aload         16
     173: aload         19
     175: checkcast     #121                // class kotlin/Pair
     178: astore        20
     180: astore        21
     182: iconst_0
     183: istore        22
     185: aload         20
     187: invokevirtual #170                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     190: checkcast     #110                // class kotlin/Triple
     193: invokevirtual #139                // Method kotlin/Triple.getFirst:()Ljava/lang/Object;
     196: checkcast     #129                // class java/lang/Number
     199: invokevirtual #133                // Method java/lang/Number.longValue:()J
     202: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     205: aload         21
     207: swap
     208: invokeinterface #72,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     213: pop
     214: goto          152
     217: aload         16
     219: checkcast     #74                 // class java/util/List
     222: nop
     223: astore        21
     225: aload         13
     227: aload         12
     229: aload         21
     231: checkcast     #30                 // class java/lang/Iterable
     234: astore        11
     236: astore        12
     238: astore        13
     240: iconst_0
     241: istore        14
     243: aload         11
     245: invokeinterface #48,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     250: astore        15
     252: aload         15
     254: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     259: ifne          273
     262: new           #344                // class java/lang/UnsupportedOperationException
     265: dup
     266: ldc_w         #346                // String Empty collection can\'t be reduced.
     269: invokespecial #349                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     272: athrow
     273: aload         15
     275: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     280: astore        16
     282: aload         15
     284: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     289: ifeq          333
     292: aload         16
     294: aload         15
     296: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     301: checkcast     #129                // class java/lang/Number
     304: invokevirtual #133                // Method java/lang/Number.longValue:()J
     307: lstore        23
     309: checkcast     #129                // class java/lang/Number
     312: invokevirtual #133                // Method java/lang/Number.longValue:()J
     315: lstore        25
     317: iconst_0
     318: istore        22
     320: lload         25
     322: lload         23
     324: lmul
     325: invokestatic  #98                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     328: astore        16
     330: goto          282
     333: aload         16
     335: astore        21
     337: aload         13
     339: aload         12
     341: aload         21
     343: checkcast     #129                // class java/lang/Number
     346: invokevirtual #133                // Method java/lang/Number.longValue:()J
     349: lstore        27
     351: astore        12
     353: astore        13
     355: iconst_0
     356: istore        16
     358: lload         27
     360: invokedynamic #405,  0            // InvokeDynamic #4:invoke:(J)Lkotlin/jvm/functions/Function1;
     365: astore        21
     367: aload         13
     369: aload         12
     371: aload         21
     373: nop
     374: invokestatic  #390                // Method executeRound:(Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map;
     377: nop
     378: astore        6
     380: goto          69
     383: aload         6
     385: nop
     386: nop
     387: astore_0
     388: iconst_0
     389: istore_1
     390: aload_0
     391: invokestatic  #392                // Method monkeyBusiness:(Ljava/util/Map;)J
     394: nop
     395: lreturn

  private static final long parseOp$lambda$8(long);
    Code:
       0: lload_0
       1: lload_0
       2: lmul
       3: lreturn

  private static final long parseOp$lambda$10$lambda$9(long, long);
    Code:
       0: lload_2
       1: lload_0
       2: ladd
       3: lreturn

  private static final long parseOp$lambda$12$lambda$11(long, long);
    Code:
       0: lload_2
       1: lload_0
       2: lmul
       3: lreturn

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

  private static final long day11part2$lambda$26$lambda$25$lambda$24$lambda$23(long, long);
    Code:
       0: lload_2
       1: lload_0
       2: lrem
       3: lstore        4
       5: lload         4
       7: lload_0
       8: lload         4
      10: lload_0
      11: lxor
      12: lload         4
      14: lload         4
      16: lneg
      17: lor
      18: land
      19: bipush        63
      21: lshr
      22: land
      23: ladd
      24: lreturn
}


package com.oocode

fun oasisReportFrom(input: String): OasisReport =
    OasisReport(input
        .split("\n")
        .map { line -> OasisHistory(line.split(" ").map { it.toInt() }) })

data class OasisReport(private val histories: List<OasisHistory>) {
    fun extrapolatedValuesSum(): Int {
        return histories.map { it.extrapolatedValue() }.sum()
    }
}

data class OasisHistory(private val history: List<Int>) {
    fun extrapolatedValue(): Int = extrapolated()
        .map { it.first() }
        .foldRight(0, { i, accumulator ->
            i - accumulator
        })

    private fun extrapolated(): List<OasisHistory> =
        listOf(this) +
                if (history.all { it == 0 }) {
                    emptyList()
                } else {
                    OasisHistory(nextHistoryRow(history)).extrapolated()
                }

    private fun first() = history[0]
}

fun nextHistoryRow(input: List<Int>) =
    input.mapIndexed { index, i ->
        i - input[Math.max(0, index - 1)]
    }.drop(1)

Compiled from "OasisReport.kt"
public final class com.oocode.OasisReportKt {
  public static final com.oocode.OasisReport oasisReportFrom(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #9                  // String input
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #17                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #19                 // class java/lang/String
      14: astore_1
      15: aload_1
      16: iconst_0
      17: ldc           #21                 // String \n
      19: aastore
      20: aload_1
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #27                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #29                 // class java/lang/Iterable
      32: astore_1
      33: nop
      34: iconst_0
      35: istore_2
      36: aload_1
      37: astore_3
      38: new           #31                 // class java/util/ArrayList
      41: dup
      42: aload_1
      43: bipush        10
      45: invokestatic  #37                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      48: invokespecial #41                 // Method java/util/ArrayList."<init>":(I)V
      51: checkcast     #43                 // class java/util/Collection
      54: astore        4
      56: iconst_0
      57: istore        5
      59: aload_3
      60: invokeinterface #47,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      65: astore        6
      67: aload         6
      69: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          253
      77: aload         6
      79: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      84: astore        7
      86: aload         4
      88: aload         7
      90: checkcast     #19                 // class java/lang/String
      93: astore        8
      95: astore        20
      97: iconst_0
      98: istore        9
     100: aload         8
     102: checkcast     #17                 // class java/lang/CharSequence
     105: iconst_1
     106: anewarray     #19                 // class java/lang/String
     109: astore        10
     111: aload         10
     113: iconst_0
     114: ldc           #59                 // String
     116: aastore
     117: aload         10
     119: iconst_0
     120: iconst_0
     121: bipush        6
     123: aconst_null
     124: invokestatic  #27                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     127: checkcast     #29                 // class java/lang/Iterable
     130: astore        10
     132: iconst_0
     133: istore        11
     135: aload         10
     137: astore        12
     139: new           #31                 // class java/util/ArrayList
     142: dup
     143: aload         10
     145: bipush        10
     147: invokestatic  #37                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     150: invokespecial #41                 // Method java/util/ArrayList."<init>":(I)V
     153: checkcast     #43                 // class java/util/Collection
     156: astore        13
     158: iconst_0
     159: istore        14
     161: aload         12
     163: invokeinterface #47,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     168: astore        15
     170: aload         15
     172: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     177: ifeq          224
     180: aload         15
     182: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     187: astore        16
     189: aload         13
     191: aload         16
     193: checkcast     #19                 // class java/lang/String
     196: astore        17
     198: astore        18
     200: iconst_0
     201: istore        19
     203: aload         17
     205: invokestatic  #65                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     208: nop
     209: invokestatic  #69                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     212: aload         18
     214: swap
     215: invokeinterface #73,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     220: pop
     221: goto          170
     224: aload         13
     226: checkcast     #75                 // class java/util/List
     229: nop
     230: astore        21
     232: new           #77                 // class com/oocode/OasisHistory
     235: dup
     236: aload         21
     238: invokespecial #80                 // Method com/oocode/OasisHistory."<init>":(Ljava/util/List;)V
     241: aload         20
     243: swap
     244: invokeinterface #73,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     249: pop
     250: goto          67
     253: aload         4
     255: checkcast     #75                 // class java/util/List
     258: nop
     259: astore        22
     261: new           #82                 // class com/oocode/OasisReport
     264: dup
     265: aload         22
     267: invokespecial #83                 // Method com/oocode/OasisReport."<init>":(Ljava/util/List;)V
     270: areturn

  public static final java.util.List<java.lang.Integer> nextHistoryRow(java.util.List<java.lang.Integer>);
    Code:
       0: aload_0
       1: ldc           #9                  // String input
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #29                 // class java/lang/Iterable
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: astore_3
      15: new           #31                 // class java/util/ArrayList
      18: dup
      19: aload_1
      20: bipush        10
      22: invokestatic  #37                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #41                 // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #43                 // class java/util/Collection
      31: astore        4
      33: iconst_0
      34: istore        5
      36: iconst_0
      37: istore        6
      39: aload_3
      40: invokeinterface #47,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        7
      47: aload         7
      49: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          140
      57: aload         7
      59: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: astore        8
      66: aload         4
      68: iload         6
      70: iinc          6, 1
      73: istore        9
      75: iload         9
      77: ifge          83
      80: invokestatic  #105                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      83: iload         9
      85: aload         8
      87: checkcast     #107                // class java/lang/Number
      90: invokevirtual #111                // Method java/lang/Number.intValue:()I
      93: istore        10
      95: istore        11
      97: astore        13
      99: iconst_0
     100: istore        12
     102: iload         10
     104: aload_0
     105: iconst_0
     106: iload         11
     108: iconst_1
     109: isub
     110: invokestatic  #117                // Method java/lang/Math.max:(II)I
     113: invokeinterface #121,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     118: checkcast     #107                // class java/lang/Number
     121: invokevirtual #111                // Method java/lang/Number.intValue:()I
     124: isub
     125: invokestatic  #69                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     128: aload         13
     130: swap
     131: invokeinterface #73,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     136: pop
     137: goto          47
     140: aload         4
     142: checkcast     #75                 // class java/util/List
     145: nop
     146: checkcast     #29                 // class java/lang/Iterable
     149: iconst_1
     150: invokestatic  #125                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
     153: areturn
}

Compiled from "OasisReport.kt"
public final class com.oocode.OasisReport {
  private final java.util.List<com.oocode.OasisHistory> histories;

  public com.oocode.OasisReport(java.util.List<com.oocode.OasisHistory>);
    Code:
       0: aload_1
       1: ldc           #10                 // String histories
       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 histories:Ljava/util/List;
      15: return

  public final int extrapolatedValuesSum();
    Code:
       0: aload_0
       1: getfield      #22                 // Field histories:Ljava/util/List;
       4: checkcast     #28                 // class java/lang/Iterable
       7: astore_1
       8: iconst_0
       9: istore_2
      10: aload_1
      11: astore_3
      12: new           #30                 // class java/util/ArrayList
      15: dup
      16: aload_1
      17: bipush        10
      19: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      22: invokespecial #39                 // Method java/util/ArrayList."<init>":(I)V
      25: checkcast     #41                 // class java/util/Collection
      28: astore        4
      30: iconst_0
      31: istore        5
      33: aload_3
      34: invokeinterface #45,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      39: astore        6
      41: aload         6
      43: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      48: ifeq          94
      51: aload         6
      53: invokeinterface #55,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      58: astore        7
      60: aload         4
      62: aload         7
      64: checkcast     #57                 // class com/oocode/OasisHistory
      67: astore        8
      69: astore        10
      71: iconst_0
      72: istore        9
      74: aload         8
      76: invokevirtual #60                 // Method com/oocode/OasisHistory.extrapolatedValue:()I
      79: invokestatic  #66                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      82: aload         10
      84: swap
      85: invokeinterface #70,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      90: pop
      91: goto          41
      94: aload         4
      96: checkcast     #72                 // class java/util/List
      99: nop
     100: checkcast     #28                 // class java/lang/Iterable
     103: invokestatic  #76                 // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     106: ireturn

  private final java.util.List<com.oocode.OasisHistory> component1();
    Code:
       0: aload_0
       1: getfield      #22                 // Field histories:Ljava/util/List;
       4: areturn

  public final com.oocode.OasisReport copy(java.util.List<com.oocode.OasisHistory>);
    Code:
       0: aload_1
       1: ldc           #10                 // String histories
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class com/oocode/OasisReport
       9: dup
      10: aload_1
      11: invokespecial #97                 // Method "<init>":(Ljava/util/List;)V
      14: areturn

  public static com.oocode.OasisReport copy$default(com.oocode.OasisReport, java.util.List, int, java.lang.Object);
    Code:
       0: iload_2
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #22                 // Field histories:Ljava/util/List;
      10: astore_1
      11: aload_0
      12: aload_1
      13: invokevirtual #101                // Method copy:(Ljava/util/List;)Lcom/oocode/OasisReport;
      16: areturn

  public java.lang.String toString();
    Code:
       0: new           #105                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #106                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #108                // String OasisReport(histories=
       9: invokevirtual #112                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #22                 // Field histories:Ljava/util/List;
      16: invokevirtual #115                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: bipush        41
      21: invokevirtual #118                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      24: invokevirtual #120                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      27: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #22                 // Field histories:Ljava/util/List;
       4: invokevirtual #123                // Method java/lang/Object.hashCode:()I
       7: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class com/oocode/OasisReport
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class com/oocode/OasisReport
      20: astore_2
      21: aload_0
      22: getfield      #22                 // Field histories:Ljava/util/List;
      25: aload_2
      26: getfield      #22                 // Field histories:Ljava/util/List;
      29: invokestatic  #129                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: iconst_1
      38: ireturn
}