fun main() = Robots.solve()

private object Robots {
    const val MAX_TURNS = 32

    fun solve() {
        val blueprints = readInput().take(3)
//        println("1st: ${maxGeodes(blueprints.first())}")
        val score = blueprints.map { maxGeodes(it) }.reduce { x, y -> x * y }
        println("Total score: ${score}")
    }

    private fun readInput(): List<Blueprint> = generateSequence(::readLine).map { line ->
        val match = "Blueprint (\\d+):(.+)".toRegex().matchEntire(line)!!
        val id = match.groupValues[1].toInt(10)
        val recipes = buildMap<Resource, Recipe> {
            match.groupValues[2].split(".").filterNot { it.isEmpty() }.forEach { recipe ->
                val match = "\\s*Each (\\w+) robot costs (.+)".toRegex().matchEntire(recipe)
                    ?: throw Error("Recipe match failed")
                val resource = parseResource(match.groupValues[1])
                val ingredients = parseIngredients(match.groupValues[2])
                put(resource, Recipe(resource, ingredients))
            }
        }
        Blueprint(id, recipes)
    }.toList()

    private fun parseIngredients(string: String): Map<Resource, Int> {
        return buildMap {
            string.split(" and ".toRegex()).forEach {
                val values = "(\\d+) (\\w+)".toRegex().matchEntire(it)!!.groupValues
                put(parseResource(values[2]), values[1].toInt(10))
            }
        }
    }

    private fun maxGeodes(blueprint: Blueprint): Int {
        println("Max for ${blueprint}...")
        val maxCost = buildMap {
            Resource.values().forEach { resource ->
                put(resource, blueprint.recipes.maxOf { it.value.cost.getOrDefault(resource, 0) })
            }
        }.plus(Pair(Resource.Geode, Int.MAX_VALUE))
        println("Max costs $maxCost")
        fun isGoodStep(step: Step, resource: Resource): Boolean {
//            println("$resource, $maxCost")
            if (resource === Resource.Geode) {
                return true
            }
            if (step.robots.getOrDefault(resource, 0) > maxCost[resource]!!) {
                return false
            }
            return true
        }

        fun normalizeNextStep(nextStep: Step): Step {
            val resources = nextStep.resources.mapValues { it -> minOf(it.value, maxCost[it.key]!! * 3) }
            return Step(resources, nextStep.robots, nextStep.time)
        }

        fun nextSteps(step: Step): List<Step> {
            val result = mutableListOf<Step>()
            for (resource in Resource.values()) {
                val cost = blueprint.recipes[resource]!!.cost
                if (step.hasEnough(cost) && isGoodStep(step, resource)) {
                    val nextStep = normalizeNextStep(step.nextStepWithBuild(resource, cost))
                    if (resource == Resource.Geode) {
                        return listOf(nextStep)
                    } else {
                        result.add(nextStep)
                    }
                }
            }
            if (result.size < Resource.values().size) {
                result.add(step.nextStepWithIdle())
            }
            return result
        }

        val stack = mutableListOf<Step>(
            Step(mapOf(), mapOf(Pair(Resource.Ore, 1)), 1)
        )
        val seenStates = mutableSetOf<String>()
        val maxGeodesAtStep = mutableMapOf<Int, Int>()

        var maxGeodes = 0
        var i = 0
        while (stack.isNotEmpty()) {
            val step = stack.removeLast()
            if (step.fingerprint() in seenStates) {
                continue
            }
            i += 1
            seenStates.add(step.fingerprint())
            if (i % 1_000_000 == 0) {
                println("step ${i / 1_000_000}M, depth=${step.time}, max=$maxGeodes, stack size=${stack.size}")
            }

            val oldMax = maxGeodes
            val geodes = step.resources.getOrDefault(Resource.Geode, 0)
            maxGeodes = maxOf(maxGeodes, geodes)
            maxGeodesAtStep[step.time] = maxOf(geodes, maxGeodesAtStep.getOrDefault(step.time, 0))

            if (maxGeodes > oldMax && step.time == MAX_TURNS + 1) {
                println("New best found $i ${step.robots} -> $maxGeodes")
            }

            val remainingTime = 1 + MAX_TURNS - step.time
            if (remainingTime <= 0) {
                continue
            }

            val maxPossibleGeodes =
                geodes + step.robots.getOrDefault(Resource.Geode, 0) * remainingTime + (1..remainingTime).sum()
            if (maxPossibleGeodes <= maxGeodes) {
                continue
            }

            if (maxGeodesAtStep[step.time]!! > geodes + 2) {
                continue
            }
//            if (geodes + 2 < maxGeodes) {
//                continue
//            }
            stack.addAll(nextSteps(step))
        }
        println("$maxGeodesAtStep")
        println("max= ${maxGeodes}")
        return maxGeodes
    }

    private data class Blueprint(val id: Int, val recipes: Map<Resource, Recipe>)

    private data class Recipe(val robotType: Resource, val cost: Map<Resource, Int>)

    private enum class Resource {
        Ore, Clay, Obsidian, Geode,
    }

    private fun parseResource(string: String): Resource = when (string) {
        "ore" -> Resource.Ore
        "clay" -> Resource.Clay
        "obsidian" -> Resource.Obsidian
        "geode" -> Resource.Geode
        else -> throw Error("Failed to parse resource: $string")
    }

    private data class Step(val resources: Map<Resource, Int>, val robots: Map<Resource, Int>, val time: Int) {
        fun nextStepWithIdle(): Step = Step(
            nextResources(),
            robots,
            time + 1
        )

        fun nextStepWithBuild(robotType: Resource, cost: Map<Resource, Int>): Step {
            val resources = nextResources().mapValues {
                it.value - cost.getOrDefault(it.key, 0)
            }
            val nextRobots = robots.toMutableMap()
            nextRobots[robotType] = robots.getOrDefault(robotType, 0) + 1
            return Step(resources, nextRobots, time + 1)
        }

        fun hasEnough(cost: Map<Resource, Int>): Boolean =
            cost.entries.all {
                resources.getOrDefault(it.key, 0) >= it.value
            }

        private fun nextResources(): Map<Resource, Int> = buildMap {
            Resource.values().forEach {
                put(it, resources.getOrDefault(it, 0) + robots.getOrDefault(it, 0))
            }
        }

        fun fingerprint(): String = "$time.${
            Resource.values().map { robots.getOrDefault(it, 0) }.joinToString("_")
        }.${
            Resource.values().map { resources.getOrDefault(it, 0) }.joinToString("_")
        }"
    }
}

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

  public static final int MAX_TURNS;

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

  public final void solve();
    Code:
       0: aload_0
       1: invokespecial #15                 // Method readInput:()Ljava/util/List;
       4: checkcast     #17                 // class java/lang/Iterable
       7: iconst_3
       8: invokestatic  #23                 // Method kotlin/collections/CollectionsKt.take:(Ljava/lang/Iterable;I)Ljava/util/List;
      11: astore_1
      12: aload_1
      13: checkcast     #17                 // class java/lang/Iterable
      16: astore_3
      17: iconst_0
      18: istore        4
      20: aload_3
      21: astore        5
      23: new           #25                 // class java/util/ArrayList
      26: dup
      27: aload_3
      28: bipush        10
      30: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      33: invokespecial #32                 // Method java/util/ArrayList."<init>":(I)V
      36: checkcast     #34                 // class java/util/Collection
      39: astore        6
      41: iconst_0
      42: istore        7
      44: aload         5
      46: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      51: astore        8
      53: aload         8
      55: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      60: ifeq          109
      63: aload         8
      65: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      70: astore        9
      72: aload         6
      74: aload         9
      76: checkcast     #50                 // class Robots$Blueprint
      79: astore        10
      81: astore        12
      83: iconst_0
      84: istore        11
      86: getstatic     #53                 // Field INSTANCE:LRobots;
      89: aload         10
      91: invokespecial #57                 // Method maxGeodes:(LRobots$Blueprint;)I
      94: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      97: aload         12
      99: swap
     100: invokeinterface #67,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     105: pop
     106: goto          53
     109: aload         6
     111: checkcast     #69                 // class java/util/List
     114: nop
     115: checkcast     #17                 // class java/lang/Iterable
     118: astore_3
     119: nop
     120: iconst_0
     121: istore        4
     123: aload_3
     124: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     129: astore        5
     131: aload         5
     133: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     138: ifne          151
     141: new           #71                 // class java/lang/UnsupportedOperationException
     144: dup
     145: ldc           #73                 // String Empty collection can\'t be reduced.
     147: invokespecial #76                 // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     150: athrow
     151: aload         5
     153: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     158: astore        6
     160: aload         5
     162: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     167: ifeq          211
     170: aload         6
     172: aload         5
     174: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     179: checkcast     #78                 // class java/lang/Number
     182: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     185: istore        7
     187: checkcast     #78                 // class java/lang/Number
     190: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     193: istore        8
     195: iconst_0
     196: istore        9
     198: iload         8
     200: iload         7
     202: imul
     203: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     206: astore        6
     208: goto          160
     211: aload         6
     213: checkcast     #78                 // class java/lang/Number
     216: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     219: istore_2
     220: new           #84                 // class java/lang/StringBuilder
     223: dup
     224: invokespecial #85                 // Method java/lang/StringBuilder."<init>":()V
     227: ldc           #87                 // String Total score:
     229: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     232: iload_2
     233: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     236: invokevirtual #98                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     239: getstatic     #104                // Field java/lang/System.out:Ljava/io/PrintStream;
     242: swap
     243: invokevirtual #110                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     246: return

  private final java.util.List<Robots$Blueprint> readInput();
    Code:
       0: getstatic     #140                // Field Robots$readInput$1.INSTANCE:LRobots$readInput$1;
       3: checkcast     #142                // class kotlin/jvm/functions/Function0
       6: invokestatic  #148                // Method kotlin/sequences/SequencesKt.generateSequence:(Lkotlin/jvm/functions/Function0;)Lkotlin/sequences/Sequence;
       9: invokedynamic #167,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      14: invokestatic  #171                // Method kotlin/sequences/SequencesKt.map:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      17: invokestatic  #175                // Method kotlin/sequences/SequencesKt.toList:(Lkotlin/sequences/Sequence;)Ljava/util/List;
      20: areturn

  private final java.util.Map<Robots$Resource, java.lang.Integer> parseIngredients(java.lang.String);
    Code:
       0: invokestatic  #184                // Method kotlin/collections/MapsKt.createMapBuilder:()Ljava/util/Map;
       3: astore_2
       4: aload_2
       5: astore_3
       6: iconst_0
       7: istore        4
       9: aload_1
      10: checkcast     #186                // class java/lang/CharSequence
      13: astore        5
      15: new           #188                // class kotlin/text/Regex
      18: dup
      19: ldc           #190                // String  and
      21: invokespecial #191                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
      24: astore        6
      26: iconst_0
      27: istore        7
      29: aload         6
      31: aload         5
      33: iload         7
      35: invokevirtual #195                // Method kotlin/text/Regex.split:(Ljava/lang/CharSequence;I)Ljava/util/List;
      38: checkcast     #17                 // class java/lang/Iterable
      41: astore        5
      43: nop
      44: iconst_0
      45: istore        6
      47: aload         5
      49: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      54: astore        7
      56: aload         7
      58: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      63: ifeq          164
      66: aload         7
      68: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      73: astore        8
      75: aload         8
      77: checkcast     #197                // class java/lang/String
      80: astore        9
      82: iconst_0
      83: istore        10
      85: new           #188                // class kotlin/text/Regex
      88: dup
      89: ldc           #199                // String (\\d+) (\\w+)
      91: invokespecial #191                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
      94: aload         9
      96: checkcast     #186                // class java/lang/CharSequence
      99: invokevirtual #203                // Method kotlin/text/Regex.matchEntire:(Ljava/lang/CharSequence;)Lkotlin/text/MatchResult;
     102: dup
     103: invokestatic  #208                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     106: invokeinterface #213,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     111: astore        11
     113: aload_3
     114: getstatic     #53                 // Field INSTANCE:LRobots;
     117: aload         11
     119: iconst_2
     120: invokeinterface #217,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     125: checkcast     #197                // class java/lang/String
     128: invokespecial #221                // Method parseResource:(Ljava/lang/String;)LRobots$Resource;
     131: aload         11
     133: iconst_1
     134: invokeinterface #217,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     139: checkcast     #197                // class java/lang/String
     142: bipush        10
     144: invokestatic  #227                // Method kotlin/text/CharsKt.checkRadix:(I)I
     147: invokestatic  #231                // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
     150: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     153: invokeinterface #237,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     158: pop
     159: nop
     160: nop
     161: goto          56
     164: nop
     165: nop
     166: aload_2
     167: invokestatic  #241                // Method kotlin/collections/MapsKt.build:(Ljava/util/Map;)Ljava/util/Map;
     170: areturn

  private final int maxGeodes(Robots$Blueprint);
    Code:
       0: new           #84                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #85                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #253                // String Max for
       9: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_1
      13: invokevirtual #256                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      16: ldc_w         #258                // String ...
      19: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      22: invokevirtual #98                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      25: getstatic     #104                // Field java/lang/System.out:Ljava/io/PrintStream;
      28: swap
      29: invokevirtual #110                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      32: invokestatic  #184                // Method kotlin/collections/MapsKt.createMapBuilder:()Ljava/util/Map;
      35: astore_3
      36: aload_3
      37: astore        4
      39: iconst_0
      40: istore        5
      42: invokestatic  #263                // Method Robots$Resource.values:()[LRobots$Resource;
      45: astore        6
      47: iconst_0
      48: istore        7
      50: iconst_0
      51: istore        8
      53: aload         6
      55: arraylength
      56: istore        9
      58: iload         8
      60: iload         9
      62: if_icmpge     287
      65: aload         6
      67: iload         8
      69: aaload
      70: astore        10
      72: aload         10
      74: astore        11
      76: iconst_0
      77: istore        12
      79: aload         4
      81: aload         11
      83: aload_1
      84: invokevirtual #266                // Method Robots$Blueprint.getRecipes:()Ljava/util/Map;
      87: astore        13
      89: astore        14
      91: astore        15
      93: aload         13
      95: invokeinterface #270,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
     100: checkcast     #17                 // class java/lang/Iterable
     103: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     108: astore        16
     110: aload         16
     112: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     117: ifne          128
     120: new           #272                // class java/util/NoSuchElementException
     123: dup
     124: invokespecial #273                // Method java/util/NoSuchElementException."<init>":()V
     127: athrow
     128: aload         16
     130: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     135: checkcast     #275                // class java/util/Map$Entry
     138: astore        17
     140: iconst_0
     141: istore        18
     143: aload         17
     145: invokeinterface #278,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     150: checkcast     #280                // class Robots$Recipe
     153: invokevirtual #283                // Method Robots$Recipe.getCost:()Ljava/util/Map;
     156: aload         11
     158: iconst_0
     159: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     162: invokeinterface #286,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     167: checkcast     #78                 // class java/lang/Number
     170: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     173: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     176: checkcast     #288                // class java/lang/Comparable
     179: astore        17
     181: aload         16
     183: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     188: ifeq          263
     191: aload         16
     193: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     198: checkcast     #275                // class java/util/Map$Entry
     201: astore        18
     203: iconst_0
     204: istore        19
     206: aload         18
     208: invokeinterface #278,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     213: checkcast     #280                // class Robots$Recipe
     216: invokevirtual #283                // Method Robots$Recipe.getCost:()Ljava/util/Map;
     219: aload         11
     221: iconst_0
     222: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     225: invokeinterface #286,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     230: checkcast     #78                 // class java/lang/Number
     233: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     236: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     239: checkcast     #288                // class java/lang/Comparable
     242: astore        18
     244: aload         17
     246: aload         18
     248: invokeinterface #292,  2          // InterfaceMethod java/lang/Comparable.compareTo:(Ljava/lang/Object;)I
     253: ifge          181
     256: aload         18
     258: astore        17
     260: goto          181
     263: aload         17
     265: astore        20
     267: aload         15
     269: aload         14
     271: aload         20
     273: invokeinterface #237,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     278: pop
     279: nop
     280: nop
     281: iinc          8, 1
     284: goto          58
     287: nop
     288: nop
     289: aload_3
     290: invokestatic  #241                // Method kotlin/collections/MapsKt.build:(Ljava/util/Map;)Ljava/util/Map;
     293: new           #294                // class kotlin/Pair
     296: dup
     297: getstatic     #298                // Field Robots$Resource.Geode:LRobots$Resource;
     300: ldc_w         #299                // int 2147483647
     303: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     306: invokespecial #302                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     309: invokestatic  #306                // Method kotlin/collections/MapsKt.plus:(Ljava/util/Map;Lkotlin/Pair;)Ljava/util/Map;
     312: astore_2
     313: new           #84                 // class java/lang/StringBuilder
     316: dup
     317: invokespecial #85                 // Method java/lang/StringBuilder."<init>":()V
     320: ldc_w         #308                // String Max costs
     323: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     326: aload_2
     327: invokevirtual #256                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     330: invokevirtual #98                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     333: getstatic     #104                // Field java/lang/System.out:Ljava/io/PrintStream;
     336: swap
     337: invokevirtual #110                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     340: iconst_1
     341: anewarray     #310                // class Robots$Step
     344: astore        4
     346: aload         4
     348: iconst_0
     349: new           #310                // class Robots$Step
     352: dup
     353: invokestatic  #313                // Method kotlin/collections/MapsKt.emptyMap:()Ljava/util/Map;
     356: new           #294                // class kotlin/Pair
     359: dup
     360: getstatic     #316                // Field Robots$Resource.Ore:LRobots$Resource;
     363: iconst_1
     364: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     367: invokespecial #302                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     370: invokestatic  #320                // Method kotlin/collections/MapsKt.mapOf:(Lkotlin/Pair;)Ljava/util/Map;
     373: iconst_1
     374: invokespecial #323                // Method Robots$Step."<init>":(Ljava/util/Map;Ljava/util/Map;I)V
     377: aastore
     378: aload         4
     380: invokestatic  #327                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     383: astore_3
     384: new           #329                // class java/util/LinkedHashSet
     387: dup
     388: invokespecial #330                // Method java/util/LinkedHashSet."<init>":()V
     391: checkcast     #332                // class java/util/Set
     394: astore        4
     396: new           #334                // class java/util/LinkedHashMap
     399: dup
     400: invokespecial #335                // Method java/util/LinkedHashMap."<init>":()V
     403: checkcast     #233                // class java/util/Map
     406: astore        5
     408: iconst_0
     409: istore        6
     411: iconst_0
     412: istore        7
     414: aload_3
     415: checkcast     #34                 // class java/util/Collection
     418: invokeinterface #338,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     423: ifne          430
     426: iconst_1
     427: goto          431
     430: iconst_0
     431: ifeq          855
     434: aload_3
     435: invokeinterface #341,  1          // InterfaceMethod java/util/List.removeLast:()Ljava/lang/Object;
     440: dup
     441: ldc_w         #343                // String removeLast(...)
     444: invokestatic  #347                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     447: checkcast     #310                // class Robots$Step
     450: astore        8
     452: aload         4
     454: aload         8
     456: invokevirtual #350                // Method Robots$Step.fingerprint:()Ljava/lang/String;
     459: invokeinterface #353,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     464: ifeq          470
     467: goto          414
     470: iinc          7, 1
     473: aload         4
     475: aload         8
     477: invokevirtual #350                // Method Robots$Step.fingerprint:()Ljava/lang/String;
     480: invokeinterface #354,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     485: pop
     486: iload         7
     488: ldc_w         #355                // int 1000000
     491: irem
     492: ifne          567
     495: new           #84                 // class java/lang/StringBuilder
     498: dup
     499: invokespecial #85                 // Method java/lang/StringBuilder."<init>":()V
     502: ldc_w         #357                // String step
     505: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     508: iload         7
     510: ldc_w         #355                // int 1000000
     513: idiv
     514: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     517: ldc_w         #359                // String M, depth=
     520: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     523: aload         8
     525: invokevirtual #362                // Method Robots$Step.getTime:()I
     528: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     531: ldc_w         #364                // String , max=
     534: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     537: iload         6
     539: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     542: ldc_w         #366                // String , stack size=
     545: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     548: aload_3
     549: invokeinterface #369,  1          // InterfaceMethod java/util/List.size:()I
     554: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     557: invokevirtual #98                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     560: getstatic     #104                // Field java/lang/System.out:Ljava/io/PrintStream;
     563: swap
     564: invokevirtual #110                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     567: iload         6
     569: istore        9
     571: aload         8
     573: invokevirtual #372                // Method Robots$Step.getResources:()Ljava/util/Map;
     576: getstatic     #298                // Field Robots$Resource.Geode:LRobots$Resource;
     579: iconst_0
     580: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     583: invokeinterface #286,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     588: checkcast     #78                 // class java/lang/Number
     591: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     594: istore        10
     596: iload         6
     598: iload         10
     600: invokestatic  #378                // Method java/lang/Math.max:(II)I
     603: istore        6
     605: nop
     606: aload         5
     608: aload         8
     610: invokevirtual #362                // Method Robots$Step.getTime:()I
     613: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     616: iload         10
     618: aload         5
     620: aload         8
     622: invokevirtual #362                // Method Robots$Step.getTime:()I
     625: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     628: iconst_0
     629: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     632: invokeinterface #286,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     637: checkcast     #78                 // class java/lang/Number
     640: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     643: invokestatic  #378                // Method java/lang/Math.max:(II)I
     646: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     649: invokeinterface #237,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     654: pop
     655: iload         6
     657: iload         9
     659: if_icmple     724
     662: aload         8
     664: invokevirtual #362                // Method Robots$Step.getTime:()I
     667: bipush        33
     669: if_icmpne     724
     672: new           #84                 // class java/lang/StringBuilder
     675: dup
     676: invokespecial #85                 // Method java/lang/StringBuilder."<init>":()V
     679: ldc_w         #380                // String New best found
     682: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     685: iload         7
     687: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     690: bipush        32
     692: invokevirtual #383                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     695: aload         8
     697: invokevirtual #386                // Method Robots$Step.getRobots:()Ljava/util/Map;
     700: invokevirtual #256                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     703: ldc_w         #388                // String  ->
     706: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     709: iload         6
     711: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     714: invokevirtual #98                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     717: getstatic     #104                // Field java/lang/System.out:Ljava/io/PrintStream;
     720: swap
     721: invokevirtual #110                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     724: bipush        33
     726: aload         8
     728: invokevirtual #362                // Method Robots$Step.getTime:()I
     731: isub
     732: istore        11
     734: iload         11
     736: ifgt          742
     739: goto          414
     742: iload         10
     744: aload         8
     746: invokevirtual #386                // Method Robots$Step.getRobots:()Ljava/util/Map;
     749: getstatic     #298                // Field Robots$Resource.Geode:LRobots$Resource;
     752: iconst_0
     753: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     756: invokeinterface #286,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     761: checkcast     #78                 // class java/lang/Number
     764: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     767: iload         11
     769: imul
     770: iadd
     771: new           #390                // class kotlin/ranges/IntRange
     774: dup
     775: iconst_1
     776: iload         11
     778: invokespecial #393                // Method kotlin/ranges/IntRange."<init>":(II)V
     781: checkcast     #17                 // class java/lang/Iterable
     784: invokestatic  #397                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     787: iadd
     788: istore        12
     790: iload         12
     792: iload         6
     794: if_icmpgt     800
     797: goto          414
     800: aload         5
     802: aload         8
     804: invokevirtual #362                // Method Robots$Step.getTime:()I
     807: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     810: invokeinterface #399,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     815: dup
     816: invokestatic  #208                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     819: checkcast     #78                 // class java/lang/Number
     822: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     825: iload         10
     827: iconst_2
     828: iadd
     829: if_icmple     835
     832: goto          414
     835: aload_3
     836: aload_1
     837: aload_2
     838: aload         8
     840: invokestatic  #403                // Method maxGeodes$nextSteps:(LRobots$Blueprint;Ljava/util/Map;LRobots$Step;)Ljava/util/List;
     843: checkcast     #34                 // class java/util/Collection
     846: invokeinterface #407,  2          // InterfaceMethod java/util/List.addAll:(Ljava/util/Collection;)Z
     851: pop
     852: goto          414
     855: aload         5
     857: invokestatic  #410                // Method java/lang/String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
     860: getstatic     #104                // Field java/lang/System.out:Ljava/io/PrintStream;
     863: swap
     864: invokevirtual #110                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     867: new           #84                 // class java/lang/StringBuilder
     870: dup
     871: invokespecial #85                 // Method java/lang/StringBuilder."<init>":()V
     874: ldc_w         #412                // String max=
     877: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     880: iload         6
     882: invokevirtual #94                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     885: invokevirtual #98                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     888: getstatic     #104                // Field java/lang/System.out:Ljava/io/PrintStream;
     891: swap
     892: invokevirtual #110                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     895: iload         6
     897: ireturn

  private final Robots$Resource parseResource(java.lang.String);
    Code:
       0: aload_1
       1: astore_2
       2: aload_2
       3: invokevirtual #437                // Method java/lang/String.hashCode:()I
       6: lookupswitch  { // 4
                110306: 61
               3056225: 87
              98241426: 74
             351871579: 48
               default: 124
          }
      48: aload_2
      49: ldc_w         #439                // String obsidian
      52: invokevirtual #442                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
      55: ifne          112
      58: goto          124
      61: aload_2
      62: ldc_w         #444                // String ore
      65: invokevirtual #442                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
      68: ifne          100
      71: goto          124
      74: aload_2
      75: ldc_w         #446                // String geode
      78: invokevirtual #442                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
      81: ifne          118
      84: goto          124
      87: aload_2
      88: ldc_w         #448                // String clay
      91: invokevirtual #442                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
      94: ifne          106
      97: goto          124
     100: getstatic     #316                // Field Robots$Resource.Ore:LRobots$Resource;
     103: goto          152
     106: getstatic     #451                // Field Robots$Resource.Clay:LRobots$Resource;
     109: goto          152
     112: getstatic     #454                // Field Robots$Resource.Obsidian:LRobots$Resource;
     115: goto          152
     118: getstatic     #298                // Field Robots$Resource.Geode:LRobots$Resource;
     121: goto          152
     124: new           #456                // class java/lang/Error
     127: dup
     128: new           #84                 // class java/lang/StringBuilder
     131: dup
     132: invokespecial #85                 // Method java/lang/StringBuilder."<init>":()V
     135: ldc_w         #458                // String Failed to parse resource:
     138: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     141: aload_1
     142: invokevirtual #91                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     145: invokevirtual #98                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     148: invokespecial #459                // Method java/lang/Error."<init>":(Ljava/lang/String;)V
     151: athrow
     152: areturn

  private static final Robots$Blueprint readInput$lambda$5(java.lang.String);
    Code:
       0: aload_0
       1: ldc_w         #461                // String line
       4: invokestatic  #464                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: new           #188                // class kotlin/text/Regex
      10: dup
      11: ldc_w         #466                // String Blueprint (\\d+):(.+)
      14: invokespecial #191                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
      17: aload_0
      18: checkcast     #186                // class java/lang/CharSequence
      21: invokevirtual #203                // Method kotlin/text/Regex.matchEntire:(Ljava/lang/CharSequence;)Lkotlin/text/MatchResult;
      24: dup
      25: invokestatic  #208                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      28: astore_1
      29: aload_1
      30: invokeinterface #213,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
      35: iconst_1
      36: invokeinterface #217,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      41: checkcast     #197                // class java/lang/String
      44: bipush        10
      46: invokestatic  #227                // Method kotlin/text/CharsKt.checkRadix:(I)I
      49: invokestatic  #231                // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
      52: istore_2
      53: invokestatic  #184                // Method kotlin/collections/MapsKt.createMapBuilder:()Ljava/util/Map;
      56: astore        4
      58: aload         4
      60: astore        5
      62: iconst_0
      63: istore        6
      65: aload_1
      66: invokeinterface #213,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
      71: iconst_2
      72: invokeinterface #217,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      77: checkcast     #186                // class java/lang/CharSequence
      80: iconst_1
      81: anewarray     #197                // class java/lang/String
      84: astore        7
      86: aload         7
      88: iconst_0
      89: ldc_w         #468                // String .
      92: aastore
      93: aload         7
      95: iconst_0
      96: iconst_0
      97: bipush        6
      99: aconst_null
     100: invokestatic  #474                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     103: checkcast     #17                 // class java/lang/Iterable
     106: astore        7
     108: iconst_0
     109: istore        8
     111: aload         7
     113: astore        9
     115: new           #25                 // class java/util/ArrayList
     118: dup
     119: invokespecial #475                // Method java/util/ArrayList."<init>":()V
     122: checkcast     #34                 // class java/util/Collection
     125: astore        10
     127: iconst_0
     128: istore        11
     130: aload         9
     132: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     137: astore        12
     139: aload         12
     141: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     146: ifeq          203
     149: aload         12
     151: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     156: astore        13
     158: aload         13
     160: checkcast     #197                // class java/lang/String
     163: astore        14
     165: iconst_0
     166: istore        15
     168: aload         14
     170: checkcast     #186                // class java/lang/CharSequence
     173: invokeinterface #478,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     178: ifne          185
     181: iconst_1
     182: goto          186
     185: iconst_0
     186: nop
     187: ifne          139
     190: aload         10
     192: aload         13
     194: invokeinterface #67,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     199: pop
     200: goto          139
     203: aload         10
     205: checkcast     #69                 // class java/util/List
     208: nop
     209: checkcast     #17                 // class java/lang/Iterable
     212: astore        7
     214: nop
     215: iconst_0
     216: istore        8
     218: aload         7
     220: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     225: astore        9
     227: aload         9
     229: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     234: ifeq          366
     237: aload         9
     239: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     244: astore        10
     246: aload         10
     248: checkcast     #197                // class java/lang/String
     251: astore        11
     253: iconst_0
     254: istore        12
     256: new           #188                // class kotlin/text/Regex
     259: dup
     260: ldc_w         #480                // String \\s*Each (\\w+) robot costs (.+)
     263: invokespecial #191                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     266: aload         11
     268: checkcast     #186                // class java/lang/CharSequence
     271: invokevirtual #203                // Method kotlin/text/Regex.matchEntire:(Ljava/lang/CharSequence;)Lkotlin/text/MatchResult;
     274: dup
     275: ifnonnull     290
     278: pop
     279: new           #456                // class java/lang/Error
     282: dup
     283: ldc_w         #482                // String Recipe match failed
     286: invokespecial #459                // Method java/lang/Error."<init>":(Ljava/lang/String;)V
     289: athrow
     290: astore        13
     292: getstatic     #53                 // Field INSTANCE:LRobots;
     295: aload         13
     297: invokeinterface #213,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     302: iconst_1
     303: invokeinterface #217,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     308: checkcast     #197                // class java/lang/String
     311: invokespecial #221                // Method parseResource:(Ljava/lang/String;)LRobots$Resource;
     314: astore        14
     316: getstatic     #53                 // Field INSTANCE:LRobots;
     319: aload         13
     321: invokeinterface #213,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     326: iconst_2
     327: invokeinterface #217,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     332: checkcast     #197                // class java/lang/String
     335: invokespecial #484                // Method parseIngredients:(Ljava/lang/String;)Ljava/util/Map;
     338: astore        15
     340: aload         5
     342: aload         14
     344: new           #280                // class Robots$Recipe
     347: dup
     348: aload         14
     350: aload         15
     352: invokespecial #487                // Method Robots$Recipe."<init>":(LRobots$Resource;Ljava/util/Map;)V
     355: invokeinterface #237,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     360: pop
     361: nop
     362: nop
     363: goto          227
     366: nop
     367: nop
     368: aload         4
     370: invokestatic  #241                // Method kotlin/collections/MapsKt.build:(Ljava/util/Map;)Ljava/util/Map;
     373: astore_3
     374: new           #50                 // class Robots$Blueprint
     377: dup
     378: iload_2
     379: aload_3
     380: invokespecial #490                // Method Robots$Blueprint."<init>":(ILjava/util/Map;)V
     383: areturn

  private static final boolean maxGeodes$isGoodStep(java.util.Map<Robots$Resource, java.lang.Integer>, Robots$Step, Robots$Resource);
    Code:
       0: aload_2
       1: getstatic     #298                // Field Robots$Resource.Geode:LRobots$Resource;
       4: if_acmpne     9
       7: iconst_1
       8: ireturn
       9: aload_1
      10: invokevirtual #386                // Method Robots$Step.getRobots:()Ljava/util/Map;
      13: aload_2
      14: iconst_0
      15: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      18: invokeinterface #286,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      23: checkcast     #78                 // class java/lang/Number
      26: invokevirtual #82                 // Method java/lang/Number.intValue:()I
      29: aload_0
      30: aload_2
      31: invokeinterface #399,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      36: dup
      37: invokestatic  #208                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      40: checkcast     #78                 // class java/lang/Number
      43: invokevirtual #82                 // Method java/lang/Number.intValue:()I
      46: if_icmple     51
      49: iconst_0
      50: ireturn
      51: iconst_1
      52: ireturn

  private static final Robots$Step maxGeodes$normalizeNextStep(java.util.Map<Robots$Resource, java.lang.Integer>, Robots$Step);
    Code:
       0: aload_1
       1: invokevirtual #372                // Method Robots$Step.getResources:()Ljava/util/Map;
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: astore        5
      11: new           #334                // class java/util/LinkedHashMap
      14: dup
      15: aload_3
      16: invokeinterface #512,  1          // InterfaceMethod java/util/Map.size:()I
      21: invokestatic  #515                // Method kotlin/collections/MapsKt.mapCapacity:(I)I
      24: invokespecial #516                // Method java/util/LinkedHashMap."<init>":(I)V
      27: checkcast     #233                // class java/util/Map
      30: astore        6
      32: iconst_0
      33: istore        7
      35: aload         5
      37: invokeinterface #270,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      42: checkcast     #17                 // class java/lang/Iterable
      45: astore        8
      47: iconst_0
      48: istore        9
      50: aload         8
      52: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      57: astore        10
      59: aload         10
      61: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      66: ifeq          178
      69: aload         10
      71: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      76: astore        11
      78: aload         6
      80: aload         11
      82: checkcast     #275                // class java/util/Map$Entry
      85: astore        12
      87: astore        13
      89: iconst_0
      90: istore        14
      92: aload         12
      94: invokeinterface #519,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
      99: aload         13
     101: swap
     102: aload         11
     104: checkcast     #275                // class java/util/Map$Entry
     107: astore        15
     109: astore        18
     111: astore        17
     113: iconst_0
     114: istore        16
     116: aload         15
     118: invokeinterface #278,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     123: checkcast     #78                 // class java/lang/Number
     126: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     129: aload_0
     130: aload         15
     132: invokeinterface #519,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
     137: invokeinterface #399,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     142: dup
     143: invokestatic  #208                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     146: checkcast     #78                 // class java/lang/Number
     149: invokevirtual #82                 // Method java/lang/Number.intValue:()I
     152: iconst_3
     153: imul
     154: invokestatic  #522                // Method java/lang/Math.min:(II)I
     157: nop
     158: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     161: astore        19
     163: aload         17
     165: aload         18
     167: aload         19
     169: invokeinterface #237,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     174: pop
     175: goto          59
     178: aload         6
     180: nop
     181: nop
     182: astore_2
     183: new           #310                // class Robots$Step
     186: dup
     187: aload_2
     188: aload_1
     189: invokevirtual #386                // Method Robots$Step.getRobots:()Ljava/util/Map;
     192: aload_1
     193: invokevirtual #362                // Method Robots$Step.getTime:()I
     196: invokespecial #323                // Method Robots$Step."<init>":(Ljava/util/Map;Ljava/util/Map;I)V
     199: areturn

  private static final java.util.List<Robots$Step> maxGeodes$nextSteps(Robots$Blueprint, java.util.Map<Robots$Resource, java.lang.Integer>, Robots$Step);
    Code:
       0: new           #25                 // class java/util/ArrayList
       3: dup
       4: invokespecial #475                // Method java/util/ArrayList."<init>":()V
       7: checkcast     #69                 // class java/util/List
      10: astore_3
      11: invokestatic  #263                // Method Robots$Resource.values:()[LRobots$Resource;
      14: astore        4
      16: iconst_0
      17: istore        5
      19: aload         4
      21: arraylength
      22: istore        6
      24: iload         5
      26: iload         6
      28: if_icmpge     123
      31: aload         4
      33: iload         5
      35: aaload
      36: astore        7
      38: aload_0
      39: invokevirtual #266                // Method Robots$Blueprint.getRecipes:()Ljava/util/Map;
      42: aload         7
      44: invokeinterface #399,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      49: dup
      50: invokestatic  #208                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      53: checkcast     #280                // class Robots$Recipe
      56: invokevirtual #283                // Method Robots$Recipe.getCost:()Ljava/util/Map;
      59: astore        8
      61: aload_2
      62: aload         8
      64: invokevirtual #539                // Method Robots$Step.hasEnough:(Ljava/util/Map;)Z
      67: ifeq          117
      70: aload_1
      71: aload_2
      72: aload         7
      74: invokestatic  #541                // Method maxGeodes$isGoodStep:(Ljava/util/Map;LRobots$Step;LRobots$Resource;)Z
      77: ifeq          117
      80: aload_1
      81: aload_2
      82: aload         7
      84: aload         8
      86: invokevirtual #545                // Method Robots$Step.nextStepWithBuild:(LRobots$Resource;Ljava/util/Map;)LRobots$Step;
      89: invokestatic  #547                // Method maxGeodes$normalizeNextStep:(Ljava/util/Map;LRobots$Step;)LRobots$Step;
      92: astore        9
      94: aload         7
      96: getstatic     #298                // Field Robots$Resource.Geode:LRobots$Resource;
      99: if_acmpne     108
     102: aload         9
     104: invokestatic  #551                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     107: areturn
     108: aload_3
     109: aload         9
     111: invokeinterface #552,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     116: pop
     117: iinc          5, 1
     120: goto          24
     123: aload_3
     124: invokeinterface #369,  1          // InterfaceMethod java/util/List.size:()I
     129: invokestatic  #263                // Method Robots$Resource.values:()[LRobots$Resource;
     132: arraylength
     133: if_icmpge     147
     136: aload_3
     137: aload_2
     138: invokevirtual #556                // Method Robots$Step.nextStepWithIdle:()LRobots$Step;
     141: invokeinterface #552,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     146: pop
     147: aload_3
     148: areturn

  static {};
    Code:
       0: new           #2                  // class Robots
       3: dup
       4: invokespecial #561                // Method "<init>":()V
       7: putstatic     #53                 // Field INSTANCE:LRobots;
      10: return
}

Compiled from "Robots.kt"
final class Robots$Blueprint {
  private final int id;

  private final java.util.Map<Robots$Resource, Robots$Recipe> recipes;

  public Robots$Blueprint(int, java.util.Map<Robots$Resource, Robots$Recipe>);
    Code:
       0: aload_2
       1: ldc           #10                 // String recipes
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: iload_1
      12: putfield      #23                 // Field id:I
      15: aload_0
      16: aload_2
      17: putfield      #26                 // Field recipes:Ljava/util/Map;
      20: return

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

  public final java.util.Map<Robots$Resource, Robots$Recipe> getRecipes();
    Code:
       0: aload_0
       1: getfield      #26                 // Field recipes:Ljava/util/Map;
       4: areturn

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

  public final java.util.Map<Robots$Resource, Robots$Recipe> component2();
    Code:
       0: aload_0
       1: getfield      #26                 // Field recipes:Ljava/util/Map;
       4: areturn

  public final Robots$Blueprint copy(int, java.util.Map<Robots$Resource, Robots$Recipe>);
    Code:
       0: aload_2
       1: ldc           #10                 // String recipes
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class Robots$Blueprint
       9: dup
      10: iload_1
      11: aload_2
      12: invokespecial #40                 // Method "<init>":(ILjava/util/Map;)V
      15: areturn

  public static Robots$Blueprint copy$default(Robots$Blueprint, int, java.util.Map, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #23                 // Field id:I
      10: istore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #26                 // Field recipes:Ljava/util/Map;
      21: astore_2
      22: aload_0
      23: iload_1
      24: aload_2
      25: invokevirtual #44                 // Method copy:(ILjava/util/Map;)LRobots$Blueprint;
      28: areturn

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

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #23                 // Field id:I
       4: invokestatic  #74                 // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #26                 // Field recipes:Ljava/util/Map;
      16: invokevirtual #76                 // Method java/lang/Object.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Robots$Blueprint
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Robots$Blueprint
      20: astore_2
      21: aload_0
      22: getfield      #23                 // Field id:I
      25: aload_2
      26: getfield      #23                 // Field id:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #26                 // Field recipes:Ljava/util/Map;
      38: aload_2
      39: getfield      #26                 // Field recipes:Ljava/util/Map;
      42: invokestatic  #84                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      45: ifne          50
      48: iconst_0
      49: ireturn
      50: iconst_1
      51: ireturn
}

Compiled from "Robots.kt"
final class Robots$Recipe {
  private final Robots$Resource robotType;

  private final java.util.Map<Robots$Resource, java.lang.Integer> cost;

  public Robots$Recipe(Robots$Resource, java.util.Map<Robots$Resource, java.lang.Integer>);
    Code:
       0: aload_1
       1: ldc           #10                 // String robotType
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String cost
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #21                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: aload_1
      18: putfield      #24                 // Field robotType:LRobots$Resource;
      21: aload_0
      22: aload_2
      23: putfield      #27                 // Field cost:Ljava/util/Map;
      26: return

  public final Robots$Resource getRobotType();
    Code:
       0: aload_0
       1: getfield      #24                 // Field robotType:LRobots$Resource;
       4: areturn

  public final java.util.Map<Robots$Resource, java.lang.Integer> getCost();
    Code:
       0: aload_0
       1: getfield      #27                 // Field cost:Ljava/util/Map;
       4: areturn

  public final Robots$Resource component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field robotType:LRobots$Resource;
       4: areturn

  public final java.util.Map<Robots$Resource, java.lang.Integer> component2();
    Code:
       0: aload_0
       1: getfield      #27                 // Field cost:Ljava/util/Map;
       4: areturn

  public final Robots$Recipe copy(Robots$Resource, java.util.Map<Robots$Resource, java.lang.Integer>);
    Code:
       0: aload_1
       1: ldc           #10                 // String robotType
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String cost
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Robots$Recipe
      15: dup
      16: aload_1
      17: aload_2
      18: invokespecial #41                 // Method "<init>":(LRobots$Resource;Ljava/util/Map;)V
      21: areturn

  public static Robots$Recipe copy$default(Robots$Recipe, Robots$Resource, java.util.Map, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #24                 // Field robotType:LRobots$Resource;
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #27                 // Field cost:Ljava/util/Map;
      21: astore_2
      22: aload_0
      23: aload_1
      24: aload_2
      25: invokevirtual #45                 // Method copy:(LRobots$Resource;Ljava/util/Map;)LRobots$Recipe;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #49                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #50                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #52                 // String Recipe(robotType=
       9: invokevirtual #56                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field robotType:LRobots$Resource;
      16: invokevirtual #59                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #61                 // String , cost=
      21: invokevirtual #56                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #27                 // Field cost:Ljava/util/Map;
      28: invokevirtual #59                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #64                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #66                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field robotType:LRobots$Resource;
       4: invokevirtual #72                 // Method Robots$Resource.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #27                 // Field cost:Ljava/util/Map;
      16: invokevirtual #73                 // Method java/lang/Object.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Robots$Recipe
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Robots$Recipe
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field robotType:LRobots$Resource;
      25: aload_2
      26: getfield      #24                 // Field robotType:LRobots$Resource;
      29: if_acmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #27                 // Field cost:Ljava/util/Map;
      38: aload_2
      39: getfield      #27                 // Field cost:Ljava/util/Map;
      42: invokestatic  #82                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      45: ifne          50
      48: iconst_0
      49: ireturn
      50: iconst_1
      51: ireturn
}

Compiled from "Robots.kt"
final class Robots$readInput$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function0<java.lang.String> {
  public static final Robots$readInput$1 INSTANCE;

  Robots$readInput$1();
    Code:
       0: aload_0
       1: iconst_0
       2: ldc           #11                 // class kotlin/io/ConsoleKt
       4: ldc           #13                 // String readLine
       6: ldc           #15                 // String readLine()Ljava/lang/String;
       8: iconst_1
       9: invokespecial #18                 // Method kotlin/jvm/internal/FunctionReferenceImpl."<init>":(ILjava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V
      12: return

  public final java.lang.String invoke();
    Code:
       0: invokestatic  #24                 // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: areturn

  public java.lang.Object invoke();
    Code:
       0: aload_0
       1: invokevirtual #27                 // Method invoke:()Ljava/lang/String;
       4: areturn

  static {};
    Code:
       0: new           #2                  // class Robots$readInput$1
       3: dup
       4: invokespecial #30                 // Method "<init>":()V
       7: putstatic     #33                 // Field INSTANCE:LRobots$readInput$1;
      10: return
}

Compiled from "Robots.kt"
final class Robots$Step {
  private final java.util.Map<Robots$Resource, java.lang.Integer> resources;

  private final java.util.Map<Robots$Resource, java.lang.Integer> robots;

  private final int time;

  public Robots$Step(java.util.Map<Robots$Resource, java.lang.Integer>, java.util.Map<Robots$Resource, java.lang.Integer>, int);
    Code:
       0: aload_1
       1: ldc           #10                 // String resources
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String robots
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #21                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: aload_1
      18: putfield      #24                 // Field resources:Ljava/util/Map;
      21: aload_0
      22: aload_2
      23: putfield      #26                 // Field robots:Ljava/util/Map;
      26: aload_0
      27: iload_3
      28: putfield      #30                 // Field time:I
      31: return

  public final java.util.Map<Robots$Resource, java.lang.Integer> getResources();
    Code:
       0: aload_0
       1: getfield      #24                 // Field resources:Ljava/util/Map;
       4: areturn

  public final java.util.Map<Robots$Resource, java.lang.Integer> getRobots();
    Code:
       0: aload_0
       1: getfield      #26                 // Field robots:Ljava/util/Map;
       4: areturn

  public final int getTime();
    Code:
       0: aload_0
       1: getfield      #30                 // Field time:I
       4: ireturn

  public final Robots$Step nextStepWithIdle();
    Code:
       0: new           #2                  // class Robots$Step
       3: dup
       4: aload_0
       5: invokespecial #43                 // Method nextResources:()Ljava/util/Map;
       8: aload_0
       9: getfield      #26                 // Field robots:Ljava/util/Map;
      12: aload_0
      13: getfield      #30                 // Field time:I
      16: iconst_1
      17: iadd
      18: invokespecial #45                 // Method "<init>":(Ljava/util/Map;Ljava/util/Map;I)V
      21: areturn

  public final Robots$Step nextStepWithBuild(Robots$Resource, java.util.Map<Robots$Resource, java.lang.Integer>);
    Code:
       0: aload_1
       1: ldc           #50                 // String robotType
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #52                 // String cost
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #43                 // Method nextResources:()Ljava/util/Map;
      16: astore        4
      18: iconst_0
      19: istore        5
      21: aload         4
      23: astore        6
      25: new           #54                 // class java/util/LinkedHashMap
      28: dup
      29: aload         4
      31: invokeinterface #59,  1           // InterfaceMethod java/util/Map.size:()I
      36: invokestatic  #65                 // Method kotlin/collections/MapsKt.mapCapacity:(I)I
      39: invokespecial #68                 // Method java/util/LinkedHashMap."<init>":(I)V
      42: checkcast     #56                 // class java/util/Map
      45: astore        7
      47: iconst_0
      48: istore        8
      50: aload         6
      52: invokeinterface #72,  1           // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      57: checkcast     #74                 // class java/lang/Iterable
      60: astore        9
      62: iconst_0
      63: istore        10
      65: aload         9
      67: invokeinterface #78,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      72: astore        11
      74: aload         11
      76: invokeinterface #84,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      81: ifeq          188
      84: aload         11
      86: invokeinterface #88,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      91: astore        12
      93: aload         7
      95: aload         12
      97: checkcast     #90                 // class java/util/Map$Entry
     100: astore        13
     102: astore        14
     104: iconst_0
     105: istore        15
     107: aload         13
     109: invokeinterface #93,  1           // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
     114: aload         14
     116: swap
     117: aload         12
     119: checkcast     #90                 // class java/util/Map$Entry
     122: astore        16
     124: astore        19
     126: astore        18
     128: iconst_0
     129: istore        17
     131: aload         16
     133: invokeinterface #96,  1           // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     138: checkcast     #98                 // class java/lang/Number
     141: invokevirtual #101                // Method java/lang/Number.intValue:()I
     144: aload_2
     145: aload         16
     147: invokeinterface #93,  1           // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
     152: iconst_0
     153: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     156: invokeinterface #111,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     161: checkcast     #98                 // class java/lang/Number
     164: invokevirtual #101                // Method java/lang/Number.intValue:()I
     167: isub
     168: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     171: astore        20
     173: aload         18
     175: aload         19
     177: aload         20
     179: invokeinterface #114,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     184: pop
     185: goto          74
     188: aload         7
     190: nop
     191: nop
     192: astore_3
     193: aload_0
     194: getfield      #26                 // Field robots:Ljava/util/Map;
     197: invokestatic  #118                // Method kotlin/collections/MapsKt.toMutableMap:(Ljava/util/Map;)Ljava/util/Map;
     200: astore        4
     202: aload         4
     204: aload_1
     205: aload_0
     206: getfield      #26                 // Field robots:Ljava/util/Map;
     209: aload_1
     210: iconst_0
     211: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     214: invokeinterface #111,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     219: checkcast     #98                 // class java/lang/Number
     222: invokevirtual #101                // Method java/lang/Number.intValue:()I
     225: iconst_1
     226: iadd
     227: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     230: invokeinterface #114,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     235: pop
     236: new           #2                  // class Robots$Step
     239: dup
     240: aload_3
     241: aload         4
     243: aload_0
     244: getfield      #30                 // Field time:I
     247: iconst_1
     248: iadd
     249: invokespecial #45                 // Method "<init>":(Ljava/util/Map;Ljava/util/Map;I)V
     252: areturn

  public final boolean hasEnough(java.util.Map<Robots$Resource, java.lang.Integer>);
    Code:
       0: aload_1
       1: ldc           #52                 // String cost
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokeinterface #72,  1           // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      12: checkcast     #74                 // class java/lang/Iterable
      15: astore_2
      16: iconst_0
      17: istore_3
      18: aload_2
      19: instanceof    #142                // class java/util/Collection
      22: ifeq          41
      25: aload_2
      26: checkcast     #142                // class java/util/Collection
      29: invokeinterface #145,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      34: ifeq          41
      37: iconst_1
      38: goto          133
      41: aload_2
      42: invokeinterface #78,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      47: astore        4
      49: aload         4
      51: invokeinterface #84,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      56: ifeq          132
      59: aload         4
      61: invokeinterface #88,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      66: astore        5
      68: aload         5
      70: checkcast     #90                 // class java/util/Map$Entry
      73: astore        6
      75: iconst_0
      76: istore        7
      78: aload_0
      79: getfield      #24                 // Field resources:Ljava/util/Map;
      82: aload         6
      84: invokeinterface #93,  1           // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
      89: iconst_0
      90: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      93: invokeinterface #111,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      98: checkcast     #98                 // class java/lang/Number
     101: invokevirtual #101                // Method java/lang/Number.intValue:()I
     104: aload         6
     106: invokeinterface #96,  1           // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     111: checkcast     #98                 // class java/lang/Number
     114: invokevirtual #101                // Method java/lang/Number.intValue:()I
     117: if_icmplt     124
     120: iconst_1
     121: goto          125
     124: iconst_0
     125: ifne          49
     128: iconst_0
     129: goto          133
     132: iconst_1
     133: ireturn

  private final java.util.Map<Robots$Resource, java.lang.Integer> nextResources();
    Code:
       0: invokestatic  #152                // Method kotlin/collections/MapsKt.createMapBuilder:()Ljava/util/Map;
       3: astore_1
       4: aload_1
       5: astore_2
       6: iconst_0
       7: istore_3
       8: invokestatic  #156                // Method Robots$Resource.values:()[LRobots$Resource;
      11: astore        4
      13: iconst_0
      14: istore        5
      16: iconst_0
      17: istore        6
      19: aload         4
      21: arraylength
      22: istore        7
      24: iload         6
      26: iload         7
      28: if_icmpge     108
      31: aload         4
      33: iload         6
      35: aaload
      36: astore        8
      38: aload         8
      40: astore        9
      42: iconst_0
      43: istore        10
      45: aload_2
      46: aload         9
      48: aload_0
      49: getfield      #24                 // Field resources:Ljava/util/Map;
      52: aload         9
      54: iconst_0
      55: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      58: invokeinterface #111,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      63: checkcast     #98                 // class java/lang/Number
      66: invokevirtual #101                // Method java/lang/Number.intValue:()I
      69: aload_0
      70: getfield      #26                 // Field robots:Ljava/util/Map;
      73: aload         9
      75: iconst_0
      76: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      79: invokeinterface #111,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      84: checkcast     #98                 // class java/lang/Number
      87: invokevirtual #101                // Method java/lang/Number.intValue:()I
      90: iadd
      91: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      94: invokeinterface #114,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      99: pop
     100: nop
     101: nop
     102: iinc          6, 1
     105: goto          24
     108: nop
     109: nop
     110: aload_1
     111: invokestatic  #159                // Method kotlin/collections/MapsKt.build:(Ljava/util/Map;)Ljava/util/Map;
     114: areturn

  public final java.lang.String fingerprint();
    Code:
       0: new           #171                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #172                // Method java/lang/StringBuilder."<init>":()V
       7: aload_0
       8: getfield      #30                 // Field time:I
      11: invokevirtual #176                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      14: bipush        46
      16: invokevirtual #179                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      19: invokestatic  #156                // Method Robots$Resource.values:()[LRobots$Resource;
      22: astore_1
      23: astore        11
      25: iconst_0
      26: istore_2
      27: aload_1
      28: astore_3
      29: new           #181                // class java/util/ArrayList
      32: dup
      33: aload_1
      34: arraylength
      35: invokespecial #182                // Method java/util/ArrayList."<init>":(I)V
      38: checkcast     #142                // class java/util/Collection
      41: astore        4
      43: iconst_0
      44: istore        5
      46: iconst_0
      47: istore        6
      49: aload_3
      50: arraylength
      51: istore        7
      53: iload         6
      55: iload         7
      57: if_icmpge     116
      60: aload_3
      61: iload         6
      63: aaload
      64: astore        8
      66: aload         4
      68: aload         8
      70: astore        9
      72: astore        12
      74: iconst_0
      75: istore        10
      77: aload_0
      78: getfield      #26                 // Field robots:Ljava/util/Map;
      81: aload         9
      83: iconst_0
      84: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      87: invokeinterface #111,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      92: checkcast     #98                 // class java/lang/Number
      95: invokevirtual #101                // Method java/lang/Number.intValue:()I
      98: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     101: aload         12
     103: swap
     104: invokeinterface #186,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     109: pop
     110: iinc          6, 1
     113: goto          53
     116: aload         4
     118: checkcast     #188                // class java/util/List
     121: nop
     122: aload         11
     124: swap
     125: checkcast     #74                 // class java/lang/Iterable
     128: ldc           #190                // String _
     130: checkcast     #192                // class java/lang/CharSequence
     133: aconst_null
     134: aconst_null
     135: iconst_0
     136: aconst_null
     137: aconst_null
     138: bipush        62
     140: aconst_null
     141: invokestatic  #198                // 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;
     144: invokevirtual #201                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     147: bipush        46
     149: invokevirtual #179                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     152: invokestatic  #156                // Method Robots$Resource.values:()[LRobots$Resource;
     155: astore_1
     156: astore        11
     158: iconst_0
     159: istore_2
     160: aload_1
     161: astore_3
     162: new           #181                // class java/util/ArrayList
     165: dup
     166: aload_1
     167: arraylength
     168: invokespecial #182                // Method java/util/ArrayList."<init>":(I)V
     171: checkcast     #142                // class java/util/Collection
     174: astore        4
     176: iconst_0
     177: istore        5
     179: iconst_0
     180: istore        6
     182: aload_3
     183: arraylength
     184: istore        7
     186: iload         6
     188: iload         7
     190: if_icmpge     249
     193: aload_3
     194: iload         6
     196: aaload
     197: astore        8
     199: aload         4
     201: aload         8
     203: astore        9
     205: astore        12
     207: iconst_0
     208: istore        10
     210: aload_0
     211: getfield      #24                 // Field resources:Ljava/util/Map;
     214: aload         9
     216: iconst_0
     217: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     220: invokeinterface #111,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     225: checkcast     #98                 // class java/lang/Number
     228: invokevirtual #101                // Method java/lang/Number.intValue:()I
     231: invokestatic  #107                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     234: aload         12
     236: swap
     237: invokeinterface #186,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     242: pop
     243: iinc          6, 1
     246: goto          186
     249: aload         4
     251: checkcast     #188                // class java/util/List
     254: nop
     255: aload         11
     257: swap
     258: checkcast     #74                 // class java/lang/Iterable
     261: ldc           #190                // String _
     263: checkcast     #192                // class java/lang/CharSequence
     266: aconst_null
     267: aconst_null
     268: iconst_0
     269: aconst_null
     270: aconst_null
     271: bipush        62
     273: aconst_null
     274: invokestatic  #198                // 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;
     277: invokevirtual #201                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     280: invokevirtual #204                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     283: areturn

  public final java.util.Map<Robots$Resource, java.lang.Integer> component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field resources:Ljava/util/Map;
       4: areturn

  public final java.util.Map<Robots$Resource, java.lang.Integer> component2();
    Code:
       0: aload_0
       1: getfield      #26                 // Field robots:Ljava/util/Map;
       4: areturn

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

  public final Robots$Step copy(java.util.Map<Robots$Resource, java.lang.Integer>, java.util.Map<Robots$Resource, java.lang.Integer>, int);
    Code:
       0: aload_1
       1: ldc           #10                 // String resources
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String robots
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Robots$Step
      15: dup
      16: aload_1
      17: aload_2
      18: iload_3
      19: invokespecial #45                 // Method "<init>":(Ljava/util/Map;Ljava/util/Map;I)V
      22: areturn

  public static Robots$Step copy$default(Robots$Step, java.util.Map, java.util.Map, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #24                 // Field resources:Ljava/util/Map;
      11: astore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #26                 // Field robots:Ljava/util/Map;
      23: astore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #30                 // Field time:I
      35: istore_3
      36: aload_0
      37: aload_1
      38: aload_2
      39: iload_3
      40: invokevirtual #222                // Method copy:(Ljava/util/Map;Ljava/util/Map;I)LRobots$Step;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #171                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #172                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #224                // String Step(resources=
       9: invokevirtual #201                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field resources:Ljava/util/Map;
      16: invokevirtual #227                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #229                // String , robots=
      21: invokevirtual #201                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #26                 // Field robots:Ljava/util/Map;
      28: invokevirtual #227                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: ldc           #231                // String , time=
      33: invokevirtual #201                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #30                 // Field time:I
      40: invokevirtual #176                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #179                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #204                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

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

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Robots$Step
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Robots$Step
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field resources:Ljava/util/Map;
      25: aload_2
      26: getfield      #24                 // Field resources:Ljava/util/Map;
      29: invokestatic  #243                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: aload_0
      38: getfield      #26                 // Field robots:Ljava/util/Map;
      41: aload_2
      42: getfield      #26                 // Field robots:Ljava/util/Map;
      45: invokestatic  #243                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: aload_0
      54: getfield      #30                 // Field time:I
      57: aload_2
      58: getfield      #30                 // Field time:I
      61: if_icmpeq     66
      64: iconst_0
      65: ireturn
      66: iconst_1
      67: ireturn
}

Compiled from "Robots.kt"
public final class RobotsKt {
  public static final void main();
    Code:
       0: getstatic     #12                 // Field Robots.INSTANCE:LRobots;
       3: invokevirtual #15                 // Method Robots.solve:()V
       6: return

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

Compiled from "Robots.kt"
final class Robots$Resource extends java.lang.Enum<Robots$Resource> {
  public static final Robots$Resource Ore;

  public static final Robots$Resource Clay;

  public static final Robots$Resource Obsidian;

  public static final Robots$Resource Geode;

  private static final Robots$Resource[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private Robots$Resource();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #10                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: return

  public static Robots$Resource[] values();
    Code:
       0: getstatic     #22                 // Field $VALUES:[LRobots$Resource;
       3: invokevirtual #28                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #29                 // class "[LRobots$Resource;"
       9: areturn

  public static Robots$Resource valueOf(java.lang.String);
    Code:
       0: ldc           #2                  // class Robots$Resource
       2: aload_0
       3: invokestatic  #34                 // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
       6: checkcast     #2                  // class Robots$Resource
       9: areturn

  public static kotlin.enums.EnumEntries<Robots$Resource> getEntries();
    Code:
       0: getstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final Robots$Resource[] $values();
    Code:
       0: iconst_4
       1: anewarray     #2                  // class Robots$Resource
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #47                 // Field Ore:LRobots$Resource;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #50                 // Field Clay:LRobots$Resource;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #53                 // Field Obsidian:LRobots$Resource;
      22: aastore
      23: aload_0
      24: iconst_3
      25: getstatic     #56                 // Field Geode:LRobots$Resource;
      28: aastore
      29: aload_0
      30: areturn

  static {};
    Code:
       0: new           #2                  // class Robots$Resource
       3: dup
       4: ldc           #58                 // String Ore
       6: iconst_0
       7: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      10: putstatic     #47                 // Field Ore:LRobots$Resource;
      13: new           #2                  // class Robots$Resource
      16: dup
      17: ldc           #60                 // String Clay
      19: iconst_1
      20: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      23: putstatic     #50                 // Field Clay:LRobots$Resource;
      26: new           #2                  // class Robots$Resource
      29: dup
      30: ldc           #61                 // String Obsidian
      32: iconst_2
      33: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      36: putstatic     #53                 // Field Obsidian:LRobots$Resource;
      39: new           #2                  // class Robots$Resource
      42: dup
      43: ldc           #62                 // String Geode
      45: iconst_3
      46: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      49: putstatic     #56                 // Field Geode:LRobots$Resource;
      52: invokestatic  #64                 // Method $values:()[LRobots$Resource;
      55: putstatic     #22                 // Field $VALUES:[LRobots$Resource;
      58: getstatic     #22                 // Field $VALUES:[LRobots$Resource;
      61: checkcast     #66                 // class "[Ljava/lang/Enum;"
      64: invokestatic  #72                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      67: putstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      70: return
}