import java.io.File

enum class Direction {
    UP,
    DOWN,
    FORWARD
}

class SubmarineCommand(val direction: Direction, val magnitude: Int)

fun parseSubmarineCommand(command: String): SubmarineCommand {
    val pieces = command.split(" ")
    if (pieces.size != 2) throw Exception("Ruh roh")
    return SubmarineCommand(Direction.valueOf(pieces[0].uppercase()), pieces[1].toInt())
}

fun day2Puzzle1() {
    class Grid(val depth: Int, val horizontal: Int) {
        fun applyCommand(command: SubmarineCommand) =
            when (command.direction) {
                Direction.UP -> Grid(depth - command.magnitude, horizontal)
                Direction.DOWN -> Grid(depth + command.magnitude, horizontal)
                Direction.FORWARD -> Grid(depth, horizontal + command.magnitude)
            }
    }

    File("day2.txt").readLines()
        .filter { it.isNotEmpty() }
        .map { parseSubmarineCommand(it) }
        .fold(Grid(0, 0)) { current, command -> current.applyCommand(command) }
        .let { println(it.depth * it.horizontal) }
}

fun day2Puzzle2() {
    class Grid(val depth: Int, val horizontal: Int, val aim: Int) {
        fun applyCommand(command: SubmarineCommand) =
            when (command.direction) {
                Direction.UP -> Grid(depth, horizontal, aim - command.magnitude)
                Direction.DOWN -> Grid(depth, horizontal, aim + command.magnitude)
                Direction.FORWARD -> Grid(depth + aim * command.magnitude, horizontal + command.magnitude, aim)
            }
    }

    File("day2.txt").readLines()
        .filter { it.isNotEmpty() }
        .map { parseSubmarineCommand(it) }
        .fold(Grid(0, 0, 0)) { current, command -> current.applyCommand(command) }
        .let { println(it.depth * it.horizontal) }
}

fun day3Puzzle2() {
    val numbers = File("day3.txt").readLines()
        .filter { it.isNotEmpty() }
    val length = numbers[0].length

    var sublist = numbers
    (0..length).forEach {
        if (sublist.size == 1) return@forEach
        sublist = findSubListForCategory(Category.MOST, it, sublist)
    }

    val most = sublist[0].toInt(2)

    sublist = numbers
    (0..length).forEach {
        if (sublist.size == 1) return@forEach
        sublist = findSubListForCategory(Category.LEAST, it, sublist)
    }

    val least = sublist[0].toInt(2)

    println(most * least)
}

fun findSubListForCategory(category: Category, index: Int, list: List<String>): List<String> {
    var oneCount = 0
    var zeroCount = 0
    list.forEach { if (it[index] == '0') zeroCount += 1 else oneCount += 1 }
    return when (category) {
        Category.MOST -> list.filter {
            val filterFor = if (oneCount >= zeroCount) '1' else '0'
            it[index] == filterFor
        }
        Category.LEAST -> list.filter {
            val filterFor = if (oneCount < zeroCount) '1' else '0'
            it[index] == filterFor
        }
    }
}

enum class Category {
    MOST,
    LEAST
}

Compiled from "Day2.kt"
public final class Day2Kt$day2Puzzle2$Grid$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method Direction.values:()[LDirection;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field Direction.UP:LDirection;
      12: invokevirtual #22                 // Method Direction.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field Direction.DOWN:LDirection;
      26: invokevirtual #22                 // Method Direction.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field Direction.FORWARD:LDirection;
      40: invokevirtual #22                 // Method Direction.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 "Day2.kt"
public final class Day2Kt$day2Puzzle2$Grid {
  private final int depth;

  private final int horizontal;

  private final int aim;

  public Day2Kt$day2Puzzle2$Grid(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 depth:I
       9: aload_0
      10: iload_2
      11: putfield      #16                 // Field horizontal:I
      14: aload_0
      15: iload_3
      16: putfield      #19                 // Field aim:I
      19: return

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

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

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

  public final Day2Kt$day2Puzzle2$Grid applyCommand(SubmarineCommand);
    Code:
       0: aload_1
       1: ldc           #29                 // String command
       3: invokestatic  #35                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #41                 // Method SubmarineCommand.getDirection:()LDirection;
      10: getstatic     #47                 // Field Day2Kt$day2Puzzle2$Grid$WhenMappings.$EnumSwitchMapping$0:[I
      13: swap
      14: invokevirtual #52                 // Method Direction.ordinal:()I
      17: iaload
      18: tableswitch   { // 1 to 3
                     1: 44
                     2: 71
                     3: 98
               default: 135
          }
      44: new           #2                  // class Day2Kt$day2Puzzle2$Grid
      47: dup
      48: aload_0
      49: getfield      #13                 // Field depth:I
      52: aload_0
      53: getfield      #16                 // Field horizontal:I
      56: aload_0
      57: getfield      #19                 // Field aim:I
      60: aload_1
      61: invokevirtual #55                 // Method SubmarineCommand.getMagnitude:()I
      64: isub
      65: invokespecial #57                 // Method "<init>":(III)V
      68: goto          143
      71: new           #2                  // class Day2Kt$day2Puzzle2$Grid
      74: dup
      75: aload_0
      76: getfield      #13                 // Field depth:I
      79: aload_0
      80: getfield      #16                 // Field horizontal:I
      83: aload_0
      84: getfield      #19                 // Field aim:I
      87: aload_1
      88: invokevirtual #55                 // Method SubmarineCommand.getMagnitude:()I
      91: iadd
      92: invokespecial #57                 // Method "<init>":(III)V
      95: goto          143
      98: new           #2                  // class Day2Kt$day2Puzzle2$Grid
     101: dup
     102: aload_0
     103: getfield      #13                 // Field depth:I
     106: aload_0
     107: getfield      #19                 // Field aim:I
     110: aload_1
     111: invokevirtual #55                 // Method SubmarineCommand.getMagnitude:()I
     114: imul
     115: iadd
     116: aload_0
     117: getfield      #16                 // Field horizontal:I
     120: aload_1
     121: invokevirtual #55                 // Method SubmarineCommand.getMagnitude:()I
     124: iadd
     125: aload_0
     126: getfield      #19                 // Field aim:I
     129: invokespecial #57                 // Method "<init>":(III)V
     132: goto          143
     135: new           #59                 // class kotlin/NoWhenBranchMatchedException
     138: dup
     139: invokespecial #60                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     142: athrow
     143: areturn
}

Compiled from "Day2.kt"
public final class Day2Kt$day2Puzzle1$Grid$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method Direction.values:()[LDirection;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field Direction.UP:LDirection;
      12: invokevirtual #22                 // Method Direction.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field Direction.DOWN:LDirection;
      26: invokevirtual #22                 // Method Direction.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field Direction.FORWARD:LDirection;
      40: invokevirtual #22                 // Method Direction.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 "Day2.kt"
public final class Day2Kt {
  public static final SubmarineCommand parseSubmarineCommand(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #9                  // String command
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #17                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #19                 // class java/lang/String
      14: astore_2
      15: aload_2
      16: iconst_0
      17: ldc           #21                 // String
      19: aastore
      20: aload_2
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #27                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: astore_1
      30: aload_1
      31: invokeinterface #33,  1           // InterfaceMethod java/util/List.size:()I
      36: iconst_2
      37: if_icmpeq     50
      40: new           #35                 // class java/lang/Exception
      43: dup
      44: ldc           #37                 // String Ruh roh
      46: invokespecial #41                 // Method java/lang/Exception."<init>":(Ljava/lang/String;)V
      49: athrow
      50: new           #43                 // class SubmarineCommand
      53: dup
      54: aload_1
      55: iconst_0
      56: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      61: checkcast     #19                 // class java/lang/String
      64: getstatic     #53                 // Field java/util/Locale.ROOT:Ljava/util/Locale;
      67: invokevirtual #57                 // Method java/lang/String.toUpperCase:(Ljava/util/Locale;)Ljava/lang/String;
      70: dup
      71: ldc           #59                 // String toUpperCase(...)
      73: invokestatic  #62                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      76: invokestatic  #68                 // Method Direction.valueOf:(Ljava/lang/String;)LDirection;
      79: aload_1
      80: iconst_1
      81: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      86: checkcast     #19                 // class java/lang/String
      89: invokestatic  #74                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      92: invokespecial #77                 // Method SubmarineCommand."<init>":(LDirection;I)V
      95: areturn

  public static final void day2Puzzle1();
    Code:
       0: new           #86                 // class java/io/File
       3: dup
       4: ldc           #88                 // String day2.txt
       6: invokespecial #89                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: aconst_null
      10: iconst_1
      11: aconst_null
      12: invokestatic  #95                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      15: checkcast     #97                 // class java/lang/Iterable
      18: astore_0
      19: nop
      20: iconst_0
      21: istore_1
      22: aload_0
      23: astore_2
      24: new           #99                 // class java/util/ArrayList
      27: dup
      28: invokespecial #101                // Method java/util/ArrayList."<init>":()V
      31: checkcast     #103                // class java/util/Collection
      34: astore_3
      35: iconst_0
      36: istore        4
      38: aload_2
      39: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        5
      46: aload         5
      48: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          109
      56: aload         5
      58: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        6
      65: aload         6
      67: checkcast     #19                 // class java/lang/String
      70: astore        7
      72: iconst_0
      73: istore        8
      75: aload         7
      77: checkcast     #17                 // class java/lang/CharSequence
      80: invokeinterface #120,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      85: ifle          92
      88: iconst_1
      89: goto          93
      92: iconst_0
      93: nop
      94: ifeq          46
      97: aload_3
      98: aload         6
     100: invokeinterface #124,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     105: pop
     106: goto          46
     109: aload_3
     110: checkcast     #29                 // class java/util/List
     113: nop
     114: checkcast     #97                 // class java/lang/Iterable
     117: astore_0
     118: nop
     119: iconst_0
     120: istore_1
     121: aload_0
     122: astore_2
     123: new           #99                 // class java/util/ArrayList
     126: dup
     127: aload_0
     128: bipush        10
     130: invokestatic  #130                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     133: invokespecial #133                // Method java/util/ArrayList."<init>":(I)V
     136: checkcast     #103                // class java/util/Collection
     139: astore_3
     140: iconst_0
     141: istore        4
     143: aload_2
     144: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     149: astore        5
     151: aload         5
     153: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     158: ifeq          200
     161: aload         5
     163: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     168: astore        6
     170: aload_3
     171: aload         6
     173: checkcast     #19                 // class java/lang/String
     176: astore        7
     178: astore        9
     180: iconst_0
     181: istore        8
     183: aload         7
     185: invokestatic  #135                // Method parseSubmarineCommand:(Ljava/lang/String;)LSubmarineCommand;
     188: aload         9
     190: swap
     191: invokeinterface #124,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     196: pop
     197: goto          151
     200: aload_3
     201: checkcast     #29                 // class java/util/List
     204: nop
     205: checkcast     #97                 // class java/lang/Iterable
     208: astore_0
     209: new           #137                // class Day2Kt$day2Puzzle1$Grid
     212: dup
     213: iconst_0
     214: iconst_0
     215: invokespecial #140                // Method Day2Kt$day2Puzzle1$Grid."<init>":(II)V
     218: astore_1
     219: iconst_0
     220: istore_2
     221: aload_1
     222: astore_3
     223: aload_0
     224: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     229: astore        4
     231: aload         4
     233: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     238: ifeq          274
     241: aload         4
     243: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     248: astore        5
     250: aload_3
     251: aload         5
     253: checkcast     #43                 // class SubmarineCommand
     256: astore        6
     258: astore        7
     260: iconst_0
     261: istore        8
     263: aload         7
     265: aload         6
     267: invokevirtual #144                // Method Day2Kt$day2Puzzle1$Grid.applyCommand:(LSubmarineCommand;)LDay2Kt$day2Puzzle1$Grid;
     270: astore_3
     271: goto          231
     274: aload_3
     275: astore_1
     276: iconst_0
     277: istore_2
     278: aload_1
     279: invokevirtual #147                // Method Day2Kt$day2Puzzle1$Grid.getDepth:()I
     282: aload_1
     283: invokevirtual #150                // Method Day2Kt$day2Puzzle1$Grid.getHorizontal:()I
     286: imul
     287: istore_3
     288: getstatic     #156                // Field java/lang/System.out:Ljava/io/PrintStream;
     291: iload_3
     292: invokevirtual #161                // Method java/io/PrintStream.println:(I)V
     295: nop
     296: nop
     297: return

  public static final void day2Puzzle2();
    Code:
       0: new           #86                 // class java/io/File
       3: dup
       4: ldc           #88                 // String day2.txt
       6: invokespecial #89                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: aconst_null
      10: iconst_1
      11: aconst_null
      12: invokestatic  #95                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      15: checkcast     #97                 // class java/lang/Iterable
      18: astore_0
      19: nop
      20: iconst_0
      21: istore_1
      22: aload_0
      23: astore_2
      24: new           #99                 // class java/util/ArrayList
      27: dup
      28: invokespecial #101                // Method java/util/ArrayList."<init>":()V
      31: checkcast     #103                // class java/util/Collection
      34: astore_3
      35: iconst_0
      36: istore        4
      38: aload_2
      39: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        5
      46: aload         5
      48: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          109
      56: aload         5
      58: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        6
      65: aload         6
      67: checkcast     #19                 // class java/lang/String
      70: astore        7
      72: iconst_0
      73: istore        8
      75: aload         7
      77: checkcast     #17                 // class java/lang/CharSequence
      80: invokeinterface #120,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      85: ifle          92
      88: iconst_1
      89: goto          93
      92: iconst_0
      93: nop
      94: ifeq          46
      97: aload_3
      98: aload         6
     100: invokeinterface #124,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     105: pop
     106: goto          46
     109: aload_3
     110: checkcast     #29                 // class java/util/List
     113: nop
     114: checkcast     #97                 // class java/lang/Iterable
     117: astore_0
     118: nop
     119: iconst_0
     120: istore_1
     121: aload_0
     122: astore_2
     123: new           #99                 // class java/util/ArrayList
     126: dup
     127: aload_0
     128: bipush        10
     130: invokestatic  #130                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     133: invokespecial #133                // Method java/util/ArrayList."<init>":(I)V
     136: checkcast     #103                // class java/util/Collection
     139: astore_3
     140: iconst_0
     141: istore        4
     143: aload_2
     144: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     149: astore        5
     151: aload         5
     153: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     158: ifeq          200
     161: aload         5
     163: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     168: astore        6
     170: aload_3
     171: aload         6
     173: checkcast     #19                 // class java/lang/String
     176: astore        7
     178: astore        9
     180: iconst_0
     181: istore        8
     183: aload         7
     185: invokestatic  #135                // Method parseSubmarineCommand:(Ljava/lang/String;)LSubmarineCommand;
     188: aload         9
     190: swap
     191: invokeinterface #124,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     196: pop
     197: goto          151
     200: aload_3
     201: checkcast     #29                 // class java/util/List
     204: nop
     205: checkcast     #97                 // class java/lang/Iterable
     208: astore_0
     209: new           #192                // class Day2Kt$day2Puzzle2$Grid
     212: dup
     213: iconst_0
     214: iconst_0
     215: iconst_0
     216: invokespecial #195                // Method Day2Kt$day2Puzzle2$Grid."<init>":(III)V
     219: astore_1
     220: iconst_0
     221: istore_2
     222: aload_1
     223: astore_3
     224: aload_0
     225: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     230: astore        4
     232: aload         4
     234: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     239: ifeq          275
     242: aload         4
     244: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     249: astore        5
     251: aload_3
     252: aload         5
     254: checkcast     #43                 // class SubmarineCommand
     257: astore        6
     259: astore        7
     261: iconst_0
     262: istore        8
     264: aload         7
     266: aload         6
     268: invokevirtual #198                // Method Day2Kt$day2Puzzle2$Grid.applyCommand:(LSubmarineCommand;)LDay2Kt$day2Puzzle2$Grid;
     271: astore_3
     272: goto          232
     275: aload_3
     276: astore_1
     277: iconst_0
     278: istore_2
     279: aload_1
     280: invokevirtual #199                // Method Day2Kt$day2Puzzle2$Grid.getDepth:()I
     283: aload_1
     284: invokevirtual #200                // Method Day2Kt$day2Puzzle2$Grid.getHorizontal:()I
     287: imul
     288: istore_3
     289: getstatic     #156                // Field java/lang/System.out:Ljava/io/PrintStream;
     292: iload_3
     293: invokevirtual #161                // Method java/io/PrintStream.println:(I)V
     296: nop
     297: nop
     298: return

  public static final void day3Puzzle2();
    Code:
       0: new           #86                 // class java/io/File
       3: dup
       4: ldc           #208                // String day3.txt
       6: invokespecial #89                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: aconst_null
      10: iconst_1
      11: aconst_null
      12: invokestatic  #95                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      15: checkcast     #97                 // class java/lang/Iterable
      18: astore_1
      19: nop
      20: iconst_0
      21: istore_2
      22: aload_1
      23: astore_3
      24: new           #99                 // class java/util/ArrayList
      27: dup
      28: invokespecial #101                // Method java/util/ArrayList."<init>":()V
      31: checkcast     #103                // class java/util/Collection
      34: astore        4
      36: iconst_0
      37: istore        5
      39: aload_3
      40: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        6
      47: aload         6
      49: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          111
      57: aload         6
      59: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: astore        7
      66: aload         7
      68: checkcast     #19                 // class java/lang/String
      71: astore        8
      73: iconst_0
      74: istore        9
      76: aload         8
      78: checkcast     #17                 // class java/lang/CharSequence
      81: invokeinterface #120,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      86: ifle          93
      89: iconst_1
      90: goto          94
      93: iconst_0
      94: nop
      95: ifeq          47
      98: aload         4
     100: aload         7
     102: invokeinterface #124,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     107: pop
     108: goto          47
     111: aload         4
     113: checkcast     #29                 // class java/util/List
     116: nop
     117: astore_0
     118: aload_0
     119: iconst_0
     120: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     125: checkcast     #19                 // class java/lang/String
     128: invokevirtual #209                // Method java/lang/String.length:()I
     131: istore_1
     132: aconst_null
     133: astore_2
     134: aload_0
     135: astore_2
     136: new           #211                // class kotlin/ranges/IntRange
     139: dup
     140: iconst_0
     141: iload_1
     142: invokespecial #212                // Method kotlin/ranges/IntRange."<init>":(II)V
     145: checkcast     #97                 // class java/lang/Iterable
     148: astore_3
     149: iconst_0
     150: istore        4
     152: aload_3
     153: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     158: astore        5
     160: aload         5
     162: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     167: ifeq          212
     170: aload         5
     172: checkcast     #214                // class kotlin/collections/IntIterator
     175: invokevirtual #217                // Method kotlin/collections/IntIterator.nextInt:()I
     178: istore        6
     180: iload         6
     182: istore        7
     184: iconst_0
     185: istore        8
     187: aload_2
     188: invokeinterface #33,  1           // InterfaceMethod java/util/List.size:()I
     193: iconst_1
     194: if_icmpeq     208
     197: getstatic     #223                // Field Category.MOST:LCategory;
     200: iload         7
     202: aload_2
     203: invokestatic  #227                // Method findSubListForCategory:(LCategory;ILjava/util/List;)Ljava/util/List;
     206: astore_2
     207: nop
     208: nop
     209: goto          160
     212: nop
     213: aload_2
     214: iconst_0
     215: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     220: checkcast     #19                 // class java/lang/String
     223: iconst_2
     224: invokestatic  #233                // Method kotlin/text/CharsKt.checkRadix:(I)I
     227: invokestatic  #236                // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
     230: istore_3
     231: aload_0
     232: astore_2
     233: new           #211                // class kotlin/ranges/IntRange
     236: dup
     237: iconst_0
     238: iload_1
     239: invokespecial #212                // Method kotlin/ranges/IntRange."<init>":(II)V
     242: checkcast     #97                 // class java/lang/Iterable
     245: astore        4
     247: iconst_0
     248: istore        5
     250: aload         4
     252: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     257: astore        6
     259: aload         6
     261: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     266: ifeq          311
     269: aload         6
     271: checkcast     #214                // class kotlin/collections/IntIterator
     274: invokevirtual #217                // Method kotlin/collections/IntIterator.nextInt:()I
     277: istore        7
     279: iload         7
     281: istore        8
     283: iconst_0
     284: istore        9
     286: aload_2
     287: invokeinterface #33,  1           // InterfaceMethod java/util/List.size:()I
     292: iconst_1
     293: if_icmpeq     307
     296: getstatic     #239                // Field Category.LEAST:LCategory;
     299: iload         8
     301: aload_2
     302: invokestatic  #227                // Method findSubListForCategory:(LCategory;ILjava/util/List;)Ljava/util/List;
     305: astore_2
     306: nop
     307: nop
     308: goto          259
     311: nop
     312: aload_2
     313: iconst_0
     314: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     319: checkcast     #19                 // class java/lang/String
     322: iconst_2
     323: invokestatic  #233                // Method kotlin/text/CharsKt.checkRadix:(I)I
     326: invokestatic  #236                // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
     329: istore        4
     331: iload_3
     332: iload         4
     334: imul
     335: istore        5
     337: getstatic     #156                // Field java/lang/System.out:Ljava/io/PrintStream;
     340: iload         5
     342: invokevirtual #161                // Method java/io/PrintStream.println:(I)V
     345: return

  public static final java.util.List<java.lang.String> findSubListForCategory(Category, int, java.util.List<java.lang.String>);
    Code:
       0: aload_0
       1: ldc           #251                // String category
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #253                // String list
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: iconst_0
      13: istore_3
      14: iconst_0
      15: istore        4
      17: aload_2
      18: checkcast     #97                 // class java/lang/Iterable
      21: astore        5
      23: iconst_0
      24: istore        6
      26: aload         5
      28: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      33: astore        7
      35: aload         7
      37: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      42: ifeq          92
      45: aload         7
      47: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      52: astore        8
      54: aload         8
      56: checkcast     #19                 // class java/lang/String
      59: astore        9
      61: iconst_0
      62: istore        10
      64: aload         9
      66: iload_1
      67: invokevirtual #257                // Method java/lang/String.charAt:(I)C
      70: bipush        48
      72: if_icmpne     84
      75: iload         4
      77: iconst_1
      78: iadd
      79: istore        4
      81: goto          88
      84: iload_3
      85: iconst_1
      86: iadd
      87: istore_3
      88: nop
      89: goto          35
      92: nop
      93: aload_0
      94: getstatic     #263                // Field Day2Kt$WhenMappings.$EnumSwitchMapping$0:[I
      97: swap
      98: invokevirtual #266                // Method Category.ordinal:()I
     101: iaload
     102: tableswitch   { // 1 to 2
                     1: 124
                     2: 246
               default: 368
          }
     124: aload_2
     125: checkcast     #97                 // class java/lang/Iterable
     128: astore        7
     130: iconst_0
     131: istore        8
     133: aload         7
     135: astore        9
     137: new           #99                 // class java/util/ArrayList
     140: dup
     141: invokespecial #101                // Method java/util/ArrayList."<init>":()V
     144: checkcast     #103                // class java/util/Collection
     147: astore        10
     149: iconst_0
     150: istore        11
     152: aload         9
     154: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     159: astore        12
     161: aload         12
     163: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     168: ifeq          237
     171: aload         12
     173: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     178: astore        13
     180: aload         13
     182: checkcast     #19                 // class java/lang/String
     185: astore        14
     187: iconst_0
     188: istore        15
     190: iload_3
     191: iload         4
     193: if_icmplt     201
     196: bipush        49
     198: goto          203
     201: bipush        48
     203: istore        16
     205: aload         14
     207: iload_1
     208: invokevirtual #257                // Method java/lang/String.charAt:(I)C
     211: iload         16
     213: if_icmpne     220
     216: iconst_1
     217: goto          221
     220: iconst_0
     221: ifeq          161
     224: aload         10
     226: aload         13
     228: invokeinterface #124,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     233: pop
     234: goto          161
     237: aload         10
     239: checkcast     #29                 // class java/util/List
     242: nop
     243: goto          376
     246: aload_2
     247: checkcast     #97                 // class java/lang/Iterable
     250: astore        7
     252: iconst_0
     253: istore        8
     255: aload         7
     257: astore        9
     259: new           #99                 // class java/util/ArrayList
     262: dup
     263: invokespecial #101                // Method java/util/ArrayList."<init>":()V
     266: checkcast     #103                // class java/util/Collection
     269: astore        10
     271: iconst_0
     272: istore        11
     274: aload         9
     276: invokeinterface #107,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     281: astore        12
     283: aload         12
     285: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     290: ifeq          359
     293: aload         12
     295: invokeinterface #117,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     300: astore        13
     302: aload         13
     304: checkcast     #19                 // class java/lang/String
     307: astore        14
     309: iconst_0
     310: istore        15
     312: iload_3
     313: iload         4
     315: if_icmpge     323
     318: bipush        49
     320: goto          325
     323: bipush        48
     325: istore        16
     327: aload         14
     329: iload_1
     330: invokevirtual #257                // Method java/lang/String.charAt:(I)C
     333: iload         16
     335: if_icmpne     342
     338: iconst_1
     339: goto          343
     342: iconst_0
     343: ifeq          283
     346: aload         10
     348: aload         13
     350: invokeinterface #124,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     355: pop
     356: goto          283
     359: aload         10
     361: checkcast     #29                 // class java/util/List
     364: nop
     365: goto          376
     368: new           #268                // class kotlin/NoWhenBranchMatchedException
     371: dup
     372: invokespecial #269                // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     375: athrow
     376: areturn
}

Compiled from "Day2.kt"
public final class Day2Kt$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method Category.values:()[LCategory;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field Category.MOST:LCategory;
      12: invokevirtual #22                 // Method Category.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field Category.LEAST:LCategory;
      26: invokevirtual #22                 // Method Category.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: aload_0
      36: putstatic     #29                 // Field $EnumSwitchMapping$0:[I
      39: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
}

Compiled from "Day2.kt"
public final class Day2Kt$day2Puzzle1$Grid {
  private final int depth;

  private final int horizontal;

  public Day2Kt$day2Puzzle1$Grid(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 depth:I
       9: aload_0
      10: iload_2
      11: putfield      #16                 // Field horizontal:I
      14: return

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

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

  public final Day2Kt$day2Puzzle1$Grid applyCommand(SubmarineCommand);
    Code:
       0: aload_1
       1: ldc           #25                 // String command
       3: invokestatic  #31                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #37                 // Method SubmarineCommand.getDirection:()LDirection;
      10: getstatic     #43                 // Field Day2Kt$day2Puzzle1$Grid$WhenMappings.$EnumSwitchMapping$0:[I
      13: swap
      14: invokevirtual #48                 // Method Direction.ordinal:()I
      17: iaload
      18: tableswitch   { // 1 to 3
                     1: 44
                     2: 67
                     3: 90
               default: 113
          }
      44: new           #2                  // class Day2Kt$day2Puzzle1$Grid
      47: dup
      48: aload_0
      49: getfield      #13                 // Field depth:I
      52: aload_1
      53: invokevirtual #51                 // Method SubmarineCommand.getMagnitude:()I
      56: isub
      57: aload_0
      58: getfield      #16                 // Field horizontal:I
      61: invokespecial #53                 // Method "<init>":(II)V
      64: goto          121
      67: new           #2                  // class Day2Kt$day2Puzzle1$Grid
      70: dup
      71: aload_0
      72: getfield      #13                 // Field depth:I
      75: aload_1
      76: invokevirtual #51                 // Method SubmarineCommand.getMagnitude:()I
      79: iadd
      80: aload_0
      81: getfield      #16                 // Field horizontal:I
      84: invokespecial #53                 // Method "<init>":(II)V
      87: goto          121
      90: new           #2                  // class Day2Kt$day2Puzzle1$Grid
      93: dup
      94: aload_0
      95: getfield      #13                 // Field depth:I
      98: aload_0
      99: getfield      #16                 // Field horizontal:I
     102: aload_1
     103: invokevirtual #51                 // Method SubmarineCommand.getMagnitude:()I
     106: iadd
     107: invokespecial #53                 // Method "<init>":(II)V
     110: goto          121
     113: new           #55                 // class kotlin/NoWhenBranchMatchedException
     116: dup
     117: invokespecial #56                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
     120: athrow
     121: areturn
}


import java.lang.Math

/*

math problem in disguise.

First we figure out what determines the end state of i-th bulb (1-based):
take n = 5 as an example.
1st bulb is on because 1 has the only factor 1
2nd is off because 2 has two factors: 1,2
3rd is off because 3 has two factors: 1,3
4th: on, factors: 1,2,4
5th: off, factors: 1,5

now note that when i>1, i-th bulb is on if and only if i has odd number of factors
for any integer N, we can do factorization:
N = p1^a1 * p2^a2 ... * pk^ak where p are prime numbers
and the number of factors will be T = (a1 + 1)*(a2 + 1)* ... *(ak + 1)
if T is an odd, we know i-th bulb will be on.
since we need T = (a1 + 1)*(a2 + 1)* ... *(ak + 1) to be odd,
all of (a_ + 1) needs to be odd because any of them being even will cause T to be even,
which means all (a_) needs to be even.
N = p1^(b1*2) * p2^(b2*2) * ... * pk^(bk*2) where a_ = b_*2 ...
well, now we know that N has to be a square number.

Given n bulbs, if we count the # of square numbers in range of 1 .. n, that is the anwser
to the question - just do floor(sqrt(n)) and we are done.

*/

class Solution {
    fun bulbSwitch(n: Int): Int {
        return Math.floor(Math.sqrt(n.toDouble())).toInt()
    }

    companion object {
        @JvmStatic
        fun main(args: Array<String>) {
            println(Solution().bulbSwitch(10))
        }
    }
}

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

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

  public final int bulbSwitch(int);
    Code:
       0: iload_1
       1: i2d
       2: invokestatic  #18                 // Method java/lang/Math.sqrt:(D)D
       5: invokestatic  #21                 // Method java/lang/Math.floor:(D)D
       8: d2i
       9: ireturn

  public static final void main(java.lang.String[]);
    Code:
       0: getstatic     #31                 // Field Companion:LSolution$Companion;
       3: aload_0
       4: invokevirtual #35                 // Method Solution$Companion.main:([Ljava/lang/String;)V
       7: return

  static {};
    Code:
       0: new           #33                 // class Solution$Companion
       3: dup
       4: aconst_null
       5: invokespecial #41                 // Method Solution$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #31                 // Field Companion:LSolution$Companion;
      11: return
}

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

  public final void main(java.lang.String[]);
    Code:
       0: aload_1
       1: ldc           #16                 // String args
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #24                 // class Solution
       9: dup
      10: invokespecial #25                 // Method Solution."<init>":()V
      13: bipush        10
      15: invokevirtual #29                 // Method Solution.bulbSwitch:(I)I
      18: istore_2
      19: getstatic     #35                 // Field java/lang/System.out:Ljava/io/PrintStream;
      22: iload_2
      23: invokevirtual #41                 // Method java/io/PrintStream.println:(I)V
      26: return

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


import java.util.*

object PigLatin {
    private val vowels = setOf('a','e','i','o','u')
    fun translate(input: String) : String {
        require(input.all { it.isLowerCase() || it.isWhitespace() })
        return input.replace("\\b\\w+\\b".toRegex()) { result : MatchResult ->
            val word = result.value
            when {
                word[0] in vowels -> word + "ay"
                word.startsWith("qu") -> word.substring(2) + "quay"
                word.startsWith("squ") -> word.substring(3) + "squay"
                word == "xray" -> word + "ay"
                else -> {
                    val firstY = word.indexOfFirst { it == 'y' }
                    val firstVowel = word.indexOfFirst { it in vowels }
                    val beforeVowel = firstVowel == -1 || firstY < firstVowel
                    val yIsVowel = firstY != -1 && (word.length == firstY + 1
                            || word.length > firstY + 1
                            && word[firstY + 1] !in vowels)
                    if (beforeVowel && yIsVowel) {
                        val beforeY = word.substring(0, firstY)
                        val afterY = word.substring(firstY)
                        afterY + beforeY + "ay"
                    } else {
                        val beginning = if (firstVowel != -1) word.substring(firstVowel) else word
                        val remainder = if (firstVowel != -1) word.substring(0, firstVowel) else ""
                        beginning + remainder + "ay"
                    }
                }
            }
        }
    }
}

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val numTestCases = scanner.nextInt()
    require(numTestCases in 1..20)
    (0 until numTestCases).map {
        val numThieves = scanner.nextInt()
        require(numThieves in 1..100)

        val duration = scanner.nextInt()
        require(duration in 0..1000000)

        val thiefSlots = mutableListOf(0, 0)
        val entries = (0 until numThieves).map { scanner.nextInt() }
        entries.forEach{ require(it in 0..100)}
        entries.forEach{
            thiefSlots.addToSmallest(it)
        }
        if (thiefSlots.max()!! > duration) {
            "NO"
        } else {
            "YES"
        }
    }.forEach(::println)

}

fun MutableList<Int>.addToSmallest(duration : Int) : MutableList<Int> {
    val indexOfSmallest = indexOfFirst { it == min() }
    this[indexOfSmallest] += duration
    return this
}

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

  private static final java.util.Set<java.lang.Character> vowels;

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

  public final java.lang.String translate(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #23                 // class java/lang/CharSequence
      10: astore_2
      11: iconst_0
      12: istore_3
      13: iconst_0
      14: istore        4
      16: iload         4
      18: aload_2
      19: invokeinterface #27,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      24: if_icmpge     78
      27: aload_2
      28: iload         4
      30: invokeinterface #31,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      35: istore        5
      37: iload         5
      39: istore        6
      41: iconst_0
      42: istore        7
      44: iload         6
      46: invokestatic  #37                 // Method java/lang/Character.isLowerCase:(C)Z
      49: ifne          60
      52: iload         6
      54: invokestatic  #42                 // Method kotlin/text/CharsKt.isWhitespace:(C)Z
      57: ifeq          64
      60: iconst_1
      61: goto          65
      64: iconst_0
      65: ifne          72
      68: iconst_0
      69: goto          79
      72: iinc          4, 1
      75: goto          16
      78: iconst_1
      79: ifne          97
      82: ldc           #44                 // String Failed requirement.
      84: astore_3
      85: new           #46                 // class java/lang/IllegalArgumentException
      88: dup
      89: aload_3
      90: invokevirtual #50                 // Method java/lang/Object.toString:()Ljava/lang/String;
      93: invokespecial #53                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      96: athrow
      97: aload_1
      98: checkcast     #23                 // class java/lang/CharSequence
     101: astore_2
     102: new           #55                 // class kotlin/text/Regex
     105: dup
     106: ldc           #57                 // String \\b\\w+\\b
     108: invokespecial #58                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     111: astore_3
     112: invokedynamic #77,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
     117: astore        4
     119: aload_3
     120: aload_2
     121: aload         4
     123: invokevirtual #81                 // Method kotlin/text/Regex.replace:(Ljava/lang/CharSequence;Lkotlin/jvm/functions/Function1;)Ljava/lang/String;
     126: areturn

  private static final java.lang.CharSequence translate$lambda$3(kotlin.text.MatchResult);
    Code:
       0: aload_0
       1: ldc           #92                 // String result
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokeinterface #97,  1           // InterfaceMethod kotlin/text/MatchResult.getValue:()Ljava/lang/String;
      12: astore_1
      13: nop
      14: getstatic     #101                // Field vowels:Ljava/util/Set;
      17: aload_1
      18: iconst_0
      19: invokevirtual #104                // Method java/lang/String.charAt:(I)C
      22: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      25: invokeinterface #114,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
      30: ifeq          58
      33: new           #116                // class java/lang/StringBuilder
      36: dup
      37: invokespecial #117                // Method java/lang/StringBuilder."<init>":()V
      40: aload_1
      41: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      44: ldc           #123                // String ay
      46: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      49: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      52: checkcast     #23                 // class java/lang/CharSequence
      55: goto          533
      58: aload_1
      59: ldc           #126                // String qu
      61: iconst_0
      62: iconst_2
      63: aconst_null
      64: invokestatic  #132                // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
      67: ifeq          105
      70: new           #116                // class java/lang/StringBuilder
      73: dup
      74: invokespecial #117                // Method java/lang/StringBuilder."<init>":()V
      77: aload_1
      78: iconst_2
      79: invokevirtual #136                // Method java/lang/String.substring:(I)Ljava/lang/String;
      82: dup
      83: ldc           #138                // String substring(...)
      85: invokestatic  #141                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      88: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      91: ldc           #143                // String quay
      93: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      96: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      99: checkcast     #23                 // class java/lang/CharSequence
     102: goto          533
     105: aload_1
     106: ldc           #145                // String squ
     108: iconst_0
     109: iconst_2
     110: aconst_null
     111: invokestatic  #132                // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
     114: ifeq          152
     117: new           #116                // class java/lang/StringBuilder
     120: dup
     121: invokespecial #117                // Method java/lang/StringBuilder."<init>":()V
     124: aload_1
     125: iconst_3
     126: invokevirtual #136                // Method java/lang/String.substring:(I)Ljava/lang/String;
     129: dup
     130: ldc           #138                // String substring(...)
     132: invokestatic  #141                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     135: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     138: ldc           #147                // String squay
     140: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     143: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     146: checkcast     #23                 // class java/lang/CharSequence
     149: goto          533
     152: aload_1
     153: ldc           #149                // String xray
     155: invokestatic  #153                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     158: ifeq          186
     161: new           #116                // class java/lang/StringBuilder
     164: dup
     165: invokespecial #117                // Method java/lang/StringBuilder."<init>":()V
     168: aload_1
     169: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     172: ldc           #123                // String ay
     174: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     177: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     180: checkcast     #23                 // class java/lang/CharSequence
     183: goto          533
     186: aload_1
     187: checkcast     #23                 // class java/lang/CharSequence
     190: astore_3
     191: iconst_0
     192: istore        4
     194: iconst_0
     195: istore        5
     197: aload_3
     198: invokeinterface #27,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     203: istore        6
     205: iload         5
     207: iload         6
     209: if_icmpge     251
     212: aload_3
     213: iload         5
     215: invokeinterface #31,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     220: istore        7
     222: iconst_0
     223: istore        8
     225: iload         7
     227: bipush        121
     229: if_icmpne     236
     232: iconst_1
     233: goto          237
     236: iconst_0
     237: ifeq          245
     240: iload         5
     242: goto          252
     245: iinc          5, 1
     248: goto          205
     251: iconst_m1
     252: istore_2
     253: aload_1
     254: checkcast     #23                 // class java/lang/CharSequence
     257: astore        4
     259: iconst_0
     260: istore        5
     262: iconst_0
     263: istore        6
     265: aload         4
     267: invokeinterface #27,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     272: istore        7
     274: iload         6
     276: iload         7
     278: if_icmpge     322
     281: aload         4
     283: iload         6
     285: invokeinterface #31,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     290: istore        8
     292: iconst_0
     293: istore        9
     295: getstatic     #101                // Field vowels:Ljava/util/Set;
     298: iload         8
     300: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     303: invokeinterface #114,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     308: ifeq          316
     311: iload         6
     313: goto          323
     316: iinc          6, 1
     319: goto          274
     322: iconst_m1
     323: istore_3
     324: iload_3
     325: iconst_m1
     326: if_icmpeq     334
     329: iload_2
     330: iload_3
     331: if_icmpge     338
     334: iconst_1
     335: goto          339
     338: iconst_0
     339: istore        4
     341: iload_2
     342: iconst_m1
     343: if_icmpeq     391
     346: aload_1
     347: invokevirtual #154                // Method java/lang/String.length:()I
     350: iload_2
     351: iconst_1
     352: iadd
     353: if_icmpeq     387
     356: aload_1
     357: invokevirtual #154                // Method java/lang/String.length:()I
     360: iload_2
     361: iconst_1
     362: iadd
     363: if_icmple     391
     366: getstatic     #101                // Field vowels:Ljava/util/Set;
     369: aload_1
     370: iload_2
     371: iconst_1
     372: iadd
     373: invokevirtual #104                // Method java/lang/String.charAt:(I)C
     376: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     379: invokeinterface #114,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     384: ifne          391
     387: iconst_1
     388: goto          392
     391: iconst_0
     392: istore        5
     394: iload         4
     396: ifeq          459
     399: iload         5
     401: ifeq          459
     404: aload_1
     405: iconst_0
     406: iload_2
     407: invokevirtual #157                // Method java/lang/String.substring:(II)Ljava/lang/String;
     410: dup
     411: ldc           #138                // String substring(...)
     413: invokestatic  #141                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     416: astore        6
     418: aload_1
     419: iload_2
     420: invokevirtual #136                // Method java/lang/String.substring:(I)Ljava/lang/String;
     423: dup
     424: ldc           #138                // String substring(...)
     426: invokestatic  #141                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     429: astore        7
     431: new           #116                // class java/lang/StringBuilder
     434: dup
     435: invokespecial #117                // Method java/lang/StringBuilder."<init>":()V
     438: aload         7
     440: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     443: aload         6
     445: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     448: ldc           #123                // String ay
     450: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     453: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     456: goto          530
     459: iload_3
     460: iconst_m1
     461: if_icmpeq     478
     464: aload_1
     465: iload_3
     466: invokevirtual #136                // Method java/lang/String.substring:(I)Ljava/lang/String;
     469: dup
     470: ldc           #138                // String substring(...)
     472: invokestatic  #141                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     475: goto          479
     478: aload_1
     479: astore        6
     481: iload_3
     482: iconst_m1
     483: if_icmpeq     501
     486: aload_1
     487: iconst_0
     488: iload_3
     489: invokevirtual #157                // Method java/lang/String.substring:(II)Ljava/lang/String;
     492: dup
     493: ldc           #138                // String substring(...)
     495: invokestatic  #141                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     498: goto          503
     501: ldc           #159                // String
     503: astore        7
     505: new           #116                // class java/lang/StringBuilder
     508: dup
     509: invokespecial #117                // Method java/lang/StringBuilder."<init>":()V
     512: aload         6
     514: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     517: aload         7
     519: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     522: ldc           #123                // String ay
     524: invokevirtual #121                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     527: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     530: checkcast     #23                 // class java/lang/CharSequence
     533: areturn

  static {};
    Code:
       0: new           #2                  // class PigLatin
       3: dup
       4: invokespecial #177                // Method "<init>":()V
       7: putstatic     #180                // Field INSTANCE:LPigLatin;
      10: iconst_5
      11: anewarray     #33                 // class java/lang/Character
      14: astore_0
      15: aload_0
      16: iconst_0
      17: bipush        97
      19: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      22: aastore
      23: aload_0
      24: iconst_1
      25: bipush        101
      27: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      30: aastore
      31: aload_0
      32: iconst_2
      33: bipush        105
      35: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      38: aastore
      39: aload_0
      40: iconst_3
      41: bipush        111
      43: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      46: aastore
      47: aload_0
      48: iconst_4
      49: bipush        117
      51: invokestatic  #108                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      54: aastore
      55: aload_0
      56: invokestatic  #186                // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
      59: putstatic     #101                // Field vowels:Ljava/util/Set;
      62: return
}

Compiled from "PigLatin.kt"
public final class PigLatinKt {
  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #9                  // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #17                 // class java/util/Scanner
       9: dup
      10: getstatic     #23                 // Field java/lang/System.in:Ljava/io/InputStream;
      13: invokespecial #27                 // Method java/util/Scanner."<init>":(Ljava/io/InputStream;)V
      16: astore_1
      17: aload_1
      18: invokevirtual #31                 // Method java/util/Scanner.nextInt:()I
      21: istore_2
      22: iconst_1
      23: iload_2
      24: if_icmpgt     41
      27: iload_2
      28: bipush        21
      30: if_icmpge     37
      33: iconst_1
      34: goto          42
      37: iconst_0
      38: goto          42
      41: iconst_0
      42: ifne          62
      45: ldc           #33                 // String Failed requirement.
      47: astore        4
      49: new           #35                 // class java/lang/IllegalArgumentException
      52: dup
      53: aload         4
      55: invokevirtual #39                 // Method java/lang/Object.toString:()Ljava/lang/String;
      58: invokespecial #42                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      61: athrow
      62: iconst_0
      63: iload_2
      64: invokestatic  #48                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
      67: checkcast     #50                 // class java/lang/Iterable
      70: astore_3
      71: iconst_0
      72: istore        4
      74: aload_3
      75: astore        5
      77: new           #52                 // class java/util/ArrayList
      80: dup
      81: aload_3
      82: bipush        10
      84: invokestatic  #58                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      87: invokespecial #61                 // Method java/util/ArrayList."<init>":(I)V
      90: checkcast     #63                 // class java/util/Collection
      93: astore        6
      95: iconst_0
      96: istore        7
      98: aload         5
     100: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     105: astore        8
     107: aload         8
     109: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     114: ifeq          577
     117: aload         8
     119: checkcast     #75                 // class kotlin/collections/IntIterator
     122: invokevirtual #76                 // Method kotlin/collections/IntIterator.nextInt:()I
     125: istore        9
     127: aload         6
     129: iload         9
     131: istore        10
     133: astore        26
     135: iconst_0
     136: istore        11
     138: aload_1
     139: invokevirtual #31                 // Method java/util/Scanner.nextInt:()I
     142: istore        12
     144: iconst_1
     145: iload         12
     147: if_icmpgt     165
     150: iload         12
     152: bipush        101
     154: if_icmpge     161
     157: iconst_1
     158: goto          166
     161: iconst_0
     162: goto          166
     165: iconst_0
     166: ifne          186
     169: ldc           #33                 // String Failed requirement.
     171: astore        13
     173: new           #35                 // class java/lang/IllegalArgumentException
     176: dup
     177: aload         13
     179: invokevirtual #39                 // Method java/lang/Object.toString:()Ljava/lang/String;
     182: invokespecial #42                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     185: athrow
     186: aload_1
     187: invokevirtual #31                 // Method java/util/Scanner.nextInt:()I
     190: istore        14
     192: iconst_0
     193: iload         14
     195: if_icmpgt     213
     198: iload         14
     200: ldc           #77                 // int 1000001
     202: if_icmpge     209
     205: iconst_1
     206: goto          214
     209: iconst_0
     210: goto          214
     213: iconst_0
     214: ifne          234
     217: ldc           #33                 // String Failed requirement.
     219: astore        15
     221: new           #35                 // class java/lang/IllegalArgumentException
     224: dup
     225: aload         15
     227: invokevirtual #39                 // Method java/lang/Object.toString:()Ljava/lang/String;
     230: invokespecial #42                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     233: athrow
     234: iconst_2
     235: anewarray     #79                 // class java/lang/Integer
     238: astore        15
     240: aload         15
     242: iconst_0
     243: iconst_0
     244: invokestatic  #83                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     247: aastore
     248: aload         15
     250: iconst_1
     251: iconst_0
     252: invokestatic  #83                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     255: aastore
     256: aload         15
     258: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     261: astore        13
     263: iconst_0
     264: iload         12
     266: invokestatic  #48                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     269: checkcast     #50                 // class java/lang/Iterable
     272: astore        16
     274: iconst_0
     275: istore        17
     277: aload         16
     279: astore        18
     281: new           #52                 // class java/util/ArrayList
     284: dup
     285: aload         16
     287: bipush        10
     289: invokestatic  #58                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     292: invokespecial #61                 // Method java/util/ArrayList."<init>":(I)V
     295: checkcast     #63                 // class java/util/Collection
     298: astore        19
     300: iconst_0
     301: istore        20
     303: aload         18
     305: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     310: astore        21
     312: aload         21
     314: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     319: ifeq          362
     322: aload         21
     324: checkcast     #75                 // class kotlin/collections/IntIterator
     327: invokevirtual #76                 // Method kotlin/collections/IntIterator.nextInt:()I
     330: istore        22
     332: aload         19
     334: iload         22
     336: istore        23
     338: astore        24
     340: iconst_0
     341: istore        25
     343: aload_1
     344: invokevirtual #31                 // Method java/util/Scanner.nextInt:()I
     347: invokestatic  #83                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     350: aload         24
     352: swap
     353: invokeinterface #91,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     358: pop
     359: goto          312
     362: aload         19
     364: checkcast     #93                 // class java/util/List
     367: nop
     368: astore        15
     370: aload         15
     372: checkcast     #50                 // class java/lang/Iterable
     375: astore        16
     377: iconst_0
     378: istore        17
     380: aload         16
     382: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     387: astore        18
     389: aload         18
     391: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     396: ifeq          468
     399: aload         18
     401: invokeinterface #97,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     406: astore        19
     408: aload         19
     410: checkcast     #99                 // class java/lang/Number
     413: invokevirtual #102                // Method java/lang/Number.intValue:()I
     416: istore        20
     418: iconst_0
     419: istore        21
     421: iconst_0
     422: iload         20
     424: if_icmpgt     442
     427: iload         20
     429: bipush        101
     431: if_icmpge     438
     434: iconst_1
     435: goto          443
     438: iconst_0
     439: goto          443
     442: iconst_0
     443: ifne          463
     446: ldc           #33                 // String Failed requirement.
     448: astore        22
     450: new           #35                 // class java/lang/IllegalArgumentException
     453: dup
     454: aload         22
     456: invokevirtual #39                 // Method java/lang/Object.toString:()Ljava/lang/String;
     459: invokespecial #42                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     462: athrow
     463: nop
     464: nop
     465: goto          389
     468: nop
     469: aload         15
     471: checkcast     #50                 // class java/lang/Iterable
     474: astore        16
     476: iconst_0
     477: istore        17
     479: aload         16
     481: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     486: astore        18
     488: aload         18
     490: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     495: ifeq          533
     498: aload         18
     500: invokeinterface #97,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     505: astore        19
     507: aload         19
     509: checkcast     #99                 // class java/lang/Number
     512: invokevirtual #102                // Method java/lang/Number.intValue:()I
     515: istore        20
     517: iconst_0
     518: istore        21
     520: aload         13
     522: iload         20
     524: invokestatic  #106                // Method addToSmallest:(Ljava/util/List;I)Ljava/util/List;
     527: pop
     528: nop
     529: nop
     530: goto          488
     533: nop
     534: aload         13
     536: checkcast     #50                 // class java/lang/Iterable
     539: invokestatic  #110                // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     542: dup
     543: invokestatic  #114                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     546: checkcast     #99                 // class java/lang/Number
     549: invokevirtual #102                // Method java/lang/Number.intValue:()I
     552: iload         14
     554: if_icmple     562
     557: ldc           #116                // String NO
     559: goto          564
     562: ldc           #118                // String YES
     564: nop
     565: aload         26
     567: swap
     568: invokeinterface #91,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     573: pop
     574: goto          107
     577: aload         6
     579: checkcast     #93                 // class java/util/List
     582: nop
     583: checkcast     #50                 // class java/lang/Iterable
     586: astore_3
     587: nop
     588: iconst_0
     589: istore        4
     591: aload_3
     592: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     597: astore        5
     599: aload         5
     601: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     606: ifeq          638
     609: aload         5
     611: invokeinterface #97,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     616: astore        6
     618: aload         6
     620: astore        7
     622: iconst_0
     623: istore        8
     625: getstatic     #122                // Field java/lang/System.out:Ljava/io/PrintStream;
     628: aload         7
     630: invokevirtual #127                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     633: nop
     634: nop
     635: goto          599
     638: nop
     639: return

  public static final java.util.List<java.lang.Integer> addToSmallest(java.util.List<java.lang.Integer>, int);
    Code:
       0: aload_0
       1: ldc           #164                // String <this>
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: astore_3
       8: iconst_0
       9: istore        4
      11: iconst_0
      12: istore        5
      14: aload_3
      15: invokeinterface #165,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      20: astore        6
      22: aload         6
      24: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      29: ifeq          91
      32: aload         6
      34: invokeinterface #97,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      39: astore        7
      41: aload         7
      43: checkcast     #99                 // class java/lang/Number
      46: invokevirtual #102                // Method java/lang/Number.intValue:()I
      49: istore        8
      51: iconst_0
      52: istore        9
      54: iload         8
      56: aload_0
      57: checkcast     #50                 // class java/lang/Iterable
      60: invokestatic  #168                // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
      63: checkcast     #99                 // class java/lang/Number
      66: invokevirtual #102                // Method java/lang/Number.intValue:()I
      69: if_icmpne     76
      72: iconst_1
      73: goto          77
      76: iconst_0
      77: ifeq          85
      80: iload         5
      82: goto          92
      85: iinc          5, 1
      88: goto          22
      91: iconst_m1
      92: istore_2
      93: aload_0
      94: iload_2
      95: aload_0
      96: iload_2
      97: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     102: checkcast     #99                 // class java/lang/Number
     105: invokevirtual #102                // Method java/lang/Number.intValue:()I
     108: iload_1
     109: iadd
     110: invokestatic  #83                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     113: invokeinterface #176,  3          // InterfaceMethod java/util/List.set:(ILjava/lang/Object;)Ljava/lang/Object;
     118: pop
     119: aload_0
     120: areturn
}