import java.io.File

fun main() {

    fun parseInputCommaAndNewLine(input: String): List<String> {
        return input.split(",", "\r\n")
    }

    fun parseInputDash(input: String): List<Int> {
        return input.split("-").map { str ->
            str.toInt()
        }
    }

    val fileName =
        "src/Day04_sample.txt"
//        "src/Day04_quiz.txt"
    val input = File(fileName).readText()
    val parseComma = parseInputCommaAndNewLine(input)
    val parseCommaList = parseComma.chunked(1)
    val parseDashList = mutableListOf<List<Int>>()
    for (aList in parseCommaList) {
        for (element in aList) {
            parseDashList.add(parseInputDash(element))
        }
    }

    fun comparedList(input: List<Int>): List<Int> {
        val pairValue = mutableListOf<Int>()
        if (input.first() == input.last()) {
            pairValue.add(input.first())
        } else if (input.first() < input.last()) {
            for (i in input.first() until input.last() + 1) {
                pairValue.add(i)
            }
        }
        return pairValue
    }

    val modifiedList = mutableListOf<List<Int>>()
    for (aList in parseDashList) {
        modifiedList.add(comparedList(aList))
    }

    fun checkContain(input: List<List<Int>>): Boolean {
        var isContain = false
        for (i in input.indices - 1) {
            if (input[i].containsAll(input[i + 1])) {
                isContain = true
            } else if (input[i + 1].containsAll(input[i])) {
                isContain = true
            }
        }
        return isContain
    }

    fun checkOverlap(input: List<List<Int>>): Boolean {
        var isOverlap = false
        for (i in input.indices - 1) {
            if (input[i].intersect(input[i + 1].toSet()).isNotEmpty()) {
                isOverlap = true
            }
        }
        return isOverlap
    }

    val compareListPart1 = modifiedList.chunked(2)
    val compareListPart2 = modifiedList.chunked(2)

    var part1Count = 0
    var part2Count = 0

    for (aList in compareListPart1) {
        if (checkContain(aList)) {
            part1Count++
        }
    }

    for (aList in compareListPart2) {
        if (checkOverlap(aList)) {
            part2Count++
        }
    }

    println(compareListPart1)
    println(part1Count)

    println(compareListPart2)
    println(part2Count)

}

Compiled from "Day04.kt"
public final class Day04Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String src/Day04_sample.txt
       2: astore_0
       3: new           #10                 // class java/io/File
       6: dup
       7: aload_0
       8: invokespecial #14                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      11: aconst_null
      12: iconst_1
      13: aconst_null
      14: invokestatic  #20                 // Method kotlin/io/FilesKt.readText$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
      17: astore_1
      18: aload_1
      19: invokestatic  #24                 // Method main$parseInputCommaAndNewLine:(Ljava/lang/String;)Ljava/util/List;
      22: astore_2
      23: aload_2
      24: checkcast     #26                 // class java/lang/Iterable
      27: iconst_1
      28: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
      31: astore_3
      32: new           #34                 // class java/util/ArrayList
      35: dup
      36: invokespecial #36                 // Method java/util/ArrayList."<init>":()V
      39: checkcast     #38                 // class java/util/List
      42: astore        4
      44: aload_3
      45: invokeinterface #42,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      50: astore        5
      52: aload         5
      54: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      59: ifeq          121
      62: aload         5
      64: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      69: checkcast     #38                 // class java/util/List
      72: astore        6
      74: aload         6
      76: invokeinterface #42,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      81: astore        7
      83: aload         7
      85: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      90: ifeq          52
      93: aload         7
      95: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     100: checkcast     #54                 // class java/lang/String
     103: astore        8
     105: aload         4
     107: aload         8
     109: invokestatic  #57                 // Method main$parseInputDash:(Ljava/lang/String;)Ljava/util/List;
     112: invokeinterface #61,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     117: pop
     118: goto          83
     121: new           #34                 // class java/util/ArrayList
     124: dup
     125: invokespecial #36                 // Method java/util/ArrayList."<init>":()V
     128: checkcast     #38                 // class java/util/List
     131: astore        5
     133: aload         4
     135: invokeinterface #42,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     140: astore        6
     142: aload         6
     144: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     149: ifeq          180
     152: aload         6
     154: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     159: checkcast     #38                 // class java/util/List
     162: astore        7
     164: aload         5
     166: aload         7
     168: invokestatic  #65                 // Method main$comparedList:(Ljava/util/List;)Ljava/util/List;
     171: invokeinterface #61,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     176: pop
     177: goto          142
     180: aload         5
     182: checkcast     #26                 // class java/lang/Iterable
     185: iconst_2
     186: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
     189: astore        6
     191: aload         5
     193: checkcast     #26                 // class java/lang/Iterable
     196: iconst_2
     197: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
     200: astore        7
     202: iconst_0
     203: istore        8
     205: iconst_0
     206: istore        9
     208: aload         6
     210: invokeinterface #42,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     215: astore        10
     217: aload         10
     219: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     224: ifeq          253
     227: aload         10
     229: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     234: checkcast     #38                 // class java/util/List
     237: astore        11
     239: aload         11
     241: invokestatic  #69                 // Method main$checkContain:(Ljava/util/List;)Z
     244: ifeq          217
     247: iinc          8, 1
     250: goto          217
     253: aload         7
     255: invokeinterface #42,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     260: astore        10
     262: aload         10
     264: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     269: ifeq          298
     272: aload         10
     274: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     279: checkcast     #38                 // class java/util/List
     282: astore        11
     284: aload         11
     286: invokestatic  #72                 // Method main$checkOverlap:(Ljava/util/List;)Z
     289: ifeq          262
     292: iinc          9, 1
     295: goto          262
     298: getstatic     #78                 // Field java/lang/System.out:Ljava/io/PrintStream;
     301: aload         6
     303: invokevirtual #84                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     306: getstatic     #78                 // Field java/lang/System.out:Ljava/io/PrintStream;
     309: iload         8
     311: invokevirtual #87                 // Method java/io/PrintStream.println:(I)V
     314: getstatic     #78                 // Field java/lang/System.out:Ljava/io/PrintStream;
     317: aload         7
     319: invokevirtual #84                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     322: getstatic     #78                 // Field java/lang/System.out:Ljava/io/PrintStream;
     325: iload         9
     327: invokevirtual #87                 // Method java/io/PrintStream.println:(I)V
     330: return

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

  private static final java.util.List<java.lang.String> main$parseInputCommaAndNewLine(java.lang.String);
    Code:
       0: aload_0
       1: checkcast     #110                // class java/lang/CharSequence
       4: iconst_2
       5: anewarray     #54                 // class java/lang/String
       8: astore_1
       9: aload_1
      10: iconst_0
      11: ldc           #112                // String ,
      13: aastore
      14: aload_1
      15: iconst_1
      16: ldc           #114                // String \r\n
      18: aastore
      19: aload_1
      20: iconst_0
      21: iconst_0
      22: bipush        6
      24: aconst_null
      25: invokestatic  #120                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      28: areturn

  private static final java.util.List<java.lang.Integer> main$parseInputDash(java.lang.String);
    Code:
       0: aload_0
       1: checkcast     #110                // class java/lang/CharSequence
       4: iconst_1
       5: anewarray     #54                 // class java/lang/String
       8: astore_1
       9: aload_1
      10: iconst_0
      11: ldc           #123                // String -
      13: aastore
      14: aload_1
      15: iconst_0
      16: iconst_0
      17: bipush        6
      19: aconst_null
      20: invokestatic  #120                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      23: checkcast     #26                 // class java/lang/Iterable
      26: astore_1
      27: iconst_0
      28: istore_2
      29: aload_1
      30: astore_3
      31: new           #34                 // class java/util/ArrayList
      34: dup
      35: aload_1
      36: bipush        10
      38: invokestatic  #127                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      41: invokespecial #129                // Method java/util/ArrayList."<init>":(I)V
      44: checkcast     #131                // class java/util/Collection
      47: astore        4
      49: iconst_0
      50: istore        5
      52: aload_3
      53: invokeinterface #132,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      58: astore        6
      60: aload         6
      62: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      67: ifeq          114
      70: aload         6
      72: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      77: astore        7
      79: aload         4
      81: aload         7
      83: checkcast     #54                 // class java/lang/String
      86: astore        8
      88: astore        10
      90: iconst_0
      91: istore        9
      93: aload         8
      95: invokestatic  #138                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      98: nop
      99: invokestatic  #142                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     102: aload         10
     104: swap
     105: invokeinterface #143,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     110: pop
     111: goto          60
     114: aload         4
     116: checkcast     #38                 // class java/util/List
     119: nop
     120: areturn

  private static final java.util.List<java.lang.Integer> main$comparedList(java.util.List<java.lang.Integer>);
    Code:
       0: new           #34                 // class java/util/ArrayList
       3: dup
       4: invokespecial #36                 // Method java/util/ArrayList."<init>":()V
       7: checkcast     #38                 // class java/util/List
      10: astore_1
      11: aload_0
      12: invokestatic  #159                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      15: checkcast     #161                // class java/lang/Number
      18: invokevirtual #165                // Method java/lang/Number.intValue:()I
      21: aload_0
      22: invokestatic  #168                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      25: checkcast     #161                // class java/lang/Number
      28: invokevirtual #165                // Method java/lang/Number.intValue:()I
      31: if_icmpne     48
      34: aload_1
      35: aload_0
      36: invokestatic  #159                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      39: invokeinterface #61,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      44: pop
      45: goto          117
      48: aload_0
      49: invokestatic  #159                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      52: checkcast     #161                // class java/lang/Number
      55: invokevirtual #165                // Method java/lang/Number.intValue:()I
      58: aload_0
      59: invokestatic  #168                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      62: checkcast     #161                // class java/lang/Number
      65: invokevirtual #165                // Method java/lang/Number.intValue:()I
      68: if_icmpge     117
      71: aload_0
      72: invokestatic  #159                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      75: checkcast     #161                // class java/lang/Number
      78: invokevirtual #165                // Method java/lang/Number.intValue:()I
      81: istore_2
      82: aload_0
      83: invokestatic  #168                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      86: checkcast     #161                // class java/lang/Number
      89: invokevirtual #165                // Method java/lang/Number.intValue:()I
      92: iconst_1
      93: iadd
      94: istore_3
      95: iload_2
      96: iload_3
      97: if_icmpge     117
     100: aload_1
     101: iload_2
     102: invokestatic  #142                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     105: invokeinterface #61,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     110: pop
     111: iinc          2, 1
     114: goto          95
     117: aload_1
     118: areturn

  private static final boolean main$checkContain(java.util.List<? extends java.util.List<java.lang.Integer>>);
    Code:
       0: iconst_0
       1: istore_1
       2: aload_0
       3: checkcast     #131                // class java/util/Collection
       6: invokestatic  #175                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
       9: checkcast     #26                 // class java/lang/Iterable
      12: iconst_1
      13: invokestatic  #142                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      16: invokestatic  #179                // Method kotlin/collections/CollectionsKt.minus:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/util/List;
      19: invokeinterface #42,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      24: astore_2
      25: aload_2
      26: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      31: ifeq          117
      34: aload_2
      35: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      40: checkcast     #161                // class java/lang/Number
      43: invokevirtual #165                // Method java/lang/Number.intValue:()I
      46: istore_3
      47: aload_0
      48: iload_3
      49: invokeinterface #183,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      54: checkcast     #38                 // class java/util/List
      57: aload_0
      58: iload_3
      59: iconst_1
      60: iadd
      61: invokeinterface #183,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      66: checkcast     #131                // class java/util/Collection
      69: invokeinterface #187,  2          // InterfaceMethod java/util/List.containsAll:(Ljava/util/Collection;)Z
      74: ifeq          82
      77: iconst_1
      78: istore_1
      79: goto          25
      82: aload_0
      83: iload_3
      84: iconst_1
      85: iadd
      86: invokeinterface #183,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      91: checkcast     #38                 // class java/util/List
      94: aload_0
      95: iload_3
      96: invokeinterface #183,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     101: checkcast     #131                // class java/util/Collection
     104: invokeinterface #187,  2          // InterfaceMethod java/util/List.containsAll:(Ljava/util/Collection;)Z
     109: ifeq          25
     112: iconst_1
     113: istore_1
     114: goto          25
     117: iload_1
     118: ireturn

  private static final boolean main$checkOverlap(java.util.List<? extends java.util.List<java.lang.Integer>>);
    Code:
       0: iconst_0
       1: istore_1
       2: aload_0
       3: checkcast     #131                // class java/util/Collection
       6: invokestatic  #175                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
       9: checkcast     #26                 // class java/lang/Iterable
      12: iconst_1
      13: invokestatic  #142                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      16: invokestatic  #179                // Method kotlin/collections/CollectionsKt.minus:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/util/List;
      19: invokeinterface #42,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      24: astore_2
      25: aload_2
      26: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      31: ifeq          102
      34: aload_2
      35: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      40: checkcast     #161                // class java/lang/Number
      43: invokevirtual #165                // Method java/lang/Number.intValue:()I
      46: istore_3
      47: aload_0
      48: iload_3
      49: invokeinterface #183,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      54: checkcast     #26                 // class java/lang/Iterable
      57: aload_0
      58: iload_3
      59: iconst_1
      60: iadd
      61: invokeinterface #183,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      66: checkcast     #26                 // class java/lang/Iterable
      69: invokestatic  #193                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
      72: checkcast     #26                 // class java/lang/Iterable
      75: invokestatic  #197                // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
      78: checkcast     #131                // class java/util/Collection
      81: invokeinterface #200,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      86: ifne          93
      89: iconst_1
      90: goto          94
      93: iconst_0
      94: ifeq          25
      97: iconst_1
      98: istore_1
      99: goto          25
     102: iload_1
     103: ireturn
}


import java.io.File

fun main() {
    fun parseInput(input: String): List<List<Int>> {
        return input.split("\n").map { bit ->
            bit.map {
                it.digitToIntOrNull() ?: 0
            }
        }
    }

    val filename =
        "src/Day03_sample_2021.txt"
//        "src/Day03_quiz_2021.txt"
    val textInput = File(filename).readText()
    val nestedIntList = parseInput(textInput)
    println(nestedIntList)

    fun maxCounter(input: List<Int>): Int {
        return input
            .groupingBy { it }
            .eachCount()
            .maxBy { it.value }.key
    }

    fun maxCounterValue(input: List<Int>): Int {
        return input
            .groupingBy { it }
            .eachCount()
            .maxBy { it.value }.value
    }

    fun minCounter(input: List<Int>): Int {
        return input
            .groupingBy { it }
            .eachCount()
            .minBy { it.value }.key
    }

    val filterTotalResult = mutableListOf<List<Int>>()

    for (i in 0 until nestedIntList.first().size - 1) {
        //for each column to list
        val columnList = nestedIntList.map { it[i] }
        filterTotalResult.add(columnList)
        println(columnList)
    }

    val gammaRate = mutableListOf<Int>()
    val epsilonRate = mutableListOf<Int>()
    val test = mutableListOf<Int>()

    for (aList in filterTotalResult) {
        gammaRate.add(maxCounter(aList))
        epsilonRate.add(minCounter(aList))
        test.add(maxCounterValue(aList))
    }

    println(test)
    var gammaRateInString = ""
    var epsilonRateInString = ""

    for (s in gammaRate) {
        gammaRateInString += s
    }

    for (s in epsilonRate) {
        epsilonRateInString += s
    }

    println(gammaRateInString)
    println(epsilonRateInString)

    val gammaRateInInteger = gammaRateInString.toInt(2)
    val epsilonRateInInteger = epsilonRateInString.toInt(2)
    println(gammaRateInInteger)
    println(epsilonRateInInteger)
    val powerConsumption = gammaRateInInteger * epsilonRateInInteger
    println(powerConsumption)
}

Compiled from "_Collections.kt"
public final class Day03_2021Kt$main$minCounter$$inlined$groupingBy$1 implements kotlin.collections.Grouping<java.lang.Integer, java.lang.Integer> {
  final java.lang.Iterable $this_groupingBy;

  public Day03_2021Kt$main$minCounter$$inlined$groupingBy$1(java.lang.Iterable);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $this_groupingBy:Ljava/lang/Iterable;
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public java.util.Iterator<java.lang.Integer> sourceIterator();
    Code:
       0: aload_0
       1: getfield      #18                 // Field $this_groupingBy:Ljava/lang/Iterable;
       4: invokeinterface #32,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
       9: areturn

  public java.lang.Integer keyOf(java.lang.Integer);
    Code:
       0: aload_1
       1: checkcast     #37                 // class java/lang/Number
       4: invokevirtual #41                 // Method java/lang/Number.intValue:()I
       7: istore_2
       8: iconst_0
       9: istore_3
      10: iload_2
      11: invokestatic  #47                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: areturn
}

Compiled from "Day03_2021.kt"
public final class Day03_2021Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String src/Day03_sample_2021.txt
       2: astore_0
       3: new           #10                 // class java/io/File
       6: dup
       7: aload_0
       8: invokespecial #14                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      11: aconst_null
      12: iconst_1
      13: aconst_null
      14: invokestatic  #20                 // Method kotlin/io/FilesKt.readText$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
      17: astore_1
      18: aload_1
      19: invokestatic  #24                 // Method main$parseInput:(Ljava/lang/String;)Ljava/util/List;
      22: astore_2
      23: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
      26: aload_2
      27: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      30: new           #38                 // class java/util/ArrayList
      33: dup
      34: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
      37: checkcast     #42                 // class java/util/List
      40: astore_3
      41: iconst_0
      42: istore        4
      44: aload_2
      45: invokestatic  #48                 // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      48: checkcast     #42                 // class java/util/List
      51: invokeinterface #52,  1           // InterfaceMethod java/util/List.size:()I
      56: iconst_1
      57: isub
      58: istore        5
      60: iload         4
      62: iload         5
      64: if_icmpge     205
      67: aload_2
      68: checkcast     #54                 // class java/lang/Iterable
      71: astore        7
      73: iconst_0
      74: istore        8
      76: aload         7
      78: astore        9
      80: new           #38                 // class java/util/ArrayList
      83: dup
      84: aload         7
      86: bipush        10
      88: invokestatic  #58                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      91: invokespecial #61                 // Method java/util/ArrayList."<init>":(I)V
      94: checkcast     #63                 // class java/util/Collection
      97: astore        10
      99: iconst_0
     100: istore        11
     102: aload         9
     104: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     109: astore        12
     111: aload         12
     113: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     118: ifeq          174
     121: aload         12
     123: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     128: astore        13
     130: aload         10
     132: aload         13
     134: checkcast     #42                 // class java/util/List
     137: astore        14
     139: astore        16
     141: iconst_0
     142: istore        15
     144: aload         14
     146: iload         4
     148: invokeinterface #81,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     153: checkcast     #83                 // class java/lang/Number
     156: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     159: invokestatic  #92                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     162: aload         16
     164: swap
     165: invokeinterface #96,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     170: pop
     171: goto          111
     174: aload         10
     176: checkcast     #42                 // class java/util/List
     179: nop
     180: astore        6
     182: aload_3
     183: aload         6
     185: invokeinterface #97,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     190: pop
     191: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     194: aload         6
     196: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     199: iinc          4, 1
     202: goto          60
     205: new           #38                 // class java/util/ArrayList
     208: dup
     209: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
     212: checkcast     #42                 // class java/util/List
     215: astore        4
     217: new           #38                 // class java/util/ArrayList
     220: dup
     221: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
     224: checkcast     #42                 // class java/util/List
     227: astore        5
     229: new           #38                 // class java/util/ArrayList
     232: dup
     233: invokespecial #40                 // Method java/util/ArrayList."<init>":()V
     236: checkcast     #42                 // class java/util/List
     239: astore        6
     241: aload_3
     242: invokeinterface #98,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     247: astore        7
     249: aload         7
     251: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     256: ifeq          322
     259: aload         7
     261: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     266: checkcast     #42                 // class java/util/List
     269: astore        8
     271: aload         4
     273: aload         8
     275: invokestatic  #102                // Method main$maxCounter:(Ljava/util/List;)I
     278: invokestatic  #92                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     281: invokeinterface #97,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     286: pop
     287: aload         5
     289: aload         8
     291: invokestatic  #105                // Method main$minCounter:(Ljava/util/List;)I
     294: invokestatic  #92                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     297: invokeinterface #97,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     302: pop
     303: aload         6
     305: aload         8
     307: invokestatic  #108                // Method main$maxCounterValue:(Ljava/util/List;)I
     310: invokestatic  #92                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     313: invokeinterface #97,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     318: pop
     319: goto          249
     322: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     325: aload         6
     327: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     330: ldc           #110                // String
     332: astore        7
     334: ldc           #110                // String
     336: astore        8
     338: aload         4
     340: invokeinterface #98,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     345: astore        9
     347: aload         9
     349: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     354: ifeq          397
     357: aload         9
     359: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     364: checkcast     #83                 // class java/lang/Number
     367: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     370: istore        10
     372: new           #112                // class java/lang/StringBuilder
     375: dup
     376: invokespecial #113                // Method java/lang/StringBuilder."<init>":()V
     379: aload         7
     381: invokevirtual #117                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     384: iload         10
     386: invokevirtual #120                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     389: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     392: astore        7
     394: goto          347
     397: aload         5
     399: invokeinterface #98,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     404: astore        9
     406: aload         9
     408: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     413: ifeq          456
     416: aload         9
     418: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     423: checkcast     #83                 // class java/lang/Number
     426: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     429: istore        10
     431: new           #112                // class java/lang/StringBuilder
     434: dup
     435: invokespecial #113                // Method java/lang/StringBuilder."<init>":()V
     438: aload         8
     440: invokevirtual #117                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     443: iload         10
     445: invokevirtual #120                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     448: invokevirtual #124                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     451: astore        8
     453: goto          406
     456: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     459: aload         7
     461: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     464: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     467: aload         8
     469: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     472: aload         7
     474: iconst_2
     475: invokestatic  #130                // Method kotlin/text/CharsKt.checkRadix:(I)I
     478: invokestatic  #134                // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
     481: istore        9
     483: aload         8
     485: iconst_2
     486: invokestatic  #130                // Method kotlin/text/CharsKt.checkRadix:(I)I
     489: invokestatic  #134                // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
     492: istore        10
     494: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     497: iload         9
     499: invokevirtual #136                // Method java/io/PrintStream.println:(I)V
     502: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     505: iload         10
     507: invokevirtual #136                // Method java/io/PrintStream.println:(I)V
     510: iload         9
     512: iload         10
     514: imul
     515: istore        11
     517: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     520: iload         11
     522: invokevirtual #136                // Method java/io/PrintStream.println:(I)V
     525: return

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

  private static final java.util.List<java.util.List<java.lang.Integer>> main$parseInput(java.lang.String);
    Code:
       0: aload_0
       1: checkcast     #176                // class java/lang/CharSequence
       4: iconst_1
       5: anewarray     #168                // class java/lang/String
       8: astore_1
       9: aload_1
      10: iconst_0
      11: ldc           #178                // String \n
      13: aastore
      14: aload_1
      15: iconst_0
      16: iconst_0
      17: bipush        6
      19: aconst_null
      20: invokestatic  #184                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      23: checkcast     #54                 // class java/lang/Iterable
      26: astore_1
      27: iconst_0
      28: istore_2
      29: aload_1
      30: astore_3
      31: new           #38                 // class java/util/ArrayList
      34: dup
      35: aload_1
      36: bipush        10
      38: invokestatic  #58                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      41: invokespecial #61                 // Method java/util/ArrayList."<init>":(I)V
      44: checkcast     #63                 // class java/util/Collection
      47: astore        4
      49: iconst_0
      50: istore        5
      52: aload_3
      53: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      58: astore        6
      60: aload         6
      62: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      67: ifeq          220
      70: aload         6
      72: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      77: astore        7
      79: aload         4
      81: aload         7
      83: checkcast     #168                // class java/lang/String
      86: astore        8
      88: astore        20
      90: iconst_0
      91: istore        9
      93: aload         8
      95: checkcast     #176                // class java/lang/CharSequence
      98: astore        10
     100: iconst_0
     101: istore        11
     103: aload         10
     105: astore        12
     107: new           #38                 // class java/util/ArrayList
     110: dup
     111: aload         10
     113: invokeinterface #187,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     118: invokespecial #61                 // Method java/util/ArrayList."<init>":(I)V
     121: checkcast     #63                 // class java/util/Collection
     124: astore        13
     126: iconst_0
     127: istore        14
     129: iconst_0
     130: istore        15
     132: iload         15
     134: aload         12
     136: invokeinterface #187,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     141: if_icmpge     201
     144: aload         12
     146: iload         15
     148: invokeinterface #191,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     153: istore        16
     155: aload         13
     157: iload         16
     159: istore        17
     161: astore        18
     163: iconst_0
     164: istore        19
     166: iload         17
     168: invokestatic  #195                // Method kotlin/text/CharsKt.digitToIntOrNull:(C)Ljava/lang/Integer;
     171: dup
     172: ifnull        181
     175: invokevirtual #196                // Method java/lang/Integer.intValue:()I
     178: goto          183
     181: pop
     182: iconst_0
     183: invokestatic  #92                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     186: aload         18
     188: swap
     189: invokeinterface #96,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     194: pop
     195: iinc          15, 1
     198: goto          132
     201: aload         13
     203: checkcast     #42                 // class java/util/List
     206: nop
     207: nop
     208: aload         20
     210: swap
     211: invokeinterface #96,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     216: pop
     217: goto          60
     220: aload         4
     222: checkcast     #42                 // class java/util/List
     225: nop
     226: areturn

  private static final int main$maxCounter(java.util.List<java.lang.Integer>);
    Code:
       0: aload_0
       1: checkcast     #54                 // class java/lang/Iterable
       4: astore_1
       5: nop
       6: iconst_0
       7: istore_2
       8: new           #205                // class Day03_2021Kt$main$maxCounter$$inlined$groupingBy$1
      11: dup
      12: aload_1
      13: invokespecial #208                // Method Day03_2021Kt$main$maxCounter$$inlined$groupingBy$1."<init>":(Ljava/lang/Iterable;)V
      16: checkcast     #210                // class kotlin/collections/Grouping
      19: invokestatic  #216                // Method kotlin/collections/GroupingKt.eachCount:(Lkotlin/collections/Grouping;)Ljava/util/Map;
      22: invokeinterface #222,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      27: checkcast     #54                 // class java/lang/Iterable
      30: astore_2
      31: aload_2
      32: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore_3
      38: aload_3
      39: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      44: ifne          55
      47: new           #224                // class java/util/NoSuchElementException
      50: dup
      51: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
      54: athrow
      55: aload_3
      56: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        4
      63: aload_3
      64: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      69: ifne          77
      72: aload         4
      74: goto          161
      77: aload         4
      79: checkcast     #227                // class java/util/Map$Entry
      82: astore        5
      84: iconst_0
      85: istore        6
      87: aload         5
      89: invokeinterface #230,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
      94: checkcast     #83                 // class java/lang/Number
      97: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     100: istore        5
     102: aload_3
     103: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     108: astore        6
     110: aload         6
     112: checkcast     #227                // class java/util/Map$Entry
     115: astore        7
     117: iconst_0
     118: istore        8
     120: aload         7
     122: invokeinterface #230,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     127: checkcast     #83                 // class java/lang/Number
     130: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     133: istore        7
     135: iload         5
     137: iload         7
     139: if_icmpge     150
     142: aload         6
     144: astore        4
     146: iload         7
     148: istore        5
     150: aload_3
     151: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     156: ifne          102
     159: aload         4
     161: checkcast     #227                // class java/util/Map$Entry
     164: invokeinterface #233,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
     169: checkcast     #83                 // class java/lang/Number
     172: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     175: ireturn

  private static final int main$maxCounterValue(java.util.List<java.lang.Integer>);
    Code:
       0: aload_0
       1: checkcast     #54                 // class java/lang/Iterable
       4: astore_1
       5: nop
       6: iconst_0
       7: istore_2
       8: new           #239                // class Day03_2021Kt$main$maxCounterValue$$inlined$groupingBy$1
      11: dup
      12: aload_1
      13: invokespecial #240                // Method Day03_2021Kt$main$maxCounterValue$$inlined$groupingBy$1."<init>":(Ljava/lang/Iterable;)V
      16: checkcast     #210                // class kotlin/collections/Grouping
      19: invokestatic  #216                // Method kotlin/collections/GroupingKt.eachCount:(Lkotlin/collections/Grouping;)Ljava/util/Map;
      22: invokeinterface #222,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      27: checkcast     #54                 // class java/lang/Iterable
      30: astore_2
      31: aload_2
      32: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore_3
      38: aload_3
      39: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      44: ifne          55
      47: new           #224                // class java/util/NoSuchElementException
      50: dup
      51: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
      54: athrow
      55: aload_3
      56: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        4
      63: aload_3
      64: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      69: ifne          77
      72: aload         4
      74: goto          161
      77: aload         4
      79: checkcast     #227                // class java/util/Map$Entry
      82: astore        5
      84: iconst_0
      85: istore        6
      87: aload         5
      89: invokeinterface #230,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
      94: checkcast     #83                 // class java/lang/Number
      97: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     100: istore        5
     102: aload_3
     103: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     108: astore        6
     110: aload         6
     112: checkcast     #227                // class java/util/Map$Entry
     115: astore        7
     117: iconst_0
     118: istore        8
     120: aload         7
     122: invokeinterface #230,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     127: checkcast     #83                 // class java/lang/Number
     130: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     133: istore        7
     135: iload         5
     137: iload         7
     139: if_icmpge     150
     142: aload         6
     144: astore        4
     146: iload         7
     148: istore        5
     150: aload_3
     151: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     156: ifne          102
     159: aload         4
     161: checkcast     #227                // class java/util/Map$Entry
     164: invokeinterface #230,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     169: checkcast     #83                 // class java/lang/Number
     172: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     175: ireturn

  private static final int main$minCounter(java.util.List<java.lang.Integer>);
    Code:
       0: aload_0
       1: checkcast     #54                 // class java/lang/Iterable
       4: astore_1
       5: nop
       6: iconst_0
       7: istore_2
       8: new           #243                // class Day03_2021Kt$main$minCounter$$inlined$groupingBy$1
      11: dup
      12: aload_1
      13: invokespecial #244                // Method Day03_2021Kt$main$minCounter$$inlined$groupingBy$1."<init>":(Ljava/lang/Iterable;)V
      16: checkcast     #210                // class kotlin/collections/Grouping
      19: invokestatic  #216                // Method kotlin/collections/GroupingKt.eachCount:(Lkotlin/collections/Grouping;)Ljava/util/Map;
      22: invokeinterface #222,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      27: checkcast     #54                 // class java/lang/Iterable
      30: astore_2
      31: aload_2
      32: invokeinterface #67,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore_3
      38: aload_3
      39: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      44: ifne          55
      47: new           #224                // class java/util/NoSuchElementException
      50: dup
      51: invokespecial #225                // Method java/util/NoSuchElementException."<init>":()V
      54: athrow
      55: aload_3
      56: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        4
      63: aload_3
      64: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      69: ifne          77
      72: aload         4
      74: goto          161
      77: aload         4
      79: checkcast     #227                // class java/util/Map$Entry
      82: astore        5
      84: iconst_0
      85: istore        6
      87: aload         5
      89: invokeinterface #230,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
      94: checkcast     #83                 // class java/lang/Number
      97: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     100: istore        5
     102: aload_3
     103: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     108: astore        6
     110: aload         6
     112: checkcast     #227                // class java/util/Map$Entry
     115: astore        7
     117: iconst_0
     118: istore        8
     120: aload         7
     122: invokeinterface #230,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     127: checkcast     #83                 // class java/lang/Number
     130: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     133: istore        7
     135: iload         5
     137: iload         7
     139: if_icmple     150
     142: aload         6
     144: astore        4
     146: iload         7
     148: istore        5
     150: aload_3
     151: invokeinterface #73,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     156: ifne          102
     159: aload         4
     161: checkcast     #227                // class java/util/Map$Entry
     164: invokeinterface #233,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
     169: checkcast     #83                 // class java/lang/Number
     172: invokevirtual #86                 // Method java/lang/Number.intValue:()I
     175: ireturn
}

Compiled from "_Collections.kt"
public final class Day03_2021Kt$main$maxCounterValue$$inlined$groupingBy$1 implements kotlin.collections.Grouping<java.lang.Integer, java.lang.Integer> {
  final java.lang.Iterable $this_groupingBy;

  public Day03_2021Kt$main$maxCounterValue$$inlined$groupingBy$1(java.lang.Iterable);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $this_groupingBy:Ljava/lang/Iterable;
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public java.util.Iterator<java.lang.Integer> sourceIterator();
    Code:
       0: aload_0
       1: getfield      #18                 // Field $this_groupingBy:Ljava/lang/Iterable;
       4: invokeinterface #32,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
       9: areturn

  public java.lang.Integer keyOf(java.lang.Integer);
    Code:
       0: aload_1
       1: checkcast     #37                 // class java/lang/Number
       4: invokevirtual #41                 // Method java/lang/Number.intValue:()I
       7: istore_2
       8: iconst_0
       9: istore_3
      10: iload_2
      11: invokestatic  #47                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: areturn
}

Compiled from "_Collections.kt"
public final class Day03_2021Kt$main$maxCounter$$inlined$groupingBy$1 implements kotlin.collections.Grouping<java.lang.Integer, java.lang.Integer> {
  final java.lang.Iterable $this_groupingBy;

  public Day03_2021Kt$main$maxCounter$$inlined$groupingBy$1(java.lang.Iterable);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $this_groupingBy:Ljava/lang/Iterable;
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public java.util.Iterator<java.lang.Integer> sourceIterator();
    Code:
       0: aload_0
       1: getfield      #18                 // Field $this_groupingBy:Ljava/lang/Iterable;
       4: invokeinterface #32,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
       9: areturn

  public java.lang.Integer keyOf(java.lang.Integer);
    Code:
       0: aload_1
       1: checkcast     #37                 // class java/lang/Number
       4: invokevirtual #41                 // Method java/lang/Number.intValue:()I
       7: istore_2
       8: iconst_0
       9: istore_3
      10: iload_2
      11: invokestatic  #47                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: areturn
}


import java.io.File
import kotlin.math.absoluteValue

fun main() {

    fun parseInput(input: String): List<String> {
        return input.split("\r\n").map { value ->
            value
        }
    }

    val fileName =
//        "src/Day03_sample.txt"
    "src/Day03_quiz.txt"
    val inputText = File(fileName).readText()
    val inputList = parseInput(input = inputText)

    println(inputList)
    println()
    val part1ChunkList = mutableListOf<List<String>>()

    for (aList in inputList) {
        part1ChunkList.add(aList.chunked(aList.length / 2))
    }

    var part2ChunkList: List<List<String>> = inputList.chunked(3)

    println(part2ChunkList)

    fun findCommonWord(inputList: List<String>): String {
        val first = inputList.first().toCharArray()
        val second = inputList.last().toCharArray()
        var index = ""

        for (aList in first) {
            if (second.contains(aList)) {
                index = aList.toString()
            }
        }
        return index
    }

    fun findCommonWordPart2(inputList: List<String>): String {

        println(inputList)
        val result = inputList.map {
            it.chunked(1)
        }

        var commonResult = ""
        for (aList in result) {
            for (element in aList) {
                if (result.all {
                        it.contains(element)
                    })
                    commonResult = element
            }
        }
        println("result")
        println(result)
        return commonResult
    }

    val commonResultList = mutableListOf<String>()
    for (aList in part2ChunkList) {
        commonResultList.add(findCommonWordPart2(aList))
    }
    println(commonResultList)

    val resultList = mutableListOf<String>()
    for (aList in part1ChunkList) {
        resultList.add(findCommonWord(aList))
    }

    println()
//    println(resultList)

    fun findNumericPosition(input: String): Int {
        val charArray = input.toCharArray()
        var position = 0
        for (aList in charArray) {
            val temp = aList.code
            val lowerMinus = 96 //for lower case
            val upperMinus = 38 //for upper case
            position = if ((temp <= 122) and (temp >= 97)) temp - lowerMinus else temp - upperMinus
        }
        return position
    }

    var sumNumberPart1 = 0
    for (aList in resultList) {
        sumNumberPart1 += findNumericPosition(aList)
    }

    println(sumNumberPart1)

    var sumNumberPart2 = 0
    for (aList in commonResultList) {
        sumNumberPart2 += findNumericPosition(aList)
    }
    println(sumNumberPart2)

}

Compiled from "Day03.kt"
public final class Day03Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String src/Day03_quiz.txt
       2: astore_0
       3: new           #10                 // class java/io/File
       6: dup
       7: aload_0
       8: invokespecial #14                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      11: aconst_null
      12: iconst_1
      13: aconst_null
      14: invokestatic  #20                 // Method kotlin/io/FilesKt.readText$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
      17: astore_1
      18: aload_1
      19: invokestatic  #24                 // Method main$parseInput:(Ljava/lang/String;)Ljava/util/List;
      22: astore_2
      23: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
      26: aload_2
      27: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      30: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
      33: invokevirtual #38                 // Method java/io/PrintStream.println:()V
      36: new           #40                 // class java/util/ArrayList
      39: dup
      40: invokespecial #42                 // Method java/util/ArrayList."<init>":()V
      43: checkcast     #44                 // class java/util/List
      46: astore_3
      47: aload_2
      48: invokeinterface #48,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      53: astore        4
      55: aload         4
      57: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      62: ifeq          102
      65: aload         4
      67: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      72: checkcast     #60                 // class java/lang/String
      75: astore        5
      77: aload_3
      78: aload         5
      80: checkcast     #62                 // class java/lang/CharSequence
      83: aload         5
      85: invokevirtual #66                 // Method java/lang/String.length:()I
      88: iconst_2
      89: idiv
      90: invokestatic  #72                 // Method kotlin/text/StringsKt.chunked:(Ljava/lang/CharSequence;I)Ljava/util/List;
      93: invokeinterface #76,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      98: pop
      99: goto          55
     102: aload_2
     103: checkcast     #78                 // class java/lang/Iterable
     106: iconst_3
     107: invokestatic  #83                 // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
     110: astore        4
     112: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     115: aload         4
     117: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     120: new           #40                 // class java/util/ArrayList
     123: dup
     124: invokespecial #42                 // Method java/util/ArrayList."<init>":()V
     127: checkcast     #44                 // class java/util/List
     130: astore        5
     132: aload         4
     134: invokeinterface #48,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     139: astore        6
     141: aload         6
     143: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     148: ifeq          179
     151: aload         6
     153: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     158: checkcast     #44                 // class java/util/List
     161: astore        7
     163: aload         5
     165: aload         7
     167: invokestatic  #87                 // Method main$findCommonWordPart2:(Ljava/util/List;)Ljava/lang/String;
     170: invokeinterface #76,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     175: pop
     176: goto          141
     179: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     182: aload         5
     184: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     187: new           #40                 // class java/util/ArrayList
     190: dup
     191: invokespecial #42                 // Method java/util/ArrayList."<init>":()V
     194: checkcast     #44                 // class java/util/List
     197: astore        6
     199: aload_3
     200: invokeinterface #48,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     205: astore        7
     207: aload         7
     209: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     214: ifeq          245
     217: aload         7
     219: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     224: checkcast     #44                 // class java/util/List
     227: astore        8
     229: aload         6
     231: aload         8
     233: invokestatic  #90                 // Method main$findCommonWord:(Ljava/util/List;)Ljava/lang/String;
     236: invokeinterface #76,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     241: pop
     242: goto          207
     245: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     248: invokevirtual #38                 // Method java/io/PrintStream.println:()V
     251: iconst_0
     252: istore        7
     254: aload         6
     256: invokeinterface #48,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     261: astore        8
     263: aload         8
     265: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     270: ifeq          298
     273: aload         8
     275: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     280: checkcast     #60                 // class java/lang/String
     283: astore        9
     285: iload         7
     287: aload         9
     289: invokestatic  #94                 // Method main$findNumericPosition:(Ljava/lang/String;)I
     292: iadd
     293: istore        7
     295: goto          263
     298: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     301: iload         7
     303: invokevirtual #97                 // Method java/io/PrintStream.println:(I)V
     306: iconst_0
     307: istore        8
     309: aload         5
     311: invokeinterface #48,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     316: astore        9
     318: aload         9
     320: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     325: ifeq          353
     328: aload         9
     330: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     335: checkcast     #60                 // class java/lang/String
     338: astore        10
     340: iload         8
     342: aload         10
     344: invokestatic  #94                 // Method main$findNumericPosition:(Ljava/lang/String;)I
     347: iadd
     348: istore        8
     350: goto          318
     353: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     356: iload         8
     358: invokevirtual #97                 // Method java/io/PrintStream.println:(I)V
     361: return

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

  private static final java.util.List<java.lang.String> main$parseInput(java.lang.String);
    Code:
       0: aload_0
       1: checkcast     #62                 // class java/lang/CharSequence
       4: iconst_1
       5: anewarray     #60                 // class java/lang/String
       8: astore_1
       9: aload_1
      10: iconst_0
      11: ldc           #118                // String \r\n
      13: aastore
      14: aload_1
      15: iconst_0
      16: iconst_0
      17: bipush        6
      19: aconst_null
      20: invokestatic  #122                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      23: checkcast     #78                 // class java/lang/Iterable
      26: astore_1
      27: iconst_0
      28: istore_2
      29: aload_1
      30: astore_3
      31: new           #40                 // class java/util/ArrayList
      34: dup
      35: aload_1
      36: bipush        10
      38: invokestatic  #126                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      41: invokespecial #128                // Method java/util/ArrayList."<init>":(I)V
      44: checkcast     #130                // class java/util/Collection
      47: astore        4
      49: iconst_0
      50: istore        5
      52: aload_3
      53: invokeinterface #131,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      58: astore        6
      60: aload         6
      62: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      67: ifeq          107
      70: aload         6
      72: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      77: astore        7
      79: aload         4
      81: aload         7
      83: checkcast     #60                 // class java/lang/String
      86: astore        8
      88: astore        10
      90: iconst_0
      91: istore        9
      93: aload         8
      95: aload         10
      97: swap
      98: invokeinterface #132,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     103: pop
     104: goto          60
     107: aload         4
     109: checkcast     #44                 // class java/util/List
     112: nop
     113: areturn

  private static final java.lang.String main$findCommonWord(java.util.List<java.lang.String>);
    Code:
       0: aload_0
       1: invokestatic  #149                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
       4: checkcast     #60                 // class java/lang/String
       7: invokevirtual #153                // Method java/lang/String.toCharArray:()[C
      10: dup
      11: ldc           #155                // String toCharArray(...)
      13: invokestatic  #161                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      16: astore_1
      17: aload_0
      18: invokestatic  #164                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      21: checkcast     #60                 // class java/lang/String
      24: invokevirtual #153                // Method java/lang/String.toCharArray:()[C
      27: dup
      28: ldc           #155                // String toCharArray(...)
      30: invokestatic  #161                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      33: astore_2
      34: ldc           #166                // String
      36: astore_3
      37: iconst_0
      38: istore        4
      40: aload_1
      41: arraylength
      42: istore        5
      44: iload         4
      46: iload         5
      48: if_icmpge     78
      51: aload_1
      52: iload         4
      54: caload
      55: istore        6
      57: aload_2
      58: iload         6
      60: invokestatic  #172                // Method kotlin/collections/ArraysKt.contains:([CC)Z
      63: ifeq          72
      66: iload         6
      68: invokestatic  #176                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      71: astore_3
      72: iinc          4, 1
      75: goto          44
      78: aload_3
      79: areturn

  private static final java.lang.String main$findCommonWordPart2(java.util.List<java.lang.String>);
    Code:
       0: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
       3: aload_0
       4: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
       7: aload_0
       8: checkcast     #78                 // class java/lang/Iterable
      11: astore_2
      12: iconst_0
      13: istore_3
      14: aload_2
      15: astore        4
      17: new           #40                 // class java/util/ArrayList
      20: dup
      21: aload_2
      22: bipush        10
      24: invokestatic  #126                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      27: invokespecial #128                // Method java/util/ArrayList."<init>":(I)V
      30: checkcast     #130                // class java/util/Collection
      33: astore        5
      35: iconst_0
      36: istore        6
      38: aload         4
      40: invokeinterface #131,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        7
      47: aload         7
      49: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          101
      57: aload         7
      59: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: astore        8
      66: aload         5
      68: aload         8
      70: checkcast     #60                 // class java/lang/String
      73: astore        9
      75: astore        13
      77: iconst_0
      78: istore        10
      80: aload         9
      82: checkcast     #62                 // class java/lang/CharSequence
      85: iconst_1
      86: invokestatic  #72                 // Method kotlin/text/StringsKt.chunked:(Ljava/lang/CharSequence;I)Ljava/util/List;
      89: aload         13
      91: swap
      92: invokeinterface #132,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      97: pop
      98: goto          47
     101: aload         5
     103: checkcast     #44                 // class java/util/List
     106: nop
     107: astore_1
     108: ldc           #166                // String
     110: astore_2
     111: aload_1
     112: invokeinterface #48,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     117: astore_3
     118: aload_3
     119: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     124: ifeq          267
     127: aload_3
     128: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     133: checkcast     #44                 // class java/util/List
     136: astore        4
     138: aload         4
     140: invokeinterface #48,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     145: astore        5
     147: aload         5
     149: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     154: ifeq          118
     157: aload         5
     159: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     164: checkcast     #60                 // class java/lang/String
     167: astore        6
     169: aload_1
     170: checkcast     #78                 // class java/lang/Iterable
     173: astore        7
     175: iconst_0
     176: istore        8
     178: aload         7
     180: instanceof    #130                // class java/util/Collection
     183: ifeq          203
     186: aload         7
     188: checkcast     #130                // class java/util/Collection
     191: invokeinterface #184,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     196: ifeq          203
     199: iconst_1
     200: goto          258
     203: aload         7
     205: invokeinterface #131,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     210: astore        9
     212: aload         9
     214: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     219: ifeq          257
     222: aload         9
     224: invokeinterface #58,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     229: astore        10
     231: aload         10
     233: checkcast     #44                 // class java/util/List
     236: astore        11
     238: iconst_0
     239: istore        12
     241: aload         11
     243: aload         6
     245: invokeinterface #186,  2          // InterfaceMethod java/util/List.contains:(Ljava/lang/Object;)Z
     250: ifne          212
     253: iconst_0
     254: goto          258
     257: iconst_1
     258: ifeq          147
     261: aload         6
     263: astore_2
     264: goto          147
     267: ldc           #188                // String result
     269: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     272: swap
     273: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     276: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
     279: aload_1
     280: invokevirtual #36                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     283: aload_2
     284: areturn

  private static final int main$findNumericPosition(java.lang.String);
    Code:
       0: aload_0
       1: invokevirtual #153                // Method java/lang/String.toCharArray:()[C
       4: dup
       5: ldc           #155                // String toCharArray(...)
       7: invokestatic  #161                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      10: astore_1
      11: iconst_0
      12: istore_2
      13: iconst_0
      14: istore_3
      15: aload_1
      16: arraylength
      17: istore        4
      19: iload_3
      20: iload         4
      22: if_icmpge     90
      25: aload_1
      26: iload_3
      27: caload
      28: istore        5
      30: iload         5
      32: istore        6
      34: bipush        96
      36: istore        7
      38: bipush        38
      40: istore        8
      42: iload         6
      44: bipush        122
      46: if_icmpgt     53
      49: iconst_1
      50: goto          54
      53: iconst_0
      54: iload         6
      56: bipush        97
      58: if_icmplt     65
      61: iconst_1
      62: goto          66
      65: iconst_0
      66: iand
      67: ifeq          78
      70: iload         6
      72: iload         7
      74: isub
      75: goto          83
      78: iload         6
      80: iload         8
      82: isub
      83: istore_2
      84: iinc          3, 1
      87: goto          19
      90: iload_2
      91: ireturn
}


import kotlin.String
import kotlin.collections.List

object Day15 {

    fun part1(input: List<String>): String {
        val steps = input[0].split(",").map { it.trim() }
        return steps.sumOf { hash(it) }.toString()
    }

    private fun hash(it: String): Int {
        return it.toCharArray().fold(0) { acc, c -> ((acc + c.code) * 17) % 256 }
    }

    fun part2(input: List<String>): String {
        val steps = input[0].split(",").map { it.trim() }
        val boxes = mutableMapOf<Int, LinkedHashMap<String, Int>>()
        steps.forEach {
            if (it.contains("-")) {
                val label = it.substring(0, it.length - 1)
                val box = hash(label)
                boxes.getOrPut(box) { linkedMapOf() }.remove(label)
            } else {
                val (label, focusLength) = it.split("=")
                val box = hash(label)
                boxes.getOrPut(box) { linkedMapOf() }[label] = focusLength.toInt()
            }
        }
        return boxes.toList().sumOf { (boxNumber, lenses) ->
            lenses.values.withIndex().sumOf { (idx, value) ->
                (idx + 1) * value * (boxNumber + 1)
            }
        }.toString()
    }
}

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

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

  public final java.lang.String part1(java.util.List<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: iconst_0
       8: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      13: checkcast     #30                 // class java/lang/CharSequence
      16: iconst_1
      17: anewarray     #32                 // class java/lang/String
      20: astore_3
      21: aload_3
      22: iconst_0
      23: ldc           #34                 // String ,
      25: aastore
      26: aload_3
      27: iconst_0
      28: iconst_0
      29: bipush        6
      31: aconst_null
      32: invokestatic  #40                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      35: checkcast     #42                 // class java/lang/Iterable
      38: astore_3
      39: iconst_0
      40: istore        4
      42: aload_3
      43: astore        5
      45: new           #44                 // class java/util/ArrayList
      48: dup
      49: aload_3
      50: bipush        10
      52: invokestatic  #50                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      55: invokespecial #53                 // Method java/util/ArrayList."<init>":(I)V
      58: checkcast     #55                 // class java/util/Collection
      61: astore        6
      63: iconst_0
      64: istore        7
      66: aload         5
      68: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      73: astore        8
      75: aload         8
      77: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      82: ifeq          132
      85: aload         8
      87: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      92: astore        9
      94: aload         6
      96: aload         9
      98: checkcast     #32                 // class java/lang/String
     101: astore        10
     103: astore        12
     105: iconst_0
     106: istore        11
     108: aload         10
     110: checkcast     #30                 // class java/lang/CharSequence
     113: invokestatic  #73                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     116: invokevirtual #77                 // Method java/lang/Object.toString:()Ljava/lang/String;
     119: nop
     120: aload         12
     122: swap
     123: invokeinterface #81,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     128: pop
     129: goto          75
     132: aload         6
     134: checkcast     #24                 // class java/util/List
     137: nop
     138: astore_2
     139: aload_2
     140: checkcast     #42                 // class java/lang/Iterable
     143: astore_3
     144: iconst_0
     145: istore        4
     147: aload_3
     148: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     153: astore        5
     155: aload         5
     157: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     162: ifeq          208
     165: aload         5
     167: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     172: astore        6
     174: iload         4
     176: aload         6
     178: checkcast     #32                 // class java/lang/String
     181: astore        7
     183: istore        12
     185: iconst_0
     186: istore        8
     188: getstatic     #84                 // Field INSTANCE:LDay15;
     191: aload         7
     193: invokespecial #88                 // Method hash:(Ljava/lang/String;)I
     196: istore        13
     198: iload         12
     200: iload         13
     202: iadd
     203: istore        4
     205: goto          155
     208: iload         4
     210: invokestatic  #92                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
     213: areturn

  private final int hash(java.lang.String);
    Code:
       0: aload_1
       1: invokevirtual #112                // Method java/lang/String.toCharArray:()[C
       4: dup
       5: ldc           #114                // String toCharArray(...)
       7: invokestatic  #117                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      10: astore_2
      11: iconst_0
      12: istore_3
      13: iconst_0
      14: istore        4
      16: iload_3
      17: istore        5
      19: iconst_0
      20: istore        6
      22: aload_2
      23: arraylength
      24: istore        7
      26: iload         6
      28: iload         7
      30: if_icmpge     70
      33: aload_2
      34: iload         6
      36: caload
      37: istore        8
      39: iload         5
      41: iload         8
      43: istore        9
      45: istore        10
      47: iconst_0
      48: istore        11
      50: iload         10
      52: iload         9
      54: iadd
      55: bipush        17
      57: imul
      58: sipush        256
      61: irem
      62: istore        5
      64: iinc          6, 1
      67: goto          26
      70: iload         5
      72: ireturn

  public final java.lang.String part2(java.util.List<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: iconst_0
       8: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      13: checkcast     #30                 // class java/lang/CharSequence
      16: iconst_1
      17: anewarray     #32                 // class java/lang/String
      20: astore_3
      21: aload_3
      22: iconst_0
      23: ldc           #34                 // String ,
      25: aastore
      26: aload_3
      27: iconst_0
      28: iconst_0
      29: bipush        6
      31: aconst_null
      32: invokestatic  #40                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      35: checkcast     #42                 // class java/lang/Iterable
      38: astore_3
      39: iconst_0
      40: istore        4
      42: aload_3
      43: astore        5
      45: new           #44                 // class java/util/ArrayList
      48: dup
      49: aload_3
      50: bipush        10
      52: invokestatic  #50                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      55: invokespecial #53                 // Method java/util/ArrayList."<init>":(I)V
      58: checkcast     #55                 // class java/util/Collection
      61: astore        6
      63: iconst_0
      64: istore        7
      66: aload         5
      68: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      73: astore        8
      75: aload         8
      77: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      82: ifeq          132
      85: aload         8
      87: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      92: astore        9
      94: aload         6
      96: aload         9
      98: checkcast     #32                 // class java/lang/String
     101: astore        10
     103: astore        22
     105: iconst_0
     106: istore        11
     108: aload         10
     110: checkcast     #30                 // class java/lang/CharSequence
     113: invokestatic  #73                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     116: invokevirtual #77                 // Method java/lang/Object.toString:()Ljava/lang/String;
     119: nop
     120: aload         22
     122: swap
     123: invokeinterface #81,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     128: pop
     129: goto          75
     132: aload         6
     134: checkcast     #24                 // class java/util/List
     137: nop
     138: astore_2
     139: new           #131                // class java/util/LinkedHashMap
     142: dup
     143: invokespecial #132                // Method java/util/LinkedHashMap."<init>":()V
     146: checkcast     #134                // class java/util/Map
     149: astore_3
     150: aload_2
     151: checkcast     #42                 // class java/lang/Iterable
     154: astore        4
     156: iconst_0
     157: istore        5
     159: aload         4
     161: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     166: astore        6
     168: aload         6
     170: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     175: ifeq          480
     178: aload         6
     180: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     185: astore        7
     187: aload         7
     189: checkcast     #32                 // class java/lang/String
     192: astore        8
     194: iconst_0
     195: istore        9
     197: aload         8
     199: checkcast     #30                 // class java/lang/CharSequence
     202: ldc           #136                // String -
     204: checkcast     #30                 // class java/lang/CharSequence
     207: iconst_0
     208: iconst_2
     209: aconst_null
     210: invokestatic  #140                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
     213: ifeq          321
     216: aload         8
     218: iconst_0
     219: aload         8
     221: invokevirtual #144                // Method java/lang/String.length:()I
     224: iconst_1
     225: isub
     226: invokevirtual #148                // Method java/lang/String.substring:(II)Ljava/lang/String;
     229: dup
     230: ldc           #150                // String substring(...)
     232: invokestatic  #117                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     235: astore        10
     237: getstatic     #84                 // Field INSTANCE:LDay15;
     240: aload         10
     242: invokespecial #88                 // Method hash:(Ljava/lang/String;)I
     245: istore        11
     247: aload_3
     248: astore        12
     250: iload         11
     252: invokestatic  #155                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     255: astore        13
     257: iconst_0
     258: istore        14
     260: aload         12
     262: aload         13
     264: invokeinterface #158,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     269: astore        15
     271: aload         15
     273: ifnonnull     306
     276: iconst_0
     277: istore        16
     279: new           #131                // class java/util/LinkedHashMap
     282: dup
     283: invokespecial #132                // Method java/util/LinkedHashMap."<init>":()V
     286: nop
     287: astore        16
     289: aload         12
     291: aload         13
     293: aload         16
     295: invokeinterface #162,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     300: pop
     301: aload         16
     303: goto          308
     306: aload         15
     308: nop
     309: checkcast     #131                // class java/util/LinkedHashMap
     312: aload         10
     314: invokevirtual #165                // Method java/util/LinkedHashMap.remove:(Ljava/lang/Object;)Ljava/lang/Object;
     317: pop
     318: goto          475
     321: aload         8
     323: checkcast     #30                 // class java/lang/CharSequence
     326: iconst_1
     327: anewarray     #32                 // class java/lang/String
     330: astore        11
     332: aload         11
     334: iconst_0
     335: ldc           #167                // String =
     337: aastore
     338: aload         11
     340: iconst_0
     341: iconst_0
     342: bipush        6
     344: aconst_null
     345: invokestatic  #40                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     348: astore        10
     350: aload         10
     352: iconst_0
     353: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     358: checkcast     #32                 // class java/lang/String
     361: astore        11
     363: aload         10
     365: iconst_1
     366: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     371: checkcast     #32                 // class java/lang/String
     374: astore        12
     376: getstatic     #84                 // Field INSTANCE:LDay15;
     379: aload         11
     381: invokespecial #88                 // Method hash:(Ljava/lang/String;)I
     384: istore        13
     386: aload_3
     387: astore        14
     389: iload         13
     391: invokestatic  #155                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     394: astore        15
     396: iconst_0
     397: istore        16
     399: aload         14
     401: aload         15
     403: invokeinterface #158,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     408: astore        17
     410: aload         17
     412: ifnonnull     445
     415: iconst_0
     416: istore        18
     418: new           #131                // class java/util/LinkedHashMap
     421: dup
     422: invokespecial #132                // Method java/util/LinkedHashMap."<init>":()V
     425: nop
     426: astore        18
     428: aload         14
     430: aload         15
     432: aload         18
     434: invokeinterface #162,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     439: pop
     440: aload         18
     442: goto          447
     445: aload         17
     447: nop
     448: checkcast     #134                // class java/util/Map
     451: astore        14
     453: aload         12
     455: invokestatic  #170                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     458: invokestatic  #155                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     461: astore        15
     463: aload         14
     465: aload         11
     467: aload         15
     469: invokeinterface #162,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     474: pop
     475: nop
     476: nop
     477: goto          168
     480: nop
     481: aload_3
     482: invokestatic  #176                // Method kotlin/collections/MapsKt.toList:(Ljava/util/Map;)Ljava/util/List;
     485: checkcast     #42                 // class java/lang/Iterable
     488: astore        4
     490: iconst_0
     491: istore        5
     493: aload         4
     495: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     500: astore        6
     502: aload         6
     504: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     509: ifeq          687
     512: aload         6
     514: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     519: astore        7
     521: iload         5
     523: aload         7
     525: checkcast     #178                // class kotlin/Pair
     528: astore        8
     530: istore        22
     532: iconst_0
     533: istore        9
     535: aload         8
     537: invokevirtual #181                // Method kotlin/Pair.component1:()Ljava/lang/Object;
     540: checkcast     #183                // class java/lang/Number
     543: invokevirtual #186                // Method java/lang/Number.intValue:()I
     546: istore        10
     548: aload         8
     550: invokevirtual #189                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     553: checkcast     #131                // class java/util/LinkedHashMap
     556: astore        11
     558: aload         11
     560: invokevirtual #193                // Method java/util/LinkedHashMap.values:()Ljava/util/Collection;
     563: dup
     564: ldc           #195                // String <get-values>(...)
     566: invokestatic  #117                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     569: checkcast     #42                 // class java/lang/Iterable
     572: invokestatic  #199                // Method kotlin/collections/CollectionsKt.withIndex:(Ljava/lang/Iterable;)Ljava/lang/Iterable;
     575: astore        12
     577: iconst_0
     578: istore        13
     580: aload         12
     582: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     587: astore        14
     589: aload         14
     591: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     596: ifeq          672
     599: aload         14
     601: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     606: astore        15
     608: iload         13
     610: aload         15
     612: checkcast     #201                // class kotlin/collections/IndexedValue
     615: astore        16
     617: istore        17
     619: iconst_0
     620: istore        18
     622: aload         16
     624: invokevirtual #203                // Method kotlin/collections/IndexedValue.component1:()I
     627: istore        19
     629: aload         16
     631: invokevirtual #204                // Method kotlin/collections/IndexedValue.component2:()Ljava/lang/Object;
     634: dup
     635: ldc           #206                // String component2(...)
     637: invokestatic  #117                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     640: checkcast     #152                // class java/lang/Integer
     643: astore        20
     645: iload         19
     647: iconst_1
     648: iadd
     649: aload         20
     651: invokevirtual #207                // Method java/lang/Integer.intValue:()I
     654: imul
     655: iload         10
     657: iconst_1
     658: iadd
     659: imul
     660: istore        21
     662: iload         17
     664: iload         21
     666: iadd
     667: istore        13
     669: goto          589
     672: iload         13
     674: nop
     675: istore        23
     677: iload         22
     679: iload         23
     681: iadd
     682: istore        5
     684: goto          502
     687: iload         5
     689: invokestatic  #92                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
     692: areturn

  static {};
    Code:
       0: new           #2                  // class Day15
       3: dup
       4: invokespecial #233                // Method "<init>":()V
       7: putstatic     #84                 // Field INSTANCE:LDay15;
      10: return
}