import java.io.File

val Char.priority: Int
        get(): Int {
            return when (this){
                in 'a'..'z' -> this -'a' + 1
                in 'A'..'Z' -> this - 'A' + 27
                else -> error("Check your input! $this")
            }
        }

fun main () {

    fun parseInput(input: String): ArrayList<Pair<String, String>> {
        val data = File(input).readLines()
        var parsed: ArrayList<Pair<String, String>> = arrayListOf()
        for (pack in data){
            val size = pack.length / 2
            val compartments = pack.chunked(size)
            val pair = Pair(compartments[0], compartments[1])
            parsed.add(pair)
        }
        return parsed
    }

    fun part1(input: String): Int {
        val knapsacks = parseInput(input)
        var res: Int = 0
        for (pack in knapsacks){
            var f = pack.first.toSet()
            var b = pack.second.toSet()
            var item = (f intersect b).first()
            res += item.priority
        }

        return res
    }

    fun part2(input: String) : Int {
        val knapsacks = parseInput(input)
        var res: Int = 0
        var allItems: MutableList<Set<Char>> = mutableListOf()
        var iter = 0
        for (pack in knapsacks){
            var bagContents = (pack.first.toSet() union pack.second.toSet())
            allItems += bagContents

            if (iter % 3 == 2){
                val common = (allItems[0] intersect allItems[1] intersect allItems[2]).first()
                res += common.priority
                allItems = mutableListOf()
            }
            ++iter
        }
        return res
    }

    val testInput: String = "data/day3_test.txt"
    check(part1(testInput) == 157)
    check(part2(testInput) == 70)

    val input: String = "data/day3.txt"
    println(part1(input))
    println(part2(input))
}

Compiled from "Day03.kt"
public final class Day03Kt {
  public static final int getPriority(char);
    Code:
       0: iload_0
       1: istore_1
       2: bipush        97
       4: iload_1
       5: if_icmpgt     22
       8: iload_1
       9: bipush        123
      11: if_icmpge     18
      14: iconst_1
      15: goto          23
      18: iconst_0
      19: goto          23
      22: iconst_0
      23: ifeq          35
      26: iload_0
      27: bipush        97
      29: isub
      30: iconst_1
      31: iadd
      32: goto          99
      35: bipush        65
      37: iload_1
      38: if_icmpgt     55
      41: iload_1
      42: bipush        91
      44: if_icmpge     51
      47: iconst_1
      48: goto          56
      51: iconst_0
      52: goto          56
      55: iconst_0
      56: ifeq          69
      59: iload_0
      60: bipush        65
      62: isub
      63: bipush        27
      65: iadd
      66: goto          99
      69: new           #8                  // class java/lang/IllegalStateException
      72: dup
      73: new           #10                 // class java/lang/StringBuilder
      76: dup
      77: invokespecial #14                 // Method java/lang/StringBuilder."<init>":()V
      80: ldc           #16                 // String Check your input!
      82: invokevirtual #20                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      85: iload_0
      86: invokevirtual #23                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      89: invokevirtual #27                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      92: invokevirtual #28                 // Method java/lang/Object.toString:()Ljava/lang/String;
      95: invokespecial #31                 // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
      98: athrow
      99: ireturn

  public static final void main();
    Code:
       0: ldc           #36                 // String data/day3_test.txt
       2: astore_0
       3: aload_0
       4: invokestatic  #40                 // Method main$part1:(Ljava/lang/String;)I
       7: sipush        157
      10: if_icmpne     17
      13: iconst_1
      14: goto          18
      17: iconst_0
      18: ifne          31
      21: new           #8                  // class java/lang/IllegalStateException
      24: dup
      25: ldc           #42                 // String Check failed.
      27: invokespecial #31                 // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
      30: athrow
      31: aload_0
      32: invokestatic  #45                 // Method main$part2:(Ljava/lang/String;)I
      35: bipush        70
      37: if_icmpne     44
      40: iconst_1
      41: goto          45
      44: iconst_0
      45: ifne          58
      48: new           #8                  // class java/lang/IllegalStateException
      51: dup
      52: ldc           #42                 // String Check failed.
      54: invokespecial #31                 // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
      57: athrow
      58: ldc           #47                 // String data/day3.txt
      60: astore_1
      61: aload_1
      62: invokestatic  #40                 // Method main$part1:(Ljava/lang/String;)I
      65: istore_2
      66: getstatic     #53                 // Field java/lang/System.out:Ljava/io/PrintStream;
      69: iload_2
      70: invokevirtual #59                 // Method java/io/PrintStream.println:(I)V
      73: aload_1
      74: invokestatic  #45                 // Method main$part2:(Ljava/lang/String;)I
      77: istore_2
      78: getstatic     #53                 // Field java/lang/System.out:Ljava/io/PrintStream;
      81: iload_2
      82: invokevirtual #59                 // Method java/io/PrintStream.println:(I)V
      85: return

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

  private static final java.util.ArrayList<kotlin.Pair<java.lang.String, java.lang.String>> main$parseInput(java.lang.String);
    Code:
       0: new           #74                 // class java/io/File
       3: dup
       4: aload_0
       5: invokespecial #75                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       8: aconst_null
       9: iconst_1
      10: aconst_null
      11: invokestatic  #81                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      14: astore_1
      15: new           #83                 // class java/util/ArrayList
      18: dup
      19: invokespecial #84                 // Method java/util/ArrayList."<init>":()V
      22: astore_2
      23: aload_1
      24: invokeinterface #90,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      29: astore_3
      30: aload_3
      31: invokeinterface #96,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      36: ifeq          106
      39: aload_3
      40: invokeinterface #100,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      45: checkcast     #64                 // class java/lang/String
      48: astore        4
      50: aload         4
      52: invokevirtual #104                // Method java/lang/String.length:()I
      55: iconst_2
      56: idiv
      57: istore        5
      59: aload         4
      61: checkcast     #106                // class java/lang/CharSequence
      64: iload         5
      66: invokestatic  #112                // Method kotlin/text/StringsKt.chunked:(Ljava/lang/CharSequence;I)Ljava/util/List;
      69: astore        6
      71: new           #114                // class kotlin/Pair
      74: dup
      75: aload         6
      77: iconst_0
      78: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      83: aload         6
      85: iconst_1
      86: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      91: invokespecial #121                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      94: astore        7
      96: aload_2
      97: aload         7
      99: invokevirtual #125                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     102: pop
     103: goto          30
     106: aload_2
     107: areturn

  private static final int main$part1(java.lang.String);
    Code:
       0: aload_0
       1: invokestatic  #137                // Method main$parseInput:(Ljava/lang/String;)Ljava/util/ArrayList;
       4: astore_1
       5: iconst_0
       6: istore_2
       7: aload_1
       8: invokevirtual #138                // Method java/util/ArrayList.iterator:()Ljava/util/Iterator;
      11: dup
      12: ldc           #140                // String iterator(...)
      14: invokestatic  #146                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      17: astore_3
      18: aload_3
      19: invokeinterface #96,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      24: ifeq          108
      27: aload_3
      28: invokeinterface #100,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      33: dup
      34: ldc           #148                // String next(...)
      36: invokestatic  #146                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      39: checkcast     #114                // class kotlin/Pair
      42: astore        4
      44: aload         4
      46: invokevirtual #151                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      49: checkcast     #106                // class java/lang/CharSequence
      52: invokestatic  #155                // Method kotlin/text/StringsKt.toSet:(Ljava/lang/CharSequence;)Ljava/util/Set;
      55: astore        5
      57: aload         4
      59: invokevirtual #158                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      62: checkcast     #106                // class java/lang/CharSequence
      65: invokestatic  #155                // Method kotlin/text/StringsKt.toSet:(Ljava/lang/CharSequence;)Ljava/util/Set;
      68: astore        6
      70: aload         5
      72: checkcast     #160                // class java/lang/Iterable
      75: aload         6
      77: checkcast     #160                // class java/lang/Iterable
      80: invokestatic  #166                // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
      83: checkcast     #160                // class java/lang/Iterable
      86: invokestatic  #170                // Method kotlin/collections/CollectionsKt.first:(Ljava/lang/Iterable;)Ljava/lang/Object;
      89: checkcast     #172                // class java/lang/Character
      92: invokevirtual #176                // Method java/lang/Character.charValue:()C
      95: istore        7
      97: iload_2
      98: iload         7
     100: invokestatic  #178                // Method getPriority:(C)I
     103: iadd
     104: istore_2
     105: goto          18
     108: iload_2
     109: ireturn

  private static final int main$part2(java.lang.String);
    Code:
       0: aload_0
       1: invokestatic  #137                // Method main$parseInput:(Ljava/lang/String;)Ljava/util/ArrayList;
       4: astore_1
       5: iconst_0
       6: istore_2
       7: new           #83                 // class java/util/ArrayList
      10: dup
      11: invokespecial #84                 // Method java/util/ArrayList."<init>":()V
      14: checkcast     #86                 // class java/util/List
      17: astore_3
      18: iconst_0
      19: istore        4
      21: aload_1
      22: invokevirtual #138                // Method java/util/ArrayList.iterator:()Ljava/util/Iterator;
      25: dup
      26: ldc           #140                // String iterator(...)
      28: invokestatic  #146                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      31: astore        5
      33: aload         5
      35: invokeinterface #96,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      40: ifeq          192
      43: aload         5
      45: invokeinterface #100,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      50: dup
      51: ldc           #148                // String next(...)
      53: invokestatic  #146                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      56: checkcast     #114                // class kotlin/Pair
      59: astore        6
      61: aload         6
      63: invokevirtual #151                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      66: checkcast     #106                // class java/lang/CharSequence
      69: invokestatic  #155                // Method kotlin/text/StringsKt.toSet:(Ljava/lang/CharSequence;)Ljava/util/Set;
      72: checkcast     #160                // class java/lang/Iterable
      75: aload         6
      77: invokevirtual #158                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      80: checkcast     #106                // class java/lang/CharSequence
      83: invokestatic  #155                // Method kotlin/text/StringsKt.toSet:(Ljava/lang/CharSequence;)Ljava/util/Set;
      86: checkcast     #160                // class java/lang/Iterable
      89: invokestatic  #187                // Method kotlin/collections/CollectionsKt.union:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
      92: astore        7
      94: aload_3
      95: checkcast     #189                // class java/util/Collection
      98: aload         7
     100: invokeinterface #190,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     105: pop
     106: iload         4
     108: iconst_3
     109: irem
     110: iconst_2
     111: if_icmpne     186
     114: aload_3
     115: iconst_0
     116: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     121: checkcast     #160                // class java/lang/Iterable
     124: aload_3
     125: iconst_1
     126: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     131: checkcast     #160                // class java/lang/Iterable
     134: invokestatic  #166                // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
     137: checkcast     #160                // class java/lang/Iterable
     140: aload_3
     141: iconst_2
     142: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     147: checkcast     #160                // class java/lang/Iterable
     150: invokestatic  #166                // Method kotlin/collections/CollectionsKt.intersect:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Set;
     153: checkcast     #160                // class java/lang/Iterable
     156: invokestatic  #170                // Method kotlin/collections/CollectionsKt.first:(Ljava/lang/Iterable;)Ljava/lang/Object;
     159: checkcast     #172                // class java/lang/Character
     162: invokevirtual #176                // Method java/lang/Character.charValue:()C
     165: istore        8
     167: iload_2
     168: iload         8
     170: invokestatic  #178                // Method getPriority:(C)I
     173: iadd
     174: istore_2
     175: new           #83                 // class java/util/ArrayList
     178: dup
     179: invokespecial #84                 // Method java/util/ArrayList."<init>":()V
     182: checkcast     #86                 // class java/util/List
     185: astore_3
     186: iinc          4, 1
     189: goto          33
     192: iload_2
     193: ireturn
}


import java.io.File

fun main(){

    fun read_file(file_path: String) : List<String> {
        val text = File(file_path).readLines()
        return text
    }

    val fix = mapOf("A" to "X", "B" to "Y", "C" to "Z")

    fun part1(x: String) : Int {
        val me: String = x[2].toString()
        val opp: String = fix.getValue(x[0].toString())

        var score: Int = 0
        // draw
        if (opp == me) score += 3

        // Win
        if (opp == "X" && me == "Y") score +=6
        if (opp == "Y" && me == "Z") score +=6
        if (opp == "Z" && me == "X") score +=6

        score += mapOf("X" to 1, "Y" to 2, "Z" to 3).getValue(me)
        return score
    }

    fun part2(x: String): Int {
        val result: String = x[2].toString()
        val opp: String = x[0].toString()
        var me: String = "A"

        var score: Int = 0

        // draw
        if (result == "Y"){
            score += 3
            me = opp
        }

        // lose
        if (result == "X"){
            if (opp == "A") me = "C"
            if (opp == "B") me = "A"
            if (opp == "C") me = "B"
        }

        // win
        if (result == "Z"){
            score += 6
            if (opp == "A") me = "B"
            if (opp == "B") me = "C"
            if (opp == "C") me = "A"
        }

        score += mapOf("A" to 1, "B" to 2, "C" to 3).getValue(me)

        return score
    }
    val testFile = read_file("data/day2_test.txt")
    check(testFile.map { part1(it)}.sum() == 15)
    check(testFile.map { part2(it)}.sum() == 12)

    val file = read_file("data/day2.txt")
    println(file.map { part1(it)} .sum())
    println(file.map { part2(it)} .sum())

}

Compiled from "Day02.kt"
public final class Day02Kt {
  public static final void main();
    Code:
       0: iconst_3
       1: anewarray     #8                  // class kotlin/Pair
       4: astore_1
       5: aload_1
       6: iconst_0
       7: ldc           #10                 // String A
       9: ldc           #12                 // String X
      11: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      14: aastore
      15: aload_1
      16: iconst_1
      17: ldc           #20                 // String B
      19: ldc           #22                 // String Y
      21: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      24: aastore
      25: aload_1
      26: iconst_2
      27: ldc           #24                 // String C
      29: ldc           #26                 // String Z
      31: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      34: aastore
      35: aload_1
      36: invokestatic  #32                 // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
      39: astore_0
      40: ldc           #34                 // String data/day2_test.txt
      42: invokestatic  #38                 // Method main$read_file:(Ljava/lang/String;)Ljava/util/List;
      45: astore_1
      46: aload_1
      47: checkcast     #40                 // class java/lang/Iterable
      50: astore_2
      51: iconst_0
      52: istore_3
      53: aload_2
      54: astore        4
      56: new           #42                 // class java/util/ArrayList
      59: dup
      60: aload_2
      61: bipush        10
      63: invokestatic  #48                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      66: invokespecial #52                 // Method java/util/ArrayList."<init>":(I)V
      69: checkcast     #54                 // class java/util/Collection
      72: astore        5
      74: iconst_0
      75: istore        6
      77: aload         4
      79: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      84: astore        7
      86: aload         7
      88: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      93: ifeq          140
      96: aload         7
      98: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     103: astore        8
     105: aload         5
     107: aload         8
     109: checkcast     #70                 // class java/lang/String
     112: astore        9
     114: astore        12
     116: iconst_0
     117: istore        10
     119: aload_0
     120: aload         9
     122: invokestatic  #74                 // Method main$part1:(Ljava/util/Map;Ljava/lang/String;)I
     125: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     128: aload         12
     130: swap
     131: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     136: pop
     137: goto          86
     140: aload         5
     142: checkcast     #86                 // class java/util/List
     145: nop
     146: checkcast     #40                 // class java/lang/Iterable
     149: invokestatic  #90                 // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     152: bipush        15
     154: if_icmpne     161
     157: iconst_1
     158: goto          162
     161: iconst_0
     162: ifne          175
     165: new           #92                 // class java/lang/IllegalStateException
     168: dup
     169: ldc           #94                 // String Check failed.
     171: invokespecial #97                 // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     174: athrow
     175: aload_1
     176: checkcast     #40                 // class java/lang/Iterable
     179: astore_2
     180: iconst_0
     181: istore_3
     182: aload_2
     183: astore        4
     185: new           #42                 // class java/util/ArrayList
     188: dup
     189: aload_2
     190: bipush        10
     192: invokestatic  #48                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     195: invokespecial #52                 // Method java/util/ArrayList."<init>":(I)V
     198: checkcast     #54                 // class java/util/Collection
     201: astore        5
     203: iconst_0
     204: istore        6
     206: aload         4
     208: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     213: astore        7
     215: aload         7
     217: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     222: ifeq          268
     225: aload         7
     227: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     232: astore        8
     234: aload         5
     236: aload         8
     238: checkcast     #70                 // class java/lang/String
     241: astore        9
     243: astore        12
     245: iconst_0
     246: istore        10
     248: aload         9
     250: invokestatic  #101                // Method main$part2:(Ljava/lang/String;)I
     253: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     256: aload         12
     258: swap
     259: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     264: pop
     265: goto          215
     268: aload         5
     270: checkcast     #86                 // class java/util/List
     273: nop
     274: checkcast     #40                 // class java/lang/Iterable
     277: invokestatic  #90                 // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     280: bipush        12
     282: if_icmpne     289
     285: iconst_1
     286: goto          290
     289: iconst_0
     290: ifne          303
     293: new           #92                 // class java/lang/IllegalStateException
     296: dup
     297: ldc           #94                 // String Check failed.
     299: invokespecial #97                 // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     302: athrow
     303: ldc           #103                // String data/day2.txt
     305: invokestatic  #38                 // Method main$read_file:(Ljava/lang/String;)Ljava/util/List;
     308: astore_2
     309: aload_2
     310: checkcast     #40                 // class java/lang/Iterable
     313: astore_3
     314: iconst_0
     315: istore        4
     317: aload_3
     318: astore        5
     320: new           #42                 // class java/util/ArrayList
     323: dup
     324: aload_3
     325: bipush        10
     327: invokestatic  #48                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     330: invokespecial #52                 // Method java/util/ArrayList."<init>":(I)V
     333: checkcast     #54                 // class java/util/Collection
     336: astore        6
     338: iconst_0
     339: istore        7
     341: aload         5
     343: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     348: astore        8
     350: aload         8
     352: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     357: ifeq          404
     360: aload         8
     362: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     367: astore        9
     369: aload         6
     371: aload         9
     373: checkcast     #70                 // class java/lang/String
     376: astore        10
     378: astore        12
     380: iconst_0
     381: istore        11
     383: aload_0
     384: aload         10
     386: invokestatic  #74                 // Method main$part1:(Ljava/util/Map;Ljava/lang/String;)I
     389: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     392: aload         12
     394: swap
     395: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     400: pop
     401: goto          350
     404: aload         6
     406: checkcast     #86                 // class java/util/List
     409: nop
     410: checkcast     #40                 // class java/lang/Iterable
     413: invokestatic  #90                 // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     416: istore_3
     417: getstatic     #109                // Field java/lang/System.out:Ljava/io/PrintStream;
     420: iload_3
     421: invokevirtual #114                // Method java/io/PrintStream.println:(I)V
     424: aload_2
     425: checkcast     #40                 // class java/lang/Iterable
     428: astore_3
     429: iconst_0
     430: istore        4
     432: aload_3
     433: astore        5
     435: new           #42                 // class java/util/ArrayList
     438: dup
     439: aload_3
     440: bipush        10
     442: invokestatic  #48                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     445: invokespecial #52                 // Method java/util/ArrayList."<init>":(I)V
     448: checkcast     #54                 // class java/util/Collection
     451: astore        6
     453: iconst_0
     454: istore        7
     456: aload         5
     458: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     463: astore        8
     465: aload         8
     467: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     472: ifeq          518
     475: aload         8
     477: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     482: astore        9
     484: aload         6
     486: aload         9
     488: checkcast     #70                 // class java/lang/String
     491: astore        10
     493: astore        12
     495: iconst_0
     496: istore        11
     498: aload         10
     500: invokestatic  #101                // Method main$part2:(Ljava/lang/String;)I
     503: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     506: aload         12
     508: swap
     509: invokeinterface #84,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     514: pop
     515: goto          465
     518: aload         6
     520: checkcast     #86                 // class java/util/List
     523: nop
     524: checkcast     #40                 // class java/lang/Iterable
     527: invokestatic  #90                 // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     530: istore_3
     531: getstatic     #109                // Field java/lang/System.out:Ljava/io/PrintStream;
     534: iload_3
     535: invokevirtual #114                // Method java/io/PrintStream.println:(I)V
     538: return

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

  private static final java.util.List<java.lang.String> main$read_file(java.lang.String);
    Code:
       0: new           #145                // class java/io/File
       3: dup
       4: aload_0
       5: invokespecial #146                // Method java/io/File."<init>":(Ljava/lang/String;)V
       8: aconst_null
       9: iconst_1
      10: aconst_null
      11: invokestatic  #152                // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      14: astore_1
      15: aload_1
      16: areturn

  private static final int main$part1(java.util.Map<java.lang.String, java.lang.String>, java.lang.String);
    Code:
       0: aload_1
       1: iconst_2
       2: invokevirtual #159                // Method java/lang/String.charAt:(I)C
       5: invokestatic  #162                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
       8: astore_2
       9: aload_0
      10: aload_1
      11: iconst_0
      12: invokevirtual #159                // Method java/lang/String.charAt:(I)C
      15: invokestatic  #162                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      18: invokestatic  #166                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
      21: checkcast     #70                 // class java/lang/String
      24: astore_3
      25: iconst_0
      26: istore        4
      28: aload_3
      29: aload_2
      30: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      33: ifeq          39
      36: iinc          4, 3
      39: aload_3
      40: ldc           #12                 // String X
      42: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      45: ifeq          60
      48: aload_2
      49: ldc           #22                 // String Y
      51: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      54: ifeq          60
      57: iinc          4, 6
      60: aload_3
      61: ldc           #22                 // String Y
      63: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      66: ifeq          81
      69: aload_2
      70: ldc           #26                 // String Z
      72: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      75: ifeq          81
      78: iinc          4, 6
      81: aload_3
      82: ldc           #26                 // String Z
      84: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      87: ifeq          102
      90: aload_2
      91: ldc           #12                 // String X
      93: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      96: ifeq          102
      99: iinc          4, 6
     102: iload         4
     104: iconst_3
     105: anewarray     #8                  // class kotlin/Pair
     108: astore        5
     110: aload         5
     112: iconst_0
     113: ldc           #12                 // String X
     115: iconst_1
     116: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     119: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     122: aastore
     123: aload         5
     125: iconst_1
     126: ldc           #22                 // String Y
     128: iconst_2
     129: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     132: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     135: aastore
     136: aload         5
     138: iconst_2
     139: ldc           #26                 // String Z
     141: iconst_3
     142: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     145: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     148: aastore
     149: aload         5
     151: invokestatic  #32                 // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
     154: aload_2
     155: invokestatic  #166                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
     158: checkcast     #174                // class java/lang/Number
     161: invokevirtual #178                // Method java/lang/Number.intValue:()I
     164: iadd
     165: istore        4
     167: iload         4
     169: ireturn

  private static final int main$part2(java.lang.String);
    Code:
       0: aload_0
       1: iconst_2
       2: invokevirtual #159                // Method java/lang/String.charAt:(I)C
       5: invokestatic  #162                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
       8: astore_1
       9: aload_0
      10: iconst_0
      11: invokevirtual #159                // Method java/lang/String.charAt:(I)C
      14: invokestatic  #162                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      17: astore_2
      18: ldc           #10                 // String A
      20: astore_3
      21: iconst_0
      22: istore        4
      24: aload_1
      25: ldc           #22                 // String Y
      27: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      30: ifeq          38
      33: iinc          4, 3
      36: aload_2
      37: astore_3
      38: aload_1
      39: ldc           #12                 // String X
      41: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      44: ifeq          83
      47: aload_2
      48: ldc           #10                 // String A
      50: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      53: ifeq          59
      56: ldc           #24                 // String C
      58: astore_3
      59: aload_2
      60: ldc           #20                 // String B
      62: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      65: ifeq          71
      68: ldc           #10                 // String A
      70: astore_3
      71: aload_2
      72: ldc           #24                 // String C
      74: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      77: ifeq          83
      80: ldc           #20                 // String B
      82: astore_3
      83: aload_1
      84: ldc           #26                 // String Z
      86: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      89: ifeq          131
      92: iinc          4, 6
      95: aload_2
      96: ldc           #10                 // String A
      98: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     101: ifeq          107
     104: ldc           #20                 // String B
     106: astore_3
     107: aload_2
     108: ldc           #20                 // String B
     110: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     113: ifeq          119
     116: ldc           #24                 // String C
     118: astore_3
     119: aload_2
     120: ldc           #24                 // String C
     122: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     125: ifeq          131
     128: ldc           #10                 // String A
     130: astore_3
     131: iload         4
     133: iconst_3
     134: anewarray     #8                  // class kotlin/Pair
     137: astore        5
     139: aload         5
     141: iconst_0
     142: ldc           #10                 // String A
     144: iconst_1
     145: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     148: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     151: aastore
     152: aload         5
     154: iconst_1
     155: ldc           #20                 // String B
     157: iconst_2
     158: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     161: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     164: aastore
     165: aload         5
     167: iconst_2
     168: ldc           #24                 // String C
     170: iconst_3
     171: invokestatic  #80                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     174: invokestatic  #18                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     177: aastore
     178: aload         5
     180: invokestatic  #32                 // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
     183: aload_3
     184: invokestatic  #166                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
     187: checkcast     #174                // class java/lang/Number
     190: invokevirtual #178                // Method java/lang/Number.intValue:()I
     193: iadd
     194: istore        4
     196: iload         4
     198: ireturn
}


import java.io.File

fun main() {

    fun  readFile(file_path: String) : List<String> {
        val text = File(file_path).readLines()
        return text
    }

    fun create_elves_calories(input: List<String>): List<Int>{
        var calories = mutableListOf<Int>()
        var counter:Int = 0
        for (food in input){
            when(food){
                "" -> {
                    calories.add(counter)
                    counter = 0
                }
                else -> {
                    counter += food.toInt()
                }
            }
        }
        return calories
    }

    fun get_max_calories(input: List<Int>, n_elves: Int): Int {
        val sorted_elves = input.sortedDescending()
        val res = sorted_elves.take(n_elves)
        return res.sum()
    }

    fun part1(input: String): Int {
        val text =  readFile(input)
        val elfList = create_elves_calories(text)
        return get_max_calories(elfList, n_elves=1)
    }

    fun part2(input: String): Int {
        val text =  readFile(input)
        val elfList = create_elves_calories(text)
        return get_max_calories(elfList, n_elves=3)
    }

    // test if implementation meets criteria from the description, like:
    check(part1("data/day1_test.txt") == 24000)

    println(part1("data/day1.txt"))
    println(part2("data/day1.txt"))
}

Compiled from "Day01.kt"
public final class Day01Kt {
  public static final void main();
    Code:
       0: ldc           #8                  // String data/day1_test.txt
       2: invokestatic  #12                 // Method main$part1:(Ljava/lang/String;)I
       5: sipush        24000
       8: if_icmpne     15
      11: iconst_1
      12: goto          16
      15: iconst_0
      16: ifne          29
      19: new           #14                 // class java/lang/IllegalStateException
      22: dup
      23: ldc           #16                 // String Check failed.
      25: invokespecial #20                 // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
      28: athrow
      29: ldc           #22                 // String data/day1.txt
      31: invokestatic  #12                 // Method main$part1:(Ljava/lang/String;)I
      34: istore_0
      35: getstatic     #28                 // Field java/lang/System.out:Ljava/io/PrintStream;
      38: iload_0
      39: invokevirtual #34                 // Method java/io/PrintStream.println:(I)V
      42: ldc           #22                 // String data/day1.txt
      44: invokestatic  #37                 // Method main$part2:(Ljava/lang/String;)I
      47: istore_0
      48: getstatic     #28                 // Field java/lang/System.out:Ljava/io/PrintStream;
      51: iload_0
      52: invokevirtual #34                 // Method java/io/PrintStream.println:(I)V
      55: return

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

  private static final java.util.List<java.lang.String> main$readFile(java.lang.String);
    Code:
       0: new           #47                 // class java/io/File
       3: dup
       4: aload_0
       5: invokespecial #48                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       8: aconst_null
       9: iconst_1
      10: aconst_null
      11: invokestatic  #54                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      14: astore_1
      15: aload_1
      16: areturn

  private static final java.util.List<java.lang.Integer> main$create_elves_calories(java.util.List<java.lang.String>);
    Code:
       0: new           #63                 // class java/util/ArrayList
       3: dup
       4: invokespecial #65                 // Method java/util/ArrayList."<init>":()V
       7: checkcast     #67                 // class java/util/List
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_0
      14: invokeinterface #71,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      19: astore_3
      20: aload_3
      21: invokeinterface #77,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      26: ifeq          77
      29: aload_3
      30: invokeinterface #81,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      35: checkcast     #83                 // class java/lang/String
      38: astore        4
      40: aload         4
      42: ldc           #85                 // String
      44: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      47: ifeq          66
      50: aload_1
      51: iload_2
      52: invokestatic  #97                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      55: invokeinterface #101,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      60: pop
      61: iconst_0
      62: istore_2
      63: goto          20
      66: iload_2
      67: aload         4
      69: invokestatic  #104                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      72: iadd
      73: istore_2
      74: goto          20
      77: aload_1
      78: areturn

  private static final int main$get_max_calories(java.util.List<java.lang.Integer>, int);
    Code:
       0: aload_0
       1: checkcast     #114                // class java/lang/Iterable
       4: invokestatic  #120                // Method kotlin/collections/CollectionsKt.sortedDescending:(Ljava/lang/Iterable;)Ljava/util/List;
       7: astore_2
       8: aload_2
       9: checkcast     #114                // class java/lang/Iterable
      12: iload_1
      13: invokestatic  #124                // Method kotlin/collections/CollectionsKt.take:(Ljava/lang/Iterable;I)Ljava/util/List;
      16: astore_3
      17: aload_3
      18: checkcast     #114                // class java/lang/Iterable
      21: invokestatic  #128                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
      24: ireturn

  private static final int main$part1(java.lang.String);
    Code:
       0: aload_0
       1: invokestatic  #133                // Method main$readFile:(Ljava/lang/String;)Ljava/util/List;
       4: astore_1
       5: aload_1
       6: invokestatic  #135                // Method main$create_elves_calories:(Ljava/util/List;)Ljava/util/List;
       9: astore_2
      10: aload_2
      11: iconst_1
      12: invokestatic  #137                // Method main$get_max_calories:(Ljava/util/List;I)I
      15: ireturn

  private static final int main$part2(java.lang.String);
    Code:
       0: aload_0
       1: invokestatic  #133                // Method main$readFile:(Ljava/lang/String;)Ljava/util/List;
       4: astore_1
       5: aload_1
       6: invokestatic  #135                // Method main$create_elves_calories:(Ljava/util/List;)Ljava/util/List;
       9: astore_2
      10: aload_2
      11: iconst_3
      12: invokestatic  #137                // Method main$get_max_calories:(Ljava/util/List;I)I
      15: ireturn
}


import java.io.File

fun parseInputFile(file: File): Pair<ArrayList<Process>, Int> {
    var resultNumberOfTicks = 0
    val list = arrayListOf<Process>().apply {
        file.forEachLine {
            it.split(" ").let {
                add(
                    Process(
                        name = it[0],
                        numberOfTicks = it[1].toInt(),
                        appearanceTime = if (it.size > 2) it[2].toInt() else 0
                    ).let {
                        resultNumberOfTicks += it.numberOfTicks
                        it
                    }
                )
            }
        }
    }
    return Pair(list, resultNumberOfTicks)
}

fun main() {
    val numberOfActualTicks: Int
    var numberOfWaitTicks = 0
    var numberOfAbstractTicks = 0
    var currentTick = 0
    val processList = parseInputFile(
//        File("test1")
        File("test2")
    ).let {
        numberOfActualTicks = it.second
        it.first
    }

    val ticks = arrayListOf<String>()
    println(numberOfActualTicks)
    repeat(numberOfActualTicks) {
        processList.filter { it.appearanceTime <= currentTick && it.ticksLeft > 0 }.let { sublist ->
            if (sublist.isNotEmpty())
                sublist.minBy { it.ticksLeft }.let {
                    ticks.add(it.name)
                    it.ticksLeft--
                }
            else {
                ticks.add("_")
            }
        }
        currentTick++
    }

    processList.forEach { process ->
        print(
            "${process.name} ${process.numberOfTicks} ${process.appearanceTime} "
        )
        currentTick = 0
        ticks.subList(0, ticks.indexOfLast { it.contains(process.name) } + 1).forEach { processName ->
            print(processName.contains(process.name).let {
                if (currentTick < process.appearanceTime) " "
                else {
                    if (!it) numberOfWaitTicks++
                    numberOfAbstractTicks++
                    if (it) "И" else "Г"
                }
            })
            currentTick++
        }
        println()
    }

//    println(ticks)
    println("Efficiency: ${"%.${2}f".format((numberOfWaitTicks.toFloat() / numberOfAbstractTicks * 100))}%")
}

data class Process(
    val name: String,
    val numberOfTicks: Int,
    val appearanceTime: Int,
    var ticksLeft: Int = numberOfTicks
)

Compiled from "Main.kt"
public final class MainKt {
  public static final kotlin.Pair<java.util.ArrayList<Process>, java.lang.Integer> parseInputFile(java.io.File);
    Code:
       0: aload_0
       1: ldc           #10                 // String file
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #18                 // class kotlin/jvm/internal/Ref$IntRef
       9: dup
      10: invokespecial #22                 // Method kotlin/jvm/internal/Ref$IntRef."<init>":()V
      13: astore_1
      14: new           #24                 // class java/util/ArrayList
      17: dup
      18: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
      21: astore_3
      22: aload_3
      23: astore        4
      25: iconst_0
      26: istore        5
      28: aload_0
      29: aconst_null
      30: aload         4
      32: aload_1
      33: invokedynamic #45,  0             // InvokeDynamic #0:invoke:(Ljava/util/ArrayList;Lkotlin/jvm/internal/Ref$IntRef;)Lkotlin/jvm/functions/Function1;
      38: iconst_1
      39: aconst_null
      40: invokestatic  #51                 // Method kotlin/io/FilesKt.forEachLine$default:(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
      43: nop
      44: aload_3
      45: astore_2
      46: new           #53                 // class kotlin/Pair
      49: dup
      50: aload_2
      51: aload_1
      52: getfield      #57                 // Field kotlin/jvm/internal/Ref$IntRef.element:I
      55: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      58: invokespecial #66                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      61: areturn

  public static final void main();
    Code:
       0: iconst_0
       1: istore_0
       2: iconst_0
       3: istore_1
       4: iconst_0
       5: istore_2
       6: iconst_0
       7: istore_3
       8: new           #76                 // class java/io/File
      11: dup
      12: ldc           #78                 // String test2
      14: invokespecial #81                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      17: invokestatic  #83                 // Method parseInputFile:(Ljava/io/File;)Lkotlin/Pair;
      20: astore        6
      22: iconst_0
      23: istore        7
      25: aload         6
      27: invokevirtual #87                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      30: checkcast     #89                 // class java/lang/Number
      33: invokevirtual #93                 // Method java/lang/Number.intValue:()I
      36: istore_0
      37: aload         6
      39: invokevirtual #96                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      42: checkcast     #24                 // class java/util/ArrayList
      45: nop
      46: astore        4
      48: new           #24                 // class java/util/ArrayList
      51: dup
      52: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
      55: astore        5
      57: iload_0
      58: istore        6
      60: getstatic     #102                // Field java/lang/System.out:Ljava/io/PrintStream;
      63: iload         6
      65: invokevirtual #108                // Method java/io/PrintStream.println:(I)V
      68: iload_0
      69: istore        6
      71: iconst_0
      72: istore        7
      74: iload         7
      76: iload         6
      78: if_icmpge     418
      81: iload         7
      83: istore        8
      85: iconst_0
      86: istore        9
      88: aload         4
      90: checkcast     #110                // class java/lang/Iterable
      93: astore        10
      95: iconst_0
      96: istore        11
      98: aload         10
     100: astore        12
     102: new           #24                 // class java/util/ArrayList
     105: dup
     106: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
     109: checkcast     #112                // class java/util/Collection
     112: astore        13
     114: iconst_0
     115: istore        14
     117: aload         12
     119: invokeinterface #116,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     124: astore        15
     126: aload         15
     128: invokeinterface #122,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     133: ifeq          193
     136: aload         15
     138: invokeinterface #125,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     143: astore        16
     145: aload         16
     147: checkcast     #127                // class Process
     150: astore        17
     152: iconst_0
     153: istore        18
     155: aload         17
     157: invokevirtual #130                // Method Process.getAppearanceTime:()I
     160: iload_3
     161: if_icmpgt     176
     164: aload         17
     166: invokevirtual #133                // Method Process.getTicksLeft:()I
     169: ifle          176
     172: iconst_1
     173: goto          177
     176: iconst_0
     177: ifeq          126
     180: aload         13
     182: aload         16
     184: invokeinterface #137,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     189: pop
     190: goto          126
     193: aload         13
     195: checkcast     #139                // class java/util/List
     198: nop
     199: astore        11
     201: iconst_0
     202: istore        12
     204: aload         11
     206: checkcast     #112                // class java/util/Collection
     209: invokeinterface #142,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     214: ifne          221
     217: iconst_1
     218: goto          222
     221: iconst_0
     222: ifeq          397
     225: aload         11
     227: checkcast     #110                // class java/lang/Iterable
     230: astore        13
     232: iconst_0
     233: istore        14
     235: aload         13
     237: invokeinterface #116,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     242: astore        15
     244: aload         15
     246: invokeinterface #122,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     251: ifne          262
     254: new           #144                // class java/util/NoSuchElementException
     257: dup
     258: invokespecial #145                // Method java/util/NoSuchElementException."<init>":()V
     261: athrow
     262: aload         15
     264: invokeinterface #125,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     269: astore        16
     271: aload         15
     273: invokeinterface #122,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     278: ifne          286
     281: aload         16
     283: goto          356
     286: aload         16
     288: checkcast     #127                // class Process
     291: astore        17
     293: iconst_0
     294: istore        18
     296: aload         17
     298: invokevirtual #133                // Method Process.getTicksLeft:()I
     301: istore        17
     303: aload         15
     305: invokeinterface #125,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     310: astore        18
     312: aload         18
     314: checkcast     #127                // class Process
     317: astore        19
     319: iconst_0
     320: istore        20
     322: aload         19
     324: invokevirtual #133                // Method Process.getTicksLeft:()I
     327: istore        19
     329: iload         17
     331: iload         19
     333: if_icmple     344
     336: aload         18
     338: astore        16
     340: iload         19
     342: istore        17
     344: aload         15
     346: invokeinterface #122,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     351: ifne          303
     354: aload         16
     356: checkcast     #127                // class Process
     359: astore        14
     361: iconst_0
     362: istore        15
     364: aload         5
     366: aload         14
     368: invokevirtual #149                // Method Process.getName:()Ljava/lang/String;
     371: invokevirtual #150                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     374: pop
     375: aload         14
     377: invokevirtual #133                // Method Process.getTicksLeft:()I
     380: istore        16
     382: aload         14
     384: iload         16
     386: iconst_m1
     387: iadd
     388: invokevirtual #153                // Method Process.setTicksLeft:(I)V
     391: iload         16
     393: pop
     394: goto          405
     397: aload         5
     399: ldc           #155                // String _
     401: invokevirtual #150                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     404: pop
     405: nop
     406: nop
     407: iload_3
     408: iconst_1
     409: iadd
     410: istore_3
     411: nop
     412: iinc          7, 1
     415: goto          74
     418: aload         4
     420: checkcast     #110                // class java/lang/Iterable
     423: astore        6
     425: iconst_0
     426: istore        7
     428: aload         6
     430: invokeinterface #116,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     435: astore        8
     437: aload         8
     439: invokeinterface #122,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     444: ifeq          783
     447: aload         8
     449: invokeinterface #125,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     454: astore        9
     456: aload         9
     458: checkcast     #127                // class Process
     461: astore        10
     463: iconst_0
     464: istore        11
     466: new           #157                // class java/lang/StringBuilder
     469: dup
     470: invokespecial #158                // Method java/lang/StringBuilder."<init>":()V
     473: aload         10
     475: invokevirtual #149                // Method Process.getName:()Ljava/lang/String;
     478: invokevirtual #162                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     481: bipush        32
     483: invokevirtual #165                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     486: aload         10
     488: invokevirtual #168                // Method Process.getNumberOfTicks:()I
     491: invokevirtual #171                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     494: bipush        32
     496: invokevirtual #165                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     499: aload         10
     501: invokevirtual #130                // Method Process.getAppearanceTime:()I
     504: invokevirtual #171                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     507: bipush        32
     509: invokevirtual #165                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     512: invokevirtual #174                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     515: astore        12
     517: getstatic     #102                // Field java/lang/System.out:Ljava/io/PrintStream;
     520: aload         12
     522: invokevirtual #178                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
     525: iconst_0
     526: istore_3
     527: aload         5
     529: iconst_0
     530: aload         5
     532: checkcast     #139                // class java/util/List
     535: astore        13
     537: istore        14
     539: astore        15
     541: iconst_0
     542: istore        16
     544: aload         13
     546: aload         13
     548: invokeinterface #181,  1          // InterfaceMethod java/util/List.size:()I
     553: invokeinterface #185,  2          // InterfaceMethod java/util/List.listIterator:(I)Ljava/util/ListIterator;
     558: astore        17
     560: aload         17
     562: invokeinterface #190,  1          // InterfaceMethod java/util/ListIterator.hasPrevious:()Z
     567: ifeq          617
     570: aload         17
     572: invokeinterface #193,  1          // InterfaceMethod java/util/ListIterator.previous:()Ljava/lang/Object;
     577: checkcast     #195                // class java/lang/String
     580: astore        18
     582: iconst_0
     583: istore        19
     585: aload         18
     587: checkcast     #197                // class java/lang/CharSequence
     590: aload         10
     592: invokevirtual #149                // Method Process.getName:()Ljava/lang/String;
     595: checkcast     #197                // class java/lang/CharSequence
     598: iconst_0
     599: iconst_2
     600: aconst_null
     601: invokestatic  #203                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
     604: ifeq          560
     607: aload         17
     609: invokeinterface #206,  1          // InterfaceMethod java/util/ListIterator.nextIndex:()I
     614: goto          618
     617: iconst_m1
     618: istore        20
     620: aload         15
     622: iload         14
     624: iload         20
     626: iconst_1
     627: iadd
     628: invokevirtual #210                // Method java/util/ArrayList.subList:(II)Ljava/util/List;
     631: dup
     632: ldc           #212                // String subList(...)
     634: invokestatic  #215                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     637: checkcast     #110                // class java/lang/Iterable
     640: astore        12
     642: iconst_0
     643: istore        13
     645: aload         12
     647: invokeinterface #116,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     652: astore        16
     654: aload         16
     656: invokeinterface #122,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     661: ifeq          771
     664: aload         16
     666: invokeinterface #125,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     671: astore        17
     673: aload         17
     675: checkcast     #195                // class java/lang/String
     678: astore        18
     680: iconst_0
     681: istore        19
     683: aload         18
     685: invokestatic  #218                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     688: aload         18
     690: checkcast     #197                // class java/lang/CharSequence
     693: aload         10
     695: invokevirtual #149                // Method Process.getName:()Ljava/lang/String;
     698: checkcast     #197                // class java/lang/CharSequence
     701: iconst_0
     702: iconst_2
     703: aconst_null
     704: invokestatic  #203                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
     707: istore        21
     709: iconst_0
     710: istore        22
     712: iload_3
     713: aload         10
     715: invokevirtual #130                // Method Process.getAppearanceTime:()I
     718: if_icmpge     726
     721: ldc           #220                // String
     723: goto          751
     726: iload         21
     728: ifne          735
     731: iload_1
     732: iconst_1
     733: iadd
     734: istore_1
     735: iload_2
     736: iconst_1
     737: iadd
     738: istore_2
     739: iload         21
     741: ifeq          749
     744: ldc           #222                // String И
     746: goto          751
     749: ldc           #224                // String Г
     751: nop
     752: astore        23
     754: getstatic     #102                // Field java/lang/System.out:Ljava/io/PrintStream;
     757: aload         23
     759: invokevirtual #178                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
     762: iload_3
     763: iconst_1
     764: iadd
     765: istore_3
     766: nop
     767: nop
     768: goto          654
     771: nop
     772: getstatic     #102                // Field java/lang/System.out:Ljava/io/PrintStream;
     775: invokevirtual #226                // Method java/io/PrintStream.println:()V
     778: nop
     779: nop
     780: goto          437
     783: nop
     784: new           #157                // class java/lang/StringBuilder
     787: dup
     788: invokespecial #158                // Method java/lang/StringBuilder."<init>":()V
     791: ldc           #228                // String Efficiency:
     793: invokevirtual #162                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     796: ldc           #230                // String %.2f
     798: astore        6
     800: iconst_1
     801: anewarray     #4                  // class java/lang/Object
     804: astore        7
     806: aload         7
     808: iconst_0
     809: iload_1
     810: i2f
     811: iload_2
     812: i2f
     813: fdiv
     814: bipush        100
     816: i2f
     817: fmul
     818: invokestatic  #235                // Method java/lang/Float.valueOf:(F)Ljava/lang/Float;
     821: aastore
     822: aload         7
     824: astore        7
     826: aload         6
     828: aload         7
     830: aload         7
     832: arraylength
     833: invokestatic  #241                // Method java/util/Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
     836: invokestatic  #245                // Method java/lang/String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
     839: dup
     840: ldc           #247                // String format(...)
     842: invokestatic  #215                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     845: invokevirtual #162                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     848: bipush        37
     850: invokevirtual #165                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     853: invokevirtual #174                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     856: getstatic     #102                // Field java/lang/System.out:Ljava/io/PrintStream;
     859: swap
     860: invokevirtual #249                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     863: return

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

  private static final kotlin.Unit parseInputFile$lambda$3$lambda$2(java.util.ArrayList, kotlin.jvm.internal.Ref$IntRef, java.lang.String);
    Code:
       0: aload_2
       1: ldc_w         #303                // String it
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_2
       8: checkcast     #197                // class java/lang/CharSequence
      11: iconst_1
      12: anewarray     #195                // class java/lang/String
      15: astore_3
      16: aload_3
      17: iconst_0
      18: ldc           #220                // String
      20: aastore
      21: aload_3
      22: iconst_0
      23: iconst_0
      24: bipush        6
      26: aconst_null
      27: invokestatic  #307                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      30: astore        4
      32: iconst_0
      33: istore        5
      35: aload_0
      36: new           #127                // class Process
      39: dup
      40: aload         4
      42: iconst_0
      43: invokeinterface #311,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      48: checkcast     #195                // class java/lang/String
      51: aload         4
      53: iconst_1
      54: invokeinterface #311,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      59: checkcast     #195                // class java/lang/String
      62: invokestatic  #315                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      65: aload         4
      67: invokeinterface #181,  1          // InterfaceMethod java/util/List.size:()I
      72: iconst_2
      73: if_icmple     93
      76: aload         4
      78: iconst_2
      79: invokeinterface #311,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      84: checkcast     #195                // class java/lang/String
      87: invokestatic  #315                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      90: goto          94
      93: iconst_0
      94: iconst_0
      95: bipush        8
      97: aconst_null
      98: invokespecial #318                // Method Process."<init>":(Ljava/lang/String;IIIILkotlin/jvm/internal/DefaultConstructorMarker;)V
     101: astore        6
     103: astore        7
     105: iconst_0
     106: istore        8
     108: aload_1
     109: aload_1
     110: getfield      #57                 // Field kotlin/jvm/internal/Ref$IntRef.element:I
     113: aload         6
     115: invokevirtual #168                // Method Process.getNumberOfTicks:()I
     118: iadd
     119: putfield      #57                 // Field kotlin/jvm/internal/Ref$IntRef.element:I
     122: aload         6
     124: aload         7
     126: swap
     127: nop
     128: invokevirtual #150                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     131: pop
     132: nop
     133: nop
     134: getstatic     #324                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     137: areturn
}


import java.io.File

class Route (
    val from: String,
    val to: String
    ){
    fun reverse(): Route {
        return Route(to, from)
    }
}

class Transitions {
    private var allTransitions = mutableMapOf<String, MutableList<String>>()

    fun addTransition (r: Route) {
        addRoute(r)
        addRoute(r.reverse())
    }

    private fun addRoute(r: Route) {
        if(allTransitions.containsKey(r.from)) {
            allTransitions[r.from]!!.add(r.to)
            return
        }
        allTransitions[r.from] = mutableListOf(r.to)
    }

    fun getTransitionFrom(node: String): List<String> {
        return allTransitions[node]!!.toList()
    }

}

fun initStatePartOne() : State = State("start", listOf("start"), true)
fun initStatePartTwo() : State = State("start", listOf("start"), false)

class State(val agentPosition: String, private val alreadyVisitedNodes: List<String>, private val hasAlreadyVisitedOneCaveTwice: Boolean) {
    fun moveTo(target: String) : State {
        val newList = alreadyVisitedNodes.toMutableList()

        val hasAlreadyVisitedOneCaveTwiceNow = hasAlreadyVisitedOneCaveTwice || hasAlreadyVisited(target)

        if(canVisitOnlyTwice(target)) {
            newList.add(target)
        }
        return State(target, newList, hasAlreadyVisitedOneCaveTwiceNow)
    }

    fun canVisitNode(node: String): Boolean {
        if(node == "start") {
            return false
        }

        if(canVisitOnlyTwice(node) && hasAlreadyVisitedOneCaveTwice && hasAlreadyVisited(node)) {
            return false
        }
        return true
    }

    private fun hasAlreadyVisited(node: String) = alreadyVisitedNodes.contains(node)

    private fun canVisitOnlyTwice(node: String) = node.lowercase() == node
}

var numPathes = 0
class TravelEngine(private val transitions: Transitions) {
    fun travel(initState: State) {
        val route = "start"
        travel(initState, route)
    }

    private fun travel(currentState: State, route: String) {
        if(currentState.agentPosition == "end") {
            numPathes += 1
            println(route)
            return
        }

        getAllPossibleMoves(currentState).forEach {
            val newState = currentState.moveTo(it)
            travel(newState, "$route -> $it")
        }
    }

    private fun getAllPossibleMoves(state: State) = sequence<String> {
        transitions.getTransitionFrom(state.agentPosition).forEach{
            if(state.canVisitNode(it)) {
                yield (it)
            }
        }
    }
}

fun main(args: Array<String>) {
    val transitions = Transitions()

    File("input.txt").forEachLine {
        val parts = it.split("-")
        transitions.addTransition(Route(parts[0], parts[1]))
    }

    val travelEngine = TravelEngine(transitions)
    travelEngine.travel(initStatePartOne())
    println("Number of paths: $numPathes")

    numPathes = 0
    travelEngine.travel(initStatePartTwo())
    println("Number of paths (Part Two): $numPathes")
}

Compiled from "main.kt"
public final class MainKt {
  private static int numPathes;

  public static final State initStatePartOne();
    Code:
       0: new           #9                  // class State
       3: dup
       4: ldc           #11                 // String start
       6: ldc           #11                 // String start
       8: invokestatic  #17                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      11: iconst_1
      12: invokespecial #21                 // Method State."<init>":(Ljava/lang/String;Ljava/util/List;Z)V
      15: areturn

  public static final State initStatePartTwo();
    Code:
       0: new           #9                  // class State
       3: dup
       4: ldc           #11                 // String start
       6: ldc           #11                 // String start
       8: invokestatic  #17                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      11: iconst_0
      12: invokespecial #21                 // Method State."<init>":(Ljava/lang/String;Ljava/util/List;Z)V
      15: areturn

  public static final int getNumPathes();
    Code:
       0: getstatic     #28                 // Field numPathes:I
       3: ireturn

  public static final void setNumPathes(int);
    Code:
       0: iload_0
       1: putstatic     #28                 // Field numPathes:I
       4: return

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #35                 // String args
       3: invokestatic  #41                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #43                 // class Transitions
       9: dup
      10: invokespecial #46                 // Method Transitions."<init>":()V
      13: astore_1
      14: new           #48                 // class java/io/File
      17: dup
      18: ldc           #50                 // String input.txt
      20: invokespecial #53                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      23: aconst_null
      24: aload_1
      25: invokedynamic #73,  0             // InvokeDynamic #0:invoke:(LTransitions;)Lkotlin/jvm/functions/Function1;
      30: iconst_1
      31: aconst_null
      32: invokestatic  #79                 // Method kotlin/io/FilesKt.forEachLine$default:(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
      35: new           #81                 // class TravelEngine
      38: dup
      39: aload_1
      40: invokespecial #84                 // Method TravelEngine."<init>":(LTransitions;)V
      43: astore_2
      44: aload_2
      45: invokestatic  #86                 // Method initStatePartOne:()LState;
      48: invokevirtual #90                 // Method TravelEngine.travel:(LState;)V
      51: new           #92                 // class java/lang/StringBuilder
      54: dup
      55: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
      58: ldc           #95                 // String Number of paths:
      60: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      63: getstatic     #28                 // Field numPathes:I
      66: invokevirtual #102                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      69: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      72: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
      75: swap
      76: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      79: iconst_0
      80: putstatic     #28                 // Field numPathes:I
      83: aload_2
      84: invokestatic  #120                // Method initStatePartTwo:()LState;
      87: invokevirtual #90                 // Method TravelEngine.travel:(LState;)V
      90: new           #92                 // class java/lang/StringBuilder
      93: dup
      94: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
      97: ldc           #122                // String Number of paths (Part Two):
      99: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     102: getstatic     #28                 // Field numPathes:I
     105: invokevirtual #102                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     108: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     111: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
     114: swap
     115: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     118: return

  private static final kotlin.Unit main$lambda$0(Transitions, java.lang.String);
    Code:
       0: aload_1
       1: ldc           #129                // String it
       3: invokestatic  #41                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #131                // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #133                // class java/lang/String
      14: astore_3
      15: aload_3
      16: iconst_0
      17: ldc           #135                // String -
      19: aastore
      20: aload_3
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #141                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: astore_2
      30: aload_0
      31: new           #143                // class Route
      34: dup
      35: aload_2
      36: iconst_0
      37: invokeinterface #149,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      42: checkcast     #133                // class java/lang/String
      45: aload_2
      46: iconst_1
      47: invokeinterface #149,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      52: checkcast     #133                // class java/lang/String
      55: invokespecial #152                // Method Route."<init>":(Ljava/lang/String;Ljava/lang/String;)V
      58: invokevirtual #156                // Method Transitions.addTransition:(LRoute;)V
      61: getstatic     #162                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      64: areturn

  static {};
    Code:
       0: return
}