package com.github.brpeterman.advent2022

import java.util.*

class CrateCrane {
    data class CrateState(val stacks: MutableMap<Int, LinkedList<Char>>, val moves: List<CrateMove>)
    data class CrateMove(val count: Int, val from: Int, val to: Int)

    fun reportStacks(stacks: List<LinkedList<Char>>): String {
        return stacks.fold("") { output, stack -> output + stack.peek().toString() }
    }

    enum class CraneMode {
        DEFAULT,
        HOLD_MULTIPLE
    }

    fun simulate(state: CrateState, mode: CraneMode = CraneMode.DEFAULT): List<LinkedList<Char>> {
        val stacks = state.stacks
        val moves = state.moves
        moves.forEach { move ->
            val from = stacks[move.from]!!
            val to = stacks[move.to]!!
            val holding = mutableListOf<Char>()
            (1..move.count).forEach {
                holding.add(from.pop())
            }
            if (mode == CraneMode.HOLD_MULTIPLE) {
                holding.reverse()
            }
            holding.forEach { crate ->
                to.push(crate)
            }
        }
        return stacks.entries
            .sortedBy { it.key }
            .map { it.value }
    }

    companion object {
        fun parseInput(input: String): CrateState {
            val (stateInput, movesInput) = input.split("\n\n")
            val stacks = stateInput.split("\n")
                .filter { it.matches(""" *\[.*""".toRegex()) }
                .fold(mutableMapOf<Int, LinkedList<Char>>().withDefault { LinkedList() }) { stacks, line ->
                    line.chunked(4)
                        .withIndex()
                        .forEach { (index, crate) ->
                            val matches = """\[([A-Z])] ?""".toRegex().matchEntire(crate)
                            if (matches != null) {
                                val stack = stacks.getValue(index + 1)
                                val (crateName) = matches.destructured
                                stack.add(crateName[0])
                                stacks[index + 1] = stack
                            }
                        }
                    stacks
                }
            val moves = movesInput.split("\n")
                .filter { it.isNotBlank() }
                .map { line ->
                    val matches = """move (\d+) from (\d+) to (\d+)""".toRegex().matchEntire(line)
                    val (count, from, to) = matches!!.destructured
                    CrateMove(count.toInt(), from.toInt(), to.toInt())
                }
            return CrateState(stacks, moves)
        }
    }
}

Compiled from "CrateCrane.kt"
public final class com.github.brpeterman.advent2022.CrateCrane$CraneMode extends java.lang.Enum<com.github.brpeterman.advent2022.CrateCrane$CraneMode> {
  public static final com.github.brpeterman.advent2022.CrateCrane$CraneMode DEFAULT;

  public static final com.github.brpeterman.advent2022.CrateCrane$CraneMode HOLD_MULTIPLE;

  private static final com.github.brpeterman.advent2022.CrateCrane$CraneMode[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private com.github.brpeterman.advent2022.CrateCrane$CraneMode();
    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 com.github.brpeterman.advent2022.CrateCrane$CraneMode[] values();
    Code:
       0: getstatic     #22                 // Field $VALUES:[Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
       3: invokevirtual #28                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #29                 // class "[Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;"
       9: areturn

  public static com.github.brpeterman.advent2022.CrateCrane$CraneMode valueOf(java.lang.String);
    Code:
       0: ldc           #2                  // class com/github/brpeterman/advent2022/CrateCrane$CraneMode
       2: aload_0
       3: invokestatic  #34                 // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
       6: checkcast     #2                  // class com/github/brpeterman/advent2022/CrateCrane$CraneMode
       9: areturn

  public static kotlin.enums.EnumEntries<com.github.brpeterman.advent2022.CrateCrane$CraneMode> getEntries();
    Code:
       0: getstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final com.github.brpeterman.advent2022.CrateCrane$CraneMode[] $values();
    Code:
       0: iconst_2
       1: anewarray     #2                  // class com/github/brpeterman/advent2022/CrateCrane$CraneMode
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #47                 // Field DEFAULT:Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #50                 // Field HOLD_MULTIPLE:Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
      16: aastore
      17: aload_0
      18: areturn

  static {};
    Code:
       0: new           #2                  // class com/github/brpeterman/advent2022/CrateCrane$CraneMode
       3: dup
       4: ldc           #52                 // String DEFAULT
       6: iconst_0
       7: invokespecial #53                 // Method "<init>":(Ljava/lang/String;I)V
      10: putstatic     #47                 // Field DEFAULT:Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
      13: new           #2                  // class com/github/brpeterman/advent2022/CrateCrane$CraneMode
      16: dup
      17: ldc           #54                 // String HOLD_MULTIPLE
      19: iconst_1
      20: invokespecial #53                 // Method "<init>":(Ljava/lang/String;I)V
      23: putstatic     #50                 // Field HOLD_MULTIPLE:Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
      26: invokestatic  #56                 // Method $values:()[Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
      29: putstatic     #22                 // Field $VALUES:[Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
      32: getstatic     #22                 // Field $VALUES:[Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
      35: checkcast     #58                 // class "[Ljava/lang/Enum;"
      38: invokestatic  #64                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      41: putstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      44: return
}

Compiled from "CrateCrane.kt"
public final class com.github.brpeterman.advent2022.CrateCrane {
  public static final com.github.brpeterman.advent2022.CrateCrane$Companion Companion;

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

  public final java.lang.String reportStacks(java.util.List<? extends java.util.LinkedList<java.lang.Character>>);
    Code:
       0: aload_1
       1: ldc           #16                 // String stacks
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/Iterable
      10: astore_2
      11: ldc           #26                 // String
      13: astore_3
      14: iconst_0
      15: istore        4
      17: aload_3
      18: astore        5
      20: aload_2
      21: invokeinterface #30,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      26: astore        6
      28: aload         6
      30: invokeinterface #36,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      35: ifeq          89
      38: aload         6
      40: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      45: astore        7
      47: aload         5
      49: aload         7
      51: checkcast     #42                 // class java/util/LinkedList
      54: astore        8
      56: astore        9
      58: iconst_0
      59: istore        10
      61: new           #44                 // class java/lang/StringBuilder
      64: dup
      65: invokespecial #45                 // Method java/lang/StringBuilder."<init>":()V
      68: aload         9
      70: invokevirtual #49                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      73: aload         8
      75: invokevirtual #52                 // Method java/util/LinkedList.peek:()Ljava/lang/Object;
      78: invokevirtual #55                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      81: invokevirtual #59                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      84: astore        5
      86: goto          28
      89: aload         5
      91: areturn

  public final java.util.List<java.util.LinkedList<java.lang.Character>> simulate(com.github.brpeterman.advent2022.CrateCrane$CrateState, com.github.brpeterman.advent2022.CrateCrane$CraneMode);
    Code:
       0: aload_1
       1: ldc           #82                 // String state
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #84                 // String mode
       9: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_1
      13: invokevirtual #90                 // Method com/github/brpeterman/advent2022/CrateCrane$CrateState.getStacks:()Ljava/util/Map;
      16: astore_3
      17: aload_1
      18: invokevirtual #94                 // Method com/github/brpeterman/advent2022/CrateCrane$CrateState.getMoves:()Ljava/util/List;
      21: astore        4
      23: aload         4
      25: checkcast     #24                 // class java/lang/Iterable
      28: astore        5
      30: iconst_0
      31: istore        6
      33: aload         5
      35: invokeinterface #30,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      40: astore        7
      42: aload         7
      44: invokeinterface #36,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      49: ifeq          295
      52: aload         7
      54: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      59: astore        8
      61: aload         8
      63: checkcast     #96                 // class com/github/brpeterman/advent2022/CrateCrane$CrateMove
      66: astore        9
      68: iconst_0
      69: istore        10
      71: aload_3
      72: aload         9
      74: invokevirtual #100                // Method com/github/brpeterman/advent2022/CrateCrane$CrateMove.getFrom:()I
      77: invokestatic  #106                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: invokeinterface #112,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      85: dup
      86: invokestatic  #116                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      89: checkcast     #42                 // class java/util/LinkedList
      92: astore        11
      94: aload_3
      95: aload         9
      97: invokevirtual #119                // Method com/github/brpeterman/advent2022/CrateCrane$CrateMove.getTo:()I
     100: invokestatic  #106                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     103: invokeinterface #112,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     108: dup
     109: invokestatic  #116                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     112: checkcast     #42                 // class java/util/LinkedList
     115: astore        12
     117: new           #121                // class java/util/ArrayList
     120: dup
     121: invokespecial #122                // Method java/util/ArrayList."<init>":()V
     124: checkcast     #75                 // class java/util/List
     127: astore        13
     129: new           #124                // class kotlin/ranges/IntRange
     132: dup
     133: iconst_1
     134: aload         9
     136: invokevirtual #127                // Method com/github/brpeterman/advent2022/CrateCrane$CrateMove.getCount:()I
     139: invokespecial #130                // Method kotlin/ranges/IntRange."<init>":(II)V
     142: checkcast     #24                 // class java/lang/Iterable
     145: astore        14
     147: iconst_0
     148: istore        15
     150: aload         14
     152: invokeinterface #30,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     157: astore        16
     159: aload         16
     161: invokeinterface #36,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     166: ifeq          210
     169: aload         16
     171: checkcast     #132                // class kotlin/collections/IntIterator
     174: invokevirtual #135                // Method kotlin/collections/IntIterator.nextInt:()I
     177: istore        17
     179: iload         17
     181: istore        18
     183: iconst_0
     184: istore        19
     186: aload         13
     188: aload         11
     190: invokevirtual #138                // Method java/util/LinkedList.pop:()Ljava/lang/Object;
     193: dup
     194: ldc           #140                // String pop(...)
     196: invokestatic  #143                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     199: invokeinterface #147,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     204: pop
     205: nop
     206: nop
     207: goto          159
     210: nop
     211: aload_2
     212: getstatic     #153                // Field com/github/brpeterman/advent2022/CrateCrane$CraneMode.HOLD_MULTIPLE:Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
     215: if_acmpne     223
     218: aload         13
     220: invokestatic  #159                // Method kotlin/collections/CollectionsKt.reverse:(Ljava/util/List;)V
     223: aload         13
     225: checkcast     #24                 // class java/lang/Iterable
     228: astore        14
     230: iconst_0
     231: istore        15
     233: aload         14
     235: invokeinterface #30,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     240: astore        16
     242: aload         16
     244: invokeinterface #36,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     249: ifeq          289
     252: aload         16
     254: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     259: astore        17
     261: aload         17
     263: checkcast     #161                // class java/lang/Character
     266: invokevirtual #165                // Method java/lang/Character.charValue:()C
     269: istore        18
     271: iconst_0
     272: istore        19
     274: aload         12
     276: iload         18
     278: invokestatic  #168                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     281: invokevirtual #171                // Method java/util/LinkedList.push:(Ljava/lang/Object;)V
     284: nop
     285: nop
     286: goto          242
     289: nop
     290: nop
     291: nop
     292: goto          42
     295: nop
     296: aload_3
     297: invokeinterface #175,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
     302: checkcast     #24                 // class java/lang/Iterable
     305: astore        5
     307: nop
     308: iconst_0
     309: istore        6
     311: aload         5
     313: new           #177                // class com/github/brpeterman/advent2022/CrateCrane$simulate$$inlined$sortedBy$1
     316: dup
     317: invokespecial #178                // Method com/github/brpeterman/advent2022/CrateCrane$simulate$$inlined$sortedBy$1."<init>":()V
     320: checkcast     #180                // class java/util/Comparator
     323: invokestatic  #184                // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
     326: checkcast     #24                 // class java/lang/Iterable
     329: astore        5
     331: nop
     332: iconst_0
     333: istore        6
     335: aload         5
     337: astore        7
     339: new           #121                // class java/util/ArrayList
     342: dup
     343: aload         5
     345: bipush        10
     347: invokestatic  #188                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     350: invokespecial #191                // Method java/util/ArrayList."<init>":(I)V
     353: checkcast     #193                // class java/util/Collection
     356: astore        8
     358: iconst_0
     359: istore        9
     361: aload         7
     363: invokeinterface #30,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     368: astore        10
     370: aload         10
     372: invokeinterface #36,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     377: ifeq          425
     380: aload         10
     382: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     387: astore        11
     389: aload         8
     391: aload         11
     393: checkcast     #195                // class java/util/Map$Entry
     396: astore        12
     398: astore        20
     400: iconst_0
     401: istore        13
     403: aload         12
     405: invokeinterface #198,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     410: checkcast     #42                 // class java/util/LinkedList
     413: aload         20
     415: swap
     416: invokeinterface #199,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     421: pop
     422: goto          370
     425: aload         8
     427: checkcast     #75                 // class java/util/List
     430: nop
     431: areturn

  public static java.util.List simulate$default(com.github.brpeterman.advent2022.CrateCrane, com.github.brpeterman.advent2022.CrateCrane$CrateState, com.github.brpeterman.advent2022.CrateCrane$CraneMode, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_2
       2: iand
       3: ifeq          10
       6: getstatic     #231                // Field com/github/brpeterman/advent2022/CrateCrane$CraneMode.DEFAULT:Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;
       9: astore_2
      10: aload_0
      11: aload_1
      12: aload_2
      13: invokevirtual #233                // Method simulate:(Lcom/github/brpeterman/advent2022/CrateCrane$CrateState;Lcom/github/brpeterman/advent2022/CrateCrane$CraneMode;)Ljava/util/List;
      16: areturn

  static {};
    Code:
       0: new           #236                // class com/github/brpeterman/advent2022/CrateCrane$Companion
       3: dup
       4: aconst_null
       5: invokespecial #239                // Method com/github/brpeterman/advent2022/CrateCrane$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #243                // Field Companion:Lcom/github/brpeterman/advent2022/CrateCrane$Companion;
      11: return
}

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

  public final com.github.brpeterman.advent2022.CrateCrane$CrateState parseInput(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #23                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #25                 // class java/lang/String
      14: astore_3
      15: aload_3
      16: iconst_0
      17: ldc           #27                 // String \n\n
      19: aastore
      20: aload_3
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #33                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: astore_2
      30: aload_2
      31: iconst_0
      32: invokeinterface #39,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      37: checkcast     #25                 // class java/lang/String
      40: astore_3
      41: aload_2
      42: iconst_1
      43: invokeinterface #39,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      48: checkcast     #25                 // class java/lang/String
      51: astore        4
      53: aload_3
      54: checkcast     #23                 // class java/lang/CharSequence
      57: iconst_1
      58: anewarray     #25                 // class java/lang/String
      61: astore        6
      63: aload         6
      65: iconst_0
      66: ldc           #41                 // String \n
      68: aastore
      69: aload         6
      71: iconst_0
      72: iconst_0
      73: bipush        6
      75: aconst_null
      76: invokestatic  #33                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      79: checkcast     #43                 // class java/lang/Iterable
      82: astore        6
      84: nop
      85: iconst_0
      86: istore        7
      88: aload         6
      90: astore        8
      92: new           #45                 // class java/util/ArrayList
      95: dup
      96: invokespecial #46                 // Method java/util/ArrayList."<init>":()V
      99: checkcast     #48                 // class java/util/Collection
     102: astore        9
     104: iconst_0
     105: istore        10
     107: aload         8
     109: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     114: astore        11
     116: aload         11
     118: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     123: ifeq          183
     126: aload         11
     128: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     133: astore        12
     135: aload         12
     137: checkcast     #25                 // class java/lang/String
     140: astore        13
     142: iconst_0
     143: istore        14
     145: aload         13
     147: checkcast     #23                 // class java/lang/CharSequence
     150: astore        15
     152: new           #64                 // class kotlin/text/Regex
     155: dup
     156: ldc           #66                 // String  *\\[.*
     158: invokespecial #69                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     161: aload         15
     163: invokevirtual #73                 // Method kotlin/text/Regex.matches:(Ljava/lang/CharSequence;)Z
     166: nop
     167: ifeq          116
     170: aload         9
     172: aload         12
     174: invokeinterface #77,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     179: pop
     180: goto          116
     183: aload         9
     185: checkcast     #35                 // class java/util/List
     188: nop
     189: checkcast     #43                 // class java/lang/Iterable
     192: astore        6
     194: new           #79                 // class java/util/LinkedHashMap
     197: dup
     198: invokespecial #80                 // Method java/util/LinkedHashMap."<init>":()V
     201: checkcast     #82                 // class java/util/Map
     204: invokedynamic #102,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
     209: invokestatic  #108                // Method kotlin/collections/MapsKt.withDefaultMutable:(Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map;
     212: astore        7
     214: iconst_0
     215: istore        8
     217: aload         7
     219: astore        9
     221: aload         6
     223: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     228: astore        10
     230: aload         10
     232: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     237: ifeq          451
     240: aload         10
     242: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     247: astore        11
     249: aload         9
     251: aload         11
     253: checkcast     #25                 // class java/lang/String
     256: astore        12
     258: astore        13
     260: iconst_0
     261: istore        14
     263: aload         12
     265: checkcast     #23                 // class java/lang/CharSequence
     268: iconst_4
     269: invokestatic  #112                // Method kotlin/text/StringsKt.chunked:(Ljava/lang/CharSequence;I)Ljava/util/List;
     272: checkcast     #43                 // class java/lang/Iterable
     275: invokestatic  #118                // Method kotlin/collections/CollectionsKt.withIndex:(Ljava/lang/Iterable;)Ljava/lang/Iterable;
     278: astore        15
     280: nop
     281: iconst_0
     282: istore        16
     284: aload         15
     286: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     291: astore        17
     293: aload         17
     295: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     300: ifeq          443
     303: aload         17
     305: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     310: astore        18
     312: aload         18
     314: checkcast     #120                // class kotlin/collections/IndexedValue
     317: astore        19
     319: iconst_0
     320: istore        20
     322: aload         19
     324: invokevirtual #124                // Method kotlin/collections/IndexedValue.component1:()I
     327: istore        21
     329: aload         19
     331: invokevirtual #127                // Method kotlin/collections/IndexedValue.component2:()Ljava/lang/Object;
     334: checkcast     #25                 // class java/lang/String
     337: astore        22
     339: new           #64                 // class kotlin/text/Regex
     342: dup
     343: ldc           #129                // String \\[([A-Z])] ?
     345: invokespecial #69                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     348: aload         22
     350: checkcast     #23                 // class java/lang/CharSequence
     353: invokevirtual #133                // Method kotlin/text/Regex.matchEntire:(Ljava/lang/CharSequence;)Lkotlin/text/MatchResult;
     356: astore        23
     358: aload         23
     360: ifnull        438
     363: aload         13
     365: iload         21
     367: iconst_1
     368: iadd
     369: invokestatic  #139                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     372: invokestatic  #143                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
     375: checkcast     #145                // class java/util/LinkedList
     378: astore        24
     380: aload         23
     382: invokeinterface #151,  1          // InterfaceMethod kotlin/text/MatchResult.getDestructured:()Lkotlin/text/MatchResult$Destructured;
     387: invokevirtual #157                // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     390: invokeinterface #161,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     395: iconst_1
     396: invokeinterface #39,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     401: checkcast     #25                 // class java/lang/String
     404: astore        25
     406: aload         24
     408: aload         25
     410: iconst_0
     411: invokevirtual #165                // Method java/lang/String.charAt:(I)C
     414: invokestatic  #170                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     417: invokevirtual #171                // Method java/util/LinkedList.add:(Ljava/lang/Object;)Z
     420: pop
     421: aload         13
     423: iload         21
     425: iconst_1
     426: iadd
     427: invokestatic  #139                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     430: aload         24
     432: invokeinterface #175,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     437: pop
     438: nop
     439: nop
     440: goto          293
     443: nop
     444: aload         13
     446: astore        9
     448: goto          230
     451: aload         9
     453: astore        5
     455: aload         4
     457: checkcast     #23                 // class java/lang/CharSequence
     460: iconst_1
     461: anewarray     #25                 // class java/lang/String
     464: astore        7
     466: aload         7
     468: iconst_0
     469: ldc           #41                 // String \n
     471: aastore
     472: aload         7
     474: iconst_0
     475: iconst_0
     476: bipush        6
     478: aconst_null
     479: invokestatic  #33                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     482: checkcast     #43                 // class java/lang/Iterable
     485: astore        7
     487: nop
     488: iconst_0
     489: istore        8
     491: aload         7
     493: astore        9
     495: new           #45                 // class java/util/ArrayList
     498: dup
     499: invokespecial #46                 // Method java/util/ArrayList."<init>":()V
     502: checkcast     #48                 // class java/util/Collection
     505: astore        10
     507: iconst_0
     508: istore        11
     510: aload         9
     512: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     517: astore        12
     519: aload         12
     521: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     526: ifeq          581
     529: aload         12
     531: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     536: astore        13
     538: aload         13
     540: checkcast     #25                 // class java/lang/String
     543: astore        14
     545: iconst_0
     546: istore        15
     548: aload         14
     550: checkcast     #23                 // class java/lang/CharSequence
     553: invokestatic  #178                // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
     556: ifne          563
     559: iconst_1
     560: goto          564
     563: iconst_0
     564: nop
     565: ifeq          519
     568: aload         10
     570: aload         13
     572: invokeinterface #77,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     577: pop
     578: goto          519
     581: aload         10
     583: checkcast     #35                 // class java/util/List
     586: nop
     587: checkcast     #43                 // class java/lang/Iterable
     590: astore        7
     592: nop
     593: iconst_0
     594: istore        8
     596: aload         7
     598: astore        9
     600: new           #45                 // class java/util/ArrayList
     603: dup
     604: aload         7
     606: bipush        10
     608: invokestatic  #182                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     611: invokespecial #185                // Method java/util/ArrayList."<init>":(I)V
     614: checkcast     #48                 // class java/util/Collection
     617: astore        10
     619: iconst_0
     620: istore        11
     622: aload         9
     624: invokeinterface #52,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     629: astore        12
     631: aload         12
     633: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     638: ifeq          793
     641: aload         12
     643: invokeinterface #62,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     648: astore        13
     650: aload         10
     652: aload         13
     654: checkcast     #25                 // class java/lang/String
     657: astore        14
     659: astore        26
     661: iconst_0
     662: istore        15
     664: new           #64                 // class kotlin/text/Regex
     667: dup
     668: ldc           #187                // String move (\\d+) from (\\d+) to (\\d+)
     670: invokespecial #69                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     673: aload         14
     675: checkcast     #23                 // class java/lang/CharSequence
     678: invokevirtual #133                // Method kotlin/text/Regex.matchEntire:(Ljava/lang/CharSequence;)Lkotlin/text/MatchResult;
     681: astore        16
     683: aload         16
     685: dup
     686: invokestatic  #191                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     689: invokeinterface #151,  1          // InterfaceMethod kotlin/text/MatchResult.getDestructured:()Lkotlin/text/MatchResult$Destructured;
     694: astore        17
     696: aload         17
     698: invokevirtual #157                // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     701: invokeinterface #161,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     706: iconst_1
     707: invokeinterface #39,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     712: checkcast     #25                 // class java/lang/String
     715: astore        18
     717: aload         17
     719: invokevirtual #157                // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     722: invokeinterface #161,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     727: iconst_2
     728: invokeinterface #39,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     733: checkcast     #25                 // class java/lang/String
     736: astore        19
     738: aload         17
     740: invokevirtual #157                // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     743: invokeinterface #161,  1          // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     748: iconst_3
     749: invokeinterface #39,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     754: checkcast     #25                 // class java/lang/String
     757: astore        20
     759: new           #193                // class com/github/brpeterman/advent2022/CrateCrane$CrateMove
     762: dup
     763: aload         18
     765: invokestatic  #197                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     768: aload         19
     770: invokestatic  #197                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     773: aload         20
     775: invokestatic  #197                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     778: invokespecial #200                // Method com/github/brpeterman/advent2022/CrateCrane$CrateMove."<init>":(III)V
     781: aload         26
     783: swap
     784: invokeinterface #77,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     789: pop
     790: goto          631
     793: aload         10
     795: checkcast     #35                 // class java/util/List
     798: nop
     799: astore        6
     801: new           #202                // class com/github/brpeterman/advent2022/CrateCrane$CrateState
     804: dup
     805: aload         5
     807: aload         6
     809: invokespecial #205                // Method com/github/brpeterman/advent2022/CrateCrane$CrateState."<init>":(Ljava/util/Map;Ljava/util/List;)V
     812: areturn

  private static final java.util.LinkedList parseInput$lambda$1(int);
    Code:
       0: new           #145                // class java/util/LinkedList
       3: dup
       4: invokespecial #251                // Method java/util/LinkedList."<init>":()V
       7: areturn

  public com.github.brpeterman.advent2022.CrateCrane$Companion(kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: invokespecial #253                // Method "<init>":()V
       4: return
}

Compiled from "CrateCrane.kt"
public final class com.github.brpeterman.advent2022.CrateCrane$CrateState {
  private final java.util.Map<java.lang.Integer, java.util.LinkedList<java.lang.Character>> stacks;

  private final java.util.List<com.github.brpeterman.advent2022.CrateCrane$CrateMove> moves;

  public com.github.brpeterman.advent2022.CrateCrane$CrateState(java.util.Map<java.lang.Integer, java.util.LinkedList<java.lang.Character>>, java.util.List<com.github.brpeterman.advent2022.CrateCrane$CrateMove>);
    Code:
       0: aload_1
       1: ldc           #10                 // String stacks
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String moves
       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 stacks:Ljava/util/Map;
      21: aload_0
      22: aload_2
      23: putfield      #27                 // Field moves:Ljava/util/List;
      26: return

  public final java.util.Map<java.lang.Integer, java.util.LinkedList<java.lang.Character>> getStacks();
    Code:
       0: aload_0
       1: getfield      #24                 // Field stacks:Ljava/util/Map;
       4: areturn

  public final java.util.List<com.github.brpeterman.advent2022.CrateCrane$CrateMove> getMoves();
    Code:
       0: aload_0
       1: getfield      #27                 // Field moves:Ljava/util/List;
       4: areturn

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

  public final java.util.List<com.github.brpeterman.advent2022.CrateCrane$CrateMove> component2();
    Code:
       0: aload_0
       1: getfield      #27                 // Field moves:Ljava/util/List;
       4: areturn

  public final com.github.brpeterman.advent2022.CrateCrane$CrateState copy(java.util.Map<java.lang.Integer, java.util.LinkedList<java.lang.Character>>, java.util.List<com.github.brpeterman.advent2022.CrateCrane$CrateMove>);
    Code:
       0: aload_1
       1: ldc           #10                 // String stacks
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String moves
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class com/github/brpeterman/advent2022/CrateCrane$CrateState
      15: dup
      16: aload_1
      17: aload_2
      18: invokespecial #42                 // Method "<init>":(Ljava/util/Map;Ljava/util/List;)V
      21: areturn

  public static com.github.brpeterman.advent2022.CrateCrane$CrateState copy$default(com.github.brpeterman.advent2022.CrateCrane$CrateState, java.util.Map, java.util.List, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #24                 // Field stacks:Ljava/util/Map;
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #27                 // Field moves:Ljava/util/List;
      21: astore_2
      22: aload_0
      23: aload_1
      24: aload_2
      25: invokevirtual #46                 // Method copy:(Ljava/util/Map;Ljava/util/List;)Lcom/github/brpeterman/advent2022/CrateCrane$CrateState;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #50                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #51                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #53                 // String CrateState(stacks=
       9: invokevirtual #57                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field stacks:Ljava/util/Map;
      16: invokevirtual #60                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #62                 // String , moves=
      21: invokevirtual #57                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #27                 // Field moves:Ljava/util/List;
      28: invokevirtual #60                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #65                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #67                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field stacks:Ljava/util/Map;
       4: invokevirtual #71                 // Method java/lang/Object.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #27                 // Field moves:Ljava/util/List;
      16: invokevirtual #71                 // 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 com/github/brpeterman/advent2022/CrateCrane$CrateState
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class com/github/brpeterman/advent2022/CrateCrane$CrateState
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field stacks:Ljava/util/Map;
      25: aload_2
      26: getfield      #24                 // Field stacks:Ljava/util/Map;
      29: invokestatic  #80                 // 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      #27                 // Field moves:Ljava/util/List;
      41: aload_2
      42: getfield      #27                 // Field moves:Ljava/util/List;
      45: invokestatic  #80                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: iconst_1
      54: ireturn
}

Compiled from "CrateCrane.kt"
public final class com.github.brpeterman.advent2022.CrateCrane$CrateMove {
  private final int count;

  private final int from;

  private final int to;

  public com.github.brpeterman.advent2022.CrateCrane$CrateMove(int, int, int);
    Code:
       0: aload_0
       1: invokespecial #9                  // Method java/lang/Object."<init>":()V
       4: aload_0
       5: iload_1
       6: putfield      #13                 // Field count:I
       9: aload_0
      10: iload_2
      11: putfield      #16                 // Field from:I
      14: aload_0
      15: iload_3
      16: putfield      #19                 // Field to:I
      19: return

  public final int getCount();
    Code:
       0: aload_0
       1: getfield      #13                 // Field count:I
       4: ireturn

  public final int getFrom();
    Code:
       0: aload_0
       1: getfield      #16                 // Field from:I
       4: ireturn

  public final int getTo();
    Code:
       0: aload_0
       1: getfield      #19                 // Field to:I
       4: ireturn

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

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

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

  public final com.github.brpeterman.advent2022.CrateCrane$CrateMove copy(int, int, int);
    Code:
       0: new           #2                  // class com/github/brpeterman/advent2022/CrateCrane$CrateMove
       3: dup
       4: iload_1
       5: iload_2
       6: iload_3
       7: invokespecial #33                 // Method "<init>":(III)V
      10: areturn

  public static com.github.brpeterman.advent2022.CrateCrane$CrateMove copy$default(com.github.brpeterman.advent2022.CrateCrane$CrateMove, int, int, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #13                 // Field count:I
      11: istore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #16                 // Field from:I
      23: istore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #19                 // Field to:I
      35: istore_3
      36: aload_0
      37: iload_1
      38: iload_2
      39: iload_3
      40: invokevirtual #37                 // Method copy:(III)Lcom/github/brpeterman/advent2022/CrateCrane$CrateMove;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #41                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #42                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #44                 // String CrateMove(count=
       9: invokevirtual #48                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #13                 // Field count:I
      16: invokevirtual #51                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #53                 // String , from=
      21: invokevirtual #48                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #16                 // Field from:I
      28: invokevirtual #51                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: ldc           #55                 // String , to=
      33: invokevirtual #48                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #19                 // Field to:I
      40: invokevirtual #51                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #58                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #60                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #13                 // Field count:I
       4: invokestatic  #66                 // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #16                 // Field from:I
      16: invokestatic  #66                 // Method java/lang/Integer.hashCode:(I)I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #19                 // Field to:I
      29: invokestatic  #66                 // 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 com/github/brpeterman/advent2022/CrateCrane$CrateMove
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class com/github/brpeterman/advent2022/CrateCrane$CrateMove
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field count:I
      25: aload_2
      26: getfield      #13                 // Field count:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #16                 // Field from:I
      38: aload_2
      39: getfield      #16                 // Field from:I
      42: if_icmpeq     47
      45: iconst_0
      46: ireturn
      47: aload_0
      48: getfield      #19                 // Field to:I
      51: aload_2
      52: getfield      #19                 // Field to:I
      55: if_icmpeq     60
      58: iconst_0
      59: ireturn
      60: iconst_1
      61: ireturn
}

Compiled from "Comparisons.kt"
public final class com.github.brpeterman.advent2022.CrateCrane$simulate$$inlined$sortedBy$1<T> implements java.util.Comparator {
  public com.github.brpeterman.advent2022.CrateCrane$simulate$$inlined$sortedBy$1();
    Code:
       0: aload_0
       1: invokespecial #16                 // Method java/lang/Object."<init>":()V
       4: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #23                 // class java/util/Map$Entry
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: invokeinterface #27,  1           // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
      14: checkcast     #29                 // class java/lang/Integer
      17: checkcast     #31                 // class java/lang/Comparable
      20: aload_2
      21: checkcast     #23                 // class java/util/Map$Entry
      24: astore_3
      25: astore        5
      27: iconst_0
      28: istore        4
      30: aload_3
      31: invokeinterface #27,  1           // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
      36: checkcast     #29                 // class java/lang/Integer
      39: aload         5
      41: swap
      42: checkcast     #31                 // class java/lang/Comparable
      45: invokestatic  #37                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      48: ireturn
}