import kotlin.math.absoluteValue

data class Either<T, U>(val t: T? = null, val u: U? = null) {
    init {
        assert((t == null) != (u == null)) { "Exactly one parameter must be null" }
    }

    override fun toString(): String = "${t ?: ""}${u ?: ""}"
}

fun <T> List<T>.split(splitEntry: T): List<List<T>> =
    this.fold(mutableListOf(mutableListOf<T>())) { acc, line ->
        if (line == splitEntry) {
            acc.add(mutableListOf())
        } else {
            acc.last().add(line)
        }
        return@fold acc
    }

fun <T> List<T>.replace(index: Int, newElement: T): List<T> =
    mapIndexed { i, elem ->
        if (i == index) {
            newElement
        } else {
            elem
        }
    }

fun <T> List<T>.replace(index: Int, replacer: (T) -> T): List<T> =
    mapIndexed { i, elem ->
        if (i == index) {
            replacer(elem)
        } else {
            elem
        }
    }

fun <T> List<List<T>>.replace(index: Pair<Int, Int>, newElement: T): List<List<T>> =
    replace(index.first) { it.replace(index.second, newElement) }

fun <T> (MutableList<T>).removeAllAt(indices: IntRange): List<T> {
    val result = this.subList(indices.first, indices.last + 1).toList()
    indices.forEach { _ -> removeAt(indices.first) }
    return result
}

fun <T> (MutableList<T>).rotateLeft(by: Int) {
    for (i in 1..(by % size)) {
        add(removeAt(0))
    }
}

fun <T, U> List<T>.combinationsWith(other: List<U>): List<Pair<T, U>> =
    flatMap { left -> other.map { right -> Pair(left, right) } }

fun <T> List<T>.combinations(): List<Pair<T, T>> =
    combinationsWith(this)

fun <T> List<T>.combinations(times: Int): List<List<T>> =
    when (times) {
        0 -> listOf()
        1 -> map { listOf(it) }
        else -> combinations(times - 1).let { tails ->
            tails.flatMap { tail -> this.map { head -> tail + head } }
        }
    }

fun <T : Comparable<T>> List<T>.indexOfMaxOrNull(): Int? =
    mapIndexed { i, e -> Pair(i, e) }.maxByOrNull { it.second }?.first

fun <T, R : Comparable<R>> List<T>.indexOfMaxByOrNull(selector: (T) -> R): Int? =
    mapIndexed { i, e -> Pair(i, selector(e)) }.maxByOrNull { it.second }?.first

fun <S, T, U> Pair<S, Pair<T, U>>.flatten(): Triple<S, T, U> =
    Triple(this.first, this.second.first, this.second.second)

//fun <S, T, U> Pair<Pair<S, T>, U>.flatten(): Triple<S, T, U> =
//    Triple(this.first.first, this.first.second, this.second)

operator fun Pair<Int, Int>.plus(other: Pair<Int, Int>): Pair<Int, Int> =
    Pair(first + other.first, second + other.second)

operator fun Pair<Int, Int>.times(factor: Int): Pair<Int, Int> =
    Pair(first * factor, second * factor)

fun Pair<Int, Int>.manhattanFrom(origin: Pair<Int, Int> = Pair(0, 0)): Int =
    (origin.first - this.first).absoluteValue +
            (origin.second - this.second).absoluteValue

//fun Pair<Int, Int>.projectRay(): Sequence<Pair<Int, Int>> =
//    generateSequence(this) { it + this }

fun Pair<Int, Int>.projectRay(
    direction: Pair<Int, Int>,
    isInBounds: (Pair<Int, Int>).() -> Boolean = { true }
): Sequence<Pair<Int, Int>> =
    generateSequence(this) { (it + direction).takeIf(isInBounds) }

data class Quadruple<out A, out B, out C, out D>(
    public val first: A,
    public val second: B,
    public val third: C,
    public val fourth: D
) {
    override fun toString(): String = "($first, $second, $third, $fourth)"
}

fun <T> Quadruple<T, T, T, T>.toList(): List<T> = listOf(first, second, third, fourth)

Compiled from "shared.kt"
public final class SharedKt {
  public static final <T> java.util.List<java.util.List<T>> split(java.util.List<? extends T>, T);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #18                 // class java/lang/Iterable
      10: astore_2
      11: iconst_1
      12: anewarray     #20                 // class java/util/List
      15: astore_3
      16: aload_3
      17: iconst_0
      18: new           #22                 // class java/util/ArrayList
      21: dup
      22: invokespecial #26                 // Method java/util/ArrayList."<init>":()V
      25: checkcast     #20                 // class java/util/List
      28: aastore
      29: aload_3
      30: invokestatic  #32                 // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
      33: astore_3
      34: iconst_0
      35: istore        4
      37: aload_3
      38: astore        5
      40: aload_2
      41: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      46: astore        6
      48: aload         6
      50: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      55: ifeq          130
      58: aload         6
      60: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      65: astore        7
      67: aload         5
      69: aload         7
      71: astore        8
      73: astore        9
      75: iconst_0
      76: istore        10
      78: aload         8
      80: aload_1
      81: invokestatic  #50                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      84: ifeq          107
      87: aload         9
      89: new           #22                 // class java/util/ArrayList
      92: dup
      93: invokespecial #26                 // Method java/util/ArrayList."<init>":()V
      96: checkcast     #20                 // class java/util/List
      99: invokeinterface #54,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     104: goto          122
     107: aload         9
     109: invokestatic  #58                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     112: checkcast     #20                 // class java/util/List
     115: aload         8
     117: invokeinterface #54,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     122: pop
     123: aload         9
     125: astore        5
     127: goto          48
     130: aload         5
     132: areturn

  public static final <T> java.util.List<T> replace(java.util.List<? extends T>, int, T);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #18                 // class java/lang/Iterable
      10: astore_3
      11: iconst_0
      12: istore        4
      14: aload_3
      15: astore        5
      17: new           #22                 // class java/util/ArrayList
      20: dup
      21: aload_3
      22: bipush        10
      24: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      27: invokespecial #82                 // Method java/util/ArrayList."<init>":(I)V
      30: checkcast     #84                 // class java/util/Collection
      33: astore        6
      35: iconst_0
      36: istore        7
      38: iconst_0
      39: istore        8
      41: aload         5
      43: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      48: astore        9
      50: aload         9
      52: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      57: ifeq          124
      60: aload         9
      62: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      67: astore        10
      69: aload         6
      71: iload         8
      73: iinc          8, 1
      76: istore        11
      78: iload         11
      80: ifge          86
      83: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      86: iload         11
      88: aload         10
      90: astore        12
      92: istore        13
      94: astore        15
      96: iconst_0
      97: istore        14
      99: iload         13
     101: iload_1
     102: if_icmpne     109
     105: aload_2
     106: goto          111
     109: aload         12
     111: nop
     112: aload         15
     114: swap
     115: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     120: pop
     121: goto          50
     124: aload         6
     126: checkcast     #20                 // class java/util/List
     129: nop
     130: areturn

  public static final <T> java.util.List<T> replace(java.util.List<? extends T>, int, kotlin.jvm.functions.Function1<? super T, ? extends T>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #106                // String replacer
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: checkcast     #18                 // class java/lang/Iterable
      16: astore_3
      17: iconst_0
      18: istore        4
      20: aload_3
      21: astore        5
      23: new           #22                 // class java/util/ArrayList
      26: dup
      27: aload_3
      28: bipush        10
      30: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      33: invokespecial #82                 // Method java/util/ArrayList."<init>":(I)V
      36: checkcast     #84                 // class java/util/Collection
      39: astore        6
      41: iconst_0
      42: istore        7
      44: iconst_0
      45: istore        8
      47: aload         5
      49: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      54: astore        9
      56: aload         9
      58: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      63: ifeq          137
      66: aload         9
      68: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      73: astore        10
      75: aload         6
      77: iload         8
      79: iinc          8, 1
      82: istore        11
      84: iload         11
      86: ifge          92
      89: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      92: iload         11
      94: aload         10
      96: astore        12
      98: istore        13
     100: astore        15
     102: iconst_0
     103: istore        14
     105: iload         13
     107: iload_1
     108: if_icmpne     122
     111: aload_2
     112: aload         12
     114: invokeinterface #112,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     119: goto          124
     122: aload         12
     124: nop
     125: aload         15
     127: swap
     128: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     133: pop
     134: goto          56
     137: aload         6
     139: checkcast     #20                 // class java/util/List
     142: nop
     143: areturn

  public static final <T> java.util.List<java.util.List<T>> replace(java.util.List<? extends java.util.List<? extends T>>, kotlin.Pair<java.lang.Integer, java.lang.Integer>, T);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #117                // String index
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: aload_1
      14: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      17: checkcast     #124                // class java/lang/Number
      20: invokevirtual #128                // Method java/lang/Number.intValue:()I
      23: aload_1
      24: aload_2
      25: invokedynamic #146,  0            // InvokeDynamic #0:invoke:(Lkotlin/Pair;Ljava/lang/Object;)Lkotlin/jvm/functions/Function1;
      30: invokestatic  #148                // Method replace:(Ljava/util/List;ILkotlin/jvm/functions/Function1;)Ljava/util/List;
      33: areturn

  public static final <T> java.util.List<T> removeAllAt(java.util.List<T>, kotlin.ranges.IntRange);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #154                // String indices
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: aload_1
      14: invokevirtual #158                // Method kotlin/ranges/IntRange.getFirst:()I
      17: aload_1
      18: invokevirtual #161                // Method kotlin/ranges/IntRange.getLast:()I
      21: iconst_1
      22: iadd
      23: invokeinterface #165,  3          // InterfaceMethod java/util/List.subList:(II)Ljava/util/List;
      28: checkcast     #18                 // class java/lang/Iterable
      31: invokestatic  #169                // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
      34: astore_2
      35: aload_1
      36: checkcast     #18                 // class java/lang/Iterable
      39: astore_3
      40: iconst_0
      41: istore        4
      43: aload_3
      44: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      49: astore        5
      51: aload         5
      53: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      58: ifeq          89
      61: aload         5
      63: checkcast     #171                // class kotlin/collections/IntIterator
      66: invokevirtual #174                // Method kotlin/collections/IntIterator.nextInt:()I
      69: istore        6
      71: iconst_0
      72: istore        7
      74: aload_0
      75: aload_1
      76: invokevirtual #158                // Method kotlin/ranges/IntRange.getFirst:()I
      79: invokeinterface #178,  2          // InterfaceMethod java/util/List.remove:(I)Ljava/lang/Object;
      84: pop
      85: nop
      86: goto          51
      89: nop
      90: aload_2
      91: areturn

  public static final <T> void rotateLeft(java.util.List<T>, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_1
       7: istore_2
       8: iload_1
       9: aload_0
      10: invokeinterface #190,  1          // InterfaceMethod java/util/List.size:()I
      15: irem
      16: istore_3
      17: iload_2
      18: iload_3
      19: if_icmpgt     47
      22: aload_0
      23: aload_0
      24: iconst_0
      25: invokeinterface #178,  2          // InterfaceMethod java/util/List.remove:(I)Ljava/lang/Object;
      30: invokeinterface #54,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      35: pop
      36: iload_2
      37: iload_3
      38: if_icmpeq     47
      41: iinc          2, 1
      44: goto          22
      47: return

  public static final <T, U> java.util.List<kotlin.Pair<T, U>> combinationsWith(java.util.List<? extends T>, java.util.List<? extends U>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #197                // String other
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: checkcast     #18                 // class java/lang/Iterable
      16: astore_2
      17: iconst_0
      18: istore_3
      19: aload_2
      20: astore        4
      22: new           #22                 // class java/util/ArrayList
      25: dup
      26: invokespecial #26                 // Method java/util/ArrayList."<init>":()V
      29: checkcast     #84                 // class java/util/Collection
      32: astore        5
      34: iconst_0
      35: istore        6
      37: aload         4
      39: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        7
      46: aload         7
      48: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          192
      56: aload         7
      58: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        8
      65: aload         8
      67: astore        9
      69: iconst_0
      70: istore        10
      72: aload_1
      73: checkcast     #18                 // class java/lang/Iterable
      76: astore        11
      78: iconst_0
      79: istore        12
      81: aload         11
      83: astore        13
      85: new           #22                 // class java/util/ArrayList
      88: dup
      89: aload         11
      91: bipush        10
      93: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      96: invokespecial #82                 // Method java/util/ArrayList."<init>":(I)V
      99: checkcast     #84                 // class java/util/Collection
     102: astore        14
     104: iconst_0
     105: istore        15
     107: aload         13
     109: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     114: astore        16
     116: aload         16
     118: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     123: ifeq          169
     126: aload         16
     128: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     133: astore        17
     135: aload         14
     137: aload         17
     139: astore        18
     141: astore        19
     143: iconst_0
     144: istore        20
     146: new           #119                // class kotlin/Pair
     149: dup
     150: aload         9
     152: aload         18
     154: invokespecial #200                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     157: aload         19
     159: swap
     160: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     165: pop
     166: goto          116
     169: aload         14
     171: checkcast     #20                 // class java/util/List
     174: nop
     175: checkcast     #18                 // class java/lang/Iterable
     178: nop
     179: astore        9
     181: aload         5
     183: aload         9
     185: invokestatic  #204                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     188: pop
     189: goto          46
     192: aload         5
     194: checkcast     #20                 // class java/util/List
     197: nop
     198: areturn

  public static final <T> java.util.List<kotlin.Pair<T, T>> combinations(java.util.List<? extends T>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_0
       8: invokestatic  #223                // Method combinationsWith:(Ljava/util/List;Ljava/util/List;)Ljava/util/List;
      11: areturn

  public static final <T> java.util.List<java.util.List<T>> combinations(java.util.List<? extends T>, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_1
       7: tableswitch   { // 0 to 1
                     0: 28
                     1: 34
               default: 130
          }
      28: invokestatic  #230                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      31: goto          334
      34: aload_0
      35: checkcast     #18                 // class java/lang/Iterable
      38: astore_2
      39: iconst_0
      40: istore_3
      41: aload_2
      42: astore        4
      44: new           #22                 // class java/util/ArrayList
      47: dup
      48: aload_2
      49: bipush        10
      51: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      54: invokespecial #82                 // Method java/util/ArrayList."<init>":(I)V
      57: checkcast     #84                 // class java/util/Collection
      60: astore        5
      62: iconst_0
      63: istore        6
      65: aload         4
      67: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      72: astore        7
      74: aload         7
      76: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      81: ifeq          121
      84: aload         7
      86: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      91: astore        8
      93: aload         5
      95: aload         8
      97: astore        9
      99: astore        24
     101: iconst_0
     102: istore        10
     104: aload         9
     106: invokestatic  #234                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     109: aload         24
     111: swap
     112: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     117: pop
     118: goto          74
     121: aload         5
     123: checkcast     #20                 // class java/util/List
     126: nop
     127: goto          334
     130: aload_0
     131: iload_1
     132: iconst_1
     133: isub
     134: invokestatic  #236                // Method combinations:(Ljava/util/List;I)Ljava/util/List;
     137: astore_3
     138: iconst_0
     139: istore        4
     141: aload_3
     142: checkcast     #18                 // class java/lang/Iterable
     145: astore        5
     147: iconst_0
     148: istore        6
     150: aload         5
     152: astore        7
     154: new           #22                 // class java/util/ArrayList
     157: dup
     158: invokespecial #26                 // Method java/util/ArrayList."<init>":()V
     161: checkcast     #84                 // class java/util/Collection
     164: astore        8
     166: iconst_0
     167: istore        9
     169: aload         7
     171: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     176: astore        10
     178: aload         10
     180: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     185: ifeq          326
     188: aload         10
     190: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     195: astore        11
     197: aload         11
     199: checkcast     #20                 // class java/util/List
     202: astore        12
     204: iconst_0
     205: istore        13
     207: aload_0
     208: checkcast     #18                 // class java/lang/Iterable
     211: astore        14
     213: iconst_0
     214: istore        15
     216: aload         14
     218: astore        16
     220: new           #22                 // class java/util/ArrayList
     223: dup
     224: aload         14
     226: bipush        10
     228: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     231: invokespecial #82                 // Method java/util/ArrayList."<init>":(I)V
     234: checkcast     #84                 // class java/util/Collection
     237: astore        17
     239: iconst_0
     240: istore        18
     242: aload         16
     244: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     249: astore        19
     251: aload         19
     253: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     258: ifeq          303
     261: aload         19
     263: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     268: astore        20
     270: aload         17
     272: aload         20
     274: astore        21
     276: astore        22
     278: iconst_0
     279: istore        23
     281: aload         12
     283: checkcast     #84                 // class java/util/Collection
     286: aload         21
     288: invokestatic  #240                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     291: aload         22
     293: swap
     294: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     299: pop
     300: goto          251
     303: aload         17
     305: checkcast     #20                 // class java/util/List
     308: nop
     309: checkcast     #18                 // class java/lang/Iterable
     312: nop
     313: astore        12
     315: aload         8
     317: aload         12
     319: invokestatic  #204                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     322: pop
     323: goto          178
     326: aload         8
     328: checkcast     #20                 // class java/util/List
     331: nop
     332: nop
     333: nop
     334: areturn

  public static final <T extends java.lang.Comparable<? super T>> java.lang.Integer indexOfMaxOrNull(java.util.List<? extends T>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #18                 // class java/lang/Iterable
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: astore_3
      15: new           #22                 // class java/util/ArrayList
      18: dup
      19: aload_1
      20: bipush        10
      22: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #82                 // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #84                 // class java/util/Collection
      31: astore        4
      33: iconst_0
      34: istore        5
      36: iconst_0
      37: istore        6
      39: aload_3
      40: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        7
      47: aload         7
      49: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          125
      57: aload         7
      59: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: astore        8
      66: aload         4
      68: iload         6
      70: iinc          6, 1
      73: istore        9
      75: iload         9
      77: ifge          83
      80: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      83: iload         9
      85: aload         8
      87: checkcast     #255                // class java/lang/Comparable
      90: astore        10
      92: istore        11
      94: astore        13
      96: iconst_0
      97: istore        12
      99: new           #119                // class kotlin/Pair
     102: dup
     103: iload         11
     105: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     108: aload         10
     110: invokespecial #200                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     113: aload         13
     115: swap
     116: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     121: pop
     122: goto          47
     125: aload         4
     127: checkcast     #20                 // class java/util/List
     130: nop
     131: checkcast     #18                 // class java/lang/Iterable
     134: astore_1
     135: iconst_0
     136: istore_2
     137: aload_1
     138: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     143: astore_3
     144: aload_3
     145: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     150: ifne          157
     153: aconst_null
     154: goto          258
     157: aload_3
     158: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     163: astore        4
     165: aload_3
     166: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     171: ifne          179
     174: aload         4
     176: goto          258
     179: aload         4
     181: checkcast     #119                // class kotlin/Pair
     184: astore        5
     186: iconst_0
     187: istore        6
     189: aload         5
     191: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     194: checkcast     #255                // class java/lang/Comparable
     197: astore        5
     199: aload_3
     200: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     205: astore        6
     207: aload         6
     209: checkcast     #119                // class kotlin/Pair
     212: astore        7
     214: iconst_0
     215: istore        8
     217: aload         7
     219: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     222: checkcast     #255                // class java/lang/Comparable
     225: astore        7
     227: aload         5
     229: aload         7
     231: invokeinterface #268,  2          // InterfaceMethod java/lang/Comparable.compareTo:(Ljava/lang/Object;)I
     236: ifge          247
     239: aload         6
     241: astore        4
     243: aload         7
     245: astore        5
     247: aload_3
     248: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     253: ifne          199
     256: aload         4
     258: checkcast     #119                // class kotlin/Pair
     261: dup
     262: ifnull        274
     265: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     268: checkcast     #257                // class java/lang/Integer
     271: goto          276
     274: pop
     275: aconst_null
     276: areturn

  public static final <T, R extends java.lang.Comparable<? super R>> java.lang.Integer indexOfMaxByOrNull(java.util.List<? extends T>, kotlin.jvm.functions.Function1<? super T, ? extends R>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc_w         #286                // String selector
      10: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      13: aload_0
      14: checkcast     #18                 // class java/lang/Iterable
      17: astore_2
      18: iconst_0
      19: istore_3
      20: aload_2
      21: astore        4
      23: new           #22                 // class java/util/ArrayList
      26: dup
      27: aload_2
      28: bipush        10
      30: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      33: invokespecial #82                 // Method java/util/ArrayList."<init>":(I)V
      36: checkcast     #84                 // class java/util/Collection
      39: astore        5
      41: iconst_0
      42: istore        6
      44: iconst_0
      45: istore        7
      47: aload         4
      49: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      54: astore        8
      56: aload         8
      58: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      63: ifeq          137
      66: aload         8
      68: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      73: astore        9
      75: aload         5
      77: iload         7
      79: iinc          7, 1
      82: istore        10
      84: iload         10
      86: ifge          92
      89: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      92: iload         10
      94: aload         9
      96: astore        11
      98: istore        12
     100: astore        14
     102: iconst_0
     103: istore        13
     105: new           #119                // class kotlin/Pair
     108: dup
     109: iload         12
     111: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     114: aload_1
     115: aload         11
     117: invokeinterface #112,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     122: invokespecial #200                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     125: aload         14
     127: swap
     128: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     133: pop
     134: goto          56
     137: aload         5
     139: checkcast     #20                 // class java/util/List
     142: nop
     143: checkcast     #18                 // class java/lang/Iterable
     146: astore_2
     147: iconst_0
     148: istore_3
     149: aload_2
     150: invokeinterface #36,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     155: astore        4
     157: aload         4
     159: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     164: ifne          171
     167: aconst_null
     168: goto          276
     171: aload         4
     173: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     178: astore        5
     180: aload         4
     182: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     187: ifne          195
     190: aload         5
     192: goto          276
     195: aload         5
     197: checkcast     #119                // class kotlin/Pair
     200: astore        6
     202: iconst_0
     203: istore        7
     205: aload         6
     207: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     210: checkcast     #255                // class java/lang/Comparable
     213: astore        6
     215: aload         4
     217: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     222: astore        7
     224: aload         7
     226: checkcast     #119                // class kotlin/Pair
     229: astore        8
     231: iconst_0
     232: istore        9
     234: aload         8
     236: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     239: checkcast     #255                // class java/lang/Comparable
     242: astore        8
     244: aload         6
     246: aload         8
     248: invokeinterface #268,  2          // InterfaceMethod java/lang/Comparable.compareTo:(Ljava/lang/Object;)I
     253: ifge          264
     256: aload         7
     258: astore        5
     260: aload         8
     262: astore        6
     264: aload         4
     266: invokeinterface #42,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     271: ifne          215
     274: aload         5
     276: checkcast     #119                // class kotlin/Pair
     279: dup
     280: ifnull        292
     283: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     286: checkcast     #257                // class java/lang/Integer
     289: goto          294
     292: pop
     293: aconst_null
     294: areturn

  public static final <S, T, U> kotlin.Triple<S, T, U> flatten(kotlin.Pair<? extends S, ? extends kotlin.Pair<? extends T, ? extends U>>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #294                // class kotlin/Triple
       9: dup
      10: aload_0
      11: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      14: aload_0
      15: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      18: checkcast     #119                // class kotlin/Pair
      21: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      24: aload_0
      25: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      28: checkcast     #119                // class kotlin/Pair
      31: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      34: invokespecial #297                // Method kotlin/Triple."<init>":(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
      37: areturn

  public static final kotlin.Pair<java.lang.Integer, java.lang.Integer> plus(kotlin.Pair<java.lang.Integer, java.lang.Integer>, kotlin.Pair<java.lang.Integer, java.lang.Integer>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #197                // String other
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #119                // class kotlin/Pair
      15: dup
      16: aload_0
      17: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      20: checkcast     #124                // class java/lang/Number
      23: invokevirtual #128                // Method java/lang/Number.intValue:()I
      26: aload_1
      27: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      30: checkcast     #124                // class java/lang/Number
      33: invokevirtual #128                // Method java/lang/Number.intValue:()I
      36: iadd
      37: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      40: aload_0
      41: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      44: checkcast     #124                // class java/lang/Number
      47: invokevirtual #128                // Method java/lang/Number.intValue:()I
      50: aload_1
      51: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      54: checkcast     #124                // class java/lang/Number
      57: invokevirtual #128                // Method java/lang/Number.intValue:()I
      60: iadd
      61: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      64: invokespecial #200                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      67: areturn

  public static final kotlin.Pair<java.lang.Integer, java.lang.Integer> times(kotlin.Pair<java.lang.Integer, java.lang.Integer>, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #119                // class kotlin/Pair
       9: dup
      10: aload_0
      11: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      14: checkcast     #124                // class java/lang/Number
      17: invokevirtual #128                // Method java/lang/Number.intValue:()I
      20: iload_1
      21: imul
      22: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: aload_0
      26: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      29: checkcast     #124                // class java/lang/Number
      32: invokevirtual #128                // Method java/lang/Number.intValue:()I
      35: iload_1
      36: imul
      37: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      40: invokespecial #200                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      43: areturn

  public static final int manhattanFrom(kotlin.Pair<java.lang.Integer, java.lang.Integer>, kotlin.Pair<java.lang.Integer, java.lang.Integer>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc_w         #310                // String origin
      10: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      13: aload_1
      14: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      17: checkcast     #124                // class java/lang/Number
      20: invokevirtual #128                // Method java/lang/Number.intValue:()I
      23: aload_0
      24: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      27: checkcast     #124                // class java/lang/Number
      30: invokevirtual #128                // Method java/lang/Number.intValue:()I
      33: isub
      34: invokestatic  #316                // Method java/lang/Math.abs:(I)I
      37: aload_1
      38: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      41: checkcast     #124                // class java/lang/Number
      44: invokevirtual #128                // Method java/lang/Number.intValue:()I
      47: aload_0
      48: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      51: checkcast     #124                // class java/lang/Number
      54: invokevirtual #128                // Method java/lang/Number.intValue:()I
      57: isub
      58: invokestatic  #316                // Method java/lang/Math.abs:(I)I
      61: iadd
      62: ireturn

  public static int manhattanFrom$default(kotlin.Pair, kotlin.Pair, int, java.lang.Object);
    Code:
       0: iload_2
       1: iconst_1
       2: iand
       3: ifeq          22
       6: new           #119                // class kotlin/Pair
       9: dup
      10: iconst_0
      11: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: iconst_0
      15: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      18: invokespecial #200                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      21: astore_1
      22: aload_0
      23: aload_1
      24: invokestatic  #321                // Method manhattanFrom:(Lkotlin/Pair;Lkotlin/Pair;)I
      27: ireturn

  public static final kotlin.sequences.Sequence<kotlin.Pair<java.lang.Integer, java.lang.Integer>> projectRay(kotlin.Pair<java.lang.Integer, java.lang.Integer>, kotlin.Pair<java.lang.Integer, java.lang.Integer>, kotlin.jvm.functions.Function1<? super kotlin.Pair<java.lang.Integer, java.lang.Integer>, java.lang.Boolean>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc_w         #326                // String direction
      10: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      13: aload_2
      14: ldc_w         #328                // String isInBounds
      17: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      20: aload_0
      21: aload_1
      22: aload_2
      23: invokedynamic #338,  0            // InvokeDynamic #1:invoke:(Lkotlin/Pair;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function1;
      28: invokestatic  #344                // Method kotlin/sequences/SequencesKt.generateSequence:(Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      31: areturn

  public static kotlin.sequences.Sequence projectRay$default(kotlin.Pair, kotlin.Pair, kotlin.jvm.functions.Function1, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_2
       2: iand
       3: ifeq          12
       6: invokedynamic #357,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function1;
      11: astore_2
      12: aload_0
      13: aload_1
      14: aload_2
      15: invokestatic  #359                // Method projectRay:(Lkotlin/Pair;Lkotlin/Pair;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      18: areturn

  public static final <T> java.util.List<T> toList(Quadruple<? extends T, ? extends T, ? extends T, ? extends T>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_4
       7: anewarray     #4                  // class java/lang/Object
      10: astore_1
      11: aload_1
      12: iconst_0
      13: aload_0
      14: invokevirtual #364                // Method Quadruple.getFirst:()Ljava/lang/Object;
      17: aastore
      18: aload_1
      19: iconst_1
      20: aload_0
      21: invokevirtual #365                // Method Quadruple.getSecond:()Ljava/lang/Object;
      24: aastore
      25: aload_1
      26: iconst_2
      27: aload_0
      28: invokevirtual #368                // Method Quadruple.getThird:()Ljava/lang/Object;
      31: aastore
      32: aload_1
      33: iconst_3
      34: aload_0
      35: invokevirtual #371                // Method Quadruple.getFourth:()Ljava/lang/Object;
      38: aastore
      39: aload_1
      40: invokestatic  #373                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      43: areturn

  private static final java.util.List replace$lambda$3(kotlin.Pair, java.lang.Object, java.util.List);
    Code:
       0: aload_2
       1: ldc_w         #376                // String it
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_2
       8: aload_0
       9: invokevirtual #264                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      12: checkcast     #124                // class java/lang/Number
      15: invokevirtual #128                // Method java/lang/Number.intValue:()I
      18: aload_1
      19: invokestatic  #378                // Method replace:(Ljava/util/List;ILjava/lang/Object;)Ljava/util/List;
      22: areturn

  private static final boolean projectRay$lambda$15(kotlin.Pair);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_1
       7: ireturn

  private static final kotlin.Pair projectRay$lambda$16(kotlin.Pair, kotlin.jvm.functions.Function1, kotlin.Pair);
    Code:
       0: aload_2
       1: ldc_w         #376                // String it
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_2
       8: aload_0
       9: invokestatic  #382                // Method plus:(Lkotlin/Pair;Lkotlin/Pair;)Lkotlin/Pair;
      12: astore_3
      13: aload_1
      14: aload_3
      15: invokeinterface #112,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
      20: checkcast     #384                // class java/lang/Boolean
      23: invokevirtual #387                // Method java/lang/Boolean.booleanValue:()Z
      26: ifeq          33
      29: aload_3
      30: goto          34
      33: aconst_null
      34: areturn
}


import java.io.File

const val QUANTUM_TIME = 2
private var numberOfPriorityTicks = 0

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(),
                        priority = it[2].toInt(),
                        afterWhatTick = (if (it.size > 3) it[3] else "0").toInt()
                    ).let {
                        if (it.priority > 0)
                            numberOfPriorityTicks += it.numberOfTicks
                        resultNumberOfTicks += it.numberOfTicks
                        it
                    }
                )
            }
        }
    }
    return Pair(list, resultNumberOfTicks)
}

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

    val ticks = arrayListOf<String>()
    repeat(numberOfActualTicks / QUANTUM_TIME) {
        if (it < (numberOfActualTicks - numberOfPriorityTicks) / QUANTUM_TIME)
            processList.filter { it.priority == 0 }.forEach { process ->
                if (process.ticksLeft > 0) {
                    repeat(minOf(QUANTUM_TIME, process.ticksLeft)) {
                        process.ticksLeft--
                        ticks.add(process.name)
                    }
                }
            }
        else
            processList.filter { it.priority > 0 }.forEach { process ->
                if (process.ticksLeft > 0) {
                    repeat(minOf(QUANTUM_TIME, process.ticksLeft)) {
                        process.ticksLeft--
                        ticks.add(process.afterWhatTick, process.name)
                    }
                }
            }
    }

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

//    println(ticks)
    println("Efficiency: ${"%.${2}f".format(((1 - numberOfWaitTicks.toFloat() / numberOfAbstractTicks) * 100))}% | With quantum time: $QUANTUM_TIME")
}

data class Process(
    val name: String,
    val numberOfTicks: Int,
    val priority: Int,
    val afterWhatTick: Int = 0,
    var ticksLeft: Int = numberOfTicks
)

Compiled from "Comparisons.kt"
public final class MainKt$main$lambda$6$$inlined$sortBy$1<T> implements java.util.Comparator {
  public MainKt$main$lambda$6$$inlined$sortBy$1();
    Code:
       0: aload_0
       1: invokespecial #16                 // Method java/lang/Object."<init>":()V
       4: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #23                 // class Process
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: invokevirtual #27                 // Method Process.getPriority:()I
      12: invokestatic  #33                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      15: checkcast     #35                 // class java/lang/Comparable
      18: aload_2
      19: checkcast     #23                 // class Process
      22: astore_3
      23: astore        5
      25: iconst_0
      26: istore        4
      28: aload_3
      29: invokevirtual #27                 // Method Process.getPriority:()I
      32: invokestatic  #33                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      35: aload         5
      37: swap
      38: checkcast     #35                 // class java/lang/Comparable
      41: invokestatic  #41                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      44: ireturn
}

Compiled from "Main.kt"
public final class MainKt {
  public static final int QUANTUM_TIME;

  private static int numberOfPriorityTicks;

  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: new           #76                 // class java/io/File
       9: dup
      10: ldc           #78                 // String test2
      12: invokespecial #81                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      15: invokestatic  #83                 // Method parseInputFile:(Ljava/io/File;)Lkotlin/Pair;
      18: astore        5
      20: iconst_0
      21: istore        6
      23: aload         5
      25: invokevirtual #87                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      28: checkcast     #89                 // class java/lang/Number
      31: invokevirtual #93                 // Method java/lang/Number.intValue:()I
      34: istore_0
      35: aload         5
      37: invokevirtual #96                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      40: checkcast     #24                 // class java/util/ArrayList
      43: astore        4
      45: aload         4
      47: astore        5
      49: iconst_0
      50: istore        6
      52: aload         5
      54: checkcast     #98                 // class java/util/List
      57: astore        7
      59: iconst_0
      60: istore        8
      62: aload         7
      64: invokeinterface #101,  1          // InterfaceMethod java/util/List.size:()I
      69: iconst_1
      70: if_icmple     88
      73: aload         7
      75: new           #103                // class MainKt$main$lambda$6$$inlined$sortBy$1
      78: dup
      79: invokespecial #104                // Method MainKt$main$lambda$6$$inlined$sortBy$1."<init>":()V
      82: checkcast     #106                // class java/util/Comparator
      85: invokestatic  #112                // Method kotlin/collections/CollectionsKt.sortWith:(Ljava/util/List;Ljava/util/Comparator;)V
      88: nop
      89: nop
      90: aload         4
      92: astore_3
      93: new           #24                 // class java/util/ArrayList
      96: dup
      97: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
     100: astore        4
     102: iload_0
     103: iconst_2
     104: idiv
     105: istore        5
     107: iconst_0
     108: istore        6
     110: iload         6
     112: iload         5
     114: if_icmpge     598
     117: iload         6
     119: istore        7
     121: iconst_0
     122: istore        8
     124: iload         7
     126: iload_0
     127: getstatic     #115                // Field numberOfPriorityTicks:I
     130: isub
     131: iconst_2
     132: idiv
     133: if_icmpge     363
     136: aload_3
     137: checkcast     #117                // class java/lang/Iterable
     140: astore        9
     142: iconst_0
     143: istore        10
     145: aload         9
     147: astore        11
     149: new           #24                 // class java/util/ArrayList
     152: dup
     153: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
     156: checkcast     #119                // class java/util/Collection
     159: astore        12
     161: iconst_0
     162: istore        13
     164: aload         11
     166: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     171: astore        14
     173: aload         14
     175: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     180: ifeq          231
     183: aload         14
     185: invokeinterface #132,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     190: astore        15
     192: aload         15
     194: checkcast     #134                // class Process
     197: astore        16
     199: iconst_0
     200: istore        17
     202: aload         16
     204: invokevirtual #137                // Method Process.getPriority:()I
     207: ifne          214
     210: iconst_1
     211: goto          215
     214: iconst_0
     215: ifeq          173
     218: aload         12
     220: aload         15
     222: invokeinterface #141,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     227: pop
     228: goto          173
     231: aload         12
     233: checkcast     #98                 // class java/util/List
     236: nop
     237: checkcast     #117                // class java/lang/Iterable
     240: astore        9
     242: nop
     243: iconst_0
     244: istore        10
     246: aload         9
     248: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     253: astore        11
     255: aload         11
     257: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     262: ifeq          359
     265: aload         11
     267: invokeinterface #132,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     272: astore        12
     274: aload         12
     276: checkcast     #134                // class Process
     279: astore        13
     281: iconst_0
     282: istore        14
     284: aload         13
     286: invokevirtual #144                // Method Process.getTicksLeft:()I
     289: ifle          354
     292: iconst_2
     293: aload         13
     295: invokevirtual #144                // Method Process.getTicksLeft:()I
     298: invokestatic  #150                // Method java/lang/Math.min:(II)I
     301: istore        15
     303: iconst_0
     304: istore        16
     306: iload         16
     308: iload         15
     310: if_icmpge     354
     313: iload         16
     315: istore        17
     317: iconst_0
     318: istore        18
     320: aload         13
     322: invokevirtual #144                // Method Process.getTicksLeft:()I
     325: istore        19
     327: aload         13
     329: iload         19
     331: iconst_m1
     332: iadd
     333: invokevirtual #154                // Method Process.setTicksLeft:(I)V
     336: aload         4
     338: aload         13
     340: invokevirtual #158                // Method Process.getName:()Ljava/lang/String;
     343: invokevirtual #159                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     346: pop
     347: nop
     348: iinc          16, 1
     351: goto          306
     354: nop
     355: nop
     356: goto          255
     359: nop
     360: goto          591
     363: aload_3
     364: checkcast     #117                // class java/lang/Iterable
     367: astore        9
     369: iconst_0
     370: istore        10
     372: aload         9
     374: astore        11
     376: new           #24                 // class java/util/ArrayList
     379: dup
     380: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
     383: checkcast     #119                // class java/util/Collection
     386: astore        12
     388: iconst_0
     389: istore        13
     391: aload         11
     393: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     398: astore        14
     400: aload         14
     402: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     407: ifeq          458
     410: aload         14
     412: invokeinterface #132,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     417: astore        15
     419: aload         15
     421: checkcast     #134                // class Process
     424: astore        16
     426: iconst_0
     427: istore        17
     429: aload         16
     431: invokevirtual #137                // Method Process.getPriority:()I
     434: ifle          441
     437: iconst_1
     438: goto          442
     441: iconst_0
     442: ifeq          400
     445: aload         12
     447: aload         15
     449: invokeinterface #141,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     454: pop
     455: goto          400
     458: aload         12
     460: checkcast     #98                 // class java/util/List
     463: nop
     464: checkcast     #117                // class java/lang/Iterable
     467: astore        9
     469: nop
     470: iconst_0
     471: istore        10
     473: aload         9
     475: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     480: astore        11
     482: aload         11
     484: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     489: ifeq          590
     492: aload         11
     494: invokeinterface #132,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     499: astore        12
     501: aload         12
     503: checkcast     #134                // class Process
     506: astore        13
     508: iconst_0
     509: istore        14
     511: aload         13
     513: invokevirtual #144                // Method Process.getTicksLeft:()I
     516: ifle          585
     519: iconst_2
     520: aload         13
     522: invokevirtual #144                // Method Process.getTicksLeft:()I
     525: invokestatic  #150                // Method java/lang/Math.min:(II)I
     528: istore        15
     530: iconst_0
     531: istore        16
     533: iload         16
     535: iload         15
     537: if_icmpge     585
     540: iload         16
     542: istore        17
     544: iconst_0
     545: istore        18
     547: aload         13
     549: invokevirtual #144                // Method Process.getTicksLeft:()I
     552: istore        19
     554: aload         13
     556: iload         19
     558: iconst_m1
     559: iadd
     560: invokevirtual #154                // Method Process.setTicksLeft:(I)V
     563: aload         4
     565: aload         13
     567: invokevirtual #162                // Method Process.getAfterWhatTick:()I
     570: aload         13
     572: invokevirtual #158                // Method Process.getName:()Ljava/lang/String;
     575: invokevirtual #165                // Method java/util/ArrayList.add:(ILjava/lang/Object;)V
     578: nop
     579: iinc          16, 1
     582: goto          533
     585: nop
     586: nop
     587: goto          482
     590: nop
     591: nop
     592: iinc          6, 1
     595: goto          110
     598: aload_3
     599: checkcast     #117                // class java/lang/Iterable
     602: astore        5
     604: iconst_0
     605: istore        6
     607: aload         5
     609: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     614: astore        7
     616: aload         7
     618: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     623: ifeq          941
     626: aload         7
     628: invokeinterface #132,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     633: astore        8
     635: aload         8
     637: checkcast     #134                // class Process
     640: astore        9
     642: iconst_0
     643: istore        10
     645: new           #167                // class java/lang/StringBuilder
     648: dup
     649: invokespecial #168                // Method java/lang/StringBuilder."<init>":()V
     652: aload         9
     654: invokevirtual #158                // Method Process.getName:()Ljava/lang/String;
     657: invokevirtual #172                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     660: bipush        32
     662: invokevirtual #175                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     665: aload         9
     667: invokevirtual #137                // Method Process.getPriority:()I
     670: invokevirtual #178                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     673: bipush        32
     675: invokevirtual #175                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     678: aload         9
     680: invokevirtual #181                // Method Process.getNumberOfTicks:()I
     683: invokevirtual #178                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     686: bipush        32
     688: invokevirtual #175                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     691: invokevirtual #184                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     694: astore        11
     696: getstatic     #190                // Field java/lang/System.out:Ljava/io/PrintStream;
     699: aload         11
     701: invokevirtual #196                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
     704: aload         4
     706: iconst_0
     707: aload         4
     709: checkcast     #98                 // class java/util/List
     712: astore        12
     714: istore        13
     716: astore        14
     718: iconst_0
     719: istore        15
     721: aload         12
     723: aload         12
     725: invokeinterface #101,  1          // InterfaceMethod java/util/List.size:()I
     730: invokeinterface #200,  2          // InterfaceMethod java/util/List.listIterator:(I)Ljava/util/ListIterator;
     735: astore        16
     737: aload         16
     739: invokeinterface #205,  1          // InterfaceMethod java/util/ListIterator.hasPrevious:()Z
     744: ifeq          794
     747: aload         16
     749: invokeinterface #208,  1          // InterfaceMethod java/util/ListIterator.previous:()Ljava/lang/Object;
     754: checkcast     #210                // class java/lang/String
     757: astore        17
     759: iconst_0
     760: istore        18
     762: aload         17
     764: checkcast     #212                // class java/lang/CharSequence
     767: aload         9
     769: invokevirtual #158                // Method Process.getName:()Ljava/lang/String;
     772: checkcast     #212                // class java/lang/CharSequence
     775: iconst_0
     776: iconst_2
     777: aconst_null
     778: invokestatic  #218                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
     781: ifeq          737
     784: aload         16
     786: invokeinterface #221,  1          // InterfaceMethod java/util/ListIterator.nextIndex:()I
     791: goto          795
     794: iconst_m1
     795: istore        19
     797: aload         14
     799: iload         13
     801: iload         19
     803: iconst_1
     804: iadd
     805: invokevirtual #225                // Method java/util/ArrayList.subList:(II)Ljava/util/List;
     808: dup
     809: ldc           #227                // String subList(...)
     811: invokestatic  #230                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     814: checkcast     #117                // class java/lang/Iterable
     817: astore        11
     819: iconst_0
     820: istore        12
     822: aload         11
     824: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     829: astore        15
     831: aload         15
     833: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     838: ifeq          929
     841: aload         15
     843: invokeinterface #132,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     848: astore        16
     850: aload         16
     852: checkcast     #210                // class java/lang/String
     855: astore        17
     857: iconst_0
     858: istore        18
     860: aload         17
     862: invokestatic  #233                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     865: aload         17
     867: checkcast     #212                // class java/lang/CharSequence
     870: aload         9
     872: invokevirtual #158                // Method Process.getName:()Ljava/lang/String;
     875: checkcast     #212                // class java/lang/CharSequence
     878: iconst_0
     879: iconst_2
     880: aconst_null
     881: invokestatic  #218                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
     884: istore        20
     886: iconst_0
     887: istore        21
     889: iload         20
     891: ifne          898
     894: iload_1
     895: iconst_1
     896: iadd
     897: istore_1
     898: iload_2
     899: iconst_1
     900: iadd
     901: istore_2
     902: iload         20
     904: ifeq          912
     907: ldc           #235                // String И
     909: goto          914
     912: ldc           #237                // String Г
     914: astore        22
     916: getstatic     #190                // Field java/lang/System.out:Ljava/io/PrintStream;
     919: aload         22
     921: invokevirtual #196                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
     924: nop
     925: nop
     926: goto          831
     929: nop
     930: getstatic     #190                // Field java/lang/System.out:Ljava/io/PrintStream;
     933: invokevirtual #240                // Method java/io/PrintStream.println:()V
     936: nop
     937: nop
     938: goto          616
     941: nop
     942: new           #167                // class java/lang/StringBuilder
     945: dup
     946: invokespecial #168                // Method java/lang/StringBuilder."<init>":()V
     949: ldc           #242                // String Efficiency:
     951: invokevirtual #172                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     954: ldc           #244                // String %.2f
     956: astore        5
     958: iconst_1
     959: anewarray     #4                  // class java/lang/Object
     962: astore        6
     964: aload         6
     966: iconst_0
     967: iconst_1
     968: i2f
     969: iload_1
     970: i2f
     971: iload_2
     972: i2f
     973: fdiv
     974: fsub
     975: bipush        100
     977: i2f
     978: fmul
     979: invokestatic  #249                // Method java/lang/Float.valueOf:(F)Ljava/lang/Float;
     982: aastore
     983: aload         6
     985: astore        6
     987: aload         5
     989: aload         6
     991: aload         6
     993: arraylength
     994: invokestatic  #255                // Method java/util/Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
     997: invokestatic  #259                // Method java/lang/String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    1000: dup
    1001: ldc_w         #261                // String format(...)
    1004: invokestatic  #230                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
    1007: invokevirtual #172                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1010: ldc_w         #263                // String % | With quantum time: 2
    1013: invokevirtual #172                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1016: invokevirtual #184                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1019: getstatic     #190                // Field java/lang/System.out:Ljava/io/PrintStream;
    1022: swap
    1023: invokevirtual #265                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1026: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #312                // 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         #315                // String it
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_2
       8: checkcast     #212                // class java/lang/CharSequence
      11: iconst_1
      12: anewarray     #210                // class java/lang/String
      15: astore_3
      16: aload_3
      17: iconst_0
      18: ldc_w         #317                // String
      21: aastore
      22: aload_3
      23: iconst_0
      24: iconst_0
      25: bipush        6
      27: aconst_null
      28: invokestatic  #321                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      31: astore        4
      33: iconst_0
      34: istore        5
      36: aload_0
      37: new           #134                // class Process
      40: dup
      41: aload         4
      43: iconst_0
      44: invokeinterface #325,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      49: checkcast     #210                // class java/lang/String
      52: aload         4
      54: iconst_1
      55: invokeinterface #325,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      60: checkcast     #210                // class java/lang/String
      63: invokestatic  #329                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      66: aload         4
      68: iconst_2
      69: invokeinterface #325,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      74: checkcast     #210                // class java/lang/String
      77: invokestatic  #329                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      80: aload         4
      82: invokeinterface #101,  1          // InterfaceMethod java/util/List.size:()I
      87: iconst_3
      88: if_icmple     105
      91: aload         4
      93: iconst_3
      94: invokeinterface #325,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      99: checkcast     #210                // class java/lang/String
     102: goto          108
     105: ldc_w         #331                // String 0
     108: invokestatic  #329                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     111: iconst_0
     112: bipush        16
     114: aconst_null
     115: invokespecial #334                // Method Process."<init>":(Ljava/lang/String;IIIIILkotlin/jvm/internal/DefaultConstructorMarker;)V
     118: astore        6
     120: astore        7
     122: iconst_0
     123: istore        8
     125: aload         6
     127: invokevirtual #137                // Method Process.getPriority:()I
     130: ifle          145
     133: getstatic     #115                // Field numberOfPriorityTicks:I
     136: aload         6
     138: invokevirtual #181                // Method Process.getNumberOfTicks:()I
     141: iadd
     142: putstatic     #115                // Field numberOfPriorityTicks:I
     145: aload_1
     146: aload_1
     147: getfield      #57                 // Field kotlin/jvm/internal/Ref$IntRef.element:I
     150: aload         6
     152: invokevirtual #181                // Method Process.getNumberOfTicks:()I
     155: iadd
     156: putfield      #57                 // Field kotlin/jvm/internal/Ref$IntRef.element:I
     159: aload         6
     161: aload         7
     163: swap
     164: nop
     165: invokevirtual #159                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     168: pop
     169: nop
     170: nop
     171: getstatic     #340                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     174: areturn

  static {};
    Code:
       0: return
}