import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min

data class Point(val x: Int, val y: Int) {
    companion object {
        fun from(string: String): Point {
            val s = string.split(",").mapNotNull { it.trim().takeUnless { it.isEmpty() } }
            require(s.size == 2)
            return Point(s[0].toInt(), s[1].toInt())
        }
    }
}

data class Line(val a: Point, val b: Point) {
    companion object {
        fun from(string: String): Line {
            val s = string.split("->").mapNotNull { it.trim().takeUnless { it.isEmpty() } }
            require(s.size == 2)
            return Line(Point.from(s[0]), Point.from(s[1]))
        }
    }
}

data class Field(
    val numbers: MutableList<Int>,
    val span: Int
) {
    fun get(x: Int, y: Int): Int = numbers[y * span + x]
    fun inc(x: Int, y: Int) = set(x, y, get(x ,y) + 1)
    fun set(x: Int, y: Int, value: Int) { numbers[y * span + x] = value }

    fun incLine(line: Line) {
        val minx = min(line.a.x, line.b.x)
        val maxx = max(line.a.x, line.b.x)
        val miny = min(line.a.y, line.b.y)
        val maxy = max(line.a.y, line.b.y)
        if (line.a.x == line.b.x) {
            for (y in min(line.a.y, line.b.y)..max(line.a.y, line.b.y)) {
                inc(line.a.x, y)
            }
        } else if (line.a.y == line.b.y) {
            for (x in min(line.a.x, line.b.x)..max(line.a.x, line.b.x)) {
                inc(x, line.a.y)
            }
        } else if (maxx - minx == maxy - miny) {
            var x = line.a.x
            var y = line.a.y
            val dx = if (line.b.x > line.a.x) 1 else -1
            val dy = if (line.b.y > line.a.y) 1 else -1
            do {
                inc(x, y)
                x += dx
                y += dy
            } while (x != line.b.x)
            inc(x, y)
        } else {
            assert(false) { "Invalid line $line" }
        }
    }
}

fun main(args: Array<String>) {
    val values = generateSequence(::readLine)
        .mapNotNull { line -> line.trim().takeUnless { trimmed -> trimmed.isBlank() } }
        .toList()

    val lines = values.map { Line.from(it) }
    val width = lines.maxOf { max(it.a.x, it.b.x) } + 1
    val height = lines.maxOf { max(it.a.y, it.b.y) } + 1

    val field = Field(MutableList(width * height) { 0 }, width)
    for (line in lines) {
        field.incLine(line)
    }

    val count = field.numbers.count { it >= 2 }
    println(count)
}

Compiled from "Day5.kt"
final class Day5Kt$main$values$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function0<java.lang.String> {
  public static final Day5Kt$main$values$1 INSTANCE;

  Day5Kt$main$values$1();
    Code:
       0: aload_0
       1: iconst_0
       2: ldc           #11                 // class kotlin/io/ConsoleKt
       4: ldc           #13                 // String readLine
       6: ldc           #15                 // String readLine()Ljava/lang/String;
       8: iconst_1
       9: invokespecial #18                 // Method kotlin/jvm/internal/FunctionReferenceImpl."<init>":(ILjava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V
      12: return

  public final java.lang.String invoke();
    Code:
       0: invokestatic  #24                 // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: areturn

  public java.lang.Object invoke();
    Code:
       0: aload_0
       1: invokevirtual #27                 // Method invoke:()Ljava/lang/String;
       4: areturn

  static {};
    Code:
       0: new           #2                  // class Day5Kt$main$values$1
       3: dup
       4: invokespecial #30                 // Method "<init>":()V
       7: putstatic     #33                 // Field INSTANCE:LDay5Kt$main$values$1;
      10: return
}

Compiled from "Day5.kt"
public final class Day5Kt {
  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #9                  // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: getstatic     #21                 // Field Day5Kt$main$values$1.INSTANCE:LDay5Kt$main$values$1;
       9: checkcast     #23                 // class kotlin/jvm/functions/Function0
      12: invokestatic  #29                 // Method kotlin/sequences/SequencesKt.generateSequence:(Lkotlin/jvm/functions/Function0;)Lkotlin/sequences/Sequence;
      15: invokedynamic #48,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      20: invokestatic  #52                 // Method kotlin/sequences/SequencesKt.mapNotNull:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      23: invokestatic  #56                 // Method kotlin/sequences/SequencesKt.toList:(Lkotlin/sequences/Sequence;)Ljava/util/List;
      26: astore_1
      27: aload_1
      28: checkcast     #58                 // class java/lang/Iterable
      31: astore_3
      32: iconst_0
      33: istore        4
      35: aload_3
      36: astore        5
      38: new           #60                 // class java/util/ArrayList
      41: dup
      42: aload_3
      43: bipush        10
      45: invokestatic  #66                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      48: invokespecial #70                 // Method java/util/ArrayList."<init>":(I)V
      51: checkcast     #72                 // class java/util/Collection
      54: astore        6
      56: iconst_0
      57: istore        7
      59: aload         5
      61: invokeinterface #76,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      66: astore        8
      68: aload         8
      70: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      75: ifeq          121
      78: aload         8
      80: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      85: astore        9
      87: aload         6
      89: aload         9
      91: checkcast     #88                 // class java/lang/String
      94: astore        10
      96: astore        14
      98: iconst_0
      99: istore        11
     101: getstatic     #94                 // Field Line.Companion:LLine$Companion;
     104: aload         10
     106: invokevirtual #100                // Method Line$Companion.from:(Ljava/lang/String;)LLine;
     109: aload         14
     111: swap
     112: invokeinterface #104,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     117: pop
     118: goto          68
     121: aload         6
     123: checkcast     #106                // class java/util/List
     126: nop
     127: astore_2
     128: aload_2
     129: checkcast     #58                 // class java/lang/Iterable
     132: invokeinterface #76,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     137: astore        5
     139: aload         5
     141: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     146: ifne          157
     149: new           #108                // class java/util/NoSuchElementException
     152: dup
     153: invokespecial #111                // Method java/util/NoSuchElementException."<init>":()V
     156: athrow
     157: aload         5
     159: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     164: checkcast     #90                 // class Line
     167: astore        6
     169: iconst_0
     170: istore        7
     172: aload         6
     174: invokevirtual #115                // Method Line.getA:()LPoint;
     177: invokevirtual #121                // Method Point.getX:()I
     180: aload         6
     182: invokevirtual #124                // Method Line.getB:()LPoint;
     185: invokevirtual #121                // Method Point.getX:()I
     188: invokestatic  #130                // Method java/lang/Math.max:(II)I
     191: nop
     192: istore        6
     194: aload         5
     196: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     201: ifeq          255
     204: aload         5
     206: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     211: checkcast     #90                 // class Line
     214: astore        7
     216: iconst_0
     217: istore        8
     219: aload         7
     221: invokevirtual #115                // Method Line.getA:()LPoint;
     224: invokevirtual #121                // Method Point.getX:()I
     227: aload         7
     229: invokevirtual #124                // Method Line.getB:()LPoint;
     232: invokevirtual #121                // Method Point.getX:()I
     235: invokestatic  #130                // Method java/lang/Math.max:(II)I
     238: nop
     239: istore        7
     241: iload         6
     243: iload         7
     245: if_icmpge     194
     248: iload         7
     250: istore        6
     252: goto          194
     255: iload         6
     257: iconst_1
     258: iadd
     259: istore_3
     260: aload_2
     261: checkcast     #58                 // class java/lang/Iterable
     264: invokeinterface #76,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     269: astore        6
     271: aload         6
     273: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     278: ifne          289
     281: new           #108                // class java/util/NoSuchElementException
     284: dup
     285: invokespecial #111                // Method java/util/NoSuchElementException."<init>":()V
     288: athrow
     289: aload         6
     291: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     296: checkcast     #90                 // class Line
     299: astore        7
     301: iconst_0
     302: istore        8
     304: aload         7
     306: invokevirtual #115                // Method Line.getA:()LPoint;
     309: invokevirtual #133                // Method Point.getY:()I
     312: aload         7
     314: invokevirtual #124                // Method Line.getB:()LPoint;
     317: invokevirtual #133                // Method Point.getY:()I
     320: invokestatic  #130                // Method java/lang/Math.max:(II)I
     323: nop
     324: istore        7
     326: aload         6
     328: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     333: ifeq          387
     336: aload         6
     338: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     343: checkcast     #90                 // class Line
     346: astore        8
     348: iconst_0
     349: istore        9
     351: aload         8
     353: invokevirtual #115                // Method Line.getA:()LPoint;
     356: invokevirtual #133                // Method Point.getY:()I
     359: aload         8
     361: invokevirtual #124                // Method Line.getB:()LPoint;
     364: invokevirtual #133                // Method Point.getY:()I
     367: invokestatic  #130                // Method java/lang/Math.max:(II)I
     370: nop
     371: istore        8
     373: iload         7
     375: iload         8
     377: if_icmpge     326
     380: iload         8
     382: istore        7
     384: goto          326
     387: iload         7
     389: iconst_1
     390: iadd
     391: istore        4
     393: iload_3
     394: iload         4
     396: imul
     397: istore        6
     399: new           #60                 // class java/util/ArrayList
     402: dup
     403: iload         6
     405: invokespecial #70                 // Method java/util/ArrayList."<init>":(I)V
     408: astore        7
     410: iconst_0
     411: istore        8
     413: iload         8
     415: iload         6
     417: if_icmpge     452
     420: iload         8
     422: istore        9
     424: aload         7
     426: iload         9
     428: istore        10
     430: astore        15
     432: iconst_0
     433: istore        11
     435: iconst_0
     436: invokestatic  #139                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     439: aload         15
     441: swap
     442: invokevirtual #140                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     445: pop
     446: iinc          8, 1
     449: goto          413
     452: aload         7
     454: checkcast     #106                // class java/util/List
     457: iload_3
     458: istore        16
     460: astore        17
     462: new           #142                // class Field
     465: dup
     466: aload         17
     468: iload         16
     470: invokespecial #145                // Method Field."<init>":(Ljava/util/List;I)V
     473: astore        5
     475: aload_2
     476: invokeinterface #146,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     481: astore        6
     483: aload         6
     485: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     490: ifeq          515
     493: aload         6
     495: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     500: checkcast     #90                 // class Line
     503: astore        7
     505: aload         5
     507: aload         7
     509: invokevirtual #150                // Method Field.incLine:(LLine;)V
     512: goto          483
     515: aload         5
     517: invokevirtual #154                // Method Field.getNumbers:()Ljava/util/List;
     520: checkcast     #58                 // class java/lang/Iterable
     523: astore        7
     525: iconst_0
     526: istore        8
     528: aload         7
     530: instanceof    #72                 // class java/util/Collection
     533: ifeq          553
     536: aload         7
     538: checkcast     #72                 // class java/util/Collection
     541: invokeinterface #157,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     546: ifeq          553
     549: iconst_0
     550: goto          627
     553: iconst_0
     554: istore        9
     556: aload         7
     558: invokeinterface #76,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     563: astore        10
     565: aload         10
     567: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     572: ifeq          625
     575: aload         10
     577: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     582: astore        11
     584: aload         11
     586: checkcast     #159                // class java/lang/Number
     589: invokevirtual #162                // Method java/lang/Number.intValue:()I
     592: istore        12
     594: iconst_0
     595: istore        13
     597: iload         12
     599: iconst_2
     600: if_icmplt     607
     603: iconst_1
     604: goto          608
     607: iconst_0
     608: ifeq          565
     611: iinc          9, 1
     614: iload         9
     616: ifge          565
     619: invokestatic  #165                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
     622: goto          565
     625: iload         9
     627: istore        6
     629: getstatic     #171                // Field java/lang/System.out:Ljava/io/PrintStream;
     632: iload         6
     634: invokevirtual #176                // Method java/io/PrintStream.println:(I)V
     637: return

  private static final java.lang.String main$lambda$1(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #210                // String line
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #212                // class java/lang/CharSequence
      10: invokestatic  #218                // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
      13: invokevirtual #222                // Method java/lang/Object.toString:()Ljava/lang/String;
      16: astore_1
      17: aload_1
      18: astore_2
      19: iconst_0
      20: istore_3
      21: aload_2
      22: checkcast     #212                // class java/lang/CharSequence
      25: invokestatic  #226                // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
      28: ifne          35
      31: aload_1
      32: goto          36
      35: aconst_null
      36: areturn
}


internal fun countDices(dices: List<Int>, digit: Int) = dices.filter { it == digit }.sum()

enum class YachtCategory(val score: (dices: List<Int>) -> Int) {
    YACHT({ if (it.toSet().size == 1) 50 else 0 }),
    ONES({ countDices(it, 1) }),
    TWOS({ countDices(it, 2) }),
    THREES({ countDices(it, 3) }),
    FOURS({ countDices(it, 4) }),
    FIVES({ countDices(it, 5) }),
    SIXES({ countDices(it, 6) }),
    FULL_HOUSE({ dices ->
        dices
            .groupingBy { it }
            .eachCount()
            .let {
                if (it.values.toSet() != setOf(2,3)) {
                    emptyMap()
                } else {
                    it
                }
            }
            .entries
            .filter { it.value == 2 || it.value == 3 }
            .sumOf { it.key * it.value }
    }),
    FOUR_OF_A_KIND({ dices ->
        dices
            .groupingBy { it }
            .eachCount()
            .entries
            .filter { it.value >= 4 }
            .sumOf { it.key * 4 }
    }),
    LITTLE_STRAIGHT({ if (it.sorted() == listOf(1, 2, 3, 4, 5)) 30 else 0 }),
    BIG_STRAIGHT({ if (it.sorted() == listOf(2, 3, 4, 5, 6)) 30 else 0 }),
    CHOICE({ it.sum() })

}

Compiled from "_Collections.kt"
public final class YachtCategory$_init_$lambda$11$$inlined$groupingBy$1 implements kotlin.collections.Grouping<java.lang.Integer, java.lang.Integer> {
  final java.lang.Iterable $this_groupingBy;

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

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

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

Compiled from "_Collections.kt"
public final class YachtCategory$_init_$lambda$15$$inlined$groupingBy$1 implements kotlin.collections.Grouping<java.lang.Integer, java.lang.Integer> {
  final java.lang.Iterable $this_groupingBy;

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

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

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

Compiled from "YachtCategory.kt"
public final class YachtCategory extends java.lang.Enum<YachtCategory> {
  private final kotlin.jvm.functions.Function1<java.util.List<java.lang.Integer>, java.lang.Integer> score;

  public static final YachtCategory YACHT;

  public static final YachtCategory ONES;

  public static final YachtCategory TWOS;

  public static final YachtCategory THREES;

  public static final YachtCategory FOURS;

  public static final YachtCategory FIVES;

  public static final YachtCategory SIXES;

  public static final YachtCategory FULL_HOUSE;

  public static final YachtCategory FOUR_OF_A_KIND;

  public static final YachtCategory LITTLE_STRAIGHT;

  public static final YachtCategory BIG_STRAIGHT;

  public static final YachtCategory CHOICE;

  private static final YachtCategory[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private YachtCategory(kotlin.jvm.functions.Function1<? super java.util.List<java.lang.Integer>, java.lang.Integer>);
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #11                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: aload_0
       7: aload_3
       8: putfield      #15                 // Field score:Lkotlin/jvm/functions/Function1;
      11: return

  public final kotlin.jvm.functions.Function1<java.util.List<java.lang.Integer>, java.lang.Integer> getScore();
    Code:
       0: aload_0
       1: getfield      #15                 // Field score:Lkotlin/jvm/functions/Function1;
       4: areturn

  public static YachtCategory[] values();
    Code:
       0: getstatic     #31                 // Field $VALUES:[LYachtCategory;
       3: invokevirtual #37                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #38                 // class "[LYachtCategory;"
       9: areturn

  public static YachtCategory valueOf(java.lang.String);
    Code:
       0: ldc           #2                  // class YachtCategory
       2: aload_0
       3: invokestatic  #43                 // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
       6: checkcast     #2                  // class YachtCategory
       9: areturn

  public static kotlin.enums.EnumEntries<YachtCategory> getEntries();
    Code:
       0: getstatic     #51                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final int _init_$lambda$0(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #63                 // class java/lang/Iterable
      10: invokestatic  #69                 // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
      13: invokeinterface #75,  1           // InterfaceMethod java/util/Set.size:()I
      18: iconst_1
      19: if_icmpne     27
      22: bipush        50
      24: goto          28
      27: iconst_0
      28: ireturn

  private static final int _init_$lambda$1(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: iconst_1
       8: invokestatic  #83                 // Method YachtCategoryKt.countDices:(Ljava/util/List;I)I
      11: ireturn

  private static final int _init_$lambda$2(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: iconst_2
       8: invokestatic  #83                 // Method YachtCategoryKt.countDices:(Ljava/util/List;I)I
      11: ireturn

  private static final int _init_$lambda$3(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: iconst_3
       8: invokestatic  #83                 // Method YachtCategoryKt.countDices:(Ljava/util/List;I)I
      11: ireturn

  private static final int _init_$lambda$4(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: iconst_4
       8: invokestatic  #83                 // Method YachtCategoryKt.countDices:(Ljava/util/List;I)I
      11: ireturn

  private static final int _init_$lambda$5(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: iconst_5
       8: invokestatic  #83                 // Method YachtCategoryKt.countDices:(Ljava/util/List;I)I
      11: ireturn

  private static final int _init_$lambda$6(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: bipush        6
       9: invokestatic  #83                 // Method YachtCategoryKt.countDices:(Ljava/util/List;I)I
      12: ireturn

  private static final int _init_$lambda$11(java.util.List);
    Code:
       0: aload_0
       1: ldc           #91                 // String dices
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #63                 // class java/lang/Iterable
      10: astore_1
      11: nop
      12: iconst_0
      13: istore_2
      14: new           #93                 // class YachtCategory$_init_$lambda$11$$inlined$groupingBy$1
      17: dup
      18: aload_1
      19: invokespecial #96                 // Method YachtCategory$_init_$lambda$11$$inlined$groupingBy$1."<init>":(Ljava/lang/Iterable;)V
      22: checkcast     #98                 // class kotlin/collections/Grouping
      25: invokestatic  #104                // Method kotlin/collections/GroupingKt.eachCount:(Lkotlin/collections/Grouping;)Ljava/util/Map;
      28: astore_2
      29: iconst_0
      30: istore_3
      31: aload_2
      32: invokeinterface #109,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
      37: checkcast     #63                 // class java/lang/Iterable
      40: invokestatic  #69                 // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
      43: iconst_2
      44: anewarray     #111                // class java/lang/Integer
      47: astore        4
      49: aload         4
      51: iconst_0
      52: iconst_2
      53: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      56: aastore
      57: aload         4
      59: iconst_1
      60: iconst_3
      61: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      64: aastore
      65: aload         4
      67: invokestatic  #120                // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
      70: invokestatic  #124                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      73: ifne          82
      76: invokestatic  #130                // Method kotlin/collections/MapsKt.emptyMap:()Ljava/util/Map;
      79: goto          83
      82: aload_2
      83: nop
      84: nop
      85: invokeinterface #134,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      90: checkcast     #63                 // class java/lang/Iterable
      93: astore_1
      94: nop
      95: iconst_0
      96: istore_2
      97: aload_1
      98: astore_3
      99: new           #136                // class java/util/ArrayList
     102: dup
     103: invokespecial #139                // Method java/util/ArrayList."<init>":()V
     106: checkcast     #141                // class java/util/Collection
     109: astore        4
     111: iconst_0
     112: istore        5
     114: aload_3
     115: invokeinterface #145,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     120: astore        6
     122: aload         6
     124: invokeinterface #151,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     129: ifeq          206
     132: aload         6
     134: invokeinterface #154,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     139: astore        7
     141: aload         7
     143: checkcast     #156                // class java/util/Map$Entry
     146: astore        8
     148: iconst_0
     149: istore        9
     151: aload         8
     153: invokeinterface #159,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     158: checkcast     #161                // class java/lang/Number
     161: invokevirtual #164                // Method java/lang/Number.intValue:()I
     164: iconst_2
     165: if_icmpeq     185
     168: aload         8
     170: invokeinterface #159,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     175: checkcast     #161                // class java/lang/Number
     178: invokevirtual #164                // Method java/lang/Number.intValue:()I
     181: iconst_3
     182: if_icmpne     189
     185: iconst_1
     186: goto          190
     189: iconst_0
     190: ifeq          122
     193: aload         4
     195: aload         7
     197: invokeinterface #168,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     202: pop
     203: goto          122
     206: aload         4
     208: checkcast     #170                // class java/util/List
     211: nop
     212: checkcast     #63                 // class java/lang/Iterable
     215: astore_1
     216: iconst_0
     217: istore_2
     218: aload_1
     219: invokeinterface #145,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     224: astore_3
     225: aload_3
     226: invokeinterface #151,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     231: ifeq          293
     234: aload_3
     235: invokeinterface #154,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     240: astore        4
     242: iload_2
     243: aload         4
     245: checkcast     #156                // class java/util/Map$Entry
     248: astore        5
     250: istore        10
     252: iconst_0
     253: istore        6
     255: aload         5
     257: invokeinterface #173,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
     262: checkcast     #161                // class java/lang/Number
     265: invokevirtual #164                // Method java/lang/Number.intValue:()I
     268: aload         5
     270: invokeinterface #159,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     275: checkcast     #161                // class java/lang/Number
     278: invokevirtual #164                // Method java/lang/Number.intValue:()I
     281: imul
     282: istore        11
     284: iload         10
     286: iload         11
     288: iadd
     289: istore_2
     290: goto          225
     293: iload_2
     294: ireturn

  private static final int _init_$lambda$15(java.util.List);
    Code:
       0: aload_0
       1: ldc           #91                 // String dices
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #63                 // class java/lang/Iterable
      10: astore_1
      11: nop
      12: iconst_0
      13: istore_2
      14: new           #194                // class YachtCategory$_init_$lambda$15$$inlined$groupingBy$1
      17: dup
      18: aload_1
      19: invokespecial #195                // Method YachtCategory$_init_$lambda$15$$inlined$groupingBy$1."<init>":(Ljava/lang/Iterable;)V
      22: checkcast     #98                 // class kotlin/collections/Grouping
      25: invokestatic  #104                // Method kotlin/collections/GroupingKt.eachCount:(Lkotlin/collections/Grouping;)Ljava/util/Map;
      28: invokeinterface #134,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
      33: checkcast     #63                 // class java/lang/Iterable
      36: astore_1
      37: nop
      38: iconst_0
      39: istore_2
      40: aload_1
      41: astore_3
      42: new           #136                // class java/util/ArrayList
      45: dup
      46: invokespecial #139                // Method java/util/ArrayList."<init>":()V
      49: checkcast     #141                // class java/util/Collection
      52: astore        4
      54: iconst_0
      55: istore        5
      57: aload_3
      58: invokeinterface #145,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      63: astore        6
      65: aload         6
      67: invokeinterface #151,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      72: ifeq          132
      75: aload         6
      77: invokeinterface #154,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      82: astore        7
      84: aload         7
      86: checkcast     #156                // class java/util/Map$Entry
      89: astore        8
      91: iconst_0
      92: istore        9
      94: aload         8
      96: invokeinterface #159,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
     101: checkcast     #161                // class java/lang/Number
     104: invokevirtual #164                // Method java/lang/Number.intValue:()I
     107: iconst_4
     108: if_icmplt     115
     111: iconst_1
     112: goto          116
     115: iconst_0
     116: ifeq          65
     119: aload         4
     121: aload         7
     123: invokeinterface #168,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     128: pop
     129: goto          65
     132: aload         4
     134: checkcast     #170                // class java/util/List
     137: nop
     138: checkcast     #63                 // class java/lang/Iterable
     141: astore_1
     142: iconst_0
     143: istore_2
     144: aload_1
     145: invokeinterface #145,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     150: astore_3
     151: aload_3
     152: invokeinterface #151,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     157: ifeq          207
     160: aload_3
     161: invokeinterface #154,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     166: astore        4
     168: iload_2
     169: aload         4
     171: checkcast     #156                // class java/util/Map$Entry
     174: astore        5
     176: istore        10
     178: iconst_0
     179: istore        6
     181: aload         5
     183: invokeinterface #173,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
     188: checkcast     #161                // class java/lang/Number
     191: invokevirtual #164                // Method java/lang/Number.intValue:()I
     194: iconst_4
     195: imul
     196: istore        11
     198: iload         10
     200: iload         11
     202: iadd
     203: istore_2
     204: goto          151
     207: iload_2
     208: ireturn

  private static final int _init_$lambda$16(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #63                 // class java/lang/Iterable
      10: invokestatic  #202                // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
      13: iconst_5
      14: anewarray     #111                // class java/lang/Integer
      17: astore_1
      18: aload_1
      19: iconst_0
      20: iconst_1
      21: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      24: aastore
      25: aload_1
      26: iconst_1
      27: iconst_2
      28: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      31: aastore
      32: aload_1
      33: iconst_2
      34: iconst_3
      35: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      38: aastore
      39: aload_1
      40: iconst_3
      41: iconst_4
      42: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      45: aastore
      46: aload_1
      47: iconst_4
      48: iconst_5
      49: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      52: aastore
      53: aload_1
      54: invokestatic  #206                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      57: invokestatic  #124                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      60: ifeq          68
      63: bipush        30
      65: goto          69
      68: iconst_0
      69: ireturn

  private static final int _init_$lambda$17(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #63                 // class java/lang/Iterable
      10: invokestatic  #202                // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
      13: iconst_5
      14: anewarray     #111                // class java/lang/Integer
      17: astore_1
      18: aload_1
      19: iconst_0
      20: iconst_2
      21: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      24: aastore
      25: aload_1
      26: iconst_1
      27: iconst_3
      28: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      31: aastore
      32: aload_1
      33: iconst_2
      34: iconst_4
      35: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      38: aastore
      39: aload_1
      40: iconst_3
      41: iconst_5
      42: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      45: aastore
      46: aload_1
      47: iconst_4
      48: bipush        6
      50: invokestatic  #114                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      53: aastore
      54: aload_1
      55: invokestatic  #206                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      58: invokestatic  #124                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      61: ifeq          69
      64: bipush        30
      66: goto          70
      69: iconst_0
      70: ireturn

  private static final int _init_$lambda$18(java.util.List);
    Code:
       0: aload_0
       1: ldc           #55                 // String it
       3: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #63                 // class java/lang/Iterable
      10: invokestatic  #212                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
      13: ireturn

  private static final YachtCategory[] $values();
    Code:
       0: bipush        12
       2: anewarray     #2                  // class YachtCategory
       5: astore_0
       6: aload_0
       7: iconst_0
       8: getstatic     #216                // Field YACHT:LYachtCategory;
      11: aastore
      12: aload_0
      13: iconst_1
      14: getstatic     #219                // Field ONES:LYachtCategory;
      17: aastore
      18: aload_0
      19: iconst_2
      20: getstatic     #222                // Field TWOS:LYachtCategory;
      23: aastore
      24: aload_0
      25: iconst_3
      26: getstatic     #225                // Field THREES:LYachtCategory;
      29: aastore
      30: aload_0
      31: iconst_4
      32: getstatic     #228                // Field FOURS:LYachtCategory;
      35: aastore
      36: aload_0
      37: iconst_5
      38: getstatic     #231                // Field FIVES:LYachtCategory;
      41: aastore
      42: aload_0
      43: bipush        6
      45: getstatic     #234                // Field SIXES:LYachtCategory;
      48: aastore
      49: aload_0
      50: bipush        7
      52: getstatic     #237                // Field FULL_HOUSE:LYachtCategory;
      55: aastore
      56: aload_0
      57: bipush        8
      59: getstatic     #240                // Field FOUR_OF_A_KIND:LYachtCategory;
      62: aastore
      63: aload_0
      64: bipush        9
      66: getstatic     #243                // Field LITTLE_STRAIGHT:LYachtCategory;
      69: aastore
      70: aload_0
      71: bipush        10
      73: getstatic     #246                // Field BIG_STRAIGHT:LYachtCategory;
      76: aastore
      77: aload_0
      78: bipush        11
      80: getstatic     #249                // Field CHOICE:LYachtCategory;
      83: aastore
      84: aload_0
      85: areturn

  static {};
    Code:
       0: new           #2                  // class YachtCategory
       3: dup
       4: ldc           #251                // String YACHT
       6: iconst_0
       7: invokedynamic #268,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      12: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
      15: putstatic     #216                // Field YACHT:LYachtCategory;
      18: new           #2                  // class YachtCategory
      21: dup
      22: ldc_w         #271                // String ONES
      25: iconst_1
      26: invokedynamic #275,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function1;
      31: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
      34: putstatic     #219                // Field ONES:LYachtCategory;
      37: new           #2                  // class YachtCategory
      40: dup
      41: ldc_w         #276                // String TWOS
      44: iconst_2
      45: invokedynamic #280,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function1;
      50: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
      53: putstatic     #222                // Field TWOS:LYachtCategory;
      56: new           #2                  // class YachtCategory
      59: dup
      60: ldc_w         #281                // String THREES
      63: iconst_3
      64: invokedynamic #285,  0            // InvokeDynamic #3:invoke:()Lkotlin/jvm/functions/Function1;
      69: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
      72: putstatic     #225                // Field THREES:LYachtCategory;
      75: new           #2                  // class YachtCategory
      78: dup
      79: ldc_w         #286                // String FOURS
      82: iconst_4
      83: invokedynamic #290,  0            // InvokeDynamic #4:invoke:()Lkotlin/jvm/functions/Function1;
      88: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
      91: putstatic     #228                // Field FOURS:LYachtCategory;
      94: new           #2                  // class YachtCategory
      97: dup
      98: ldc_w         #291                // String FIVES
     101: iconst_5
     102: invokedynamic #295,  0            // InvokeDynamic #5:invoke:()Lkotlin/jvm/functions/Function1;
     107: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
     110: putstatic     #231                // Field FIVES:LYachtCategory;
     113: new           #2                  // class YachtCategory
     116: dup
     117: ldc_w         #296                // String SIXES
     120: bipush        6
     122: invokedynamic #300,  0            // InvokeDynamic #6:invoke:()Lkotlin/jvm/functions/Function1;
     127: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
     130: putstatic     #234                // Field SIXES:LYachtCategory;
     133: new           #2                  // class YachtCategory
     136: dup
     137: ldc_w         #301                // String FULL_HOUSE
     140: bipush        7
     142: invokedynamic #305,  0            // InvokeDynamic #7:invoke:()Lkotlin/jvm/functions/Function1;
     147: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
     150: putstatic     #237                // Field FULL_HOUSE:LYachtCategory;
     153: new           #2                  // class YachtCategory
     156: dup
     157: ldc_w         #306                // String FOUR_OF_A_KIND
     160: bipush        8
     162: invokedynamic #310,  0            // InvokeDynamic #8:invoke:()Lkotlin/jvm/functions/Function1;
     167: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
     170: putstatic     #240                // Field FOUR_OF_A_KIND:LYachtCategory;
     173: new           #2                  // class YachtCategory
     176: dup
     177: ldc_w         #311                // String LITTLE_STRAIGHT
     180: bipush        9
     182: invokedynamic #315,  0            // InvokeDynamic #9:invoke:()Lkotlin/jvm/functions/Function1;
     187: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
     190: putstatic     #243                // Field LITTLE_STRAIGHT:LYachtCategory;
     193: new           #2                  // class YachtCategory
     196: dup
     197: ldc_w         #316                // String BIG_STRAIGHT
     200: bipush        10
     202: invokedynamic #320,  0            // InvokeDynamic #10:invoke:()Lkotlin/jvm/functions/Function1;
     207: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
     210: putstatic     #246                // Field BIG_STRAIGHT:LYachtCategory;
     213: new           #2                  // class YachtCategory
     216: dup
     217: ldc_w         #321                // String CHOICE
     220: bipush        11
     222: invokedynamic #325,  0            // InvokeDynamic #11:invoke:()Lkotlin/jvm/functions/Function1;
     227: invokespecial #270                // Method "<init>":(Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
     230: putstatic     #249                // Field CHOICE:LYachtCategory;
     233: invokestatic  #327                // Method $values:()[LYachtCategory;
     236: putstatic     #31                 // Field $VALUES:[LYachtCategory;
     239: getstatic     #31                 // Field $VALUES:[LYachtCategory;
     242: checkcast     #329                // class "[Ljava/lang/Enum;"
     245: invokestatic  #335                // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
     248: putstatic     #51                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
     251: return
}

Compiled from "YachtCategory.kt"
public final class YachtCategoryKt {
  public static final int countDices(java.util.List<java.lang.Integer>, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String dices
       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_0
      12: istore_3
      13: aload_2
      14: astore        4
      16: new           #20                 // class java/util/ArrayList
      19: dup
      20: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
      23: checkcast     #26                 // class java/util/Collection
      26: astore        5
      28: iconst_0
      29: istore        6
      31: aload         4
      33: invokeinterface #30,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      38: astore        7
      40: aload         7
      42: invokeinterface #36,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      47: ifeq          99
      50: aload         7
      52: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      57: astore        8
      59: aload         8
      61: checkcast     #42                 // class java/lang/Number
      64: invokevirtual #46                 // Method java/lang/Number.intValue:()I
      67: istore        9
      69: iconst_0
      70: istore        10
      72: iload         9
      74: iload_1
      75: if_icmpne     82
      78: iconst_1
      79: goto          83
      82: iconst_0
      83: ifeq          40
      86: aload         5
      88: aload         8
      90: invokeinterface #50,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      95: pop
      96: goto          40
      99: aload         5
     101: checkcast     #52                 // class java/util/List
     104: nop
     105: checkcast     #18                 // class java/lang/Iterable
     108: invokestatic  #58                 // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     111: ireturn
}


class Forth {

    companion object {
        private val OPS: Map<String, (List<Int>) -> List<Int>> = mapOf(
            "+" to {
                require(it.size >= 2) { "tsk-tsk-tsk" }
                it.dropLast(2) + it.takeLast(2).sum()
            },
            "-" to {
                require(it.size >= 2) { "tsk-tsk-tsk" }
                it.dropLast(2) + it.takeLast(2).reduce { acc, i -> acc - i }
            },
            "*" to {
                require(it.size >= 2) { "tsk-tsk-tsk" }
                it.dropLast(2) + it.takeLast(2).reduce { acc, i -> acc * i }
            },
            "/" to {
                require(it.size >= 2 && it[1] != 0) { "tsk-tsk-tsk" }
                it.dropLast(2) + it.takeLast(2).reduce { acc, i -> acc / i }
            },
            "dup" to {
                require(it.isNotEmpty()) { "tsk-tsk-tsk" }
                it + it.last()
            },
            "drop" to {
                require(it.isNotEmpty()) { "tsk-tsk-tsk" }
                it.dropLast(1)
            },
            "swap" to {
                require(it.size >= 2) { "tsk-tsk-tsk" }
                val sub = it.takeLast(2)
                it.dropLast(2) + sub.last() + sub[0]
            },
            "over" to {
                require(it.size >= 2) { "tsk-tsk-tsk" }
                it + it[it.size - 2]
            }
        )
    }

    fun evaluate(vararg line: String) = processReplacements(line.asList())
        .fold(listOf<List<Int>>()) { acc, s -> acc + listOf(evaluateLine(s)) }
        .flatMap { it.toList() }

    private fun processReplacements(lines: List<String>): List<String> {
        val replacements = mutableMapOf<String, String>()
        return lines.mapNotNull {
            val line = it.lowercase()
            if (line.matches(Regex(":.*;"))) {
                updateReplacementsMap(line, replacements)
                null
            } else {
                prepareLine(line, replacements)
            }
        }

    }

    private fun updateReplacementsMap(
        line: String,
        replacements: MutableMap<String, String>
    ) {
        val commandDefinition = line.substring(1, line.length - 2).trim()
        val spaceIndex = commandDefinition.indexOf(" ")
        val key = commandDefinition.substring(0, spaceIndex)
        require(key.toDoubleOrNull() == null) { "You can't redefine a number" }
        val value = commandDefinition.substring(spaceIndex + 1)
        replacements[key] = prepareLine(value, replacements)
    }

    private fun prepareLine(line: String, replacements: MutableMap<String, String>) = line.split(" ")
        .map { token ->
            if (replacements.containsKey(token)) {
                replacements[token]
            } else {
                token
            }
        }
        .joinToString(" ")

    private fun evaluateLine(line: String): List<Int> {
        return line.lowercase().split(" ")
            .fold(listOf()) { acc, c ->
                when {
                    c.toIntOrNull() != null -> acc + c.toInt()
                    c in OPS.keys -> OPS[c]!!.invoke(acc)
                    else -> throw IllegalArgumentException("Incorrect input")
                }
            }

    }
}

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

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

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

  private static final java.util.Map<java.lang.String, kotlin.jvm.functions.Function1<java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>>> OPS;

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

  public final java.util.List<java.lang.Integer> evaluate(java.lang.String...);
    Code:
       0: aload_1
       1: ldc           #16                 // String line
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: invokestatic  #28                 // Method kotlin/collections/ArraysKt.asList:([Ljava/lang/Object;)Ljava/util/List;
      11: invokespecial #32                 // Method processReplacements:(Ljava/util/List;)Ljava/util/List;
      14: checkcast     #34                 // class java/lang/Iterable
      17: astore_2
      18: invokestatic  #40                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      21: astore_3
      22: nop
      23: iconst_0
      24: istore        4
      26: aload_3
      27: astore        5
      29: aload_2
      30: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      35: astore        6
      37: aload         6
      39: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      44: ifeq          95
      47: aload         6
      49: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      54: astore        7
      56: aload         5
      58: aload         7
      60: checkcast     #56                 // class java/lang/String
      63: astore        8
      65: astore        9
      67: iconst_0
      68: istore        10
      70: aload         9
      72: checkcast     #58                 // class java/util/Collection
      75: aload_0
      76: aload         8
      78: invokespecial #62                 // Method evaluateLine:(Ljava/lang/String;)Ljava/util/List;
      81: invokestatic  #66                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      84: checkcast     #34                 // class java/lang/Iterable
      87: invokestatic  #70                 // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
      90: astore        5
      92: goto          37
      95: aload         5
      97: checkcast     #34                 // class java/lang/Iterable
     100: astore_2
     101: nop
     102: iconst_0
     103: istore_3
     104: aload_2
     105: astore        4
     107: new           #72                 // class java/util/ArrayList
     110: dup
     111: invokespecial #73                 // Method java/util/ArrayList."<init>":()V
     114: checkcast     #58                 // class java/util/Collection
     117: astore        5
     119: iconst_0
     120: istore        6
     122: aload         4
     124: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     129: astore        7
     131: aload         7
     133: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     138: ifeq          184
     141: aload         7
     143: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     148: astore        8
     150: aload         8
     152: checkcast     #75                 // class java/util/List
     155: astore        9
     157: iconst_0
     158: istore        10
     160: aload         9
     162: checkcast     #34                 // class java/lang/Iterable
     165: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
     168: checkcast     #34                 // class java/lang/Iterable
     171: astore        9
     173: aload         5
     175: aload         9
     177: invokestatic  #83                 // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     180: pop
     181: goto          131
     184: aload         5
     186: checkcast     #75                 // class java/util/List
     189: nop
     190: areturn

  private final java.util.List<java.lang.String> processReplacements(java.util.List<java.lang.String>);
    Code:
       0: new           #111                // class java/util/LinkedHashMap
       3: dup
       4: invokespecial #112                // Method java/util/LinkedHashMap."<init>":()V
       7: checkcast     #114                // class java/util/Map
      10: astore_2
      11: aload_1
      12: checkcast     #34                 // class java/lang/Iterable
      15: astore_3
      16: iconst_0
      17: istore        4
      19: aload_3
      20: astore        5
      22: new           #72                 // class java/util/ArrayList
      25: dup
      26: invokespecial #73                 // Method java/util/ArrayList."<init>":()V
      29: checkcast     #58                 // class java/util/Collection
      32: astore        6
      34: iconst_0
      35: istore        7
      37: aload         5
      39: astore        8
      41: iconst_0
      42: istore        9
      44: aload         8
      46: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      51: astore        10
      53: aload         10
      55: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      60: ifeq          175
      63: aload         10
      65: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      70: astore        11
      72: aload         11
      74: astore        12
      76: iconst_0
      77: istore        13
      79: aload         12
      81: checkcast     #56                 // class java/lang/String
      84: astore        14
      86: iconst_0
      87: istore        15
      89: aload         14
      91: getstatic     #120                // Field java/util/Locale.ROOT:Ljava/util/Locale;
      94: invokevirtual #124                // Method java/lang/String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
      97: dup
      98: ldc           #126                // String toLowerCase(...)
     100: invokestatic  #129                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     103: astore        16
     105: aload         16
     107: checkcast     #131                // class java/lang/CharSequence
     110: astore        17
     112: new           #133                // class kotlin/text/Regex
     115: dup
     116: ldc           #135                // String :.*;
     118: invokespecial #138                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     121: aload         17
     123: invokevirtual #142                // Method kotlin/text/Regex.matches:(Ljava/lang/CharSequence;)Z
     126: ifeq          140
     129: aload_0
     130: aload         16
     132: aload_2
     133: invokespecial #146                // Method updateReplacementsMap:(Ljava/lang/String;Ljava/util/Map;)V
     136: aconst_null
     137: goto          147
     140: aload_0
     141: aload         16
     143: aload_2
     144: invokespecial #150                // Method prepareLine:(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/String;
     147: nop
     148: dup
     149: ifnull        170
     152: astore        18
     154: iconst_0
     155: istore        19
     157: aload         6
     159: aload         18
     161: invokeinterface #154,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     166: pop
     167: goto          171
     170: pop
     171: nop
     172: goto          53
     175: nop
     176: aload         6
     178: checkcast     #75                 // class java/util/List
     181: nop
     182: areturn

  private final void updateReplacementsMap(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
    Code:
       0: nop
       1: aload_1
       2: iconst_1
       3: aload_1
       4: invokevirtual #173                // Method java/lang/String.length:()I
       7: iconst_2
       8: isub
       9: invokevirtual #177                // Method java/lang/String.substring:(II)Ljava/lang/String;
      12: dup
      13: ldc           #179                // String substring(...)
      15: invokestatic  #129                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      18: checkcast     #131                // class java/lang/CharSequence
      21: invokestatic  #185                // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
      24: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      27: astore_3
      28: aload_3
      29: checkcast     #131                // class java/lang/CharSequence
      32: ldc           #191                // String
      34: iconst_0
      35: iconst_0
      36: bipush        6
      38: aconst_null
      39: invokestatic  #195                // Method kotlin/text/StringsKt.indexOf$default:(Ljava/lang/CharSequence;Ljava/lang/String;IZILjava/lang/Object;)I
      42: istore        4
      44: aload_3
      45: iconst_0
      46: iload         4
      48: invokevirtual #177                // Method java/lang/String.substring:(II)Ljava/lang/String;
      51: dup
      52: ldc           #179                // String substring(...)
      54: invokestatic  #129                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      57: astore        5
      59: aload         5
      61: invokestatic  #199                // Method kotlin/text/StringsKt.toDoubleOrNull:(Ljava/lang/String;)Ljava/lang/Double;
      64: ifnonnull     71
      67: iconst_1
      68: goto          72
      71: iconst_0
      72: ifne          95
      75: iconst_0
      76: istore        7
      78: ldc           #201                // String You can\'t redefine a number
      80: astore        7
      82: new           #203                // class java/lang/IllegalArgumentException
      85: dup
      86: aload         7
      88: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      91: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      94: athrow
      95: aload_3
      96: iload         4
      98: iconst_1
      99: iadd
     100: invokevirtual #207                // Method java/lang/String.substring:(I)Ljava/lang/String;
     103: dup
     104: ldc           #179                // String substring(...)
     106: invokestatic  #129                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     109: astore        6
     111: aload_2
     112: aload         5
     114: aload_0
     115: aload         6
     117: aload_2
     118: invokespecial #150                // Method prepareLine:(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/String;
     121: invokeinterface #211,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     126: pop
     127: return

  private final java.lang.String prepareLine(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
    Code:
       0: aload_1
       1: checkcast     #131                // class java/lang/CharSequence
       4: iconst_1
       5: anewarray     #56                 // class java/lang/String
       8: astore_3
       9: aload_3
      10: iconst_0
      11: ldc           #191                // String
      13: aastore
      14: aload_3
      15: iconst_0
      16: iconst_0
      17: bipush        6
      19: aconst_null
      20: invokestatic  #221                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      23: checkcast     #34                 // class java/lang/Iterable
      26: astore_3
      27: nop
      28: iconst_0
      29: istore        4
      31: aload_3
      32: astore        5
      34: new           #72                 // class java/util/ArrayList
      37: dup
      38: aload_3
      39: bipush        10
      41: invokestatic  #225                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      44: invokespecial #228                // Method java/util/ArrayList."<init>":(I)V
      47: checkcast     #58                 // class java/util/Collection
      50: astore        6
      52: iconst_0
      53: istore        7
      55: aload         5
      57: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      62: astore        8
      64: aload         8
      66: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      71: ifeq          137
      74: aload         8
      76: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      81: astore        9
      83: aload         6
      85: aload         9
      87: checkcast     #56                 // class java/lang/String
      90: astore        10
      92: astore        12
      94: iconst_0
      95: istore        11
      97: aload_2
      98: aload         10
     100: invokeinterface #231,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     105: ifeq          122
     108: aload_2
     109: aload         10
     111: invokeinterface #235,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     116: checkcast     #56                 // class java/lang/String
     119: goto          124
     122: aload         10
     124: nop
     125: aload         12
     127: swap
     128: invokeinterface #154,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     133: pop
     134: goto          64
     137: aload         6
     139: checkcast     #75                 // class java/util/List
     142: nop
     143: checkcast     #34                 // class java/lang/Iterable
     146: ldc           #191                // String
     148: checkcast     #131                // class java/lang/CharSequence
     151: aconst_null
     152: aconst_null
     153: iconst_0
     154: aconst_null
     155: aconst_null
     156: bipush        62
     158: aconst_null
     159: invokestatic  #239                // Method kotlin/collections/CollectionsKt.joinToString$default:(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
     162: areturn

  private final java.util.List<java.lang.Integer> evaluateLine(java.lang.String);
    Code:
       0: aload_1
       1: getstatic     #120                // Field java/util/Locale.ROOT:Ljava/util/Locale;
       4: invokevirtual #124                // Method java/lang/String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
       7: dup
       8: ldc           #126                // String toLowerCase(...)
      10: invokestatic  #129                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      13: checkcast     #131                // class java/lang/CharSequence
      16: iconst_1
      17: anewarray     #56                 // class java/lang/String
      20: astore_2
      21: aload_2
      22: iconst_0
      23: ldc           #191                // String
      25: aastore
      26: aload_2
      27: iconst_0
      28: iconst_0
      29: bipush        6
      31: aconst_null
      32: invokestatic  #221                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      35: checkcast     #34                 // class java/lang/Iterable
      38: astore_2
      39: invokestatic  #40                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      42: astore_3
      43: nop
      44: iconst_0
      45: istore        4
      47: aload_3
      48: astore        5
      50: aload_2
      51: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      56: astore        6
      58: aload         6
      60: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      65: ifeq          184
      68: aload         6
      70: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      75: astore        7
      77: aload         5
      79: aload         7
      81: checkcast     #56                 // class java/lang/String
      84: astore        8
      86: astore        9
      88: iconst_0
      89: istore        10
      91: nop
      92: aload         8
      94: invokestatic  #251                // Method kotlin/text/StringsKt.toIntOrNull:(Ljava/lang/String;)Ljava/lang/Integer;
      97: ifnull        119
     100: aload         9
     102: checkcast     #58                 // class java/util/Collection
     105: aload         8
     107: invokestatic  #257                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     110: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     113: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     116: goto          178
     119: getstatic     #267                // Field OPS:Ljava/util/Map;
     122: invokeinterface #271,  1          // InterfaceMethod java/util/Map.keySet:()Ljava/util/Set;
     127: aload         8
     129: invokeinterface #276,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     134: ifeq          167
     137: getstatic     #267                // Field OPS:Ljava/util/Map;
     140: aload         8
     142: invokeinterface #235,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     147: dup
     148: invokestatic  #280                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     151: checkcast     #282                // class kotlin/jvm/functions/Function1
     154: aload         9
     156: invokeinterface #285,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     161: checkcast     #75                 // class java/util/List
     164: goto          178
     167: new           #203                // class java/lang/IllegalArgumentException
     170: dup
     171: ldc_w         #287                // String Incorrect input
     174: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     177: athrow
     178: nop
     179: astore        5
     181: goto          58
     184: aload         5
     186: areturn

  private static final java.util.List OPS$lambda$7(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #294,  1          // InterfaceMethod java/util/List.size:()I
      13: iconst_2
      14: if_icmplt     21
      17: iconst_1
      18: goto          22
      21: iconst_0
      22: ifne          43
      25: iconst_0
      26: istore_1
      27: ldc_w         #296                // String tsk-tsk-tsk
      30: astore_1
      31: new           #203                // class java/lang/IllegalArgumentException
      34: dup
      35: aload_1
      36: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      39: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      42: athrow
      43: aload_0
      44: iconst_2
      45: invokestatic  #300                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      48: checkcast     #58                 // class java/util/Collection
      51: aload_0
      52: iconst_2
      53: invokestatic  #303                // Method kotlin/collections/CollectionsKt.takeLast:(Ljava/util/List;I)Ljava/util/List;
      56: checkcast     #34                 // class java/lang/Iterable
      59: invokestatic  #307                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
      62: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      65: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      68: areturn

  private static final java.util.List OPS$lambda$10(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #294,  1          // InterfaceMethod java/util/List.size:()I
      13: iconst_2
      14: if_icmplt     21
      17: iconst_1
      18: goto          22
      21: iconst_0
      22: ifne          43
      25: iconst_0
      26: istore_2
      27: ldc_w         #296                // String tsk-tsk-tsk
      30: astore_2
      31: new           #203                // class java/lang/IllegalArgumentException
      34: dup
      35: aload_2
      36: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      39: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      42: athrow
      43: aload_0
      44: iconst_2
      45: invokestatic  #300                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      48: checkcast     #58                 // class java/util/Collection
      51: aload_0
      52: iconst_2
      53: invokestatic  #303                // Method kotlin/collections/CollectionsKt.takeLast:(Ljava/util/List;I)Ljava/util/List;
      56: checkcast     #34                 // class java/lang/Iterable
      59: astore_1
      60: astore        8
      62: iconst_0
      63: istore_2
      64: aload_1
      65: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      70: astore_3
      71: aload_3
      72: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      77: ifne          91
      80: new           #311                // class java/lang/UnsupportedOperationException
      83: dup
      84: ldc_w         #313                // String Empty collection can\'t be reduced.
      87: invokespecial #314                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
      90: athrow
      91: aload_3
      92: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      97: astore        4
      99: aload_3
     100: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     105: ifeq          148
     108: aload         4
     110: aload_3
     111: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     116: checkcast     #316                // class java/lang/Number
     119: invokevirtual #319                // Method java/lang/Number.intValue:()I
     122: istore        5
     124: checkcast     #316                // class java/lang/Number
     127: invokevirtual #319                // Method java/lang/Number.intValue:()I
     130: istore        6
     132: iconst_0
     133: istore        7
     135: iload         6
     137: iload         5
     139: isub
     140: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     143: astore        4
     145: goto          99
     148: aload         4
     150: aload         8
     152: swap
     153: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     156: areturn

  private static final java.util.List OPS$lambda$13(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #294,  1          // InterfaceMethod java/util/List.size:()I
      13: iconst_2
      14: if_icmplt     21
      17: iconst_1
      18: goto          22
      21: iconst_0
      22: ifne          43
      25: iconst_0
      26: istore_2
      27: ldc_w         #296                // String tsk-tsk-tsk
      30: astore_2
      31: new           #203                // class java/lang/IllegalArgumentException
      34: dup
      35: aload_2
      36: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      39: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      42: athrow
      43: aload_0
      44: iconst_2
      45: invokestatic  #300                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      48: checkcast     #58                 // class java/util/Collection
      51: aload_0
      52: iconst_2
      53: invokestatic  #303                // Method kotlin/collections/CollectionsKt.takeLast:(Ljava/util/List;I)Ljava/util/List;
      56: checkcast     #34                 // class java/lang/Iterable
      59: astore_1
      60: astore        8
      62: iconst_0
      63: istore_2
      64: aload_1
      65: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      70: astore_3
      71: aload_3
      72: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      77: ifne          91
      80: new           #311                // class java/lang/UnsupportedOperationException
      83: dup
      84: ldc_w         #313                // String Empty collection can\'t be reduced.
      87: invokespecial #314                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
      90: athrow
      91: aload_3
      92: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      97: astore        4
      99: aload_3
     100: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     105: ifeq          148
     108: aload         4
     110: aload_3
     111: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     116: checkcast     #316                // class java/lang/Number
     119: invokevirtual #319                // Method java/lang/Number.intValue:()I
     122: istore        5
     124: checkcast     #316                // class java/lang/Number
     127: invokevirtual #319                // Method java/lang/Number.intValue:()I
     130: istore        6
     132: iconst_0
     133: istore        7
     135: iload         6
     137: iload         5
     139: imul
     140: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     143: astore        4
     145: goto          99
     148: aload         4
     150: aload         8
     152: swap
     153: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     156: areturn

  private static final java.util.List OPS$lambda$16(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #294,  1          // InterfaceMethod java/util/List.size:()I
      13: iconst_2
      14: if_icmplt     37
      17: aload_0
      18: iconst_1
      19: invokeinterface #333,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      24: checkcast     #316                // class java/lang/Number
      27: invokevirtual #319                // Method java/lang/Number.intValue:()I
      30: ifeq          37
      33: iconst_1
      34: goto          38
      37: iconst_0
      38: ifne          59
      41: iconst_0
      42: istore_2
      43: ldc_w         #296                // String tsk-tsk-tsk
      46: astore_2
      47: new           #203                // class java/lang/IllegalArgumentException
      50: dup
      51: aload_2
      52: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      55: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      58: athrow
      59: aload_0
      60: iconst_2
      61: invokestatic  #300                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      64: checkcast     #58                 // class java/util/Collection
      67: aload_0
      68: iconst_2
      69: invokestatic  #303                // Method kotlin/collections/CollectionsKt.takeLast:(Ljava/util/List;I)Ljava/util/List;
      72: checkcast     #34                 // class java/lang/Iterable
      75: astore_1
      76: astore        8
      78: iconst_0
      79: istore_2
      80: aload_1
      81: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      86: astore_3
      87: aload_3
      88: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      93: ifne          107
      96: new           #311                // class java/lang/UnsupportedOperationException
      99: dup
     100: ldc_w         #313                // String Empty collection can\'t be reduced.
     103: invokespecial #314                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     106: athrow
     107: aload_3
     108: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     113: astore        4
     115: aload_3
     116: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     121: ifeq          164
     124: aload         4
     126: aload_3
     127: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     132: checkcast     #316                // class java/lang/Number
     135: invokevirtual #319                // Method java/lang/Number.intValue:()I
     138: istore        5
     140: checkcast     #316                // class java/lang/Number
     143: invokevirtual #319                // Method java/lang/Number.intValue:()I
     146: istore        6
     148: iconst_0
     149: istore        7
     151: iload         6
     153: iload         5
     155: idiv
     156: invokestatic  #261                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     159: astore        4
     161: goto          115
     164: aload         4
     166: aload         8
     168: swap
     169: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     172: areturn

  private static final java.util.List OPS$lambda$18(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: checkcast     #58                 // class java/util/Collection
      11: invokeinterface #339,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      16: ifne          23
      19: iconst_1
      20: goto          24
      23: iconst_0
      24: ifne          45
      27: iconst_0
      28: istore_1
      29: ldc_w         #296                // String tsk-tsk-tsk
      32: astore_1
      33: new           #203                // class java/lang/IllegalArgumentException
      36: dup
      37: aload_1
      38: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      41: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      44: athrow
      45: aload_0
      46: checkcast     #58                 // class java/util/Collection
      49: aload_0
      50: invokestatic  #343                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      53: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      56: areturn

  private static final java.util.List OPS$lambda$20(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: checkcast     #58                 // class java/util/Collection
      11: invokeinterface #339,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      16: ifne          23
      19: iconst_1
      20: goto          24
      23: iconst_0
      24: ifne          45
      27: iconst_0
      28: istore_1
      29: ldc_w         #296                // String tsk-tsk-tsk
      32: astore_1
      33: new           #203                // class java/lang/IllegalArgumentException
      36: dup
      37: aload_1
      38: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      41: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      44: athrow
      45: aload_0
      46: iconst_1
      47: invokestatic  #300                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      50: areturn

  private static final java.util.List OPS$lambda$22(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #294,  1          // InterfaceMethod java/util/List.size:()I
      13: iconst_2
      14: if_icmplt     21
      17: iconst_1
      18: goto          22
      21: iconst_0
      22: ifne          43
      25: iconst_0
      26: istore_2
      27: ldc_w         #296                // String tsk-tsk-tsk
      30: astore_2
      31: new           #203                // class java/lang/IllegalArgumentException
      34: dup
      35: aload_2
      36: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      39: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      42: athrow
      43: aload_0
      44: iconst_2
      45: invokestatic  #303                // Method kotlin/collections/CollectionsKt.takeLast:(Ljava/util/List;I)Ljava/util/List;
      48: astore_1
      49: aload_0
      50: iconst_2
      51: invokestatic  #300                // Method kotlin/collections/CollectionsKt.dropLast:(Ljava/util/List;I)Ljava/util/List;
      54: checkcast     #58                 // class java/util/Collection
      57: aload_1
      58: invokestatic  #343                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      61: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      64: checkcast     #58                 // class java/util/Collection
      67: aload_1
      68: iconst_0
      69: invokeinterface #333,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      74: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      77: areturn

  private static final java.util.List OPS$lambda$24(java.util.List);
    Code:
       0: aload_0
       1: ldc_w         #291                // String it
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #294,  1          // InterfaceMethod java/util/List.size:()I
      13: iconst_2
      14: if_icmplt     21
      17: iconst_1
      18: goto          22
      21: iconst_0
      22: ifne          43
      25: iconst_0
      26: istore_1
      27: ldc_w         #296                // String tsk-tsk-tsk
      30: astore_1
      31: new           #203                // class java/lang/IllegalArgumentException
      34: dup
      35: aload_1
      36: invokevirtual #189                // Method java/lang/Object.toString:()Ljava/lang/String;
      39: invokespecial #204                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      42: athrow
      43: aload_0
      44: checkcast     #58                 // class java/util/Collection
      47: aload_0
      48: aload_0
      49: invokeinterface #294,  1          // InterfaceMethod java/util/List.size:()I
      54: iconst_2
      55: isub
      56: invokeinterface #333,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      61: invokestatic  #264                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      64: areturn

  static {};
    Code:
       0: new           #354                // class Forth$Companion
       3: dup
       4: aconst_null
       5: invokespecial #357                // Method Forth$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #361                // Field Companion:LForth$Companion;
      11: bipush        8
      13: anewarray     #363                // class kotlin/Pair
      16: astore_0
      17: aload_0
      18: iconst_0
      19: ldc_w         #365                // String +
      22: invokedynamic #380,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      27: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      30: aastore
      31: aload_0
      32: iconst_1
      33: ldc_w         #388                // String -
      36: invokedynamic #392,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function1;
      41: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      44: aastore
      45: aload_0
      46: iconst_2
      47: ldc_w         #394                // String *
      50: invokedynamic #398,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function1;
      55: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      58: aastore
      59: aload_0
      60: iconst_3
      61: ldc_w         #400                // String /
      64: invokedynamic #404,  0            // InvokeDynamic #3:invoke:()Lkotlin/jvm/functions/Function1;
      69: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      72: aastore
      73: aload_0
      74: iconst_4
      75: ldc_w         #406                // String dup
      78: invokedynamic #410,  0            // InvokeDynamic #4:invoke:()Lkotlin/jvm/functions/Function1;
      83: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      86: aastore
      87: aload_0
      88: iconst_5
      89: ldc_w         #412                // String drop
      92: invokedynamic #416,  0            // InvokeDynamic #5:invoke:()Lkotlin/jvm/functions/Function1;
      97: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     100: aastore
     101: aload_0
     102: bipush        6
     104: ldc_w         #418                // String swap
     107: invokedynamic #422,  0            // InvokeDynamic #6:invoke:()Lkotlin/jvm/functions/Function1;
     112: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     115: aastore
     116: aload_0
     117: bipush        7
     119: ldc_w         #424                // String over
     122: invokedynamic #428,  0            // InvokeDynamic #7:invoke:()Lkotlin/jvm/functions/Function1;
     127: invokestatic  #386                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     130: aastore
     131: aload_0
     132: invokestatic  #434                // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
     135: putstatic     #267                // Field OPS:Ljava/util/Map;
     138: return
}