class ChangeCalculator (list: List<Int>) {

    private val sortedList = list.sortedDescending()

    fun computeMostEfficientChange(total : Int) : List<Int> {
        require(total >= 0) {"Negative totals are not allowed."}
        if (total == 0) return emptyList() // no coins make zero change

        val trimmed = sortedList.dropWhile { it > total } // drop useless values
        var pairs = pairsOf(trimmed, total)
        while(pairs.isNotEmpty() && pairs.none { it.first == total }) { // stop if no pairs remain or found match
            pairs = pairsOf(trimmed, total, pairs)
        }
        if (pairs.isEmpty())
            throw IllegalArgumentException("The total $total cannot be represented in the given currency.")
        else return pairs.filter { it.first == total }
                .minBy { it.second.size }?.second
                ?.reversed() ?: throw IllegalArgumentException("No minimum found")
    }

    // Memoize sums of lists to reduce problem complexity, i.e. dynamic programming
    private fun pairsOf(left: Collection<Int>,
                        total: Int,
                        pairs: List<Pair<Int, List<Int>>> = listOf()): List<Pair<Int, List<Int>>> {
        return if (pairs.isEmpty()) { // build up initial list with all pairs including single coins
            left.flatMap { first ->
                left.filter { it <= first }
                        .plus(0) // handle single coins by pairing values with zero
                        .map { second -> Pair(first + second, listOf(first, second)) }
                        .filter { it.first <= total }
                        .map { Pair(it.first, it.second.filter { it>0 }) } // filter out zeroes
            }
        } else { // add remaining candidate coins to each remaining pair
            pairs.flatMap { pair ->
                left.filter { it <= pair.second.last() }
                        .map { second -> Pair(pair.first + second, pair.second + second) }
                        .filter { it.first <= total }
            }
        }
    }
}

Compiled from "ChangeCalculator.kt"
public final class ChangeCalculator {
  private final java.util.List<java.lang.Integer> sortedList;

  public ChangeCalculator(java.util.List<java.lang.Integer>);
    Code:
       0: aload_1
       1: ldc           #10                 // String list
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: checkcast     #21                 // class java/lang/Iterable
      15: invokestatic  #27                 // Method kotlin/collections/CollectionsKt.sortedDescending:(Ljava/lang/Iterable;)Ljava/util/List;
      18: putfield      #31                 // Field sortedList:Ljava/util/List;
      21: return

  public final java.util.List<java.lang.Integer> computeMostEfficientChange(int);
    Code:
       0: iload_1
       1: iflt          8
       4: iconst_1
       5: goto          9
       8: iconst_0
       9: ifne          29
      12: iconst_0
      13: istore_3
      14: ldc           #38                 // String Negative totals are not allowed.
      16: astore_3
      17: new           #40                 // class java/lang/IllegalArgumentException
      20: dup
      21: aload_3
      22: invokevirtual #44                 // Method java/lang/Object.toString:()Ljava/lang/String;
      25: invokespecial #47                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      28: athrow
      29: iload_1
      30: ifne          37
      33: invokestatic  #51                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      36: areturn
      37: aload_0
      38: getfield      #31                 // Field sortedList:Ljava/util/List;
      41: checkcast     #21                 // class java/lang/Iterable
      44: astore_3
      45: iconst_0
      46: istore        4
      48: iconst_0
      49: istore        5
      51: new           #53                 // class java/util/ArrayList
      54: dup
      55: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
      58: astore        6
      60: aload_3
      61: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      66: astore        7
      68: aload         7
      70: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      75: ifeq          144
      78: aload         7
      80: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      85: astore        8
      87: iload         5
      89: ifeq          103
      92: aload         6
      94: aload         8
      96: invokevirtual #72                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      99: pop
     100: goto          68
     103: aload         8
     105: checkcast     #74                 // class java/lang/Number
     108: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     111: istore        9
     113: iconst_0
     114: istore        10
     116: iload         9
     118: iload_1
     119: if_icmple     126
     122: iconst_1
     123: goto          127
     126: iconst_0
     127: ifne          68
     130: aload         6
     132: aload         8
     134: invokevirtual #72                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     137: pop
     138: iconst_1
     139: istore        5
     141: goto          68
     144: aload         6
     146: checkcast     #80                 // class java/util/List
     149: astore_2
     150: aload_0
     151: aload_2
     152: checkcast     #82                 // class java/util/Collection
     155: iload_1
     156: aconst_null
     157: iconst_4
     158: aconst_null
     159: invokestatic  #86                 // Method pairsOf$default:(LChangeCalculator;Ljava/util/Collection;ILjava/util/List;ILjava/lang/Object;)Ljava/util/List;
     162: astore_3
     163: aload_3
     164: checkcast     #82                 // class java/util/Collection
     167: invokeinterface #89,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
     172: ifne          179
     175: iconst_1
     176: goto          180
     179: iconst_0
     180: ifeq          300
     183: aload_3
     184: checkcast     #21                 // class java/lang/Iterable
     187: astore        4
     189: iconst_0
     190: istore        5
     192: aload         4
     194: instanceof    #82                 // class java/util/Collection
     197: ifeq          217
     200: aload         4
     202: checkcast     #82                 // class java/util/Collection
     205: invokeinterface #89,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
     210: ifeq          217
     213: iconst_1
     214: goto          283
     217: aload         4
     219: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     224: astore        6
     226: aload         6
     228: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     233: ifeq          282
     236: aload         6
     238: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     243: astore        7
     245: aload         7
     247: checkcast     #91                 // class kotlin/Pair
     250: astore        8
     252: iconst_0
     253: istore        9
     255: aload         8
     257: invokevirtual #94                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     260: checkcast     #74                 // class java/lang/Number
     263: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     266: iload_1
     267: if_icmpne     274
     270: iconst_1
     271: goto          275
     274: iconst_0
     275: ifeq          226
     278: iconst_0
     279: goto          283
     282: iconst_1
     283: ifeq          300
     286: aload_0
     287: aload_2
     288: checkcast     #82                 // class java/util/Collection
     291: iload_1
     292: aload_3
     293: invokespecial #98                 // Method pairsOf:(Ljava/util/Collection;ILjava/util/List;)Ljava/util/List;
     296: astore_3
     297: goto          163
     300: aload_3
     301: invokeinterface #99,  1           // InterfaceMethod java/util/List.isEmpty:()Z
     306: ifeq          341
     309: new           #40                 // class java/lang/IllegalArgumentException
     312: dup
     313: new           #101                // class java/lang/StringBuilder
     316: dup
     317: invokespecial #102                // Method java/lang/StringBuilder."<init>":()V
     320: ldc           #104                // String The total
     322: invokevirtual #108                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     325: iload_1
     326: invokevirtual #111                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     329: ldc           #113                // String  cannot be represented in the given currency.
     331: invokevirtual #108                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     334: invokevirtual #114                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     337: invokespecial #47                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     340: athrow
     341: aload_3
     342: checkcast     #21                 // class java/lang/Iterable
     345: astore        5
     347: iconst_0
     348: istore        6
     350: aload         5
     352: astore        7
     354: new           #53                 // class java/util/ArrayList
     357: dup
     358: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
     361: checkcast     #82                 // class java/util/Collection
     364: astore        8
     366: iconst_0
     367: istore        9
     369: aload         7
     371: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     376: astore        10
     378: aload         10
     380: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     385: ifeq          443
     388: aload         10
     390: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     395: astore        11
     397: aload         11
     399: checkcast     #91                 // class kotlin/Pair
     402: astore        12
     404: iconst_0
     405: istore        13
     407: aload         12
     409: invokevirtual #94                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     412: checkcast     #74                 // class java/lang/Number
     415: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     418: iload_1
     419: if_icmpne     426
     422: iconst_1
     423: goto          427
     426: iconst_0
     427: ifeq          378
     430: aload         8
     432: aload         11
     434: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     439: pop
     440: goto          378
     443: aload         8
     445: checkcast     #80                 // class java/util/List
     448: nop
     449: checkcast     #21                 // class java/lang/Iterable
     452: astore        5
     454: nop
     455: iconst_0
     456: istore        6
     458: aload         5
     460: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     465: astore        7
     467: aload         7
     469: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     474: ifne          485
     477: new           #117                // class java/util/NoSuchElementException
     480: dup
     481: invokespecial #118                // Method java/util/NoSuchElementException."<init>":()V
     484: athrow
     485: aload         7
     487: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     492: astore        8
     494: aload         7
     496: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     501: ifne          509
     504: aload         8
     506: goto          595
     509: aload         8
     511: checkcast     #91                 // class kotlin/Pair
     514: astore        9
     516: iconst_0
     517: istore        10
     519: aload         9
     521: invokevirtual #121                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     524: checkcast     #80                 // class java/util/List
     527: invokeinterface #124,  1          // InterfaceMethod java/util/List.size:()I
     532: istore        9
     534: aload         7
     536: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     541: astore        10
     543: aload         10
     545: checkcast     #91                 // class kotlin/Pair
     548: astore        11
     550: iconst_0
     551: istore        12
     553: aload         11
     555: invokevirtual #121                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     558: checkcast     #80                 // class java/util/List
     561: invokeinterface #124,  1          // InterfaceMethod java/util/List.size:()I
     566: istore        11
     568: iload         9
     570: iload         11
     572: if_icmple     583
     575: aload         10
     577: astore        8
     579: iload         11
     581: istore        9
     583: aload         7
     585: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     590: ifne          534
     593: aload         8
     595: checkcast     #91                 // class kotlin/Pair
     598: astore        4
     600: aload         4
     602: ifnull        640
     605: aload         4
     607: invokevirtual #121                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     610: checkcast     #80                 // class java/util/List
     613: astore        5
     615: aload         5
     617: ifnull        640
     620: aload         5
     622: checkcast     #21                 // class java/lang/Iterable
     625: invokestatic  #127                // Method kotlin/collections/CollectionsKt.reversed:(Ljava/lang/Iterable;)Ljava/util/List;
     628: astore        6
     630: aload         6
     632: ifnull        640
     635: aload         6
     637: goto          650
     640: new           #40                 // class java/lang/IllegalArgumentException
     643: dup
     644: ldc           #129                // String No minimum found
     646: invokespecial #47                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     649: athrow
     650: areturn

  private final java.util.List<kotlin.Pair<java.lang.Integer, java.util.List<java.lang.Integer>>> pairsOf(java.util.Collection<java.lang.Integer>, int, java.util.List<? extends kotlin.Pair<java.lang.Integer, ? extends java.util.List<java.lang.Integer>>>);
    Code:
       0: aload_3
       1: invokeinterface #99,  1           // InterfaceMethod java/util/List.isEmpty:()Z
       6: ifeq          692
       9: aload_1
      10: checkcast     #21                 // class java/lang/Iterable
      13: astore        4
      15: iconst_0
      16: istore        5
      18: aload         4
      20: astore        6
      22: new           #53                 // class java/util/ArrayList
      25: dup
      26: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
      29: checkcast     #82                 // class java/util/Collection
      32: astore        7
      34: iconst_0
      35: istore        8
      37: aload         6
      39: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        9
      46: aload         9
      48: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          683
      56: aload         9
      58: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        10
      65: aload         10
      67: checkcast     #74                 // class java/lang/Number
      70: invokevirtual #78                 // Method java/lang/Number.intValue:()I
      73: istore        11
      75: iconst_0
      76: istore        12
      78: aload_1
      79: checkcast     #21                 // class java/lang/Iterable
      82: astore        13
      84: iconst_0
      85: istore        14
      87: aload         13
      89: astore        15
      91: new           #53                 // class java/util/ArrayList
      94: dup
      95: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
      98: checkcast     #82                 // class java/util/Collection
     101: astore        16
     103: iconst_0
     104: istore        17
     106: aload         15
     108: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     113: astore        18
     115: aload         18
     117: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     122: ifeq          175
     125: aload         18
     127: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     132: astore        19
     134: aload         19
     136: checkcast     #74                 // class java/lang/Number
     139: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     142: istore        20
     144: iconst_0
     145: istore        21
     147: iload         20
     149: iload         11
     151: if_icmpgt     158
     154: iconst_1
     155: goto          159
     158: iconst_0
     159: ifeq          115
     162: aload         16
     164: aload         19
     166: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     171: pop
     172: goto          115
     175: aload         16
     177: checkcast     #80                 // class java/util/List
     180: nop
     181: checkcast     #82                 // class java/util/Collection
     184: iconst_0
     185: invokestatic  #174                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     188: invokestatic  #178                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     191: checkcast     #21                 // class java/lang/Iterable
     194: astore        13
     196: nop
     197: iconst_0
     198: istore        14
     200: aload         13
     202: astore        15
     204: new           #53                 // class java/util/ArrayList
     207: dup
     208: aload         13
     210: bipush        10
     212: invokestatic  #182                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     215: invokespecial #185                // Method java/util/ArrayList."<init>":(I)V
     218: checkcast     #82                 // class java/util/Collection
     221: astore        16
     223: iconst_0
     224: istore        17
     226: aload         15
     228: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     233: astore        18
     235: aload         18
     237: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     242: ifeq          327
     245: aload         18
     247: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     252: astore        19
     254: aload         16
     256: aload         19
     258: checkcast     #74                 // class java/lang/Number
     261: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     264: istore        20
     266: astore        22
     268: iconst_0
     269: istore        21
     271: new           #91                 // class kotlin/Pair
     274: dup
     275: iload         11
     277: iload         20
     279: iadd
     280: invokestatic  #174                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     283: iconst_2
     284: anewarray     #170                // class java/lang/Integer
     287: astore        23
     289: aload         23
     291: iconst_0
     292: iload         11
     294: invokestatic  #174                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     297: aastore
     298: aload         23
     300: iconst_1
     301: iload         20
     303: invokestatic  #174                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     306: aastore
     307: aload         23
     309: invokestatic  #189                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     312: invokespecial #192                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     315: aload         22
     317: swap
     318: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     323: pop
     324: goto          235
     327: aload         16
     329: checkcast     #80                 // class java/util/List
     332: nop
     333: checkcast     #21                 // class java/lang/Iterable
     336: astore        13
     338: nop
     339: iconst_0
     340: istore        14
     342: aload         13
     344: astore        15
     346: new           #53                 // class java/util/ArrayList
     349: dup
     350: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
     353: checkcast     #82                 // class java/util/Collection
     356: astore        16
     358: iconst_0
     359: istore        17
     361: aload         15
     363: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     368: astore        18
     370: aload         18
     372: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     377: ifeq          435
     380: aload         18
     382: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     387: astore        19
     389: aload         19
     391: checkcast     #91                 // class kotlin/Pair
     394: astore        20
     396: iconst_0
     397: istore        21
     399: aload         20
     401: invokevirtual #94                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     404: checkcast     #74                 // class java/lang/Number
     407: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     410: iload_2
     411: if_icmpgt     418
     414: iconst_1
     415: goto          419
     418: iconst_0
     419: ifeq          370
     422: aload         16
     424: aload         19
     426: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     431: pop
     432: goto          370
     435: aload         16
     437: checkcast     #80                 // class java/util/List
     440: nop
     441: checkcast     #21                 // class java/lang/Iterable
     444: astore        13
     446: nop
     447: iconst_0
     448: istore        14
     450: aload         13
     452: astore        15
     454: new           #53                 // class java/util/ArrayList
     457: dup
     458: aload         13
     460: bipush        10
     462: invokestatic  #182                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     465: invokespecial #185                // Method java/util/ArrayList."<init>":(I)V
     468: checkcast     #82                 // class java/util/Collection
     471: astore        16
     473: iconst_0
     474: istore        17
     476: aload         15
     478: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     483: astore        18
     485: aload         18
     487: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     492: ifeq          660
     495: aload         18
     497: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     502: astore        19
     504: aload         16
     506: aload         19
     508: checkcast     #91                 // class kotlin/Pair
     511: astore        20
     513: astore        22
     515: iconst_0
     516: istore        21
     518: aload         20
     520: invokevirtual #94                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     523: aload         20
     525: invokevirtual #121                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     528: checkcast     #21                 // class java/lang/Iterable
     531: astore        23
     533: astore        24
     535: iconst_0
     536: istore        25
     538: aload         23
     540: astore        26
     542: new           #53                 // class java/util/ArrayList
     545: dup
     546: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
     549: checkcast     #82                 // class java/util/Collection
     552: astore        27
     554: iconst_0
     555: istore        28
     557: aload         26
     559: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     564: astore        29
     566: aload         29
     568: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     573: ifeq          624
     576: aload         29
     578: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     583: astore        30
     585: aload         30
     587: checkcast     #74                 // class java/lang/Number
     590: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     593: istore        31
     595: iconst_0
     596: istore        32
     598: iload         31
     600: ifle          607
     603: iconst_1
     604: goto          608
     607: iconst_0
     608: ifeq          566
     611: aload         27
     613: aload         30
     615: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     620: pop
     621: goto          566
     624: aload         27
     626: checkcast     #80                 // class java/util/List
     629: nop
     630: aload         24
     632: swap
     633: astore        33
     635: astore        34
     637: new           #91                 // class kotlin/Pair
     640: dup
     641: aload         34
     643: aload         33
     645: invokespecial #192                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     648: aload         22
     650: swap
     651: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     656: pop
     657: goto          485
     660: aload         16
     662: checkcast     #80                 // class java/util/List
     665: nop
     666: checkcast     #21                 // class java/lang/Iterable
     669: nop
     670: astore        11
     672: aload         7
     674: aload         11
     676: invokestatic  #196                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     679: pop
     680: goto          46
     683: aload         7
     685: checkcast     #80                 // class java/util/List
     688: nop
     689: goto          1145
     692: aload_3
     693: checkcast     #21                 // class java/lang/Iterable
     696: astore        4
     698: iconst_0
     699: istore        5
     701: aload         4
     703: astore        6
     705: new           #53                 // class java/util/ArrayList
     708: dup
     709: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
     712: checkcast     #82                 // class java/util/Collection
     715: astore        7
     717: iconst_0
     718: istore        8
     720: aload         6
     722: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     727: astore        9
     729: aload         9
     731: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     736: ifeq          1139
     739: aload         9
     741: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     746: astore        10
     748: aload         10
     750: checkcast     #91                 // class kotlin/Pair
     753: astore        11
     755: iconst_0
     756: istore        12
     758: aload_1
     759: checkcast     #21                 // class java/lang/Iterable
     762: astore        13
     764: iconst_0
     765: istore        14
     767: aload         13
     769: astore        15
     771: new           #53                 // class java/util/ArrayList
     774: dup
     775: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
     778: checkcast     #82                 // class java/util/Collection
     781: astore        16
     783: iconst_0
     784: istore        17
     786: aload         15
     788: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     793: astore        18
     795: aload         18
     797: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     802: ifeq          870
     805: aload         18
     807: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     812: astore        19
     814: aload         19
     816: checkcast     #74                 // class java/lang/Number
     819: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     822: istore        20
     824: iconst_0
     825: istore        21
     827: iload         20
     829: aload         11
     831: invokevirtual #121                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     834: checkcast     #80                 // class java/util/List
     837: invokestatic  #200                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     840: checkcast     #74                 // class java/lang/Number
     843: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     846: if_icmpgt     853
     849: iconst_1
     850: goto          854
     853: iconst_0
     854: ifeq          795
     857: aload         16
     859: aload         19
     861: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     866: pop
     867: goto          795
     870: aload         16
     872: checkcast     #80                 // class java/util/List
     875: nop
     876: checkcast     #21                 // class java/lang/Iterable
     879: astore        13
     881: nop
     882: iconst_0
     883: istore        14
     885: aload         13
     887: astore        15
     889: new           #53                 // class java/util/ArrayList
     892: dup
     893: aload         13
     895: bipush        10
     897: invokestatic  #182                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     900: invokespecial #185                // Method java/util/ArrayList."<init>":(I)V
     903: checkcast     #82                 // class java/util/Collection
     906: astore        16
     908: iconst_0
     909: istore        17
     911: aload         15
     913: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     918: astore        18
     920: aload         18
     922: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     927: ifeq          1008
     930: aload         18
     932: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     937: astore        19
     939: aload         16
     941: aload         19
     943: checkcast     #74                 // class java/lang/Number
     946: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     949: istore        20
     951: astore        22
     953: iconst_0
     954: istore        21
     956: new           #91                 // class kotlin/Pair
     959: dup
     960: aload         11
     962: invokevirtual #94                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     965: checkcast     #74                 // class java/lang/Number
     968: invokevirtual #78                 // Method java/lang/Number.intValue:()I
     971: iload         20
     973: iadd
     974: invokestatic  #174                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     977: aload         11
     979: invokevirtual #121                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     982: checkcast     #82                 // class java/util/Collection
     985: iload         20
     987: invokestatic  #174                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     990: invokestatic  #178                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     993: invokespecial #192                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     996: aload         22
     998: swap
     999: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1004: pop
    1005: goto          920
    1008: aload         16
    1010: checkcast     #80                 // class java/util/List
    1013: nop
    1014: checkcast     #21                 // class java/lang/Iterable
    1017: astore        13
    1019: nop
    1020: iconst_0
    1021: istore        14
    1023: aload         13
    1025: astore        15
    1027: new           #53                 // class java/util/ArrayList
    1030: dup
    1031: invokespecial #54                 // Method java/util/ArrayList."<init>":()V
    1034: checkcast     #82                 // class java/util/Collection
    1037: astore        16
    1039: iconst_0
    1040: istore        17
    1042: aload         15
    1044: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1049: astore        18
    1051: aload         18
    1053: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1058: ifeq          1116
    1061: aload         18
    1063: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1068: astore        19
    1070: aload         19
    1072: checkcast     #91                 // class kotlin/Pair
    1075: astore        20
    1077: iconst_0
    1078: istore        21
    1080: aload         20
    1082: invokevirtual #94                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1085: checkcast     #74                 // class java/lang/Number
    1088: invokevirtual #78                 // Method java/lang/Number.intValue:()I
    1091: iload_2
    1092: if_icmpgt     1099
    1095: iconst_1
    1096: goto          1100
    1099: iconst_0
    1100: ifeq          1051
    1103: aload         16
    1105: aload         19
    1107: invokeinterface #115,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1112: pop
    1113: goto          1051
    1116: aload         16
    1118: checkcast     #80                 // class java/util/List
    1121: nop
    1122: checkcast     #21                 // class java/lang/Iterable
    1125: nop
    1126: astore        11
    1128: aload         7
    1130: aload         11
    1132: invokestatic  #196                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
    1135: pop
    1136: goto          729
    1139: aload         7
    1141: checkcast     #80                 // class java/util/List
    1144: nop
    1145: areturn

  static java.util.List pairsOf$default(ChangeCalculator, java.util.Collection, int, java.util.List, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_4
       3: iand
       4: ifeq          11
       7: invokestatic  #51                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      10: astore_3
      11: aload_0
      12: aload_1
      13: iload_2
      14: aload_3
      15: invokespecial #98                 // Method pairsOf:(Ljava/util/Collection;ILjava/util/List;)Ljava/util/List;
      18: areturn
}


fun suffixArray(S: CharSequence): IntArray {
    val n = S.length

    // Stable sort of characters.
    // Same characters are sorted by their position in descending order.
    // E.g. last character which represents suffix of length 1 should be ordered first among same characters.
    val sa = S.indices.reversed().sortedBy { S[it] }.toIntArray()
    val classes = S.chars().toArray()
    // sa[i] - suffix on i'th position after sorting by first len characters
    // classes[i] - equivalence class of the i'th suffix after sorting by first len characters
    var len = 1
    while (len < n) {
        // Calculate classes for suffixes of length len * 2
        val c = classes.copyOf()
        for (i in 0 until n) {
            // Condition sa[i - 1] + len < n emulates 0-symbol at the end of the string.
            // A separate class is created for each suffix followed by emulated 0-symbol.
            classes[sa[i]] =
                    if (i > 0 && c[sa[i - 1]] == c[sa[i]] && sa[i - 1] + len < n
                            && c[sa[i - 1] + len / 2] == c[sa[i] + len / 2]) classes[sa[i - 1]]
                    else i
        }
        // Suffixes are already sorted by first len characters
        // Now sort suffixes by first len * 2 characters
        val cnt = IntArray(n) { it }
        val s = sa.copyOf()
        for (i in 0 until n) {
            // s[i] - order of suffixes sorted by first len characters
            // (s[i] - len) - order of suffixes sorted only by second len characters
            val s1 = s[i] - len
            // sort only suffixes of length > len, others are already sorted
            if (s1 >= 0)
                sa[cnt[classes[s1]]++] = s1
        }
        len *= 2
    }
    return sa
}

// Usage example
fun main() {
    val s = "abcab"
    val sa = suffixArray(s)
    // print suffixes in lexicographic order

    // print suffixes in lexicographic order
    for (p in sa) println(s.substring(p))
}

Compiled from "SuffixArray.kt"
public final class SuffixArrayKt {
  public static final int[] suffixArray(java.lang.CharSequence);
    Code:
       0: aload_0
       1: ldc           #9                  // String S
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokeinterface #21,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      12: istore_1
      13: aload_0
      14: invokestatic  #27                 // Method kotlin/text/StringsKt.getIndices:(Ljava/lang/CharSequence;)Lkotlin/ranges/IntRange;
      17: checkcast     #29                 // class kotlin/ranges/IntProgression
      20: invokestatic  #35                 // Method kotlin/ranges/RangesKt.reversed:(Lkotlin/ranges/IntProgression;)Lkotlin/ranges/IntProgression;
      23: checkcast     #37                 // class java/lang/Iterable
      26: astore_3
      27: iconst_0
      28: istore        4
      30: aload_3
      31: new           #39                 // class SuffixArrayKt$suffixArray$$inlined$sortedBy$1
      34: dup
      35: aload_0
      36: invokespecial #43                 // Method SuffixArrayKt$suffixArray$$inlined$sortedBy$1."<init>":(Ljava/lang/CharSequence;)V
      39: checkcast     #45                 // class java/util/Comparator
      42: invokestatic  #51                 // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
      45: checkcast     #53                 // class java/util/Collection
      48: invokestatic  #57                 // Method kotlin/collections/CollectionsKt.toIntArray:(Ljava/util/Collection;)[I
      51: astore_2
      52: aload_0
      53: invokeinterface #61,  1           // InterfaceMethod java/lang/CharSequence.chars:()Ljava/util/stream/IntStream;
      58: invokeinterface #67,  1           // InterfaceMethod java/util/stream/IntStream.toArray:()[I
      63: astore_3
      64: iconst_1
      65: istore        4
      67: iload         4
      69: iload_1
      70: if_icmpge     307
      73: aload_3
      74: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      77: aload_3
      78: dup
      79: arraylength
      80: invokestatic  #77                 // Method java/util/Arrays.copyOf:([II)[I
      83: dup
      84: ldc           #79                 // String copyOf(...)
      86: invokestatic  #82                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      89: astore        5
      91: iconst_0
      92: istore        6
      94: iload         6
      96: iload_1
      97: if_icmpge     191
     100: aload_3
     101: aload_2
     102: iload         6
     104: iaload
     105: iload         6
     107: ifle          182
     110: aload         5
     112: aload_2
     113: iload         6
     115: iconst_1
     116: isub
     117: iaload
     118: iaload
     119: aload         5
     121: aload_2
     122: iload         6
     124: iaload
     125: iaload
     126: if_icmpne     182
     129: aload_2
     130: iload         6
     132: iconst_1
     133: isub
     134: iaload
     135: iload         4
     137: iadd
     138: iload_1
     139: if_icmpge     182
     142: aload         5
     144: aload_2
     145: iload         6
     147: iconst_1
     148: isub
     149: iaload
     150: iload         4
     152: iconst_2
     153: idiv
     154: iadd
     155: iaload
     156: aload         5
     158: aload_2
     159: iload         6
     161: iaload
     162: iload         4
     164: iconst_2
     165: idiv
     166: iadd
     167: iaload
     168: if_icmpne     182
     171: aload_3
     172: aload_2
     173: iload         6
     175: iconst_1
     176: isub
     177: iaload
     178: iaload
     179: goto          184
     182: iload         6
     184: iastore
     185: iinc          6, 1
     188: goto          94
     191: iconst_0
     192: istore        7
     194: iload_1
     195: newarray       int
     197: astore        8
     199: iload         7
     201: iload_1
     202: if_icmpge     222
     205: iload         7
     207: istore        9
     209: aload         8
     211: iload         9
     213: iload         9
     215: iastore
     216: iinc          7, 1
     219: goto          199
     222: aload         8
     224: astore        6
     226: aload_2
     227: dup
     228: arraylength
     229: invokestatic  #77                 // Method java/util/Arrays.copyOf:([II)[I
     232: dup
     233: ldc           #79                 // String copyOf(...)
     235: invokestatic  #82                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     238: astore        7
     240: iconst_0
     241: istore        8
     243: iload         8
     245: iload_1
     246: if_icmpge     298
     249: aload         7
     251: iload         8
     253: iaload
     254: iload         4
     256: isub
     257: istore        9
     259: iload         9
     261: iflt          292
     264: aload_2
     265: aload_3
     266: iload         9
     268: iaload
     269: istore        10
     271: aload         6
     273: iload         10
     275: iaload
     276: istore        11
     278: aload         6
     280: iload         10
     282: iload         11
     284: iconst_1
     285: iadd
     286: iastore
     287: iload         11
     289: iload         9
     291: iastore
     292: iinc          8, 1
     295: goto          243
     298: iload         4
     300: iconst_2
     301: imul
     302: istore        4
     304: goto          67
     307: aload_2
     308: areturn

  public static final void main();
    Code:
       0: ldc           #102                // String abcab
       2: astore_0
       3: aload_0
       4: checkcast     #17                 // class java/lang/CharSequence
       7: invokestatic  #104                // Method suffixArray:(Ljava/lang/CharSequence;)[I
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: arraylength
      15: istore_3
      16: iload_2
      17: iload_3
      18: if_icmpge     54
      21: aload_1
      22: iload_2
      23: iaload
      24: istore        4
      26: aload_0
      27: iload         4
      29: invokevirtual #110                // Method java/lang/String.substring:(I)Ljava/lang/String;
      32: dup
      33: ldc           #112                // String substring(...)
      35: invokestatic  #82                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      38: astore        5
      40: getstatic     #118                // Field java/lang/System.out:Ljava/io/PrintStream;
      43: aload         5
      45: invokevirtual #123                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      48: iinc          2, 1
      51: goto          16
      54: return

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

Compiled from "Comparisons.kt"
public final class SuffixArrayKt$suffixArray$$inlined$sortedBy$1<T> implements java.util.Comparator {
  final java.lang.CharSequence $S$inlined;

  public SuffixArrayKt$suffixArray$$inlined$sortedBy$1(java.lang.CharSequence);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $S$inlined:Ljava/lang/CharSequence;
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #28                 // class java/lang/Number
       4: invokevirtual #32                 // Method java/lang/Number.intValue:()I
       7: istore_3
       8: iconst_0
       9: istore        4
      11: aload_0
      12: getfield      #18                 // Field $S$inlined:Ljava/lang/CharSequence;
      15: iload_3
      16: invokeinterface #38,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      21: invokestatic  #44                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      24: checkcast     #46                 // class java/lang/Comparable
      27: aload_2
      28: checkcast     #28                 // class java/lang/Number
      31: invokevirtual #32                 // Method java/lang/Number.intValue:()I
      34: istore_3
      35: astore        5
      37: iconst_0
      38: istore        4
      40: aload_0
      41: getfield      #18                 // Field $S$inlined:Ljava/lang/CharSequence;
      44: iload_3
      45: invokeinterface #38,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      50: invokestatic  #44                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      53: aload         5
      55: swap
      56: checkcast     #46                 // class java/lang/Comparable
      59: invokestatic  #52                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      62: ireturn
}


// https://en.wikipedia.org/wiki/Matching_(graph_theory)#In_unweighted_bipartite_graphs in O(V * E)
fun maxMatching(graph: Array<out List<Int>>, n2: Int): Int {
    val n1 = graph.size
    val vis = BooleanArray(n1)
    val matching = IntArray(n2) { -1 }

    val findPath = DeepRecursiveFunction { u1 ->
        vis[u1] = true
        for (v in graph[u1]) {
            val u2 = matching[v]
            if (u2 == -1 || !vis[u2] && callRecursive(u2) == 1) {
                matching[v] = u1
                return@DeepRecursiveFunction 1
            }
        }
        0
    }

    return (0 until n1).sumOf { vis.fill(false); findPath(it) }
}

// Usage example
fun main() {
    val g = (1..2).map { arrayListOf<Int>() }.toTypedArray()
    g[0].add(0)
    g[0].add(1)
    g[1].add(1)
    println(2 == maxMatching(g, 2))
}

Compiled from "MaxBipartiteMatchingEV.kt"
final class MaxBipartiteMatchingEVKt$maxMatching$findPath$1 extends kotlin.coroutines.jvm.internal.RestrictedSuspendLambda implements kotlin.jvm.functions.Function3<kotlin.DeepRecursiveScope<java.lang.Integer, java.lang.Integer>, java.lang.Integer, kotlin.coroutines.Continuation<? super java.lang.Integer>, java.lang.Object> {
  int I$1;

  java.lang.Object L$1;

  int label;

  private java.lang.Object L$0;

  int I$0;

  final boolean[] $vis;

  final java.util.List<java.lang.Integer>[] $graph;

  final int[] $matching;

  MaxBipartiteMatchingEVKt$maxMatching$findPath$1(boolean[], java.util.List<java.lang.Integer>[], int[], kotlin.coroutines.Continuation<? super MaxBipartiteMatchingEVKt$maxMatching$findPath$1>);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #14                 // Field $vis:[Z
       5: aload_0
       6: aload_2
       7: putfield      #18                 // Field $graph:[Ljava/util/List;
      10: aload_0
      11: aload_3
      12: putfield      #22                 // Field $matching:[I
      15: aload_0
      16: iconst_3
      17: aload         4
      19: invokespecial #25                 // Method kotlin/coroutines/jvm/internal/RestrictedSuspendLambda."<init>":(ILkotlin/coroutines/Continuation;)V
      22: return

  public final java.lang.Object invokeSuspend(java.lang.Object);
    Code:
       0: invokestatic  #57                 // Method kotlin/coroutines/intrinsics/IntrinsicsKt.getCOROUTINE_SUSPENDED:()Ljava/lang/Object;
       3: astore        7
       5: aload_0
       6: getfield      #60                 // Field label:I
       9: tableswitch   { // 0 to 1
                     0: 32
                     1: 168
               default: 229
          }
      32: aload_1
      33: invokestatic  #66                 // Method kotlin/ResultKt.throwOnFailure:(Ljava/lang/Object;)V
      36: aload_0
      37: getfield      #68                 // Field L$0:Ljava/lang/Object;
      40: checkcast     #70                 // class kotlin/DeepRecursiveScope
      43: astore_2
      44: aload_0
      45: getfield      #72                 // Field I$0:I
      48: istore_3
      49: aload_0
      50: getfield      #14                 // Field $vis:[Z
      53: iload_3
      54: iconst_1
      55: bastore
      56: aload_0
      57: getfield      #18                 // Field $graph:[Ljava/util/List;
      60: iload_3
      61: aaload
      62: invokeinterface #78,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      67: astore        4
      69: aload         4
      71: invokeinterface #84,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      76: ifeq          224
      79: aload         4
      81: invokeinterface #87,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      86: checkcast     #89                 // class java/lang/Number
      89: invokevirtual #93                 // Method java/lang/Number.intValue:()I
      92: istore        5
      94: aload_0
      95: getfield      #22                 // Field $matching:[I
      98: iload         5
     100: iaload
     101: istore        6
     103: iload         6
     105: iconst_m1
     106: if_icmpeq     211
     109: aload_0
     110: getfield      #14                 // Field $vis:[Z
     113: iload         6
     115: baload
     116: ifne          69
     119: aload_2
     120: iload         6
     122: invokestatic  #99                 // Method kotlin/coroutines/jvm/internal/Boxing.boxInt:(I)Ljava/lang/Integer;
     125: aload_0
     126: checkcast     #101                // class kotlin/coroutines/Continuation
     129: aload_0
     130: aload_2
     131: putfield      #68                 // Field L$0:Ljava/lang/Object;
     134: aload_0
     135: aload         4
     137: putfield      #103                // Field L$1:Ljava/lang/Object;
     140: aload_0
     141: iload_3
     142: putfield      #72                 // Field I$0:I
     145: aload_0
     146: iload         5
     148: putfield      #105                // Field I$1:I
     151: aload_0
     152: iconst_1
     153: putfield      #60                 // Field label:I
     156: invokevirtual #109                // Method kotlin/DeepRecursiveScope.callRecursive:(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
     159: dup
     160: aload         7
     162: if_acmpne     201
     165: aload         7
     167: areturn
     168: aload_0
     169: getfield      #105                // Field I$1:I
     172: istore        5
     174: aload_0
     175: getfield      #72                 // Field I$0:I
     178: istore_3
     179: aload_0
     180: getfield      #103                // Field L$1:Ljava/lang/Object;
     183: checkcast     #80                 // class java/util/Iterator
     186: astore        4
     188: aload_0
     189: getfield      #68                 // Field L$0:Ljava/lang/Object;
     192: checkcast     #70                 // class kotlin/DeepRecursiveScope
     195: astore_2
     196: aload_1
     197: invokestatic  #66                 // Method kotlin/ResultKt.throwOnFailure:(Ljava/lang/Object;)V
     200: aload_1
     201: checkcast     #89                 // class java/lang/Number
     204: invokevirtual #93                 // Method java/lang/Number.intValue:()I
     207: iconst_1
     208: if_icmpne     69
     211: aload_0
     212: getfield      #22                 // Field $matching:[I
     215: iload         5
     217: iload_3
     218: iastore
     219: iconst_1
     220: invokestatic  #99                 // Method kotlin/coroutines/jvm/internal/Boxing.boxInt:(I)Ljava/lang/Integer;
     223: areturn
     224: iconst_0
     225: invokestatic  #99                 // Method kotlin/coroutines/jvm/internal/Boxing.boxInt:(I)Ljava/lang/Integer;
     228: areturn
     229: new           #111                // class java/lang/IllegalStateException
     232: dup
     233: ldc           #113                // String call to \'resume\' before \'invoke\' with coroutine
     235: invokespecial #116                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     238: athrow

  public final java.lang.Object invoke(kotlin.DeepRecursiveScope<java.lang.Integer, java.lang.Integer>, int, kotlin.coroutines.Continuation<? super java.lang.Integer>);
    Code:
       0: new           #2                  // class MaxBipartiteMatchingEVKt$maxMatching$findPath$1
       3: dup
       4: aload_0
       5: getfield      #14                 // Field $vis:[Z
       8: aload_0
       9: getfield      #18                 // Field $graph:[Ljava/util/List;
      12: aload_0
      13: getfield      #22                 // Field $matching:[I
      16: aload_3
      17: invokespecial #126                // Method "<init>":([Z[Ljava/util/List;[ILkotlin/coroutines/Continuation;)V
      20: astore        4
      22: aload         4
      24: aload_1
      25: putfield      #68                 // Field L$0:Ljava/lang/Object;
      28: aload         4
      30: iload_2
      31: putfield      #72                 // Field I$0:I
      34: aload         4
      36: getstatic     #132                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      39: invokevirtual #134                // Method invokeSuspend:(Ljava/lang/Object;)Ljava/lang/Object;
      42: areturn

  public java.lang.Object invoke(java.lang.Object, java.lang.Object, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #70                 // class kotlin/DeepRecursiveScope
       5: aload_2
       6: checkcast     #89                 // class java/lang/Number
       9: invokevirtual #93                 // Method java/lang/Number.intValue:()I
      12: aload_3
      13: checkcast     #101                // class kotlin/coroutines/Continuation
      16: invokevirtual #140                // Method invoke:(Lkotlin/DeepRecursiveScope;ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
      19: areturn
}

Compiled from "MaxBipartiteMatchingEV.kt"
public final class MaxBipartiteMatchingEVKt {
  public static final int maxMatching(java.util.List<java.lang.Integer>[], int);
    Code:
       0: aload_0
       1: ldc           #10                 // String graph
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: arraylength
       8: istore_2
       9: iload_2
      10: newarray       boolean
      12: astore_3
      13: iconst_0
      14: istore        5
      16: iload_1
      17: newarray       int
      19: astore        6
      21: iload         5
      23: iload_1
      24: if_icmpge     43
      27: iload         5
      29: istore        7
      31: aload         6
      33: iload         7
      35: iconst_m1
      36: iastore
      37: iinc          5, 1
      40: goto          21
      43: aload         6
      45: astore        4
      47: new           #18                 // class kotlin/DeepRecursiveFunction
      50: dup
      51: new           #20                 // class MaxBipartiteMatchingEVKt$maxMatching$findPath$1
      54: dup
      55: aload_3
      56: aload_0
      57: aload         4
      59: aconst_null
      60: invokespecial #24                 // Method MaxBipartiteMatchingEVKt$maxMatching$findPath$1."<init>":([Z[Ljava/util/List;[ILkotlin/coroutines/Continuation;)V
      63: checkcast     #26                 // class kotlin/jvm/functions/Function3
      66: invokespecial #29                 // Method kotlin/DeepRecursiveFunction."<init>":(Lkotlin/jvm/functions/Function3;)V
      69: astore        5
      71: iconst_0
      72: iload_2
      73: invokestatic  #35                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
      76: checkcast     #37                 // class java/lang/Iterable
      79: astore        6
      81: iconst_0
      82: istore        7
      84: aload         6
      86: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      91: astore        8
      93: aload         8
      95: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     100: ifeq          162
     103: aload         8
     105: checkcast     #49                 // class kotlin/collections/IntIterator
     108: invokevirtual #53                 // Method kotlin/collections/IntIterator.nextInt:()I
     111: istore        9
     113: iload         7
     115: iload         9
     117: istore        10
     119: istore        12
     121: iconst_0
     122: istore        11
     124: aload_3
     125: iconst_0
     126: iconst_0
     127: iconst_0
     128: bipush        6
     130: aconst_null
     131: invokestatic  #59                 // Method kotlin/collections/ArraysKt.fill$default:([ZZIIILjava/lang/Object;)V
     134: aload         5
     136: iload         10
     138: invokestatic  #65                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     141: invokestatic  #71                 // Method kotlin/DeepRecursiveKt.invoke:(Lkotlin/DeepRecursiveFunction;Ljava/lang/Object;)Ljava/lang/Object;
     144: checkcast     #73                 // class java/lang/Number
     147: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     150: istore        13
     152: iload         12
     154: iload         13
     156: iadd
     157: istore        7
     159: goto          93
     162: iload         7
     164: ireturn

  public static final void main();
    Code:
       0: new           #95                 // class kotlin/ranges/IntRange
       3: dup
       4: iconst_1
       5: iconst_2
       6: invokespecial #98                 // Method kotlin/ranges/IntRange."<init>":(II)V
       9: checkcast     #37                 // class java/lang/Iterable
      12: astore_1
      13: iconst_0
      14: istore_2
      15: aload_1
      16: astore_3
      17: new           #100                // class java/util/ArrayList
      20: dup
      21: aload_1
      22: bipush        10
      24: invokestatic  #106                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      27: invokespecial #109                // Method java/util/ArrayList."<init>":(I)V
      30: checkcast     #111                // class java/util/Collection
      33: astore        4
      35: iconst_0
      36: istore        5
      38: aload_3
      39: invokeinterface #41,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        6
      46: aload         6
      48: invokeinterface #47,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          97
      56: aload         6
      58: checkcast     #49                 // class kotlin/collections/IntIterator
      61: invokevirtual #53                 // Method kotlin/collections/IntIterator.nextInt:()I
      64: istore        7
      66: aload         4
      68: iload         7
      70: istore        8
      72: astore        10
      74: iconst_0
      75: istore        9
      77: new           #100                // class java/util/ArrayList
      80: dup
      81: invokespecial #113                // Method java/util/ArrayList."<init>":()V
      84: nop
      85: aload         10
      87: swap
      88: invokeinterface #117,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      93: pop
      94: goto          46
      97: aload         4
      99: checkcast     #119                // class java/util/List
     102: nop
     103: checkcast     #111                // class java/util/Collection
     106: astore_1
     107: nop
     108: iconst_0
     109: istore_2
     110: aload_1
     111: astore_3
     112: aload_3
     113: iconst_0
     114: anewarray     #100                // class java/util/ArrayList
     117: invokeinterface #123,  2          // InterfaceMethod java/util/Collection.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
     122: checkcast     #125                // class "[Ljava/util/ArrayList;"
     125: astore_0
     126: aload_0
     127: iconst_0
     128: aaload
     129: iconst_0
     130: invokestatic  #65                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     133: invokevirtual #126                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     136: pop
     137: aload_0
     138: iconst_0
     139: aaload
     140: iconst_1
     141: invokestatic  #65                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     144: invokevirtual #126                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     147: pop
     148: aload_0
     149: iconst_1
     150: aaload
     151: iconst_1
     152: invokestatic  #65                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     155: invokevirtual #126                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     158: pop
     159: iconst_2
     160: aload_0
     161: checkcast     #89                 // class "[Ljava/util/List;"
     164: iconst_2
     165: invokestatic  #128                // Method maxMatching:([Ljava/util/List;I)I
     168: if_icmpne     175
     171: iconst_1
     172: goto          176
     175: iconst_0
     176: istore_1
     177: getstatic     #134                // Field java/lang/System.out:Ljava/io/PrintStream;
     180: iload_1
     181: invokevirtual #140                // Method java/io/PrintStream.println:(Z)V
     184: return

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


object Dijkstra {
    data class Edge(val target: Int, val cost: Int)

    data class ShortestPaths(val dist: IntArray, val pred: IntArray)

    fun shortestPaths(graph: Array<out List<Edge>>, s: Int): ShortestPaths {
        val n = graph.size
        val dist = IntArray(n) { Int.MAX_VALUE }
        dist[s] = 0
        val pred = IntArray(n) { -1 }
        val visited = BooleanArray(n)
        for (i in 0 until n) {
            var u = -1
            for (j in 0 until n) {
                if (!visited[j] && (u == -1 || dist[u] > dist[j]))
                    u = j
            }
            if (dist[u] == Int.MAX_VALUE)
                break
            visited[u] = true

            for (e in graph[u]) {
                val v = e.target
                val nprio = dist[u] + e.cost
                if (dist[v] > nprio) {
                    dist[v] = nprio
                    pred[v] = u
                }
            }
        }
        return ShortestPaths(dist, pred)
    }

    // Usage example
    @JvmStatic
    fun main(args: Array<String>) {
        val cost = arrayOf(intArrayOf(0, 3, 2), intArrayOf(0, 0, -2), intArrayOf(0, 0, 0))
        val n = cost.size
        val graph = (1..n).map { arrayListOf<Edge>() }.toTypedArray()
        for (i in 0 until n) {
            for (j in 0 until n) {
                if (cost[i][j] != 0) {
                    graph[i].add(Edge(j, cost[i][j]))
                }
            }
        }
        println(graph.contentToString())
        val (dist, pred) = shortestPaths(graph, 0)
        println(0 == dist[0])
        println(3 == dist[1])
        println(1 == dist[2])
        println(-1 == pred[0])
        println(0 == pred[1])
        println(1 == pred[2])
    }
}

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

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

  public final Dijkstra$ShortestPaths shortestPaths(java.util.List<Dijkstra$Edge>[], int);
    Code:
       0: aload_1
       1: ldc           #16                 // String graph
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: arraylength
       8: istore_3
       9: iconst_0
      10: istore        5
      12: iload_3
      13: newarray       int
      15: astore        6
      17: iload         5
      19: iload_3
      20: if_icmpge     40
      23: iload         5
      25: istore        7
      27: aload         6
      29: iload         7
      31: ldc           #23                 // int 2147483647
      33: iastore
      34: iinc          5, 1
      37: goto          17
      40: aload         6
      42: astore        4
      44: aload         4
      46: iload_2
      47: iconst_0
      48: iastore
      49: iconst_0
      50: istore        6
      52: iload_3
      53: newarray       int
      55: astore        7
      57: iload         6
      59: iload_3
      60: if_icmpge     79
      63: iload         6
      65: istore        8
      67: aload         7
      69: iload         8
      71: iconst_m1
      72: iastore
      73: iinc          6, 1
      76: goto          57
      79: aload         7
      81: astore        5
      83: iload_3
      84: newarray       boolean
      86: astore        6
      88: iconst_0
      89: istore        7
      91: iload         7
      93: iload_3
      94: if_icmpge     251
      97: iconst_m1
      98: istore        8
     100: iconst_0
     101: istore        9
     103: iload         9
     105: iload_3
     106: if_icmpge     146
     109: aload         6
     111: iload         9
     113: baload
     114: ifne          140
     117: iload         8
     119: iconst_m1
     120: if_icmpeq     136
     123: aload         4
     125: iload         8
     127: iaload
     128: aload         4
     130: iload         9
     132: iaload
     133: if_icmple     140
     136: iload         9
     138: istore        8
     140: iinc          9, 1
     143: goto          103
     146: aload         4
     148: iload         8
     150: iaload
     151: ldc           #23                 // int 2147483647
     153: if_icmpne     159
     156: goto          251
     159: aload         6
     161: iload         8
     163: iconst_1
     164: bastore
     165: aload_1
     166: iload         8
     168: aaload
     169: invokeinterface #29,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     174: astore        9
     176: aload         9
     178: invokeinterface #35,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     183: ifeq          245
     186: aload         9
     188: invokeinterface #39,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     193: checkcast     #41                 // class Dijkstra$Edge
     196: astore        10
     198: aload         10
     200: invokevirtual #45                 // Method Dijkstra$Edge.getTarget:()I
     203: istore        11
     205: aload         4
     207: iload         8
     209: iaload
     210: aload         10
     212: invokevirtual #48                 // Method Dijkstra$Edge.getCost:()I
     215: iadd
     216: istore        12
     218: aload         4
     220: iload         11
     222: iaload
     223: iload         12
     225: if_icmple     176
     228: aload         4
     230: iload         11
     232: iload         12
     234: iastore
     235: aload         5
     237: iload         11
     239: iload         8
     241: iastore
     242: goto          176
     245: iinc          7, 1
     248: goto          91
     251: new           #50                 // class Dijkstra$ShortestPaths
     254: dup
     255: aload         4
     257: aload         5
     259: invokespecial #53                 // Method Dijkstra$ShortestPaths."<init>":([I[I)V
     262: areturn

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #77                 // String args
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_3
       7: anewarray     #71                 // class "[I"
      10: astore_2
      11: aload_2
      12: iconst_0
      13: iconst_3
      14: newarray       int
      16: astore_3
      17: aload_3
      18: iconst_0
      19: iconst_0
      20: iastore
      21: aload_3
      22: iconst_1
      23: iconst_3
      24: iastore
      25: aload_3
      26: iconst_2
      27: iconst_2
      28: iastore
      29: aload_3
      30: aastore
      31: aload_2
      32: iconst_1
      33: iconst_3
      34: newarray       int
      36: astore_3
      37: aload_3
      38: iconst_0
      39: iconst_0
      40: iastore
      41: aload_3
      42: iconst_1
      43: iconst_0
      44: iastore
      45: aload_3
      46: iconst_2
      47: bipush        -2
      49: iastore
      50: aload_3
      51: aastore
      52: aload_2
      53: iconst_2
      54: iconst_3
      55: newarray       int
      57: astore_3
      58: aload_3
      59: iconst_0
      60: iconst_0
      61: iastore
      62: aload_3
      63: iconst_1
      64: iconst_0
      65: iastore
      66: aload_3
      67: iconst_2
      68: iconst_0
      69: iastore
      70: aload_3
      71: aastore
      72: aload_2
      73: astore_1
      74: aload_1
      75: checkcast     #79                 // class "[Ljava/lang/Object;"
      78: arraylength
      79: istore_2
      80: new           #81                 // class kotlin/ranges/IntRange
      83: dup
      84: iconst_1
      85: iload_2
      86: invokespecial #84                 // Method kotlin/ranges/IntRange."<init>":(II)V
      89: checkcast     #86                 // class java/lang/Iterable
      92: astore        4
      94: iconst_0
      95: istore        5
      97: aload         4
      99: astore        6
     101: new           #88                 // class java/util/ArrayList
     104: dup
     105: aload         4
     107: bipush        10
     109: invokestatic  #94                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     112: invokespecial #97                 // Method java/util/ArrayList."<init>":(I)V
     115: checkcast     #99                 // class java/util/Collection
     118: astore        7
     120: iconst_0
     121: istore        8
     123: aload         6
     125: invokeinterface #100,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     130: astore        9
     132: aload         9
     134: invokeinterface #35,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     139: ifeq          183
     142: aload         9
     144: checkcast     #102                // class kotlin/collections/IntIterator
     147: invokevirtual #105                // Method kotlin/collections/IntIterator.nextInt:()I
     150: istore        10
     152: aload         7
     154: iload         10
     156: istore        11
     158: astore        13
     160: iconst_0
     161: istore        12
     163: new           #88                 // class java/util/ArrayList
     166: dup
     167: invokespecial #106                // Method java/util/ArrayList."<init>":()V
     170: nop
     171: aload         13
     173: swap
     174: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     179: pop
     180: goto          132
     183: aload         7
     185: checkcast     #25                 // class java/util/List
     188: nop
     189: checkcast     #99                 // class java/util/Collection
     192: astore        4
     194: nop
     195: iconst_0
     196: istore        5
     198: aload         4
     200: astore        6
     202: aload         6
     204: iconst_0
     205: anewarray     #88                 // class java/util/ArrayList
     208: invokeinterface #114,  2          // InterfaceMethod java/util/Collection.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
     213: checkcast     #116                // class "[Ljava/util/ArrayList;"
     216: astore_3
     217: iconst_0
     218: istore        4
     220: iload         4
     222: iload_2
     223: if_icmpge     281
     226: iconst_0
     227: istore        5
     229: iload         5
     231: iload_2
     232: if_icmpge     275
     235: aload_1
     236: iload         4
     238: aaload
     239: iload         5
     241: iaload
     242: ifeq          269
     245: aload_3
     246: iload         4
     248: aaload
     249: new           #41                 // class Dijkstra$Edge
     252: dup
     253: iload         5
     255: aload_1
     256: iload         4
     258: aaload
     259: iload         5
     261: iaload
     262: invokespecial #117                // Method Dijkstra$Edge."<init>":(II)V
     265: invokevirtual #118                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     268: pop
     269: iinc          5, 1
     272: goto          229
     275: iinc          4, 1
     278: goto          220
     281: aload_3
     282: invokestatic  #124                // Method java/util/Arrays.toString:([Ljava/lang/Object;)Ljava/lang/String;
     285: dup
     286: ldc           #126                // String toString(...)
     288: invokestatic  #129                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     291: astore        4
     293: getstatic     #135                // Field java/lang/System.out:Ljava/io/PrintStream;
     296: aload         4
     298: invokevirtual #141                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     301: getstatic     #144                // Field INSTANCE:LDijkstra;
     304: aload_3
     305: checkcast     #70                 // class "[Ljava/util/List;"
     308: iconst_0
     309: invokevirtual #146                // Method shortestPaths:([Ljava/util/List;I)LDijkstra$ShortestPaths;
     312: astore        4
     314: aload         4
     316: invokevirtual #150                // Method Dijkstra$ShortestPaths.component1:()[I
     319: astore        5
     321: aload         4
     323: invokevirtual #153                // Method Dijkstra$ShortestPaths.component2:()[I
     326: astore        6
     328: aload         5
     330: iconst_0
     331: iaload
     332: ifne          339
     335: iconst_1
     336: goto          340
     339: iconst_0
     340: istore        7
     342: getstatic     #135                // Field java/lang/System.out:Ljava/io/PrintStream;
     345: iload         7
     347: invokevirtual #156                // Method java/io/PrintStream.println:(Z)V
     350: iconst_3
     351: aload         5
     353: iconst_1
     354: iaload
     355: if_icmpne     362
     358: iconst_1
     359: goto          363
     362: iconst_0
     363: istore        7
     365: getstatic     #135                // Field java/lang/System.out:Ljava/io/PrintStream;
     368: iload         7
     370: invokevirtual #156                // Method java/io/PrintStream.println:(Z)V
     373: iconst_1
     374: aload         5
     376: iconst_2
     377: iaload
     378: if_icmpne     385
     381: iconst_1
     382: goto          386
     385: iconst_0
     386: istore        7
     388: getstatic     #135                // Field java/lang/System.out:Ljava/io/PrintStream;
     391: iload         7
     393: invokevirtual #156                // Method java/io/PrintStream.println:(Z)V
     396: iconst_m1
     397: aload         6
     399: iconst_0
     400: iaload
     401: if_icmpne     408
     404: iconst_1
     405: goto          409
     408: iconst_0
     409: istore        7
     411: getstatic     #135                // Field java/lang/System.out:Ljava/io/PrintStream;
     414: iload         7
     416: invokevirtual #156                // Method java/io/PrintStream.println:(Z)V
     419: aload         6
     421: iconst_1
     422: iaload
     423: ifne          430
     426: iconst_1
     427: goto          431
     430: iconst_0
     431: istore        7
     433: getstatic     #135                // Field java/lang/System.out:Ljava/io/PrintStream;
     436: iload         7
     438: invokevirtual #156                // Method java/io/PrintStream.println:(Z)V
     441: iconst_1
     442: aload         6
     444: iconst_2
     445: iaload
     446: if_icmpne     453
     449: iconst_1
     450: goto          454
     453: iconst_0
     454: istore        7
     456: getstatic     #135                // Field java/lang/System.out:Ljava/io/PrintStream;
     459: iload         7
     461: invokevirtual #156                // Method java/io/PrintStream.println:(Z)V
     464: return

  static {};
    Code:
       0: new           #2                  // class Dijkstra
       3: dup
       4: invokespecial #176                // Method "<init>":()V
       7: putstatic     #144                // Field INSTANCE:LDijkstra;
      10: return
}

Compiled from "Dijkstra.kt"
public final class Dijkstra$Edge {
  private final int target;

  private final int cost;

  public Dijkstra$Edge(int, int);
    Code:
       0: aload_0
       1: invokespecial #9                  // Method java/lang/Object."<init>":()V
       4: aload_0
       5: iload_1
       6: putfield      #13                 // Field target:I
       9: aload_0
      10: iload_2
      11: putfield      #16                 // Field cost:I
      14: return

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

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

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

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

  public final Dijkstra$Edge copy(int, int);
    Code:
       0: new           #2                  // class Dijkstra$Edge
       3: dup
       4: iload_1
       5: iload_2
       6: invokespecial #28                 // Method "<init>":(II)V
       9: areturn

  public static Dijkstra$Edge copy$default(Dijkstra$Edge, int, int, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #13                 // Field target:I
      10: istore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #16                 // Field cost:I
      21: istore_2
      22: aload_0
      23: iload_1
      24: iload_2
      25: invokevirtual #32                 // Method copy:(II)LDijkstra$Edge;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #36                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #37                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #39                 // String Edge(target=
       9: invokevirtual #43                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #13                 // Field target:I
      16: invokevirtual #46                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #48                 // String , cost=
      21: invokevirtual #43                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #16                 // Field cost:I
      28: invokevirtual #46                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #51                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #53                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #13                 // Field target:I
       4: invokestatic  #59                 // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #16                 // Field cost:I
      16: invokestatic  #59                 // Method java/lang/Integer.hashCode:(I)I
      19: iadd
      20: istore_1
      21: iload_1
      22: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Dijkstra$Edge
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Dijkstra$Edge
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field target:I
      25: aload_2
      26: getfield      #13                 // Field target:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #16                 // Field cost:I
      38: aload_2
      39: getfield      #16                 // Field cost:I
      42: if_icmpeq     47
      45: iconst_0
      46: ireturn
      47: iconst_1
      48: ireturn
}

Compiled from "Dijkstra.kt"
public final class Dijkstra$ShortestPaths {
  private final int[] dist;

  private final int[] pred;

  public Dijkstra$ShortestPaths(int[], int[]);
    Code:
       0: aload_1
       1: ldc           #9                  // String dist
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String pred
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #20                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: aload_1
      18: putfield      #23                 // Field dist:[I
      21: aload_0
      22: aload_2
      23: putfield      #25                 // Field pred:[I
      26: return

  public final int[] getDist();
    Code:
       0: aload_0
       1: getfield      #23                 // Field dist:[I
       4: areturn

  public final int[] getPred();
    Code:
       0: aload_0
       1: getfield      #25                 // Field pred:[I
       4: areturn

  public final int[] component1();
    Code:
       0: aload_0
       1: getfield      #23                 // Field dist:[I
       4: areturn

  public final int[] component2();
    Code:
       0: aload_0
       1: getfield      #25                 // Field pred:[I
       4: areturn

  public final Dijkstra$ShortestPaths copy(int[], int[]);
    Code:
       0: aload_1
       1: ldc           #9                  // String dist
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String pred
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Dijkstra$ShortestPaths
      15: dup
      16: aload_1
      17: aload_2
      18: invokespecial #36                 // Method "<init>":([I[I)V
      21: areturn

  public static Dijkstra$ShortestPaths copy$default(Dijkstra$ShortestPaths, int[], int[], int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #23                 // Field dist:[I
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #25                 // Field pred:[I
      21: astore_2
      22: aload_0
      23: aload_1
      24: aload_2
      25: invokevirtual #40                 // Method copy:([I[I)LDijkstra$ShortestPaths;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #44                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #45                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #47                 // String ShortestPaths(dist=
       9: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #23                 // Field dist:[I
      16: invokestatic  #56                 // Method java/util/Arrays.toString:([I)Ljava/lang/String;
      19: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      22: ldc           #58                 // String , pred=
      24: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: aload_0
      28: getfield      #25                 // Field pred:[I
      31: invokestatic  #56                 // Method java/util/Arrays.toString:([I)Ljava/lang/String;
      34: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      37: bipush        41
      39: invokevirtual #61                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      42: invokevirtual #63                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      45: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #23                 // Field dist:[I
       4: invokestatic  #68                 // Method java/util/Arrays.hashCode:([I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #25                 // Field pred:[I
      16: invokestatic  #68                 // Method java/util/Arrays.hashCode:([I)I
      19: iadd
      20: istore_1
      21: iload_1
      22: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Dijkstra$ShortestPaths
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Dijkstra$ShortestPaths
      20: astore_2
      21: aload_0
      22: getfield      #23                 // Field dist:[I
      25: aload_2
      26: getfield      #23                 // Field dist:[I
      29: invokestatic  #77                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: aload_0
      38: getfield      #25                 // Field pred:[I
      41: aload_2
      42: getfield      #25                 // Field pred:[I
      45: invokestatic  #77                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: iconst_1
      54: ireturn
}