import kotlin.math.ceil
import kotlin.math.pow

fun primeByEuler(page: Int, prime: KtPrime) {
    val num = BooleanArray(page)
    for (i in 2 until page) {
        if (!num[i]) prime.add(i.toLong())
        for (j in 0 until prime.size() ){
            if (i.toLong() * prime.getitem(j) >= page) break
            num[(i * prime.getitem(j)).toInt()] = true
            if (i % prime.getitem(j) == 0L) break
        }
    }
}

fun primeByEratosthenesInterval(pos: Long, page: Int, prime: KtPrime) {
    val num = BooleanArray(page)
    for (i in 0 until prime.size()) {
        val p = prime.getitem(i)
        if (p * p >= pos + page) break
        for (j in ceil(pos * 1.0 / p).toLong() until ((pos + page - 1) / p).toLong() + 1)
            num[(j * p - pos).toInt()] = true
    }
    for (i in num.indices) if (!num[i]) prime.add(pos + i)
}

fun main(args: Array<String>) {
    println("Hello sample.Prime! I'm Kotlin :-)")
    val limit = args[0].toLong()
    val page = args[1].toInt()
    val mode = args[2].toInt()
    val prime = KtPrime(limit, page, mode)

    println("使用分区埃拉托色尼筛选法计算${prime.getDfString(limit)}以内素数：")
    val costTime = kotlin.system.measureTimeMillis {
        //首先使用欧拉法得到种子素数组
        primeByEuler(page, prime)
        prime.generateResults(page.toLong())
        //循环使用埃拉托色尼法计算分区
        for (i in 1 until limit/page) {
            val pos = page * i
            primeByEratosthenesInterval(pos, page, prime)
            prime.generateResults(pos + page)
        }
    }
    prime.printTable()
    System.out.printf("Kotline finished within %.0e the %dth prime is %d; time cost: %d ms \n",
            limit.toDouble(), prime.maxInd, prime.maxPrime, costTime)
}

class KtPrime(limit: Long, page: Int, private val mode: Int) {
    var maxInd: Long = 0
    var maxPrime: Long = 0
    private val maxKeep: Int = (Math.sqrt(limit.toDouble()) / Math.log(Math.sqrt(limit.toDouble())) * 1.3).toInt()
    var reserve = ((Math.sqrt(limit.toDouble()) + page) / Math.log(Math.sqrt(limit.toDouble()) + page) * 1.3).toInt()
    private val primeList: ArrayList<Long> = ArrayList(reserve)
    private val seqList = ArrayList<String>()
    private val interList = ArrayList<String>()
    private var prevNo: Long = 0

    fun getitem(index: Int): Long {
        return primeList[index]
    }

    fun size(): Int {
        return primeList.size
    }

    fun add(p: Long) {
        primeList.add(p)
        maxInd++
    }

    fun generateResults(inter: Long) {
        if (mode > 0) {
            putSequence(prevNo)
            putInterval(inter)
            prevNo = maxInd
        }
        maxPrime = primeList[primeList.size - 1]
        freeUp()
    }

    private fun putInterval(inter: Long) {
        val s: String
        if (inter % 10.0.pow(inter.toString().length - 1.toDouble()) == 0.0) {
            s = "${getDfString(inter)}|$maxInd|${getitem(size() - 1)}"
            interList.add(s)
            if (mode > 1) println("[In:]$s")
        }
    }

    private fun putSequence(beginNo: Long) {
        for (i in beginNo.toString().length - 1 until maxInd.toString().length) {
            for (j in 1..9) {
                val seq = (j * 10.0.pow(i.toDouble())).toLong()
                if (seq < beginNo) continue
                if (seq >= maxInd) return
                val l = getitem(size() - 1 - (maxInd - seq).toInt())
                var s = getDfString(seq) + "|" + l
                seqList.add(s)
                if (mode > 1) println("==>[No:]$s")
            }
        }
    }

    private fun freeUp() {
        if (maxInd > maxKeep) primeList.subList(maxKeep, primeList.size - 1).clear()
    }

    fun printTable() {
        if (mode < 1) return
        println("## 素数序列表")
        println("序号|数值")
        println("---|---")
        seqList.forEach { x: String? -> println(x) }
        println("## 素数区间表")
        println("区间|个数|最大值")
        println("---|---|---")
        interList.forEach { x: String? -> println(x) }
    }

    fun getDfString(l: Long): String {
        var s = l.toString()
        when {
            l % 1000000000000L == 0L -> {
                s = s.substring(0, s.length - 12) + "万亿"
            }
            l % 100000000L == 0L -> {
                s = s.substring(0, s.length - 8) + "亿"
            }
            l % 10000 == 0L -> {
                s = s.substring(0, s.length - 4) + "万"
            }
        }
        return s
    }

    init {
        println("内存分配：$reserve")
    }
}

Compiled from "KtHelloPrime.kt"
public final class KtHelloPrimeKt {
  public static final void primeByEuler(int, KtPrime);
    Code:
       0: aload_1
       1: ldc           #9                  // String prime
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_0
       7: newarray       boolean
       9: astore_2
      10: iconst_2
      11: istore_3
      12: iload_3
      13: iload_0
      14: if_icmpge     99
      17: aload_2
      18: iload_3
      19: baload
      20: ifne          29
      23: aload_1
      24: iload_3
      25: i2l
      26: invokevirtual #21                 // Method KtPrime.add:(J)V
      29: iconst_0
      30: istore        4
      32: aload_1
      33: invokevirtual #25                 // Method KtPrime.size:()I
      36: istore        5
      38: iload         4
      40: iload         5
      42: if_icmpge     93
      45: iload_3
      46: i2l
      47: aload_1
      48: iload         4
      50: invokevirtual #29                 // Method KtPrime.getitem:(I)J
      53: lmul
      54: iload_0
      55: i2l
      56: lcmp
      57: ifge          93
      60: aload_2
      61: iload_3
      62: i2l
      63: aload_1
      64: iload         4
      66: invokevirtual #29                 // Method KtPrime.getitem:(I)J
      69: lmul
      70: l2i
      71: iconst_1
      72: bastore
      73: iload_3
      74: i2l
      75: aload_1
      76: iload         4
      78: invokevirtual #29                 // Method KtPrime.getitem:(I)J
      81: lrem
      82: lconst_0
      83: lcmp
      84: ifeq          93
      87: iinc          4, 1
      90: goto          38
      93: iinc          3, 1
      96: goto          12
      99: return

  public static final void primeByEratosthenesInterval(long, int, KtPrime);
    Code:
       0: aload_3
       1: ldc           #9                  // String prime
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_2
       7: newarray       boolean
       9: astore        4
      11: iconst_0
      12: istore        5
      14: aload_3
      15: invokevirtual #25                 // Method KtPrime.size:()I
      18: istore        6
      20: iload         5
      22: iload         6
      24: if_icmpge     110
      27: aload_3
      28: iload         5
      30: invokevirtual #29                 // Method KtPrime.getitem:(I)J
      33: lstore        7
      35: lload         7
      37: lload         7
      39: lmul
      40: lload_0
      41: iload_2
      42: i2l
      43: ladd
      44: lcmp
      45: ifge          110
      48: lload_0
      49: l2d
      50: dconst_1
      51: dmul
      52: lload         7
      54: l2d
      55: ddiv
      56: invokestatic  #45                 // Method java/lang/Math.ceil:(D)D
      59: d2l
      60: lstore        9
      62: lload_0
      63: iload_2
      64: i2l
      65: ladd
      66: lconst_1
      67: lsub
      68: lload         7
      70: ldiv
      71: lconst_1
      72: ladd
      73: lstore        11
      75: lload         9
      77: lload         11
      79: lcmp
      80: ifge          104
      83: aload         4
      85: lload         9
      87: lload         7
      89: lmul
      90: lload_0
      91: lsub
      92: l2i
      93: iconst_1
      94: bastore
      95: lload         9
      97: lconst_1
      98: ladd
      99: lstore        9
     101: goto          75
     104: iinc          5, 1
     107: goto          20
     110: iconst_0
     111: istore        5
     113: aload         4
     115: arraylength
     116: istore        6
     118: iload         5
     120: iload         6
     122: if_icmpge     148
     125: aload         4
     127: iload         5
     129: baload
     130: ifne          142
     133: aload_3
     134: lload_0
     135: iload         5
     137: i2l
     138: ladd
     139: invokevirtual #21                 // Method KtPrime.add:(J)V
     142: iinc          5, 1
     145: goto          118
     148: return

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #52                 // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: ldc           #54                 // String Hello sample.Prime! I\'m Kotlin :-)
       8: getstatic     #60                 // Field java/lang/System.out:Ljava/io/PrintStream;
      11: swap
      12: invokevirtual #66                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      15: aload_0
      16: iconst_0
      17: aaload
      18: invokestatic  #72                 // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
      21: lstore_1
      22: aload_0
      23: iconst_1
      24: aaload
      25: invokestatic  #78                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      28: istore_3
      29: aload_0
      30: iconst_2
      31: aaload
      32: invokestatic  #78                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      35: istore        4
      37: new           #17                 // class KtPrime
      40: dup
      41: lload_1
      42: iload_3
      43: iload         4
      45: invokespecial #82                 // Method KtPrime."<init>":(JII)V
      48: astore        5
      50: new           #84                 // class java/lang/StringBuilder
      53: dup
      54: invokespecial #87                 // Method java/lang/StringBuilder."<init>":()V
      57: ldc           #89                 // String 使用分区埃拉托色尼筛选法计算
      59: invokevirtual #93                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      62: aload         5
      64: lload_1
      65: invokevirtual #97                 // Method KtPrime.getDfString:(J)Ljava/lang/String;
      68: invokevirtual #93                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      71: ldc           #99                 // String 以内素数：
      73: invokevirtual #93                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      76: invokevirtual #103                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      79: getstatic     #60                 // Field java/lang/System.out:Ljava/io/PrintStream;
      82: swap
      83: invokevirtual #66                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      86: iconst_0
      87: istore        8
      89: invokestatic  #107                // Method java/lang/System.currentTimeMillis:()J
      92: lstore        9
      94: iconst_0
      95: istore        11
      97: iload_3
      98: aload         5
     100: invokestatic  #109                // Method primeByEuler:(ILKtPrime;)V
     103: aload         5
     105: iload_3
     106: i2l
     107: invokevirtual #112                // Method KtPrime.generateResults:(J)V
     110: lconst_1
     111: lstore        12
     113: lload_1
     114: iload_3
     115: i2l
     116: ldiv
     117: lstore        14
     119: lload         12
     121: lload         14
     123: lcmp
     124: ifge          161
     127: iload_3
     128: i2l
     129: lload         12
     131: lmul
     132: lstore        16
     134: lload         16
     136: iload_3
     137: aload         5
     139: invokestatic  #114                // Method primeByEratosthenesInterval:(JILKtPrime;)V
     142: aload         5
     144: lload         16
     146: iload_3
     147: i2l
     148: ladd
     149: invokevirtual #112                // Method KtPrime.generateResults:(J)V
     152: lload         12
     154: lconst_1
     155: ladd
     156: lstore        12
     158: goto          119
     161: nop
     162: nop
     163: invokestatic  #107                // Method java/lang/System.currentTimeMillis:()J
     166: lload         9
     168: lsub
     169: lstore        6
     171: aload         5
     173: invokevirtual #117                // Method KtPrime.printTable:()V
     176: getstatic     #60                 // Field java/lang/System.out:Ljava/io/PrintStream;
     179: ldc           #119                // String Kotline finished within %.0e the %dth prime is %d; time cost: %d ms \n
     181: iconst_4
     182: anewarray     #4                  // class java/lang/Object
     185: astore        8
     187: aload         8
     189: iconst_0
     190: lload_1
     191: l2d
     192: invokestatic  #125                // Method java/lang/Double.valueOf:(D)Ljava/lang/Double;
     195: aastore
     196: aload         8
     198: iconst_1
     199: aload         5
     201: invokevirtual #128                // Method KtPrime.getMaxInd:()J
     204: invokestatic  #131                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     207: aastore
     208: aload         8
     210: iconst_2
     211: aload         5
     213: invokevirtual #134                // Method KtPrime.getMaxPrime:()J
     216: invokestatic  #131                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     219: aastore
     220: aload         8
     222: iconst_3
     223: lload         6
     225: invokestatic  #131                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     228: aastore
     229: aload         8
     231: invokevirtual #138                // Method java/io/PrintStream.printf:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream;
     234: pop
     235: return
}


fun pad2(n: Int): String {
    val s = "$n"
    return if (s.length < 2) " $s" else s
}

interface ICell {
    fun draw(): String
}

interface IDown {
    val down: Int
}

interface IAcross {
    val across: Int
}

// singleton
object EmptyCell : ICell {
    override fun toString() = "EmptyCell"

    override fun draw() = "   -----  "
}

data class DownCell(override val down: Int) : ICell, IDown {
    override fun draw() = "   ${pad2(down)}\\--  "
}

data class AcrossCell(override val across: Int) : ICell, IAcross {
    override fun draw() = "   --\\${pad2(across)}  "
}

data class DownAcrossCell(override val down: Int, override val across: Int) : ICell, IDown, IAcross {
    override fun draw() = "   ${pad2(down)}\\${pad2(across)}  "
}

data class ValueCell(val values: Set<Int>) : ICell {
    override fun draw(): String {
        return when (values.size) {
            1 -> "     ${values.first()}    "
            else -> (1..9).joinToString(separator = "", prefix = " ", transform = ::drawOneValue)
        }
    }

    fun isPossible(n: Int) = values.contains(n)

    private fun drawOneValue(it: Int) = if (it in values) "$it" else "."
}

fun da(d: Int, a: Int) = DownAcrossCell(d, a)
fun d(d: Int) = DownCell(d)
fun a(a: Int) = AcrossCell(a)
fun e() = EmptyCell
fun v() = ValueCell(setOf(1, 2, 3, 4, 5, 6, 7, 8, 9))
fun v(vararg args: Int) = ValueCell(args.toSet())
fun v(args: List<Int>) = ValueCell(args.toSet())

data class SimplePair<T>(val first: T, val second: T)

fun drawRow(row: Collection<ICell>): String {
    return row.joinToString(separator = "", postfix = "\n", transform = ICell::draw)
}

fun drawGrid(grid: Collection<Collection<ICell>>): String {
    return grid.joinToString(transform = ::drawRow)
}

fun <T> allDifferent(nums: Collection<T>): Boolean {
    return nums.size == HashSet(nums).size
}

fun <T> product(colls: List<Set<T>>): List<List<T>> {
    return when (colls.size) {
        0 -> emptyList()
        1 -> colls[0].map { listOf(it) }
        else -> {
            val head = colls[0]
            val tail = colls.drop(1)
            val tailProd = product(tail)
            return head.flatMap { x -> tailProd.map { listOf(x) + it } }
        }
    }
}

fun permuteAll(vs: List<ValueCell>, target: Int): List<List<Int>> {
    val values = vs.map { it.values }
    return product(values)
        .filter { target == it.sum() }
}

fun <T> transpose(m: List<List<T>>): List<List<T>> {
    return when {
        m.isEmpty() -> emptyList()
        else -> {
            (1..m[0].size)
                .map { m.map { col -> col[it - 1] } }
        }
    }
}

fun <T> partitionBy(f: (T) -> Boolean, coll: List<T>): List<List<T>> {
    return when {
        coll.isEmpty() -> emptyList()
        else -> {
            val head = coll[0]
            val fx = f(head)
            val group = coll.takeWhile { fx == f(it) }
            listOf(group) + partitionBy(f, coll.drop(group.size))
        }
    }
}

fun <T> partitionAll(n: Int, step: Int, coll: List<T>): List<List<T>> {
    return when {
        coll.isEmpty() -> emptyList()
        else -> {
            listOf(coll.take(n)) + partitionAll(n, step, coll.drop(step))
        }
    }
}

fun <T> partitionN(n: Int, coll: List<T>): List<List<T>> = partitionAll(n, n, coll)

fun solveStep(cells: List<ValueCell>, total: Int): List<ValueCell> {
    val finalIndex = cells.size - 1
    val perms = permuteAll(cells, total)
        .filter { cells.last().isPossible(it[finalIndex]) }
        .filter { allDifferent(it) }
    return transpose(perms).map { v(it) }
}

fun gatherValues(line: List<ICell>): List<List<ICell>> {
    return partitionBy({ it is ValueCell }, line)
}

fun pairTargetsWithValues(line: List<ICell>): List<SimplePair<List<ICell>>> {
    return partitionN(2, gatherValues(line))
        .map { SimplePair(it[0], if (1 == it.size) emptyList() else it[1]) }
}

fun solvePair(accessor: (ICell) -> Int, pair: SimplePair<List<ICell>>): List<ICell> {
    val notValueCells = pair.first
    return when {
        pair.second.isEmpty() -> notValueCells
        else -> {
            val valueCells = pair.second.map { it as ValueCell }
            val total = accessor(notValueCells.last())
            val newValueCells = solveStep(valueCells, total)
            notValueCells + newValueCells
        }
    }
}

fun solveLine(line: List<ICell>, f: (ICell) -> Int): List<ICell> {
    return pairTargetsWithValues(line)
        .map { solvePair(f, it) }
        .flatten()
}

fun solveRow(row: List<ICell>): List<ICell> {
    return solveLine(row, { (it as IAcross).across })
}

fun solveColumn(column: List<ICell>): List<ICell> {
    return solveLine(column, { (it as IDown).down })
}

fun solveGrid(grid: List<List<ICell>>): List<List<ICell>> {
    val rowsDone = grid.map(::solveRow)
    val colsDone = transpose(rowsDone).map(::solveColumn)
    return transpose(colsDone)
}

fun solver(grid: List<List<ICell>>): List<List<ICell>> {
    println(drawGrid(grid))
    val g = solveGrid(grid)
    return if (g == grid) g else solver(g)
}

Compiled from "main.kt"
final class MainKt$drawRow$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function1<ICell, java.lang.String> {
  public static final MainKt$drawRow$1 INSTANCE;

  MainKt$drawRow$1();
    Code:
       0: aload_0
       1: iconst_1
       2: ldc           #11                 // class ICell
       4: ldc           #13                 // String draw
       6: ldc           #15                 // String draw()Ljava/lang/String;
       8: iconst_0
       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(ICell);
    Code:
       0: aload_1
       1: ldc           #24                 // String p0
       3: invokestatic  #30                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokeinterface #33,  1           // InterfaceMethod ICell.draw:()Ljava/lang/String;
      12: areturn

  public java.lang.Object invoke(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #11                 // class ICell
       5: invokevirtual #37                 // Method invoke:(LICell;)Ljava/lang/String;
       8: areturn

  static {};
    Code:
       0: new           #2                  // class MainKt$drawRow$1
       3: dup
       4: invokespecial #42                 // Method "<init>":()V
       7: putstatic     #45                 // Field INSTANCE:LMainKt$drawRow$1;
      10: return
}

Compiled from "main.kt"
final class MainKt$drawGrid$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function1<java.util.Collection<? extends ICell>, java.lang.String> {
  public static final MainKt$drawGrid$1 INSTANCE;

  MainKt$drawGrid$1();
    Code:
       0: aload_0
       1: iconst_1
       2: ldc           #11                 // class MainKt
       4: ldc           #13                 // String drawRow
       6: ldc           #15                 // String drawRow(Ljava/util/Collection;)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(java.util.Collection<? extends ICell>);
    Code:
       0: aload_1
       1: ldc           #25                 // String p0
       3: invokestatic  #31                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokestatic  #33                 // Method MainKt.drawRow:(Ljava/util/Collection;)Ljava/lang/String;
      10: areturn

  public java.lang.Object invoke(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #37                 // class java/util/Collection
       5: invokevirtual #39                 // Method invoke:(Ljava/util/Collection;)Ljava/lang/String;
       8: areturn

  static {};
    Code:
       0: new           #2                  // class MainKt$drawGrid$1
       3: dup
       4: invokespecial #44                 // Method "<init>":()V
       7: putstatic     #47                 // Field INSTANCE:LMainKt$drawGrid$1;
      10: return
}

Compiled from "main.kt"
public final class MainKt {
  public static final java.lang.String pad2(int);
    Code:
       0: iload_0
       1: invokestatic  #12                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
       4: astore_1
       5: aload_1
       6: invokevirtual #16                 // Method java/lang/String.length:()I
       9: iconst_2
      10: if_icmpge     35
      13: new           #18                 // class java/lang/StringBuilder
      16: dup
      17: invokespecial #22                 // Method java/lang/StringBuilder."<init>":()V
      20: bipush        32
      22: invokevirtual #26                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      25: aload_1
      26: invokevirtual #29                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      29: invokevirtual #33                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      32: goto          36
      35: aload_1
      36: areturn

  public static final DownAcrossCell da(int, int);
    Code:
       0: new           #41                 // class DownAcrossCell
       3: dup
       4: iload_0
       5: iload_1
       6: invokespecial #44                 // Method DownAcrossCell."<init>":(II)V
       9: areturn

  public static final DownCell d(int);
    Code:
       0: new           #49                 // class DownCell
       3: dup
       4: iload_0
       5: invokespecial #52                 // Method DownCell."<init>":(I)V
       8: areturn

  public static final AcrossCell a(int);
    Code:
       0: new           #55                 // class AcrossCell
       3: dup
       4: iload_0
       5: invokespecial #56                 // Method AcrossCell."<init>":(I)V
       8: areturn

  public static final EmptyCell e();
    Code:
       0: getstatic     #64                 // Field EmptyCell.INSTANCE:LEmptyCell;
       3: areturn

  public static final ValueCell v();
    Code:
       0: new           #68                 // class ValueCell
       3: dup
       4: bipush        9
       6: anewarray     #70                 // class java/lang/Integer
       9: astore_0
      10: aload_0
      11: iconst_0
      12: iconst_1
      13: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      16: aastore
      17: aload_0
      18: iconst_1
      19: iconst_2
      20: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      23: aastore
      24: aload_0
      25: iconst_2
      26: iconst_3
      27: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      30: aastore
      31: aload_0
      32: iconst_3
      33: iconst_4
      34: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      37: aastore
      38: aload_0
      39: iconst_4
      40: iconst_5
      41: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      44: aastore
      45: aload_0
      46: iconst_5
      47: bipush        6
      49: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      52: aastore
      53: aload_0
      54: bipush        6
      56: bipush        7
      58: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      61: aastore
      62: aload_0
      63: bipush        7
      65: bipush        8
      67: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      70: aastore
      71: aload_0
      72: bipush        8
      74: bipush        9
      76: invokestatic  #73                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      79: aastore
      80: aload_0
      81: invokestatic  #79                 // Method kotlin/collections/SetsKt.setOf:([Ljava/lang/Object;)Ljava/util/Set;
      84: invokespecial #82                 // Method ValueCell."<init>":(Ljava/util/Set;)V
      87: areturn

  public static final ValueCell v(int...);
    Code:
       0: aload_0
       1: ldc           #85                 // String args
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #68                 // class ValueCell
       9: dup
      10: aload_0
      11: invokestatic  #97                 // Method kotlin/collections/ArraysKt.toSet:([I)Ljava/util/Set;
      14: invokespecial #82                 // Method ValueCell."<init>":(Ljava/util/Set;)V
      17: areturn

  public static final ValueCell v(java.util.List<java.lang.Integer>);
    Code:
       0: aload_0
       1: ldc           #85                 // String args
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #68                 // class ValueCell
       9: dup
      10: aload_0
      11: checkcast     #102                // class java/lang/Iterable
      14: invokestatic  #107                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
      17: invokespecial #82                 // Method ValueCell."<init>":(Ljava/util/Set;)V
      20: areturn

  public static final java.lang.String drawRow(java.util.Collection<? extends ICell>);
    Code:
       0: aload_0
       1: ldc           #113                // String row
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #102                // class java/lang/Iterable
      10: ldc           #115                // String
      12: checkcast     #117                // class java/lang/CharSequence
      15: aconst_null
      16: ldc           #119                // String \n
      18: checkcast     #117                // class java/lang/CharSequence
      21: iconst_0
      22: aconst_null
      23: getstatic     #124                // Field MainKt$drawRow$1.INSTANCE:LMainKt$drawRow$1;
      26: checkcast     #126                // class kotlin/jvm/functions/Function1
      29: bipush        26
      31: aconst_null
      32: invokestatic  #130                // 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;
      35: areturn

  public static final java.lang.String drawGrid(java.util.Collection<? extends java.util.Collection<? extends ICell>>);
    Code:
       0: aload_0
       1: ldc           #135                // String grid
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #102                // class java/lang/Iterable
      10: aconst_null
      11: aconst_null
      12: aconst_null
      13: iconst_0
      14: aconst_null
      15: getstatic     #140                // Field MainKt$drawGrid$1.INSTANCE:LMainKt$drawGrid$1;
      18: checkcast     #126                // class kotlin/jvm/functions/Function1
      21: bipush        31
      23: aconst_null
      24: invokestatic  #130                // 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;
      27: areturn

  public static final <T> boolean allDifferent(java.util.Collection<? extends T>);
    Code:
       0: aload_0
       1: ldc           #145                // String nums
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokeinterface #150,  1          // InterfaceMethod java/util/Collection.size:()I
      12: new           #152                // class java/util/HashSet
      15: dup
      16: aload_0
      17: invokespecial #155                // Method java/util/HashSet."<init>":(Ljava/util/Collection;)V
      20: invokevirtual #156                // Method java/util/HashSet.size:()I
      23: if_icmpne     30
      26: iconst_1
      27: goto          31
      30: iconst_0
      31: ireturn

  public static final <T> java.util.List<java.util.List<T>> product(java.util.List<? extends java.util.Set<? extends T>>);
    Code:
       0: aload_0
       1: ldc           #161                // String colls
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokeinterface #164,  1          // InterfaceMethod java/util/List.size:()I
      12: tableswitch   { // 0 to 1
                     0: 36
                     1: 42
               default: 142
          }
      36: invokestatic  #168                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      39: goto          365
      42: aload_0
      43: iconst_0
      44: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      49: checkcast     #102                // class java/lang/Iterable
      52: astore_1
      53: iconst_0
      54: istore_2
      55: aload_1
      56: astore_3
      57: new           #174                // class java/util/ArrayList
      60: dup
      61: aload_1
      62: bipush        10
      64: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      67: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
      70: checkcast     #147                // class java/util/Collection
      73: astore        4
      75: iconst_0
      76: istore        5
      78: aload_3
      79: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      84: astore        6
      86: aload         6
      88: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      93: ifeq          133
      96: aload         6
      98: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     103: astore        7
     105: aload         4
     107: aload         7
     109: astore        8
     111: astore        23
     113: iconst_0
     114: istore        9
     116: aload         8
     118: invokestatic  #197                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     121: aload         23
     123: swap
     124: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     129: pop
     130: goto          86
     133: aload         4
     135: checkcast     #163                // class java/util/List
     138: nop
     139: goto          365
     142: aload_0
     143: iconst_0
     144: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     149: checkcast     #203                // class java/util/Set
     152: astore_1
     153: aload_0
     154: checkcast     #102                // class java/lang/Iterable
     157: iconst_1
     158: invokestatic  #207                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
     161: astore_2
     162: aload_2
     163: invokestatic  #209                // Method product:(Ljava/util/List;)Ljava/util/List;
     166: astore_3
     167: aload_1
     168: checkcast     #102                // class java/lang/Iterable
     171: astore        4
     173: iconst_0
     174: istore        5
     176: aload         4
     178: astore        6
     180: new           #174                // class java/util/ArrayList
     183: dup
     184: invokespecial #210                // Method java/util/ArrayList."<init>":()V
     187: checkcast     #147                // class java/util/Collection
     190: astore        7
     192: iconst_0
     193: istore        8
     195: aload         6
     197: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     202: astore        9
     204: aload         9
     206: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     211: ifeq          358
     214: aload         9
     216: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     221: astore        10
     223: aload         10
     225: astore        11
     227: iconst_0
     228: istore        12
     230: aload_3
     231: checkcast     #102                // class java/lang/Iterable
     234: astore        13
     236: iconst_0
     237: istore        14
     239: aload         13
     241: astore        15
     243: new           #174                // class java/util/ArrayList
     246: dup
     247: aload         13
     249: bipush        10
     251: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     254: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
     257: checkcast     #147                // class java/util/Collection
     260: astore        16
     262: iconst_0
     263: istore        17
     265: aload         15
     267: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     272: astore        18
     274: aload         18
     276: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     281: ifeq          335
     284: aload         18
     286: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     291: astore        19
     293: aload         16
     295: aload         19
     297: checkcast     #163                // class java/util/List
     300: astore        20
     302: astore        21
     304: iconst_0
     305: istore        22
     307: aload         11
     309: invokestatic  #197                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     312: checkcast     #147                // class java/util/Collection
     315: aload         20
     317: checkcast     #102                // class java/lang/Iterable
     320: invokestatic  #214                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     323: aload         21
     325: swap
     326: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     331: pop
     332: goto          274
     335: aload         16
     337: checkcast     #163                // class java/util/List
     340: nop
     341: checkcast     #102                // class java/lang/Iterable
     344: nop
     345: astore        11
     347: aload         7
     349: aload         11
     351: invokestatic  #218                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     354: pop
     355: goto          204
     358: aload         7
     360: checkcast     #163                // class java/util/List
     363: nop
     364: areturn
     365: areturn

  public static final java.util.List<java.util.List<java.lang.Integer>> permuteAll(java.util.List<ValueCell>, int);
    Code:
       0: aload_0
       1: ldc           #246                // String vs
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #102                // class java/lang/Iterable
      10: astore_3
      11: iconst_0
      12: istore        4
      14: aload_3
      15: astore        5
      17: new           #174                // class java/util/ArrayList
      20: dup
      21: aload_3
      22: bipush        10
      24: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      27: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
      30: checkcast     #147                // class java/util/Collection
      33: astore        6
      35: iconst_0
      36: istore        7
      38: aload         5
      40: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        8
      47: aload         8
      49: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          97
      57: aload         8
      59: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: astore        9
      66: aload         6
      68: aload         9
      70: checkcast     #68                 // class ValueCell
      73: astore        10
      75: astore        12
      77: iconst_0
      78: istore        11
      80: aload         10
      82: invokevirtual #250                // Method ValueCell.getValues:()Ljava/util/Set;
      85: aload         12
      87: swap
      88: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      93: pop
      94: goto          47
      97: aload         6
      99: checkcast     #163                // class java/util/List
     102: nop
     103: astore_2
     104: aload_2
     105: invokestatic  #209                // Method product:(Ljava/util/List;)Ljava/util/List;
     108: checkcast     #102                // class java/lang/Iterable
     111: astore_3
     112: nop
     113: iconst_0
     114: istore        4
     116: aload_3
     117: astore        5
     119: new           #174                // class java/util/ArrayList
     122: dup
     123: invokespecial #210                // Method java/util/ArrayList."<init>":()V
     126: checkcast     #147                // class java/util/Collection
     129: astore        6
     131: iconst_0
     132: istore        7
     134: aload         5
     136: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     141: astore        8
     143: aload         8
     145: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     150: ifeq          205
     153: aload         8
     155: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     160: astore        9
     162: aload         9
     164: checkcast     #163                // class java/util/List
     167: astore        10
     169: iconst_0
     170: istore        11
     172: iload_1
     173: aload         10
     175: checkcast     #102                // class java/lang/Iterable
     178: invokestatic  #254                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     181: if_icmpne     188
     184: iconst_1
     185: goto          189
     188: iconst_0
     189: ifeq          143
     192: aload         6
     194: aload         9
     196: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     201: pop
     202: goto          143
     205: aload         6
     207: checkcast     #163                // class java/util/List
     210: nop
     211: areturn

  public static final <T> java.util.List<java.util.List<T>> transpose(java.util.List<? extends java.util.List<? extends T>>);
    Code:
       0: aload_0
       1: ldc_w         #267                // String m
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: nop
       8: aload_0
       9: invokeinterface #270,  1          // InterfaceMethod java/util/List.isEmpty:()Z
      14: ifeq          23
      17: invokestatic  #168                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      20: goto          240
      23: new           #272                // class kotlin/ranges/IntRange
      26: dup
      27: iconst_1
      28: aload_0
      29: iconst_0
      30: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      35: checkcast     #163                // class java/util/List
      38: invokeinterface #164,  1          // InterfaceMethod java/util/List.size:()I
      43: invokespecial #273                // Method kotlin/ranges/IntRange."<init>":(II)V
      46: checkcast     #102                // class java/lang/Iterable
      49: astore_1
      50: nop
      51: iconst_0
      52: istore_2
      53: aload_1
      54: astore_3
      55: new           #174                // class java/util/ArrayList
      58: dup
      59: aload_1
      60: bipush        10
      62: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      65: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
      68: checkcast     #147                // class java/util/Collection
      71: astore        4
      73: iconst_0
      74: istore        5
      76: aload_3
      77: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      82: astore        6
      84: aload         6
      86: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      91: ifeq          234
      94: aload         6
      96: checkcast     #275                // class kotlin/collections/IntIterator
      99: invokevirtual #278                // Method kotlin/collections/IntIterator.nextInt:()I
     102: istore        7
     104: aload         4
     106: iload         7
     108: istore        8
     110: astore        20
     112: iconst_0
     113: istore        9
     115: aload_0
     116: checkcast     #102                // class java/lang/Iterable
     119: astore        10
     121: iconst_0
     122: istore        11
     124: aload         10
     126: astore        12
     128: new           #174                // class java/util/ArrayList
     131: dup
     132: aload         10
     134: bipush        10
     136: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     139: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
     142: checkcast     #147                // class java/util/Collection
     145: astore        13
     147: iconst_0
     148: istore        14
     150: aload         12
     152: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     157: astore        15
     159: aload         15
     161: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     166: ifeq          215
     169: aload         15
     171: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     176: astore        16
     178: aload         13
     180: aload         16
     182: checkcast     #163                // class java/util/List
     185: astore        17
     187: astore        18
     189: iconst_0
     190: istore        19
     192: aload         17
     194: iload         8
     196: iconst_1
     197: isub
     198: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     203: aload         18
     205: swap
     206: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     211: pop
     212: goto          159
     215: aload         13
     217: checkcast     #163                // class java/util/List
     220: nop
     221: nop
     222: aload         20
     224: swap
     225: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     230: pop
     231: goto          84
     234: aload         4
     236: checkcast     #163                // class java/util/List
     239: nop
     240: areturn

  public static final <T> java.util.List<java.util.List<T>> partitionBy(kotlin.jvm.functions.Function1<? super T, java.lang.Boolean>, java.util.List<? extends T>);
    Code:
       0: aload_0
       1: ldc_w         #286                // String f
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: ldc_w         #288                // String coll
      11: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      14: nop
      15: aload_1
      16: invokeinterface #270,  1          // InterfaceMethod java/util/List.isEmpty:()Z
      21: ifeq          30
      24: invokestatic  #168                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      27: goto          184
      30: aload_1
      31: iconst_0
      32: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      37: astore_2
      38: aload_0
      39: aload_2
      40: invokeinterface #292,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
      45: checkcast     #294                // class java/lang/Boolean
      48: invokevirtual #297                // Method java/lang/Boolean.booleanValue:()Z
      51: istore_3
      52: aload_1
      53: checkcast     #102                // class java/lang/Iterable
      56: astore        5
      58: iconst_0
      59: istore        6
      61: new           #174                // class java/util/ArrayList
      64: dup
      65: invokespecial #210                // Method java/util/ArrayList."<init>":()V
      68: astore        7
      70: aload         5
      72: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      77: astore        8
      79: aload         8
      81: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      86: ifeq          145
      89: aload         8
      91: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      96: astore        9
      98: aload         9
     100: astore        10
     102: iconst_0
     103: istore        11
     105: iload_3
     106: aload_0
     107: aload         10
     109: invokeinterface #292,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     114: checkcast     #294                // class java/lang/Boolean
     117: invokevirtual #297                // Method java/lang/Boolean.booleanValue:()Z
     120: if_icmpne     127
     123: iconst_1
     124: goto          128
     127: iconst_0
     128: ifne          134
     131: goto          145
     134: aload         7
     136: aload         9
     138: invokevirtual #298                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     141: pop
     142: goto          79
     145: aload         7
     147: checkcast     #163                // class java/util/List
     150: astore        4
     152: aload         4
     154: invokestatic  #197                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     157: checkcast     #147                // class java/util/Collection
     160: aload_0
     161: aload_1
     162: checkcast     #102                // class java/lang/Iterable
     165: aload         4
     167: invokeinterface #164,  1          // InterfaceMethod java/util/List.size:()I
     172: invokestatic  #207                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
     175: invokestatic  #300                // Method partitionBy:(Lkotlin/jvm/functions/Function1;Ljava/util/List;)Ljava/util/List;
     178: checkcast     #102                // class java/lang/Iterable
     181: invokestatic  #214                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     184: areturn

  public static final <T> java.util.List<java.util.List<T>> partitionAll(int, int, java.util.List<? extends T>);
    Code:
       0: aload_2
       1: ldc_w         #288                // String coll
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: nop
       8: aload_2
       9: invokeinterface #270,  1          // InterfaceMethod java/util/List.isEmpty:()Z
      14: ifeq          23
      17: invokestatic  #168                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      20: goto          56
      23: aload_2
      24: checkcast     #102                // class java/lang/Iterable
      27: iload_0
      28: invokestatic  #316                // Method kotlin/collections/CollectionsKt.take:(Ljava/lang/Iterable;I)Ljava/util/List;
      31: invokestatic  #197                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      34: checkcast     #147                // class java/util/Collection
      37: iload_0
      38: iload_1
      39: aload_2
      40: checkcast     #102                // class java/lang/Iterable
      43: iload_1
      44: invokestatic  #207                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
      47: invokestatic  #318                // Method partitionAll:(IILjava/util/List;)Ljava/util/List;
      50: checkcast     #102                // class java/lang/Iterable
      53: invokestatic  #214                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
      56: areturn

  public static final <T> java.util.List<java.util.List<T>> partitionN(int, java.util.List<? extends T>);
    Code:
       0: aload_1
       1: ldc_w         #288                // String coll
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: iload_0
       8: iload_0
       9: aload_1
      10: invokestatic  #318                // Method partitionAll:(IILjava/util/List;)Ljava/util/List;
      13: areturn

  public static final java.util.List<ValueCell> solveStep(java.util.List<ValueCell>, int);
    Code:
       0: aload_0
       1: ldc_w         #326                // String cells
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #164,  1          // InterfaceMethod java/util/List.size:()I
      13: iconst_1
      14: isub
      15: istore_2
      16: aload_0
      17: iload_1
      18: invokestatic  #328                // Method permuteAll:(Ljava/util/List;I)Ljava/util/List;
      21: checkcast     #102                // class java/lang/Iterable
      24: astore        4
      26: nop
      27: iconst_0
      28: istore        5
      30: aload         4
      32: astore        6
      34: new           #174                // class java/util/ArrayList
      37: dup
      38: invokespecial #210                // Method java/util/ArrayList."<init>":()V
      41: checkcast     #147                // class java/util/Collection
      44: astore        7
      46: iconst_0
      47: istore        8
      49: aload         6
      51: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      56: astore        9
      58: aload         9
      60: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      65: ifeq          127
      68: aload         9
      70: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      75: astore        10
      77: aload         10
      79: checkcast     #163                // class java/util/List
      82: astore        11
      84: iconst_0
      85: istore        12
      87: aload_0
      88: invokestatic  #332                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      91: checkcast     #68                 // class ValueCell
      94: aload         11
      96: iload_2
      97: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     102: checkcast     #334                // class java/lang/Number
     105: invokevirtual #337                // Method java/lang/Number.intValue:()I
     108: invokevirtual #341                // Method ValueCell.isPossible:(I)Z
     111: ifeq          58
     114: aload         7
     116: aload         10
     118: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     123: pop
     124: goto          58
     127: aload         7
     129: checkcast     #163                // class java/util/List
     132: nop
     133: checkcast     #102                // class java/lang/Iterable
     136: astore        4
     138: nop
     139: iconst_0
     140: istore        5
     142: aload         4
     144: astore        6
     146: new           #174                // class java/util/ArrayList
     149: dup
     150: invokespecial #210                // Method java/util/ArrayList."<init>":()V
     153: checkcast     #147                // class java/util/Collection
     156: astore        7
     158: iconst_0
     159: istore        8
     161: aload         6
     163: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     168: astore        9
     170: aload         9
     172: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     177: ifeq          223
     180: aload         9
     182: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     187: astore        10
     189: aload         10
     191: checkcast     #163                // class java/util/List
     194: astore        11
     196: iconst_0
     197: istore        12
     199: aload         11
     201: checkcast     #147                // class java/util/Collection
     204: invokestatic  #343                // Method allDifferent:(Ljava/util/Collection;)Z
     207: ifeq          170
     210: aload         7
     212: aload         10
     214: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     219: pop
     220: goto          170
     223: aload         7
     225: checkcast     #163                // class java/util/List
     228: nop
     229: astore_3
     230: aload_3
     231: invokestatic  #345                // Method transpose:(Ljava/util/List;)Ljava/util/List;
     234: checkcast     #102                // class java/lang/Iterable
     237: astore        4
     239: iconst_0
     240: istore        5
     242: aload         4
     244: astore        6
     246: new           #174                // class java/util/ArrayList
     249: dup
     250: aload         4
     252: bipush        10
     254: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     257: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
     260: checkcast     #147                // class java/util/Collection
     263: astore        7
     265: iconst_0
     266: istore        8
     268: aload         6
     270: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     275: astore        9
     277: aload         9
     279: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     284: ifeq          327
     287: aload         9
     289: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     294: astore        10
     296: aload         7
     298: aload         10
     300: checkcast     #163                // class java/util/List
     303: astore        11
     305: astore        13
     307: iconst_0
     308: istore        12
     310: aload         11
     312: invokestatic  #347                // Method v:(Ljava/util/List;)LValueCell;
     315: aload         13
     317: swap
     318: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     323: pop
     324: goto          277
     327: aload         7
     329: checkcast     #163                // class java/util/List
     332: nop
     333: areturn

  public static final java.util.List<java.util.List<ICell>> gatherValues(java.util.List<? extends ICell>);
    Code:
       0: aload_0
       1: ldc_w         #357                // String line
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: invokedynamic #375,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      12: aload_0
      13: invokestatic  #300                // Method partitionBy:(Lkotlin/jvm/functions/Function1;Ljava/util/List;)Ljava/util/List;
      16: areturn

  public static final java.util.List<SimplePair<java.util.List<ICell>>> pairTargetsWithValues(java.util.List<? extends ICell>);
    Code:
       0: aload_0
       1: ldc_w         #357                // String line
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: iconst_2
       8: aload_0
       9: invokestatic  #379                // Method gatherValues:(Ljava/util/List;)Ljava/util/List;
      12: invokestatic  #381                // Method partitionN:(ILjava/util/List;)Ljava/util/List;
      15: checkcast     #102                // class java/lang/Iterable
      18: astore_1
      19: nop
      20: iconst_0
      21: istore_2
      22: aload_1
      23: astore_3
      24: new           #174                // class java/util/ArrayList
      27: dup
      28: aload_1
      29: bipush        10
      31: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      34: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
      37: checkcast     #147                // class java/util/Collection
      40: astore        4
      42: iconst_0
      43: istore        5
      45: aload_3
      46: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      51: astore        6
      53: aload         6
      55: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      60: ifeq          141
      63: aload         6
      65: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      70: astore        7
      72: aload         4
      74: aload         7
      76: checkcast     #163                // class java/util/List
      79: astore        8
      81: astore        10
      83: iconst_0
      84: istore        9
      86: new           #383                // class SimplePair
      89: dup
      90: aload         8
      92: iconst_0
      93: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      98: iconst_1
      99: aload         8
     101: invokeinterface #164,  1          // InterfaceMethod java/util/List.size:()I
     106: if_icmpne     115
     109: invokestatic  #168                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
     112: goto          126
     115: aload         8
     117: iconst_1
     118: invokeinterface #172,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     123: checkcast     #163                // class java/util/List
     126: invokespecial #386                // Method SimplePair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     129: aload         10
     131: swap
     132: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     137: pop
     138: goto          53
     141: aload         4
     143: checkcast     #163                // class java/util/List
     146: nop
     147: areturn

  public static final java.util.List<ICell> solvePair(kotlin.jvm.functions.Function1<? super ICell, java.lang.Integer>, SimplePair<java.util.List<ICell>>);
    Code:
       0: aload_0
       1: ldc_w         #392                // String accessor
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: ldc_w         #394                // String pair
      11: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      14: aload_1
      15: invokevirtual #397                // Method SimplePair.getFirst:()Ljava/lang/Object;
      18: checkcast     #163                // class java/util/List
      21: astore_2
      22: nop
      23: aload_1
      24: invokevirtual #400                // Method SimplePair.getSecond:()Ljava/lang/Object;
      27: checkcast     #163                // class java/util/List
      30: invokeinterface #270,  1          // InterfaceMethod java/util/List.isEmpty:()Z
      35: ifeq          42
      38: aload_2
      39: goto          192
      42: aload_1
      43: invokevirtual #400                // Method SimplePair.getSecond:()Ljava/lang/Object;
      46: checkcast     #102                // class java/lang/Iterable
      49: astore        4
      51: iconst_0
      52: istore        5
      54: aload         4
      56: astore        6
      58: new           #174                // class java/util/ArrayList
      61: dup
      62: aload         4
      64: bipush        10
      66: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      69: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
      72: checkcast     #147                // class java/util/Collection
      75: astore        7
      77: iconst_0
      78: istore        8
      80: aload         6
      82: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      87: astore        9
      89: aload         9
      91: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      96: ifeq          147
      99: aload         9
     101: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     106: astore        10
     108: aload         7
     110: aload         10
     112: checkcast     #402                // class ICell
     115: astore        11
     117: astore        13
     119: iconst_0
     120: istore        12
     122: aload         11
     124: ldc_w         #404                // String null cannot be cast to non-null type <root>.ValueCell
     127: invokestatic  #407                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;Ljava/lang/String;)V
     130: aload         11
     132: checkcast     #68                 // class ValueCell
     135: aload         13
     137: swap
     138: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     143: pop
     144: goto          89
     147: aload         7
     149: checkcast     #163                // class java/util/List
     152: nop
     153: astore_3
     154: aload_0
     155: aload_2
     156: invokestatic  #332                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     159: invokeinterface #292,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
     164: checkcast     #334                // class java/lang/Number
     167: invokevirtual #337                // Method java/lang/Number.intValue:()I
     170: istore        4
     172: aload_3
     173: iload         4
     175: invokestatic  #409                // Method solveStep:(Ljava/util/List;I)Ljava/util/List;
     178: astore        5
     180: aload_2
     181: checkcast     #147                // class java/util/Collection
     184: aload         5
     186: checkcast     #102                // class java/lang/Iterable
     189: invokestatic  #214                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     192: areturn

  public static final java.util.List<ICell> solveLine(java.util.List<? extends ICell>, kotlin.jvm.functions.Function1<? super ICell, java.lang.Integer>);
    Code:
       0: aload_0
       1: ldc_w         #357                // String line
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: ldc_w         #286                // String f
      11: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      14: aload_0
      15: invokestatic  #420                // Method pairTargetsWithValues:(Ljava/util/List;)Ljava/util/List;
      18: checkcast     #102                // class java/lang/Iterable
      21: astore_2
      22: nop
      23: iconst_0
      24: istore_3
      25: aload_2
      26: astore        4
      28: new           #174                // class java/util/ArrayList
      31: dup
      32: aload_2
      33: bipush        10
      35: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      38: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
      41: checkcast     #147                // class java/util/Collection
      44: astore        5
      46: iconst_0
      47: istore        6
      49: aload         4
      51: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      56: astore        7
      58: aload         7
      60: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      65: ifeq          109
      68: aload         7
      70: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      75: astore        8
      77: aload         5
      79: aload         8
      81: checkcast     #383                // class SimplePair
      84: astore        9
      86: astore        11
      88: iconst_0
      89: istore        10
      91: aload_1
      92: aload         9
      94: invokestatic  #422                // Method solvePair:(Lkotlin/jvm/functions/Function1;LSimplePair;)Ljava/util/List;
      97: aload         11
      99: swap
     100: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     105: pop
     106: goto          58
     109: aload         5
     111: checkcast     #163                // class java/util/List
     114: nop
     115: checkcast     #102                // class java/lang/Iterable
     118: invokestatic  #426                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
     121: areturn

  public static final java.util.List<ICell> solveRow(java.util.List<? extends ICell>);
    Code:
       0: aload_0
       1: ldc           #113                // String row
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokedynamic #437,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function1;
      12: invokestatic  #439                // Method solveLine:(Ljava/util/List;Lkotlin/jvm/functions/Function1;)Ljava/util/List;
      15: areturn

  public static final java.util.List<ICell> solveColumn(java.util.List<? extends ICell>);
    Code:
       0: aload_0
       1: ldc_w         #442                // String column
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokedynamic #447,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function1;
      13: invokestatic  #439                // Method solveLine:(Ljava/util/List;Lkotlin/jvm/functions/Function1;)Ljava/util/List;
      16: areturn

  public static final java.util.List<java.util.List<ICell>> solveGrid(java.util.List<? extends java.util.List<? extends ICell>>);
    Code:
       0: aload_0
       1: ldc           #135                // String grid
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #102                // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: astore        4
      16: new           #174                // class java/util/ArrayList
      19: dup
      20: aload_2
      21: bipush        10
      23: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      26: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
      29: checkcast     #147                // class java/util/Collection
      32: astore        5
      34: iconst_0
      35: istore        6
      37: aload         4
      39: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        7
      46: aload         7
      48: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          96
      56: aload         7
      58: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        8
      65: aload         5
      67: aload         8
      69: checkcast     #163                // class java/util/List
      72: astore        9
      74: astore        12
      76: iconst_0
      77: istore        10
      79: aload         9
      81: invokestatic  #451                // Method solveRow:(Ljava/util/List;)Ljava/util/List;
      84: aload         12
      86: swap
      87: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      92: pop
      93: goto          46
      96: aload         5
      98: checkcast     #163                // class java/util/List
     101: nop
     102: astore_1
     103: aload_1
     104: invokestatic  #345                // Method transpose:(Ljava/util/List;)Ljava/util/List;
     107: checkcast     #102                // class java/lang/Iterable
     110: astore_3
     111: iconst_0
     112: istore        4
     114: aload_3
     115: astore        5
     117: new           #174                // class java/util/ArrayList
     120: dup
     121: aload_3
     122: bipush        10
     124: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     127: invokespecial #179                // Method java/util/ArrayList."<init>":(I)V
     130: checkcast     #147                // class java/util/Collection
     133: astore        6
     135: iconst_0
     136: istore        7
     138: aload         5
     140: invokeinterface #183,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     145: astore        8
     147: aload         8
     149: invokeinterface #189,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     154: ifeq          197
     157: aload         8
     159: invokeinterface #193,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     164: astore        9
     166: aload         6
     168: aload         9
     170: checkcast     #163                // class java/util/List
     173: astore        10
     175: astore        12
     177: iconst_0
     178: istore        11
     180: aload         10
     182: invokestatic  #453                // Method solveColumn:(Ljava/util/List;)Ljava/util/List;
     185: aload         12
     187: swap
     188: invokeinterface #201,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     193: pop
     194: goto          147
     197: aload         6
     199: checkcast     #163                // class java/util/List
     202: nop
     203: astore_2
     204: aload_2
     205: invokestatic  #345                // Method transpose:(Ljava/util/List;)Ljava/util/List;
     208: areturn

  public static final java.util.List<java.util.List<ICell>> solver(java.util.List<? extends java.util.List<? extends ICell>>);
    Code:
       0: aload_0
       1: ldc           #135                // String grid
       3: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #147                // class java/util/Collection
      10: invokestatic  #461                // Method drawGrid:(Ljava/util/Collection;)Ljava/lang/String;
      13: getstatic     #467                // Field java/lang/System.out:Ljava/io/PrintStream;
      16: swap
      17: invokevirtual #473                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      20: aload_0
      21: invokestatic  #475                // Method solveGrid:(Ljava/util/List;)Ljava/util/List;
      24: astore_1
      25: aload_1
      26: aload_0
      27: invokestatic  #479                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      30: ifeq          37
      33: aload_1
      34: goto          41
      37: aload_1
      38: invokestatic  #481                // Method solver:(Ljava/util/List;)Ljava/util/List;
      41: areturn

  private static final boolean gatherValues$lambda$11(ICell);
    Code:
       0: aload_0
       1: ldc_w         #483                // String it
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: instanceof    #68                 // class ValueCell
      11: ireturn

  private static final int solveRow$lambda$15(ICell);
    Code:
       0: aload_0
       1: ldc_w         #483                // String it
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: checkcast     #485                // class IAcross
      11: invokeinterface #488,  1          // InterfaceMethod IAcross.getAcross:()I
      16: ireturn

  private static final int solveColumn$lambda$16(ICell);
    Code:
       0: aload_0
       1: ldc_w         #483                // String it
       4: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: checkcast     #490                // class IDown
      11: invokeinterface #493,  1          // InterfaceMethod IDown.getDown:()I
      16: ireturn
}


/**
 * Given a collection of candidate numbers (C) and a target number (T),
 * find all unique combinations in C where the candidate numbers sums to T.
 *
 * Each number in C may only be used once in the combination.
 *
 * Note:
 * All numbers (including target) will be positive integers.
 * The solution set must not contain duplicate combinations.
 * For example, given candidate set [10, 1, 2, 7, 6, 1, 5] and target 8,
 * A solution set is:
 * [
 * [1, 7],
 * [1, 2, 5],
 * [2, 6],
 * [1, 1, 6]
 * ]
 *
 * Accepted.
 */

class CombinationSumII {

    fun combinationSum2(candidates: IntArray, target: Int): List<List<Int>> {
        if (candidates.isEmpty()) {
            return emptyList()
        }
        val lists = mutableListOf<List<Int>>()

        candidates.sort()

        dfs(candidates, target, ArrayList(), lists, 0)

        return lists
    }

    private fun dfs(candidates: IntArray, target: Int, path: MutableList<Int>, ret: MutableList<List<Int>>, index: Int) {
        if (target < 0) {
            return
        }

        if (target == 0) {
            ret.add(ArrayList(path))
            return
        }

        for (i in index until candidates.size) {
            if (i != index && candidates[i] == candidates[i - 1]) {
                continue
            }

            path.add(candidates[i])
            dfs(candidates, target - candidates[i], path, ret, i + 1)
            path.removeAt(path.size - 1)
        }
    }

}

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

  public final java.util.List<java.util.List<java.lang.Integer>> combinationSum2(int[], int);
    Code:
       0: aload_1
       1: ldc           #16                 // String candidates
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: arraylength
       8: ifne          15
      11: iconst_1
      12: goto          16
      15: iconst_0
      16: ifeq          23
      19: invokestatic  #28                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      22: areturn
      23: new           #30                 // class java/util/ArrayList
      26: dup
      27: invokespecial #31                 // Method java/util/ArrayList."<init>":()V
      30: checkcast     #33                 // class java/util/List
      33: astore_3
      34: aload_1
      35: invokestatic  #39                 // Method kotlin/collections/ArraysKt.sort:([I)V
      38: aload_0
      39: aload_1
      40: iload_2
      41: new           #30                 // class java/util/ArrayList
      44: dup
      45: invokespecial #31                 // Method java/util/ArrayList."<init>":()V
      48: checkcast     #33                 // class java/util/List
      51: aload_3
      52: iconst_0
      53: invokespecial #43                 // Method dfs:([IILjava/util/List;Ljava/util/List;I)V
      56: aload_3
      57: areturn

  private final void dfs(int[], int, java.util.List<java.lang.Integer>, java.util.List<java.util.List<java.lang.Integer>>, int);
    Code:
       0: iload_2
       1: ifge          5
       4: return
       5: iload_2
       6: ifne          29
       9: aload         4
      11: new           #30                 // class java/util/ArrayList
      14: dup
      15: aload_3
      16: checkcast     #51                 // class java/util/Collection
      19: invokespecial #54                 // Method java/util/ArrayList."<init>":(Ljava/util/Collection;)V
      22: invokeinterface #58,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      27: pop
      28: return
      29: iload         5
      31: istore        6
      33: aload_1
      34: arraylength
      35: istore        7
      37: iload         6
      39: iload         7
      41: if_icmpge     120
      44: iload         6
      46: iload         5
      48: if_icmpeq     67
      51: aload_1
      52: iload         6
      54: iaload
      55: aload_1
      56: iload         6
      58: iconst_1
      59: isub
      60: iaload
      61: if_icmpne     67
      64: goto          114
      67: aload_3
      68: aload_1
      69: iload         6
      71: iaload
      72: invokestatic  #64                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      75: invokeinterface #58,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      80: pop
      81: aload_0
      82: aload_1
      83: iload_2
      84: aload_1
      85: iload         6
      87: iaload
      88: isub
      89: aload_3
      90: aload         4
      92: iload         6
      94: iconst_1
      95: iadd
      96: invokespecial #43                 // Method dfs:([IILjava/util/List;Ljava/util/List;I)V
      99: aload_3
     100: aload_3
     101: invokeinterface #68,  1           // InterfaceMethod java/util/List.size:()I
     106: iconst_1
     107: isub
     108: invokeinterface #72,  2           // InterfaceMethod java/util/List.remove:(I)Ljava/lang/Object;
     113: pop
     114: iinc          6, 1
     117: goto          37
     120: return
}