package day02

class Day02 {

    enum class Play(val points: Int) {
        ROCK(1) {
            override fun scoreAgainst(other: Play) = when (other) {
                ROCK -> Result.DRAW
                PAPER -> Result.LOSS
                SCISSORS -> Result.WIN
            }.points + points
        },
        PAPER(2) {
            override fun scoreAgainst(other: Play) = when (other) {
                ROCK -> Result.WIN
                PAPER -> Result.DRAW
                SCISSORS -> Result.LOSS
            }.points + points
        },
        SCISSORS(3) {
            override fun scoreAgainst(other: Play) = when (other) {
                ROCK -> Result.LOSS
                PAPER -> Result.WIN
                SCISSORS -> Result.DRAW
            }.points + points
        };

        abstract fun scoreAgainst(other: Play): Int
    }

    enum class Result(val points: Int) {
        LOSS(0), DRAW(3), WIN(6)
    }

    enum class OpponentPlay(val play: Play) {
        A(Play.ROCK), B(Play.PAPER), C(Play.SCISSORS)
    }

    enum class ResponsePlay(val play: Play) {
        X(Play.ROCK), Y(Play.PAPER), Z(Play.SCISSORS)
    }

    enum class ExpectedResult(val result: Result) {
        X(Result.LOSS) {
            override fun expectedResponse(opponentPlay: Play) = when (opponentPlay) {
                Play.ROCK -> Play.SCISSORS
                Play.PAPER -> Play.ROCK
                Play.SCISSORS -> Play.PAPER
            }
        },
        Y(Result.DRAW) {
            override fun expectedResponse(opponentPlay: Play) = opponentPlay
        },
        Z(Result.WIN) {
            override fun expectedResponse(opponentPlay: Play) = when (opponentPlay) {
                Play.ROCK -> Play.PAPER
                Play.PAPER -> Play.SCISSORS
                Play.SCISSORS -> Play.ROCK
            }
        };

        abstract fun expectedResponse(opponentPlay: Play): Play
    }

    fun parse1(input: String): List<Pair<OpponentPlay, ResponsePlay>> =
        input.split("\n")
            .map {
                it.split(" ")
                    .let { pair ->
                        OpponentPlay.valueOf(pair[0]) to ResponsePlay.valueOf(pair[1])
                    }
            }

    fun part1(parsed: List<Pair<OpponentPlay, ResponsePlay>>): Int =
        parsed.sumOf { (opponent, response) ->
            response.play.scoreAgainst(opponent.play)
        }

    fun parse2(input: String): List<Pair<OpponentPlay, ExpectedResult>> =
        input.split("\n")
            .map {
                it.split(" ")
                    .let { pair ->
                        OpponentPlay.valueOf(pair[0]) to ExpectedResult.valueOf(pair[1])
                    }
            }

    fun part2(parsed: List<Pair<OpponentPlay, ExpectedResult>>): Int =
        parsed.sumOf { (opponent, expectedResult) ->
            expectedResult.expectedResponse(opponent.play).scoreAgainst(opponent.play)
        }

}

Compiled from "Day02.kt"
public abstract class day02.Day02$Play extends java.lang.Enum<day02.Day02$Play> {
  private final int points;

  public static final day02.Day02$Play ROCK;

  public static final day02.Day02$Play PAPER;

  public static final day02.Day02$Play SCISSORS;

  private static final day02.Day02$Play[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private day02.Day02$Play(int);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #11                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: aload_0
       7: iload_3
       8: putfield      #15                 // Field points:I
      11: return

  public final int getPoints();
    Code:
       0: aload_0
       1: getfield      #15                 // Field points:I
       4: ireturn

  public abstract int scoreAgainst(day02.Day02$Play);

  public static day02.Day02$Play[] values();
    Code:
       0: getstatic     #31                 // Field $VALUES:[Lday02/Day02$Play;
       3: invokevirtual #37                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #38                 // class "[Lday02/Day02$Play;"
       9: areturn

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

  public static kotlin.enums.EnumEntries<day02.Day02$Play> getEntries();
    Code:
       0: getstatic     #51                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final day02.Day02$Play[] $values();
    Code:
       0: iconst_3
       1: anewarray     #2                  // class day02/Day02$Play
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #55                 // Field ROCK:Lday02/Day02$Play;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #58                 // Field PAPER:Lday02/Day02$Play;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #61                 // Field SCISSORS:Lday02/Day02$Play;
      22: aastore
      23: aload_0
      24: areturn

  public day02.Day02$Play(java.lang.String, int, int, kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: iload_3
       4: invokespecial #64                 // Method "<init>":(Ljava/lang/String;II)V
       7: return

  static {};
    Code:
       0: new           #70                 // class day02/Day02$Play$ROCK
       3: dup
       4: ldc           #71                 // String ROCK
       6: iconst_0
       7: invokespecial #72                 // Method day02/Day02$Play$ROCK."<init>":(Ljava/lang/String;I)V
      10: putstatic     #55                 // Field ROCK:Lday02/Day02$Play;
      13: new           #74                 // class day02/Day02$Play$PAPER
      16: dup
      17: ldc           #75                 // String PAPER
      19: iconst_1
      20: invokespecial #76                 // Method day02/Day02$Play$PAPER."<init>":(Ljava/lang/String;I)V
      23: putstatic     #58                 // Field PAPER:Lday02/Day02$Play;
      26: new           #78                 // class day02/Day02$Play$SCISSORS
      29: dup
      30: ldc           #79                 // String SCISSORS
      32: iconst_2
      33: invokespecial #80                 // Method day02/Day02$Play$SCISSORS."<init>":(Ljava/lang/String;I)V
      36: putstatic     #61                 // Field SCISSORS:Lday02/Day02$Play;
      39: invokestatic  #82                 // Method $values:()[Lday02/Day02$Play;
      42: putstatic     #31                 // Field $VALUES:[Lday02/Day02$Play;
      45: getstatic     #31                 // Field $VALUES:[Lday02/Day02$Play;
      48: checkcast     #84                 // class "[Ljava/lang/Enum;"
      51: invokestatic  #90                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      54: putstatic     #51                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      57: return
}

Compiled from "Day02.kt"
public final class day02.Day02$ExpectedResult$X$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method day02/Day02$Play.values:()[Lday02/Day02$Play;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      12: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      26: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      40: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      43: iconst_3
      44: iastore
      45: goto          49
      48: astore_1
      49: aload_0
      50: putstatic     #32                 // Field $EnumSwitchMapping$0:[I
      53: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
          35    45    48   Class java/lang/NoSuchFieldError
}

Compiled from "Day02.kt"
public final class day02.Day02$Play$SCISSORS$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method day02/Day02$Play.values:()[Lday02/Day02$Play;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      12: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      26: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      40: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      43: iconst_3
      44: iastore
      45: goto          49
      48: astore_1
      49: aload_0
      50: putstatic     #32                 // Field $EnumSwitchMapping$0:[I
      53: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
          35    45    48   Class java/lang/NoSuchFieldError
}

Compiled from "Day02.kt"
public final class day02.Day02$OpponentPlay extends java.lang.Enum<day02.Day02$OpponentPlay> {
  private final day02.Day02$Play play;

  public static final day02.Day02$OpponentPlay A;

  public static final day02.Day02$OpponentPlay B;

  public static final day02.Day02$OpponentPlay C;

  private static final day02.Day02$OpponentPlay[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private day02.Day02$OpponentPlay(day02.Day02$Play);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #11                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: aload_0
       7: aload_3
       8: putfield      #15                 // Field play:Lday02/Day02$Play;
      11: return

  public final day02.Day02$Play getPlay();
    Code:
       0: aload_0
       1: getfield      #15                 // Field play:Lday02/Day02$Play;
       4: areturn

  public static day02.Day02$OpponentPlay[] values();
    Code:
       0: getstatic     #30                 // Field $VALUES:[Lday02/Day02$OpponentPlay;
       3: invokevirtual #36                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #37                 // class "[Lday02/Day02$OpponentPlay;"
       9: areturn

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

  public static kotlin.enums.EnumEntries<day02.Day02$OpponentPlay> getEntries();
    Code:
       0: getstatic     #50                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final day02.Day02$OpponentPlay[] $values();
    Code:
       0: iconst_3
       1: anewarray     #2                  // class day02/Day02$OpponentPlay
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #54                 // Field A:Lday02/Day02$OpponentPlay;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #57                 // Field B:Lday02/Day02$OpponentPlay;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #60                 // Field C:Lday02/Day02$OpponentPlay;
      22: aastore
      23: aload_0
      24: areturn

  static {};
    Code:
       0: new           #2                  // class day02/Day02$OpponentPlay
       3: dup
       4: ldc           #63                 // String A
       6: iconst_0
       7: getstatic     #68                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      10: invokespecial #70                 // Method "<init>":(Ljava/lang/String;ILday02/Day02$Play;)V
      13: putstatic     #54                 // Field A:Lday02/Day02$OpponentPlay;
      16: new           #2                  // class day02/Day02$OpponentPlay
      19: dup
      20: ldc           #71                 // String B
      22: iconst_1
      23: getstatic     #74                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      26: invokespecial #70                 // Method "<init>":(Ljava/lang/String;ILday02/Day02$Play;)V
      29: putstatic     #57                 // Field B:Lday02/Day02$OpponentPlay;
      32: new           #2                  // class day02/Day02$OpponentPlay
      35: dup
      36: ldc           #75                 // String C
      38: iconst_2
      39: getstatic     #78                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      42: invokespecial #70                 // Method "<init>":(Ljava/lang/String;ILday02/Day02$Play;)V
      45: putstatic     #60                 // Field C:Lday02/Day02$OpponentPlay;
      48: invokestatic  #80                 // Method $values:()[Lday02/Day02$OpponentPlay;
      51: putstatic     #30                 // Field $VALUES:[Lday02/Day02$OpponentPlay;
      54: getstatic     #30                 // Field $VALUES:[Lday02/Day02$OpponentPlay;
      57: checkcast     #82                 // class "[Ljava/lang/Enum;"
      60: invokestatic  #88                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      63: putstatic     #50                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      66: return
}

Compiled from "Day02.kt"
public final class day02.Day02$ResponsePlay extends java.lang.Enum<day02.Day02$ResponsePlay> {
  private final day02.Day02$Play play;

  public static final day02.Day02$ResponsePlay X;

  public static final day02.Day02$ResponsePlay Y;

  public static final day02.Day02$ResponsePlay Z;

  private static final day02.Day02$ResponsePlay[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private day02.Day02$ResponsePlay(day02.Day02$Play);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #11                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: aload_0
       7: aload_3
       8: putfield      #15                 // Field play:Lday02/Day02$Play;
      11: return

  public final day02.Day02$Play getPlay();
    Code:
       0: aload_0
       1: getfield      #15                 // Field play:Lday02/Day02$Play;
       4: areturn

  public static day02.Day02$ResponsePlay[] values();
    Code:
       0: getstatic     #30                 // Field $VALUES:[Lday02/Day02$ResponsePlay;
       3: invokevirtual #36                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #37                 // class "[Lday02/Day02$ResponsePlay;"
       9: areturn

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

  public static kotlin.enums.EnumEntries<day02.Day02$ResponsePlay> getEntries();
    Code:
       0: getstatic     #50                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final day02.Day02$ResponsePlay[] $values();
    Code:
       0: iconst_3
       1: anewarray     #2                  // class day02/Day02$ResponsePlay
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #54                 // Field X:Lday02/Day02$ResponsePlay;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #57                 // Field Y:Lday02/Day02$ResponsePlay;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #60                 // Field Z:Lday02/Day02$ResponsePlay;
      22: aastore
      23: aload_0
      24: areturn

  static {};
    Code:
       0: new           #2                  // class day02/Day02$ResponsePlay
       3: dup
       4: ldc           #63                 // String X
       6: iconst_0
       7: getstatic     #68                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      10: invokespecial #70                 // Method "<init>":(Ljava/lang/String;ILday02/Day02$Play;)V
      13: putstatic     #54                 // Field X:Lday02/Day02$ResponsePlay;
      16: new           #2                  // class day02/Day02$ResponsePlay
      19: dup
      20: ldc           #71                 // String Y
      22: iconst_1
      23: getstatic     #74                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      26: invokespecial #70                 // Method "<init>":(Ljava/lang/String;ILday02/Day02$Play;)V
      29: putstatic     #57                 // Field Y:Lday02/Day02$ResponsePlay;
      32: new           #2                  // class day02/Day02$ResponsePlay
      35: dup
      36: ldc           #75                 // String Z
      38: iconst_2
      39: getstatic     #78                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      42: invokespecial #70                 // Method "<init>":(Ljava/lang/String;ILday02/Day02$Play;)V
      45: putstatic     #60                 // Field Z:Lday02/Day02$ResponsePlay;
      48: invokestatic  #80                 // Method $values:()[Lday02/Day02$ResponsePlay;
      51: putstatic     #30                 // Field $VALUES:[Lday02/Day02$ResponsePlay;
      54: getstatic     #30                 // Field $VALUES:[Lday02/Day02$ResponsePlay;
      57: checkcast     #82                 // class "[Ljava/lang/Enum;"
      60: invokestatic  #88                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      63: putstatic     #50                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      66: return
}

Compiled from "Day02.kt"
final class day02.Day02$Play$SCISSORS extends day02.Day02$Play {
  day02.Day02$Play$SCISSORS();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: iconst_3
       4: aconst_null
       5: invokespecial #10                 // Method day02/Day02$Play."<init>":(Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: return

  public int scoreAgainst(day02.Day02$Play);
    Code:
       0: aload_1
       1: ldc           #21                 // String other
       3: invokestatic  #27                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: getstatic     #33                 // Field day02/Day02$Play$SCISSORS$WhenMappings.$EnumSwitchMapping$0:[I
      10: swap
      11: invokevirtual #37                 // Method day02/Day02$Play.ordinal:()I
      14: iaload
      15: tableswitch   { // 1 to 3
                     1: 40
                     2: 46
                     3: 52
               default: 58
          }
      40: getstatic     #43                 // Field day02/Day02$Result.LOSS:Lday02/Day02$Result;
      43: goto          66
      46: getstatic     #46                 // Field day02/Day02$Result.WIN:Lday02/Day02$Result;
      49: goto          66
      52: getstatic     #49                 // Field day02/Day02$Result.DRAW:Lday02/Day02$Result;
      55: goto          66
      58: new           #51                 // class kotlin/NoWhenBranchMatchedException
      61: dup
      62: invokespecial #53                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      65: athrow
      66: invokevirtual #56                 // Method day02/Day02$Result.getPoints:()I
      69: aload_0
      70: invokevirtual #57                 // Method getPoints:()I
      73: iadd
      74: ireturn
}

Compiled from "Day02.kt"
public final class day02.Day02$Play$ROCK$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method day02/Day02$Play.values:()[Lday02/Day02$Play;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      12: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      26: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      40: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      43: iconst_3
      44: iastore
      45: goto          49
      48: astore_1
      49: aload_0
      50: putstatic     #32                 // Field $EnumSwitchMapping$0:[I
      53: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
          35    45    48   Class java/lang/NoSuchFieldError
}

Compiled from "Day02.kt"
final class day02.Day02$ExpectedResult$Z extends day02.Day02$ExpectedResult {
  day02.Day02$ExpectedResult$Z();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: getstatic     #13                 // Field day02/Day02$Result.WIN:Lday02/Day02$Result;
       6: aconst_null
       7: invokespecial #16                 // Method day02/Day02$ExpectedResult."<init>":(Ljava/lang/String;ILday02/Day02$Result;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      10: return

  public day02.Day02$Play expectedResponse(day02.Day02$Play);
    Code:
       0: aload_1
       1: ldc           #27                 // String opponentPlay
       3: invokestatic  #33                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: getstatic     #39                 // Field day02/Day02$ExpectedResult$Z$WhenMappings.$EnumSwitchMapping$0:[I
      10: swap
      11: invokevirtual #45                 // Method day02/Day02$Play.ordinal:()I
      14: iaload
      15: tableswitch   { // 1 to 3
                     1: 40
                     2: 46
                     3: 52
               default: 58
          }
      40: getstatic     #49                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      43: goto          66
      46: getstatic     #52                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      49: goto          66
      52: getstatic     #55                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      55: goto          66
      58: new           #57                 // class kotlin/NoWhenBranchMatchedException
      61: dup
      62: invokespecial #59                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      65: athrow
      66: areturn
}

Compiled from "Day02.kt"
public abstract class day02.Day02$ExpectedResult extends java.lang.Enum<day02.Day02$ExpectedResult> {
  private final day02.Day02$Result result;

  public static final day02.Day02$ExpectedResult X;

  public static final day02.Day02$ExpectedResult Y;

  public static final day02.Day02$ExpectedResult Z;

  private static final day02.Day02$ExpectedResult[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private day02.Day02$ExpectedResult(day02.Day02$Result);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #11                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: aload_0
       7: aload_3
       8: putfield      #15                 // Field result:Lday02/Day02$Result;
      11: return

  public final day02.Day02$Result getResult();
    Code:
       0: aload_0
       1: getfield      #15                 // Field result:Lday02/Day02$Result;
       4: areturn

  public abstract day02.Day02$Play expectedResponse(day02.Day02$Play);

  public static day02.Day02$ExpectedResult[] values();
    Code:
       0: getstatic     #32                 // Field $VALUES:[Lday02/Day02$ExpectedResult;
       3: invokevirtual #38                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #39                 // class "[Lday02/Day02$ExpectedResult;"
       9: areturn

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

  public static kotlin.enums.EnumEntries<day02.Day02$ExpectedResult> getEntries();
    Code:
       0: getstatic     #52                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final day02.Day02$ExpectedResult[] $values();
    Code:
       0: iconst_3
       1: anewarray     #2                  // class day02/Day02$ExpectedResult
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #56                 // Field X:Lday02/Day02$ExpectedResult;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #59                 // Field Y:Lday02/Day02$ExpectedResult;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #62                 // Field Z:Lday02/Day02$ExpectedResult;
      22: aastore
      23: aload_0
      24: areturn

  public day02.Day02$ExpectedResult(java.lang.String, int, day02.Day02$Result, kotlin.jvm.internal.DefaultConstructorMarker);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: aload_3
       4: invokespecial #65                 // Method "<init>":(Ljava/lang/String;ILday02/Day02$Result;)V
       7: return

  static {};
    Code:
       0: new           #71                 // class day02/Day02$ExpectedResult$X
       3: dup
       4: ldc           #72                 // String X
       6: iconst_0
       7: invokespecial #73                 // Method day02/Day02$ExpectedResult$X."<init>":(Ljava/lang/String;I)V
      10: putstatic     #56                 // Field X:Lday02/Day02$ExpectedResult;
      13: new           #75                 // class day02/Day02$ExpectedResult$Y
      16: dup
      17: ldc           #76                 // String Y
      19: iconst_1
      20: invokespecial #77                 // Method day02/Day02$ExpectedResult$Y."<init>":(Ljava/lang/String;I)V
      23: putstatic     #59                 // Field Y:Lday02/Day02$ExpectedResult;
      26: new           #79                 // class day02/Day02$ExpectedResult$Z
      29: dup
      30: ldc           #80                 // String Z
      32: iconst_2
      33: invokespecial #81                 // Method day02/Day02$ExpectedResult$Z."<init>":(Ljava/lang/String;I)V
      36: putstatic     #62                 // Field Z:Lday02/Day02$ExpectedResult;
      39: invokestatic  #83                 // Method $values:()[Lday02/Day02$ExpectedResult;
      42: putstatic     #32                 // Field $VALUES:[Lday02/Day02$ExpectedResult;
      45: getstatic     #32                 // Field $VALUES:[Lday02/Day02$ExpectedResult;
      48: checkcast     #85                 // class "[Ljava/lang/Enum;"
      51: invokestatic  #91                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      54: putstatic     #52                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      57: return
}

Compiled from "Day02.kt"
final class day02.Day02$ExpectedResult$X extends day02.Day02$ExpectedResult {
  day02.Day02$ExpectedResult$X();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: getstatic     #13                 // Field day02/Day02$Result.LOSS:Lday02/Day02$Result;
       6: aconst_null
       7: invokespecial #16                 // Method day02/Day02$ExpectedResult."<init>":(Ljava/lang/String;ILday02/Day02$Result;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      10: return

  public day02.Day02$Play expectedResponse(day02.Day02$Play);
    Code:
       0: aload_1
       1: ldc           #27                 // String opponentPlay
       3: invokestatic  #33                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: getstatic     #39                 // Field day02/Day02$ExpectedResult$X$WhenMappings.$EnumSwitchMapping$0:[I
      10: swap
      11: invokevirtual #45                 // Method day02/Day02$Play.ordinal:()I
      14: iaload
      15: tableswitch   { // 1 to 3
                     1: 40
                     2: 46
                     3: 52
               default: 58
          }
      40: getstatic     #49                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      43: goto          66
      46: getstatic     #52                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      49: goto          66
      52: getstatic     #55                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      55: goto          66
      58: new           #57                 // class kotlin/NoWhenBranchMatchedException
      61: dup
      62: invokespecial #59                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      65: athrow
      66: areturn
}

Compiled from "Day02.kt"
public final class day02.Day02$Result extends java.lang.Enum<day02.Day02$Result> {
  private final int points;

  public static final day02.Day02$Result LOSS;

  public static final day02.Day02$Result DRAW;

  public static final day02.Day02$Result WIN;

  private static final day02.Day02$Result[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private day02.Day02$Result(int);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #11                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: aload_0
       7: iload_3
       8: putfield      #15                 // Field points:I
      11: return

  public final int getPoints();
    Code:
       0: aload_0
       1: getfield      #15                 // Field points:I
       4: ireturn

  public static day02.Day02$Result[] values();
    Code:
       0: getstatic     #28                 // Field $VALUES:[Lday02/Day02$Result;
       3: invokevirtual #34                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #35                 // class "[Lday02/Day02$Result;"
       9: areturn

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

  public static kotlin.enums.EnumEntries<day02.Day02$Result> getEntries();
    Code:
       0: getstatic     #49                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final day02.Day02$Result[] $values();
    Code:
       0: iconst_3
       1: anewarray     #2                  // class day02/Day02$Result
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #53                 // Field LOSS:Lday02/Day02$Result;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #56                 // Field DRAW:Lday02/Day02$Result;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #59                 // Field WIN:Lday02/Day02$Result;
      22: aastore
      23: aload_0
      24: areturn

  static {};
    Code:
       0: new           #2                  // class day02/Day02$Result
       3: dup
       4: ldc           #62                 // String LOSS
       6: iconst_0
       7: iconst_0
       8: invokespecial #64                 // Method "<init>":(Ljava/lang/String;II)V
      11: putstatic     #53                 // Field LOSS:Lday02/Day02$Result;
      14: new           #2                  // class day02/Day02$Result
      17: dup
      18: ldc           #65                 // String DRAW
      20: iconst_1
      21: iconst_3
      22: invokespecial #64                 // Method "<init>":(Ljava/lang/String;II)V
      25: putstatic     #56                 // Field DRAW:Lday02/Day02$Result;
      28: new           #2                  // class day02/Day02$Result
      31: dup
      32: ldc           #66                 // String WIN
      34: iconst_2
      35: bipush        6
      37: invokespecial #64                 // Method "<init>":(Ljava/lang/String;II)V
      40: putstatic     #59                 // Field WIN:Lday02/Day02$Result;
      43: invokestatic  #68                 // Method $values:()[Lday02/Day02$Result;
      46: putstatic     #28                 // Field $VALUES:[Lday02/Day02$Result;
      49: getstatic     #28                 // Field $VALUES:[Lday02/Day02$Result;
      52: checkcast     #70                 // class "[Ljava/lang/Enum;"
      55: invokestatic  #76                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      58: putstatic     #49                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      61: return
}

Compiled from "Day02.kt"
final class day02.Day02$ExpectedResult$Y extends day02.Day02$ExpectedResult {
  day02.Day02$ExpectedResult$Y();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: getstatic     #13                 // Field day02/Day02$Result.DRAW:Lday02/Day02$Result;
       6: aconst_null
       7: invokespecial #16                 // Method day02/Day02$ExpectedResult."<init>":(Ljava/lang/String;ILday02/Day02$Result;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
      10: return

  public day02.Day02$Play expectedResponse(day02.Day02$Play);
    Code:
       0: aload_1
       1: ldc           #27                 // String opponentPlay
       3: invokestatic  #33                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: areturn
}

Compiled from "Day02.kt"
public final class day02.Day02$ExpectedResult$Z$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method day02/Day02$Play.values:()[Lday02/Day02$Play;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      12: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      26: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      40: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      43: iconst_3
      44: iastore
      45: goto          49
      48: astore_1
      49: aload_0
      50: putstatic     #32                 // Field $EnumSwitchMapping$0:[I
      53: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
          35    45    48   Class java/lang/NoSuchFieldError
}

Compiled from "Day02.kt"
final class day02.Day02$Play$ROCK extends day02.Day02$Play {
  day02.Day02$Play$ROCK();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: iconst_1
       4: aconst_null
       5: invokespecial #10                 // Method day02/Day02$Play."<init>":(Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: return

  public int scoreAgainst(day02.Day02$Play);
    Code:
       0: aload_1
       1: ldc           #21                 // String other
       3: invokestatic  #27                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: getstatic     #33                 // Field day02/Day02$Play$ROCK$WhenMappings.$EnumSwitchMapping$0:[I
      10: swap
      11: invokevirtual #37                 // Method day02/Day02$Play.ordinal:()I
      14: iaload
      15: tableswitch   { // 1 to 3
                     1: 40
                     2: 46
                     3: 52
               default: 58
          }
      40: getstatic     #43                 // Field day02/Day02$Result.DRAW:Lday02/Day02$Result;
      43: goto          66
      46: getstatic     #46                 // Field day02/Day02$Result.LOSS:Lday02/Day02$Result;
      49: goto          66
      52: getstatic     #49                 // Field day02/Day02$Result.WIN:Lday02/Day02$Result;
      55: goto          66
      58: new           #51                 // class kotlin/NoWhenBranchMatchedException
      61: dup
      62: invokespecial #53                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      65: athrow
      66: invokevirtual #56                 // Method day02/Day02$Result.getPoints:()I
      69: aload_0
      70: invokevirtual #57                 // Method getPoints:()I
      73: iadd
      74: ireturn
}

Compiled from "Day02.kt"
final class day02.Day02$Play$PAPER extends day02.Day02$Play {
  day02.Day02$Play$PAPER();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: iconst_2
       4: aconst_null
       5: invokespecial #10                 // Method day02/Day02$Play."<init>":(Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: return

  public int scoreAgainst(day02.Day02$Play);
    Code:
       0: aload_1
       1: ldc           #21                 // String other
       3: invokestatic  #27                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: getstatic     #33                 // Field day02/Day02$Play$PAPER$WhenMappings.$EnumSwitchMapping$0:[I
      10: swap
      11: invokevirtual #37                 // Method day02/Day02$Play.ordinal:()I
      14: iaload
      15: tableswitch   { // 1 to 3
                     1: 40
                     2: 46
                     3: 52
               default: 58
          }
      40: getstatic     #43                 // Field day02/Day02$Result.WIN:Lday02/Day02$Result;
      43: goto          66
      46: getstatic     #46                 // Field day02/Day02$Result.DRAW:Lday02/Day02$Result;
      49: goto          66
      52: getstatic     #49                 // Field day02/Day02$Result.LOSS:Lday02/Day02$Result;
      55: goto          66
      58: new           #51                 // class kotlin/NoWhenBranchMatchedException
      61: dup
      62: invokespecial #53                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      65: athrow
      66: invokevirtual #56                 // Method day02/Day02$Result.getPoints:()I
      69: aload_0
      70: invokevirtual #57                 // Method getPoints:()I
      73: iadd
      74: ireturn
}

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

  public final java.util.List<kotlin.Pair<day02.Day02$OpponentPlay, day02.Day02$ResponsePlay>> parse1(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #26                 // class java/lang/String
      14: astore_2
      15: aload_2
      16: iconst_0
      17: ldc           #28                 // String \n
      19: aastore
      20: aload_2
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #34                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #36                 // class java/lang/Iterable
      32: astore_2
      33: nop
      34: iconst_0
      35: istore_3
      36: aload_2
      37: astore        4
      39: new           #38                 // class java/util/ArrayList
      42: dup
      43: aload_2
      44: bipush        10
      46: invokestatic  #44                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      49: invokespecial #47                 // Method java/util/ArrayList."<init>":(I)V
      52: checkcast     #49                 // class java/util/Collection
      55: astore        5
      57: iconst_0
      58: istore        6
      60: aload         4
      62: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      67: astore        7
      69: aload         7
      71: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      76: ifeq          179
      79: aload         7
      81: invokeinterface #63,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      86: astore        8
      88: aload         5
      90: aload         8
      92: checkcast     #26                 // class java/lang/String
      95: astore        9
      97: astore        14
      99: iconst_0
     100: istore        10
     102: aload         9
     104: checkcast     #24                 // class java/lang/CharSequence
     107: iconst_1
     108: anewarray     #26                 // class java/lang/String
     111: astore        11
     113: aload         11
     115: iconst_0
     116: ldc           #65                 // String
     118: aastore
     119: aload         11
     121: iconst_0
     122: iconst_0
     123: bipush        6
     125: aconst_null
     126: invokestatic  #34                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     129: astore        12
     131: iconst_0
     132: istore        13
     134: aload         12
     136: iconst_0
     137: invokeinterface #71,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     142: checkcast     #26                 // class java/lang/String
     145: invokestatic  #77                 // Method day02/Day02$OpponentPlay.valueOf:(Ljava/lang/String;)Lday02/Day02$OpponentPlay;
     148: aload         12
     150: iconst_1
     151: invokeinterface #71,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     156: checkcast     #26                 // class java/lang/String
     159: invokestatic  #82                 // Method day02/Day02$ResponsePlay.valueOf:(Ljava/lang/String;)Lday02/Day02$ResponsePlay;
     162: invokestatic  #88                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     165: nop
     166: nop
     167: aload         14
     169: swap
     170: invokeinterface #92,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     175: pop
     176: goto          69
     179: aload         5
     181: checkcast     #67                 // class java/util/List
     184: nop
     185: areturn

  public final int part1(java.util.List<? extends kotlin.Pair<? extends day02.Day02$OpponentPlay, ? extends day02.Day02$ResponsePlay>>);
    Code:
       0: aload_1
       1: ldc           #113                // String parsed
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #36                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      19: astore        4
      21: aload         4
      23: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      28: ifeq          97
      31: aload         4
      33: invokeinterface #63,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      38: astore        5
      40: iload_3
      41: aload         5
      43: checkcast     #115                // class kotlin/Pair
      46: astore        6
      48: istore        10
      50: iconst_0
      51: istore        7
      53: aload         6
      55: invokevirtual #118                // Method kotlin/Pair.component1:()Ljava/lang/Object;
      58: checkcast     #73                 // class day02/Day02$OpponentPlay
      61: astore        8
      63: aload         6
      65: invokevirtual #121                // Method kotlin/Pair.component2:()Ljava/lang/Object;
      68: checkcast     #79                 // class day02/Day02$ResponsePlay
      71: astore        9
      73: aload         9
      75: invokevirtual #125                // Method day02/Day02$ResponsePlay.getPlay:()Lday02/Day02$Play;
      78: aload         8
      80: invokevirtual #126                // Method day02/Day02$OpponentPlay.getPlay:()Lday02/Day02$Play;
      83: invokevirtual #132                // Method day02/Day02$Play.scoreAgainst:(Lday02/Day02$Play;)I
      86: istore        11
      88: iload         10
      90: iload         11
      92: iadd
      93: istore_3
      94: goto          21
      97: iload_3
      98: ireturn

  public final java.util.List<kotlin.Pair<day02.Day02$OpponentPlay, day02.Day02$ExpectedResult>> parse2(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #26                 // class java/lang/String
      14: astore_2
      15: aload_2
      16: iconst_0
      17: ldc           #28                 // String \n
      19: aastore
      20: aload_2
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #34                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #36                 // class java/lang/Iterable
      32: astore_2
      33: nop
      34: iconst_0
      35: istore_3
      36: aload_2
      37: astore        4
      39: new           #38                 // class java/util/ArrayList
      42: dup
      43: aload_2
      44: bipush        10
      46: invokestatic  #44                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      49: invokespecial #47                 // Method java/util/ArrayList."<init>":(I)V
      52: checkcast     #49                 // class java/util/Collection
      55: astore        5
      57: iconst_0
      58: istore        6
      60: aload         4
      62: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      67: astore        7
      69: aload         7
      71: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      76: ifeq          179
      79: aload         7
      81: invokeinterface #63,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      86: astore        8
      88: aload         5
      90: aload         8
      92: checkcast     #26                 // class java/lang/String
      95: astore        9
      97: astore        14
      99: iconst_0
     100: istore        10
     102: aload         9
     104: checkcast     #24                 // class java/lang/CharSequence
     107: iconst_1
     108: anewarray     #26                 // class java/lang/String
     111: astore        11
     113: aload         11
     115: iconst_0
     116: ldc           #65                 // String
     118: aastore
     119: aload         11
     121: iconst_0
     122: iconst_0
     123: bipush        6
     125: aconst_null
     126: invokestatic  #34                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     129: astore        12
     131: iconst_0
     132: istore        13
     134: aload         12
     136: iconst_0
     137: invokeinterface #71,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     142: checkcast     #26                 // class java/lang/String
     145: invokestatic  #77                 // Method day02/Day02$OpponentPlay.valueOf:(Ljava/lang/String;)Lday02/Day02$OpponentPlay;
     148: aload         12
     150: iconst_1
     151: invokeinterface #71,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     156: checkcast     #26                 // class java/lang/String
     159: invokestatic  #144                // Method day02/Day02$ExpectedResult.valueOf:(Ljava/lang/String;)Lday02/Day02$ExpectedResult;
     162: invokestatic  #88                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     165: nop
     166: nop
     167: aload         14
     169: swap
     170: invokeinterface #92,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     175: pop
     176: goto          69
     179: aload         5
     181: checkcast     #67                 // class java/util/List
     184: nop
     185: areturn

  public final int part2(java.util.List<? extends kotlin.Pair<? extends day02.Day02$OpponentPlay, ? extends day02.Day02$ExpectedResult>>);
    Code:
       0: aload_1
       1: ldc           #113                // String parsed
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #36                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      19: astore        4
      21: aload         4
      23: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      28: ifeq          102
      31: aload         4
      33: invokeinterface #63,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      38: astore        5
      40: iload_3
      41: aload         5
      43: checkcast     #115                // class kotlin/Pair
      46: astore        6
      48: istore        10
      50: iconst_0
      51: istore        7
      53: aload         6
      55: invokevirtual #118                // Method kotlin/Pair.component1:()Ljava/lang/Object;
      58: checkcast     #73                 // class day02/Day02$OpponentPlay
      61: astore        8
      63: aload         6
      65: invokevirtual #121                // Method kotlin/Pair.component2:()Ljava/lang/Object;
      68: checkcast     #141                // class day02/Day02$ExpectedResult
      71: astore        9
      73: aload         9
      75: aload         8
      77: invokevirtual #126                // Method day02/Day02$OpponentPlay.getPlay:()Lday02/Day02$Play;
      80: invokevirtual #152                // Method day02/Day02$ExpectedResult.expectedResponse:(Lday02/Day02$Play;)Lday02/Day02$Play;
      83: aload         8
      85: invokevirtual #126                // Method day02/Day02$OpponentPlay.getPlay:()Lday02/Day02$Play;
      88: invokevirtual #132                // Method day02/Day02$Play.scoreAgainst:(Lday02/Day02$Play;)I
      91: istore        11
      93: iload         10
      95: iload         11
      97: iadd
      98: istore_3
      99: goto          21
     102: iload_3
     103: ireturn
}

Compiled from "Day02.kt"
public final class day02.Day02$Play$PAPER$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method day02/Day02$Play.values:()[Lday02/Day02$Play;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field day02/Day02$Play.ROCK:Lday02/Day02$Play;
      12: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field day02/Day02$Play.PAPER:Lday02/Day02$Play;
      26: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field day02/Day02$Play.SCISSORS:Lday02/Day02$Play;
      40: invokevirtual #22                 // Method day02/Day02$Play.ordinal:()I
      43: iconst_3
      44: iastore
      45: goto          49
      48: astore_1
      49: aload_0
      50: putstatic     #32                 // Field $EnumSwitchMapping$0:[I
      53: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
          35    45    48   Class java/lang/NoSuchFieldError
}


package day05

import day05.Day05.Step

private typealias Stack = MutableList<Char>
private typealias Storage = MutableList<Stack>

private const val EMPTY = ' '

private fun List<String>.indexOfStackNumbers() = indexOfFirst { it.startsWith(" 1") }

private val stepRegex = """move (\d+) from (\d+) to (\d+)""".toRegex()
private fun String.toStep() = stepRegex.find(this)!!.groupValues.let { (_, amount, from, to) ->
    Step(
        amount = amount.toInt(),
        from = from.toInt(),
        to = to.toInt()
    )
}

// CrateMover 9000 moves one by one
private fun Storage.move(step: Step) {
    (0 until step.amount).forEach { _ ->
        this[step.toIndex].add(this[step.fromIndex].last())
        this[step.fromIndex].removeLast()
    }
}

// CrateMover 9001 moves by batch
private fun Storage.moveV2(step: Step) {
    this[step.toIndex].addAll(this[step.fromIndex].takeLast(step.amount))
    this[step.fromIndex] = this[step.fromIndex].dropLast(step.amount).toMutableList()
}

class Day05 {

    data class Step(
        val amount: Int,
        val from: Int,
        val to: Int,
    ) {
        val fromIndex: Int
            get() = from - 1
        val toIndex: Int
            get() = to - 1
    }

    fun parse(input: String): Pair<Storage, List<Step>> {
        val storage: Storage = input
            .lines()
            .let { lines -> lines.subList(0, lines.indexOfStackNumbers()) }
            .map { row -> row.chunked(4).map { it[1] } }
            // transform rows to columns (stacks)
            .let { rows ->
                rows.fold(
                    initial = List(rows.first().size) { mutableListOf<Char>() },
                    operation = { columns, row ->
                        columns.apply {
                            forEachIndexed { columnIndex, column ->
                                // remove empty values
                                if (row[columnIndex] != EMPTY) {
                                    column.add(row[columnIndex])
                                }
                            }
                        }
                    }
                ).map { it.reversed().toMutableList() } // bottom to top of the stack
            }.toMutableList()
            .onEach { println(it) }

        val steps = input
            .lines()
            .let { lines -> lines.subList(lines.indexOfStackNumbers() + 2, lines.size) }
            .map { it.toStep() }
            .onEach { println(it) }

        return storage to steps
    }

    fun part1(parsed: Pair<Storage, List<Step>>): String {
        val (storage, steps) = parsed
        steps.forEach { step -> storage.move(step) }
        return storage.joinToString(separator = "") { stack -> "${stack.last()}" }
    }

    fun part2(parsed: Pair<Storage, List<Step>>): String {
        val (storage, steps) = parsed
        steps.forEach { step -> storage.moveV2(step) }
        return storage.joinToString(separator = "") { stack -> "${stack.last()}" }
    }

}

Compiled from "Day05.kt"
public final class day05.Day05Kt {
  private static final char EMPTY;

  private static final kotlin.text.Regex stepRegex;

  private static final int indexOfStackNumbers(java.util.List<java.lang.String>);
    Code:
       0: aload_0
       1: astore_1
       2: iconst_0
       3: istore_2
       4: iconst_0
       5: istore_3
       6: aload_1
       7: invokeinterface #13,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      12: astore        4
      14: aload         4
      16: invokeinterface #19,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      21: ifeq          66
      24: aload         4
      26: invokeinterface #23,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      31: astore        5
      33: aload         5
      35: checkcast     #25                 // class java/lang/String
      38: astore        6
      40: iconst_0
      41: istore        7
      43: aload         6
      45: ldc           #27                 // String  1
      47: iconst_0
      48: iconst_2
      49: aconst_null
      50: invokestatic  #33                 // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
      53: ifeq          60
      56: iload_3
      57: goto          67
      60: iinc          3, 1
      63: goto          14
      66: iconst_m1
      67: ireturn

  private static final day05.Day05$Step toStep(java.lang.String);
    Code:
       0: getstatic     #50                 // Field stepRegex:Lkotlin/text/Regex;
       3: aload_0
       4: checkcast     #52                 // class java/lang/CharSequence
       7: iconst_0
       8: iconst_2
       9: aconst_null
      10: invokestatic  #58                 // Method kotlin/text/Regex.find$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/text/MatchResult;
      13: dup
      14: invokestatic  #64                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      17: invokeinterface #70,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
      22: astore_1
      23: iconst_0
      24: istore_2
      25: aload_1
      26: iconst_1
      27: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      32: checkcast     #25                 // class java/lang/String
      35: astore_3
      36: aload_1
      37: iconst_2
      38: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      43: checkcast     #25                 // class java/lang/String
      46: astore        4
      48: aload_1
      49: iconst_3
      50: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      55: checkcast     #25                 // class java/lang/String
      58: astore        5
      60: new           #76                 // class day05/Day05$Step
      63: dup
      64: aload_3
      65: invokestatic  #82                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      68: aload         4
      70: invokestatic  #82                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      73: aload         5
      75: invokestatic  #82                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      78: invokespecial #86                 // Method day05/Day05$Step."<init>":(III)V
      81: nop
      82: nop
      83: areturn

  private static final void move(java.util.List<java.util.List<java.lang.Character>>, day05.Day05$Step);
    Code:
       0: iconst_0
       1: aload_1
       2: invokevirtual #98                 // Method day05/Day05$Step.getAmount:()I
       5: invokestatic  #104                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
       8: checkcast     #106                // class java/lang/Iterable
      11: astore_2
      12: iconst_0
      13: istore_3
      14: aload_2
      15: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      20: astore        4
      22: aload         4
      24: invokeinterface #19,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      29: ifeq          104
      32: aload         4
      34: checkcast     #109                // class kotlin/collections/IntIterator
      37: invokevirtual #112                // Method kotlin/collections/IntIterator.nextInt:()I
      40: istore        5
      42: iconst_0
      43: istore        6
      45: aload_0
      46: aload_1
      47: invokevirtual #115                // Method day05/Day05$Step.getToIndex:()I
      50: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      55: checkcast     #9                  // class java/util/List
      58: aload_0
      59: aload_1
      60: invokevirtual #118                // Method day05/Day05$Step.getFromIndex:()I
      63: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      68: checkcast     #9                  // class java/util/List
      71: invokestatic  #124                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      74: invokeinterface #128,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      79: pop
      80: aload_0
      81: aload_1
      82: invokevirtual #118                // Method day05/Day05$Step.getFromIndex:()I
      85: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      90: checkcast     #9                  // class java/util/List
      93: invokeinterface #131,  1          // InterfaceMethod java/util/List.removeLast:()Ljava/lang/Object;
      98: pop
      99: nop
     100: nop
     101: goto          22
     104: nop
     105: return

  private static final void moveV2(java.util.List<java.util.List<java.lang.Character>>, day05.Day05$Step);
    Code:
       0: aload_0
       1: aload_1
       2: invokevirtual #115                // Method day05/Day05$Step.getToIndex:()I
       5: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      10: checkcast     #9                  // class java/util/List
      13: aload_0
      14: aload_1
      15: invokevirtual #118                // Method day05/Day05$Step.getFromIndex:()I
      18: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      23: checkcast     #9                  // class java/util/List
      26: aload_1
      27: invokevirtual #98                 // Method day05/Day05$Step.getAmount:()I
      30: invokestatic  #144                // Method kotlin/collections/CollectionsKt.takeLast:(Ljava/util/List;I)Ljava/util/List;
      33: checkcast     #146                // class java/util/Collection
      36: invokeinterface #150,  2          // InterfaceMethod java/util/List.addAll:(Ljava/util/Collection;)Z
      41: pop
      42: aload_0
      43: aload_1
      44: invokevirtual #118                // Method day05/Day05$Step.getFromIndex:()I
      47: aload_0
      48: aload_1
      49: invokevirtual #118                // Method day05/Day05$Step.getFromIndex:()I
      52: invokeinterface #74,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      57: checkcast     #9                  // class java/util/List
      60: aload_1
      61: invokevirtual #98                 // Method day05/Day05$Step.getAmount:()I
      64: invokestatic  #153                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      67: checkcast     #146                // class java/util/Collection
      70: invokestatic  #157                // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
      73: invokeinterface #161,  3          // InterfaceMethod java/util/List.set:(ILjava/lang/Object;)Ljava/lang/Object;
      78: pop
      79: return

  public static final int access$indexOfStackNumbers(java.util.List);
    Code:
       0: aload_0
       1: invokestatic  #165                // Method indexOfStackNumbers:(Ljava/util/List;)I
       4: ireturn

  public static final day05.Day05$Step access$toStep(java.lang.String);
    Code:
       0: aload_0
       1: invokestatic  #169                // Method toStep:(Ljava/lang/String;)Lday05/Day05$Step;
       4: areturn

  public static final void access$move(java.util.List, day05.Day05$Step);
    Code:
       0: aload_0
       1: aload_1
       2: invokestatic  #172                // Method move:(Ljava/util/List;Lday05/Day05$Step;)V
       5: return

  public static final void access$moveV2(java.util.List, day05.Day05$Step);
    Code:
       0: aload_0
       1: aload_1
       2: invokestatic  #175                // Method moveV2:(Ljava/util/List;Lday05/Day05$Step;)V
       5: return

  static {};
    Code:
       0: new           #54                 // class kotlin/text/Regex
       3: dup
       4: ldc           #179                // String move (\\d+) from (\\d+) to (\\d+)
       6: invokespecial #182                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
       9: putstatic     #50                 // Field stepRegex:Lkotlin/text/Regex;
      12: return
}

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

  public final kotlin.Pair<java.util.List<java.util.List<java.lang.Character>>, java.util.List<day05.Day05$Step>> parse(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/CharSequence
      10: invokestatic  #30                 // Method kotlin/text/StringsKt.lines:(Ljava/lang/CharSequence;)Ljava/util/List;
      13: astore        4
      15: iconst_0
      16: istore        5
      18: aload         4
      20: iconst_0
      21: aload         4
      23: invokestatic  #36                 // Method day05/Day05Kt.access$indexOfStackNumbers:(Ljava/util/List;)I
      26: invokeinterface #42,  3           // InterfaceMethod java/util/List.subList:(II)Ljava/util/List;
      31: checkcast     #44                 // class java/lang/Iterable
      34: astore_3
      35: nop
      36: iconst_0
      37: istore        4
      39: aload_3
      40: astore        5
      42: new           #46                 // class java/util/ArrayList
      45: dup
      46: aload_3
      47: bipush        10
      49: invokestatic  #52                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      52: invokespecial #55                 // Method java/util/ArrayList."<init>":(I)V
      55: checkcast     #57                 // class java/util/Collection
      58: astore        6
      60: iconst_0
      61: istore        7
      63: aload         5
      65: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      70: astore        8
      72: aload         8
      74: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      79: ifeq          230
      82: aload         8
      84: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      89: astore        9
      91: aload         6
      93: aload         9
      95: checkcast     #73                 // class java/lang/String
      98: astore        10
     100: astore        28
     102: iconst_0
     103: istore        11
     105: aload         10
     107: checkcast     #24                 // class java/lang/CharSequence
     110: iconst_4
     111: invokestatic  #77                 // Method kotlin/text/StringsKt.chunked:(Ljava/lang/CharSequence;I)Ljava/util/List;
     114: checkcast     #44                 // class java/lang/Iterable
     117: astore        12
     119: iconst_0
     120: istore        13
     122: aload         12
     124: astore        14
     126: new           #46                 // class java/util/ArrayList
     129: dup
     130: aload         12
     132: bipush        10
     134: invokestatic  #52                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     137: invokespecial #55                 // Method java/util/ArrayList."<init>":(I)V
     140: checkcast     #57                 // class java/util/Collection
     143: astore        15
     145: iconst_0
     146: istore        16
     148: aload         14
     150: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     155: astore        17
     157: aload         17
     159: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     164: ifeq          211
     167: aload         17
     169: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     174: astore        18
     176: aload         15
     178: aload         18
     180: checkcast     #73                 // class java/lang/String
     183: astore        19
     185: astore        20
     187: iconst_0
     188: istore        21
     190: aload         19
     192: iconst_1
     193: invokevirtual #81                 // Method java/lang/String.charAt:(I)C
     196: invokestatic  #87                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     199: aload         20
     201: swap
     202: invokeinterface #91,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     207: pop
     208: goto          157
     211: aload         15
     213: checkcast     #38                 // class java/util/List
     216: nop
     217: nop
     218: aload         28
     220: swap
     221: invokeinterface #91,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     226: pop
     227: goto          72
     230: aload         6
     232: checkcast     #38                 // class java/util/List
     235: nop
     236: astore        4
     238: iconst_0
     239: istore        5
     241: aload         4
     243: checkcast     #44                 // class java/lang/Iterable
     246: astore        6
     248: aload         4
     250: invokestatic  #95                 // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     253: checkcast     #38                 // class java/util/List
     256: invokeinterface #99,  1           // InterfaceMethod java/util/List.size:()I
     261: istore        7
     263: new           #46                 // class java/util/ArrayList
     266: dup
     267: iload         7
     269: invokespecial #55                 // Method java/util/ArrayList."<init>":(I)V
     272: astore        8
     274: iconst_0
     275: istore        9
     277: iload         9
     279: iload         7
     281: if_icmpge     323
     284: iload         9
     286: istore        10
     288: aload         8
     290: iload         10
     292: istore        11
     294: astore        12
     296: iconst_0
     297: istore        13
     299: new           #46                 // class java/util/ArrayList
     302: dup
     303: invokespecial #100                // Method java/util/ArrayList."<init>":()V
     306: checkcast     #38                 // class java/util/List
     309: nop
     310: aload         12
     312: swap
     313: invokevirtual #101                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     316: pop
     317: iinc          9, 1
     320: goto          277
     323: aload         8
     325: checkcast     #38                 // class java/util/List
     328: astore        7
     330: nop
     331: iconst_0
     332: istore        8
     334: aload         7
     336: astore        9
     338: aload         6
     340: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     345: astore        10
     347: aload         10
     349: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     354: ifeq          513
     357: aload         10
     359: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     364: astore        11
     366: aload         9
     368: aload         11
     370: checkcast     #38                 // class java/util/List
     373: astore        13
     375: astore        14
     377: iconst_0
     378: istore        15
     380: aload         14
     382: astore        16
     384: aload         16
     386: astore        17
     388: iconst_0
     389: istore        18
     391: aload         17
     393: checkcast     #44                 // class java/lang/Iterable
     396: astore        19
     398: iconst_0
     399: istore        20
     401: iconst_0
     402: istore        21
     404: aload         19
     406: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     411: astore        22
     413: aload         22
     415: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     420: ifeq          503
     423: aload         22
     425: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     430: astore        23
     432: iload         21
     434: iinc          21, 1
     437: istore        24
     439: iload         24
     441: ifge          447
     444: invokestatic  #104                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     447: iload         24
     449: aload         23
     451: checkcast     #38                 // class java/util/List
     454: astore        25
     456: istore        26
     458: iconst_0
     459: istore        27
     461: aload         13
     463: iload         26
     465: invokeinterface #108,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     470: checkcast     #83                 // class java/lang/Character
     473: invokevirtual #112                // Method java/lang/Character.charValue:()C
     476: bipush        32
     478: if_icmpeq     498
     481: aload         25
     483: aload         13
     485: iload         26
     487: invokeinterface #108,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     492: invokeinterface #113,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     497: pop
     498: nop
     499: nop
     500: goto          413
     503: nop
     504: nop
     505: aload         16
     507: nop
     508: astore        9
     510: goto          347
     513: aload         9
     515: checkcast     #44                 // class java/lang/Iterable
     518: astore        6
     520: nop
     521: iconst_0
     522: istore        7
     524: aload         6
     526: astore        8
     528: new           #46                 // class java/util/ArrayList
     531: dup
     532: aload         6
     534: bipush        10
     536: invokestatic  #52                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     539: invokespecial #55                 // Method java/util/ArrayList."<init>":(I)V
     542: checkcast     #57                 // class java/util/Collection
     545: astore        9
     547: iconst_0
     548: istore        10
     550: aload         8
     552: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     557: astore        11
     559: aload         11
     561: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     566: ifeq          618
     569: aload         11
     571: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     576: astore        13
     578: aload         9
     580: aload         13
     582: checkcast     #38                 // class java/util/List
     585: astore        14
     587: astore        12
     589: iconst_0
     590: istore        15
     592: aload         14
     594: checkcast     #44                 // class java/lang/Iterable
     597: invokestatic  #117                // Method kotlin/collections/CollectionsKt.reversed:(Ljava/lang/Iterable;)Ljava/util/List;
     600: checkcast     #57                 // class java/util/Collection
     603: invokestatic  #121                // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
     606: aload         12
     608: swap
     609: invokeinterface #91,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     614: pop
     615: goto          559
     618: aload         9
     620: checkcast     #38                 // class java/util/List
     623: nop
     624: nop
     625: checkcast     #57                 // class java/util/Collection
     628: invokestatic  #121                // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
     631: checkcast     #44                 // class java/lang/Iterable
     634: astore_3
     635: nop
     636: iconst_0
     637: istore        4
     639: aload_3
     640: astore        5
     642: aload         5
     644: astore        6
     646: iconst_0
     647: istore        7
     649: aload         6
     651: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     656: astore        8
     658: aload         8
     660: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     665: ifeq          700
     668: aload         8
     670: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     675: astore        9
     677: aload         9
     679: checkcast     #38                 // class java/util/List
     682: astore        10
     684: iconst_0
     685: istore        11
     687: getstatic     #127                // Field java/lang/System.out:Ljava/io/PrintStream;
     690: aload         10
     692: invokevirtual #133                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     695: nop
     696: nop
     697: goto          658
     700: aload         5
     702: nop
     703: checkcast     #38                 // class java/util/List
     706: astore_2
     707: aload_1
     708: checkcast     #24                 // class java/lang/CharSequence
     711: invokestatic  #30                 // Method kotlin/text/StringsKt.lines:(Ljava/lang/CharSequence;)Ljava/util/List;
     714: astore        5
     716: iconst_0
     717: istore        6
     719: aload         5
     721: aload         5
     723: invokestatic  #36                 // Method day05/Day05Kt.access$indexOfStackNumbers:(Ljava/util/List;)I
     726: iconst_2
     727: iadd
     728: aload         5
     730: invokeinterface #99,  1           // InterfaceMethod java/util/List.size:()I
     735: invokeinterface #42,  3           // InterfaceMethod java/util/List.subList:(II)Ljava/util/List;
     740: checkcast     #44                 // class java/lang/Iterable
     743: astore        4
     745: nop
     746: iconst_0
     747: istore        5
     749: aload         4
     751: astore        6
     753: new           #46                 // class java/util/ArrayList
     756: dup
     757: aload         4
     759: bipush        10
     761: invokestatic  #52                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     764: invokespecial #55                 // Method java/util/ArrayList."<init>":(I)V
     767: checkcast     #57                 // class java/util/Collection
     770: astore        7
     772: iconst_0
     773: istore        8
     775: aload         6
     777: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     782: astore        9
     784: aload         9
     786: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     791: ifeq          834
     794: aload         9
     796: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     801: astore        10
     803: aload         7
     805: aload         10
     807: checkcast     #73                 // class java/lang/String
     810: astore        11
     812: astore        28
     814: iconst_0
     815: istore        12
     817: aload         11
     819: invokestatic  #137                // Method day05/Day05Kt.access$toStep:(Ljava/lang/String;)Lday05/Day05$Step;
     822: aload         28
     824: swap
     825: invokeinterface #91,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     830: pop
     831: goto          784
     834: aload         7
     836: checkcast     #38                 // class java/util/List
     839: nop
     840: checkcast     #44                 // class java/lang/Iterable
     843: astore        4
     845: nop
     846: iconst_0
     847: istore        5
     849: aload         4
     851: astore        6
     853: aload         6
     855: astore        7
     857: iconst_0
     858: istore        8
     860: aload         7
     862: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     867: astore        9
     869: aload         9
     871: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     876: ifeq          911
     879: aload         9
     881: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     886: astore        10
     888: aload         10
     890: checkcast     #139                // class day05/Day05$Step
     893: astore        11
     895: iconst_0
     896: istore        12
     898: getstatic     #127                // Field java/lang/System.out:Ljava/io/PrintStream;
     901: aload         11
     903: invokevirtual #133                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     906: nop
     907: nop
     908: goto          869
     911: aload         6
     913: nop
     914: checkcast     #38                 // class java/util/List
     917: astore_3
     918: aload_2
     919: aload_3
     920: invokestatic  #145                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     923: areturn

  public final java.lang.String part1(kotlin.Pair<? extends java.util.List<java.util.List<java.lang.Character>>, ? extends java.util.List<day05.Day05$Step>>);
    Code:
       0: aload_1
       1: ldc           #198                // String parsed
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #203                // Method kotlin/Pair.component1:()Ljava/lang/Object;
      10: checkcast     #38                 // class java/util/List
      13: astore_2
      14: aload_1
      15: invokevirtual #206                // Method kotlin/Pair.component2:()Ljava/lang/Object;
      18: checkcast     #38                 // class java/util/List
      21: astore_3
      22: aload_3
      23: checkcast     #44                 // class java/lang/Iterable
      26: astore        4
      28: iconst_0
      29: istore        5
      31: aload         4
      33: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      38: astore        6
      40: aload         6
      42: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      47: ifeq          79
      50: aload         6
      52: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      57: astore        7
      59: aload         7
      61: checkcast     #139                // class day05/Day05$Step
      64: astore        8
      66: iconst_0
      67: istore        9
      69: aload_2
      70: aload         8
      72: invokestatic  #210                // Method day05/Day05Kt.access$move:(Ljava/util/List;Lday05/Day05$Step;)V
      75: nop
      76: goto          40
      79: nop
      80: aload_2
      81: checkcast     #44                 // class java/lang/Iterable
      84: ldc           #212                // String
      86: checkcast     #24                 // class java/lang/CharSequence
      89: aconst_null
      90: aconst_null
      91: iconst_0
      92: aconst_null
      93: invokedynamic #231,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      98: bipush        30
     100: aconst_null
     101: invokestatic  #235                // 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;
     104: areturn

  public final java.lang.String part2(kotlin.Pair<? extends java.util.List<java.util.List<java.lang.Character>>, ? extends java.util.List<day05.Day05$Step>>);
    Code:
       0: aload_1
       1: ldc           #198                // String parsed
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #203                // Method kotlin/Pair.component1:()Ljava/lang/Object;
      10: checkcast     #38                 // class java/util/List
      13: astore_2
      14: aload_1
      15: invokevirtual #206                // Method kotlin/Pair.component2:()Ljava/lang/Object;
      18: checkcast     #38                 // class java/util/List
      21: astore_3
      22: aload_3
      23: checkcast     #44                 // class java/lang/Iterable
      26: astore        4
      28: iconst_0
      29: istore        5
      31: aload         4
      33: invokeinterface #61,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      38: astore        6
      40: aload         6
      42: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      47: ifeq          79
      50: aload         6
      52: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      57: astore        7
      59: aload         7
      61: checkcast     #139                // class day05/Day05$Step
      64: astore        8
      66: iconst_0
      67: istore        9
      69: aload_2
      70: aload         8
      72: invokestatic  #244                // Method day05/Day05Kt.access$moveV2:(Ljava/util/List;Lday05/Day05$Step;)V
      75: nop
      76: goto          40
      79: nop
      80: aload_2
      81: checkcast     #44                 // class java/lang/Iterable
      84: ldc           #212                // String
      86: checkcast     #24                 // class java/lang/CharSequence
      89: aconst_null
      90: aconst_null
      91: iconst_0
      92: aconst_null
      93: invokedynamic #249,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function1;
      98: bipush        30
     100: aconst_null
     101: invokestatic  #235                // 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;
     104: areturn

  private static final java.lang.CharSequence part1$lambda$14(java.util.List);
    Code:
       0: aload_0
       1: ldc           #252                // String stack
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokestatic  #255                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      10: checkcast     #83                 // class java/lang/Character
      13: invokevirtual #112                // Method java/lang/Character.charValue:()C
      16: invokestatic  #258                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      19: checkcast     #24                 // class java/lang/CharSequence
      22: areturn

  private static final java.lang.CharSequence part2$lambda$16(java.util.List);
    Code:
       0: aload_0
       1: ldc           #252                // String stack
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokestatic  #255                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      10: checkcast     #83                 // class java/lang/Character
      13: invokevirtual #112                // Method java/lang/Character.charValue:()C
      16: invokestatic  #258                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      19: checkcast     #24                 // class java/lang/CharSequence
      22: areturn
}

Compiled from "Day05.kt"
public final class day05.Day05$Step {
  private final int amount;

  private final int from;

  private final int to;

  public day05.Day05$Step(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 amount: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 getAmount();
    Code:
       0: aload_0
       1: getfield      #13                 // Field amount: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 getFromIndex();
    Code:
       0: aload_0
       1: getfield      #16                 // Field from:I
       4: iconst_1
       5: isub
       6: ireturn

  public final int getToIndex();
    Code:
       0: aload_0
       1: getfield      #19                 // Field to:I
       4: iconst_1
       5: isub
       6: ireturn

  public final int component1();
    Code:
       0: aload_0
       1: getfield      #13                 // Field amount: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 day05.Day05$Step copy(int, int, int);
    Code:
       0: new           #2                  // class day05/Day05$Step
       3: dup
       4: iload_1
       5: iload_2
       6: iload_3
       7: invokespecial #35                 // Method "<init>":(III)V
      10: areturn

  public static day05.Day05$Step copy$default(day05.Day05$Step, 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 amount: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 #39                 // Method copy:(III)Lday05/Day05$Step;
      43: areturn

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

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #13                 // Field amount:I
       4: invokestatic  #68                 // 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  #68                 // 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  #68                 // 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 day05/Day05$Step
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class day05/Day05$Step
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field amount:I
      25: aload_2
      26: getfield      #13                 // Field amount: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
}