import java.io.InputStream

interface IFile {
    val name: String
    val size: Int
}

data class File(override val name: String, override val size: Int) : IFile
data class Directory(
    override val name: String,
    override var size: Int,
    val children: MutableList<IFile>,
    val parent: Directory?,

    ) : IFile

class Day7 {
    companion object {
        private fun sumLessThan100k(dir: Directory): Int {
            val returnSize = if (dir.size <= 100_000) dir.size else 0
            val subDirs = dir.children.filterIsInstance<Directory>()
            if (subDirs.isNotEmpty()) {
                return returnSize + subDirs.sumOf { sumLessThan100k(it) }
            }
            return returnSize
        }

        private fun dirsMoreThan(dir: Directory, min: Int): List<Int> {
            val returnList = if (dir.size >= min) listOf(dir.size) else listOf()
            val subDirs = dir.children.filterIsInstance<Directory>()
            if (subDirs.isNotEmpty()) {
                return returnList + subDirs.flatMap { dirsMoreThan(it, min) }
            }
            return returnList
        }

        fun process(input: InputStream?): Int {
            if (input == null) {
                throw Exception("Input missing")
            }

            return input
                .bufferedReader()
                .useLines { lines ->
                    val root = Directory("/", 0, mutableListOf(), null)
                    var current = root

                    for (line in lines.drop(1)) {
                        when (line.take(4)) {
                            "$ cd" -> {
                                val dir = line.drop(5)
                                if (dir == "..") {
                                    current.size = current.children.sumOf { it.size }
                                    current = current.parent!!
                                } else {
                                    current = current.children.find { it.name == line.drop(5) } as Directory
                                }
                            }

                            "$ ls" -> continue
                            "dir " -> current.children.add(Directory(line.drop(4), 0, mutableListOf(), current))
                            else -> {
                                val split = line.split(" ")
                                current.children.add(File(split[1], split[0].toInt()))
                            }
                        }
                    }
                    current.size = current.children.sumOf { it.size }
                    root.size = root.children.sumOf { it.size }

                    sumLessThan100k(root)
                }
        }

        fun process2(input: InputStream?): Int {
            if (input == null) {
                throw Exception("Input missing")
            }

            return input
                .bufferedReader()
                .useLines { lines ->
                    val root = Directory("/", 0, mutableListOf(), null)
                    var current = root

                    for (line in lines.drop(1)) {
                        when (line.take(4)) {
                            "$ cd" -> {
                                val dir = line.drop(5)
                                if (dir == "..") {
                                    current.size = current.children.sumOf { it.size }
                                    current = current.parent!!
                                } else {
                                    current = current.children.find { it.name == line.drop(5) } as Directory
                                }
                            }

                            "$ ls" -> continue
                            "dir " -> current.children.add(Directory(line.drop(4), 0, mutableListOf(), current))
                            else -> {
                                val split = line.split(" ")
                                current.children.add(File(split[1], split[0].toInt()))
                            }
                        }
                    }
                    while (current.parent != null) {
                        current.size = current.children.sumOf { it.size }
                        current = current.parent!!
                    }

                    root.size = root.children.sumOf { it.size }

                    val toFree = 70_000_000 - 30_000_000 - root.size
                    dirsMoreThan(root, -toFree).min()
                }
        }
    }

}

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

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

  static {};
    Code:
       0: new           #13                 // class Day7$Companion
       3: dup
       4: aconst_null
       5: invokespecial #16                 // Method Day7$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #20                 // Field Companion:LDay7$Companion;
      11: return
}

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

  private final int sumLessThan100k(Directory);
    Code:
       0: aload_1
       1: invokevirtual #18                 // Method Directory.getSize:()I
       4: ldc           #19                 // int 100000
       6: if_icmpgt     16
       9: aload_1
      10: invokevirtual #18                 // Method Directory.getSize:()I
      13: goto          17
      16: iconst_0
      17: istore_2
      18: aload_1
      19: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
      22: checkcast     #25                 // class java/lang/Iterable
      25: astore        4
      27: iconst_0
      28: istore        5
      30: aload         4
      32: astore        6
      34: new           #27                 // class java/util/ArrayList
      37: dup
      38: invokespecial #28                 // Method java/util/ArrayList."<init>":()V
      41: checkcast     #30                 // class java/util/Collection
      44: astore        7
      46: iconst_0
      47: istore        8
      49: aload         6
      51: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      56: astore        9
      58: aload         9
      60: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      65: ifeq          98
      68: aload         9
      70: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      75: astore        10
      77: aload         10
      79: instanceof    #14                 // class Directory
      82: ifeq          58
      85: aload         7
      87: aload         10
      89: invokeinterface #48,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      94: pop
      95: goto          58
      98: aload         7
     100: checkcast     #50                 // class java/util/List
     103: nop
     104: astore_3
     105: aload_3
     106: checkcast     #30                 // class java/util/Collection
     109: invokeinterface #53,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
     114: ifne          121
     117: iconst_1
     118: goto          122
     121: iconst_0
     122: ifeq          209
     125: iload_2
     126: aload_3
     127: checkcast     #25                 // class java/lang/Iterable
     130: astore        4
     132: istore        11
     134: iconst_0
     135: istore        5
     137: aload         4
     139: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     144: astore        6
     146: aload         6
     148: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     153: ifeq          199
     156: aload         6
     158: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     163: astore        7
     165: iload         5
     167: aload         7
     169: checkcast     #14                 // class Directory
     172: astore        8
     174: istore        12
     176: iconst_0
     177: istore        9
     179: getstatic     #58                 // Field Day7.Companion:LDay7$Companion;
     182: aload         8
     184: invokespecial #60                 // Method sumLessThan100k:(LDirectory;)I
     187: istore        13
     189: iload         12
     191: iload         13
     193: iadd
     194: istore        5
     196: goto          146
     199: iload         5
     201: istore        12
     203: iload         11
     205: iload         12
     207: iadd
     208: ireturn
     209: iload_2
     210: ireturn

  private final java.util.List<java.lang.Integer> dirsMoreThan(Directory, int);
    Code:
       0: aload_1
       1: invokevirtual #18                 // Method Directory.getSize:()I
       4: iload_2
       5: if_icmplt     21
       8: aload_1
       9: invokevirtual #18                 // Method Directory.getSize:()I
      12: invokestatic  #86                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      15: invokestatic  #92                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      18: goto          24
      21: invokestatic  #95                 // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      24: astore_3
      25: aload_1
      26: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
      29: checkcast     #25                 // class java/lang/Iterable
      32: astore        5
      34: iconst_0
      35: istore        6
      37: aload         5
      39: astore        7
      41: new           #27                 // class java/util/ArrayList
      44: dup
      45: invokespecial #28                 // Method java/util/ArrayList."<init>":()V
      48: checkcast     #30                 // class java/util/Collection
      51: astore        8
      53: iconst_0
      54: istore        9
      56: aload         7
      58: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      63: astore        10
      65: aload         10
      67: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      72: ifeq          105
      75: aload         10
      77: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      82: astore        11
      84: aload         11
      86: instanceof    #14                 // class Directory
      89: ifeq          65
      92: aload         8
      94: aload         11
      96: invokeinterface #48,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     101: pop
     102: goto          65
     105: aload         8
     107: checkcast     #50                 // class java/util/List
     110: nop
     111: astore        4
     113: aload         4
     115: checkcast     #30                 // class java/util/Collection
     118: invokeinterface #53,  1           // InterfaceMethod java/util/Collection.isEmpty:()Z
     123: ifne          130
     126: iconst_1
     127: goto          131
     130: iconst_0
     131: ifeq          248
     134: aload_3
     135: checkcast     #30                 // class java/util/Collection
     138: aload         4
     140: checkcast     #25                 // class java/lang/Iterable
     143: astore        5
     145: astore        14
     147: iconst_0
     148: istore        6
     150: aload         5
     152: astore        7
     154: new           #27                 // class java/util/ArrayList
     157: dup
     158: invokespecial #28                 // Method java/util/ArrayList."<init>":()V
     161: checkcast     #30                 // class java/util/Collection
     164: astore        8
     166: iconst_0
     167: istore        9
     169: aload         7
     171: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     176: astore        10
     178: aload         10
     180: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     185: ifeq          232
     188: aload         10
     190: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     195: astore        11
     197: aload         11
     199: checkcast     #14                 // class Directory
     202: astore        12
     204: iconst_0
     205: istore        13
     207: getstatic     #58                 // Field Day7.Companion:LDay7$Companion;
     210: aload         12
     212: iload_2
     213: invokespecial #97                 // Method dirsMoreThan:(LDirectory;I)Ljava/util/List;
     216: checkcast     #25                 // class java/lang/Iterable
     219: astore        12
     221: aload         8
     223: aload         12
     225: invokestatic  #101                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     228: pop
     229: goto          178
     232: aload         8
     234: checkcast     #50                 // class java/util/List
     237: nop
     238: aload         14
     240: swap
     241: checkcast     #25                 // class java/lang/Iterable
     244: invokestatic  #105                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     247: areturn
     248: aload_3
     249: areturn

  public final int process(java.io.InputStream);
    Code:
       0: aload_1
       1: ifnonnull     14
       4: new           #120                // class java/lang/Exception
       7: dup
       8: ldc           #122                // String Input missing
      10: invokespecial #125                // Method java/lang/Exception."<init>":(Ljava/lang/String;)V
      13: athrow
      14: aload_1
      15: astore_2
      16: getstatic     #131                // Field kotlin/text/Charsets.UTF_8:Ljava/nio/charset/Charset;
      19: astore_3
      20: new           #133                // class java/io/InputStreamReader
      23: dup
      24: aload_2
      25: aload_3
      26: invokespecial #136                // Method java/io/InputStreamReader."<init>":(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
      29: checkcast     #138                // class java/io/Reader
      32: astore        4
      34: sipush        8192
      37: istore        5
      39: aload         4
      41: instanceof    #140                // class java/io/BufferedReader
      44: ifeq          55
      47: aload         4
      49: checkcast     #140                // class java/io/BufferedReader
      52: goto          66
      55: new           #140                // class java/io/BufferedReader
      58: dup
      59: aload         4
      61: iload         5
      63: invokespecial #143                // Method java/io/BufferedReader."<init>":(Ljava/io/Reader;I)V
      66: checkcast     #138                // class java/io/Reader
      69: astore_2
      70: nop
      71: iconst_0
      72: istore_3
      73: aload_2
      74: astore        4
      76: sipush        8192
      79: istore        5
      81: aload         4
      83: instanceof    #140                // class java/io/BufferedReader
      86: ifeq          97
      89: aload         4
      91: checkcast     #140                // class java/io/BufferedReader
      94: goto          108
      97: new           #140                // class java/io/BufferedReader
     100: dup
     101: aload         4
     103: iload         5
     105: invokespecial #143                // Method java/io/BufferedReader."<init>":(Ljava/io/Reader;I)V
     108: checkcast     #145                // class java/io/Closeable
     111: astore        4
     113: aconst_null
     114: astore        5
     116: nop
     117: aload         4
     119: checkcast     #140                // class java/io/BufferedReader
     122: astore        6
     124: iconst_0
     125: istore        7
     127: aload         6
     129: invokestatic  #151                // Method kotlin/io/TextStreamsKt.lineSequence:(Ljava/io/BufferedReader;)Lkotlin/sequences/Sequence;
     132: astore        8
     134: iconst_0
     135: istore        9
     137: new           #14                 // class Directory
     140: dup
     141: ldc           #153                // String /
     143: iconst_0
     144: new           #27                 // class java/util/ArrayList
     147: dup
     148: invokespecial #28                 // Method java/util/ArrayList."<init>":()V
     151: checkcast     #50                 // class java/util/List
     154: aconst_null
     155: invokespecial #156                // Method Directory."<init>":(Ljava/lang/String;ILjava/util/List;LDirectory;)V
     158: astore        10
     160: aload         10
     162: astore        11
     164: aload         8
     166: iconst_1
     167: invokestatic  #162                // Method kotlin/sequences/SequencesKt.drop:(Lkotlin/sequences/Sequence;I)Lkotlin/sequences/Sequence;
     170: invokeinterface #165,  1          // InterfaceMethod kotlin/sequences/Sequence.iterator:()Ljava/util/Iterator;
     175: astore        12
     177: aload         12
     179: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     184: ifeq          610
     187: aload         12
     189: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     194: checkcast     #167                // class java/lang/String
     197: astore        13
     199: aload         13
     201: iconst_4
     202: invokestatic  #173                // Method kotlin/text/StringsKt.take:(Ljava/lang/String;I)Ljava/lang/String;
     205: astore        14
     207: aload         14
     209: invokevirtual #176                // Method java/lang/String.hashCode:()I
     212: lookupswitch  { // 3
               1106397: 274
               1106691: 248
               3083571: 261
               default: 535
          }
     248: aload         14
     250: ldc           #178                // String $ ls
     252: invokevirtual #181                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
     255: ifne          492
     258: goto          535
     261: aload         14
     263: ldc           #183                // String dir
     265: invokevirtual #181                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
     268: ifne          495
     271: goto          535
     274: aload         14
     276: ldc           #185                // String $ cd
     278: invokevirtual #181                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
     281: ifeq          535
     284: aload         13
     286: iconst_5
     287: invokestatic  #187                // Method kotlin/text/StringsKt.drop:(Ljava/lang/String;I)Ljava/lang/String;
     290: astore        15
     292: aload         15
     294: ldc           #189                // String ..
     296: invokestatic  #195                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     299: ifeq          405
     302: aload         11
     304: aload         11
     306: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     309: checkcast     #25                 // class java/lang/Iterable
     312: astore        16
     314: astore        17
     316: iconst_0
     317: istore        18
     319: aload         16
     321: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     326: astore        19
     328: aload         19
     330: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     335: ifeq          380
     338: aload         19
     340: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     345: astore        20
     347: iload         18
     349: aload         20
     351: checkcast     #197                // class IFile
     354: astore        21
     356: istore        22
     358: iconst_0
     359: istore        23
     361: aload         21
     363: invokeinterface #198,  1          // InterfaceMethod IFile.getSize:()I
     368: istore        24
     370: iload         22
     372: iload         24
     374: iadd
     375: istore        18
     377: goto          328
     380: iload         18
     382: istore        22
     384: aload         17
     386: iload         22
     388: invokevirtual #202                // Method Directory.setSize:(I)V
     391: aload         11
     393: invokevirtual #206                // Method Directory.getParent:()LDirectory;
     396: dup
     397: invokestatic  #210                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     400: astore        11
     402: goto          177
     405: aload         11
     407: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     410: checkcast     #25                 // class java/lang/Iterable
     413: astore        19
     415: aload         19
     417: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     422: astore        20
     424: aload         20
     426: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     431: ifeq          477
     434: aload         20
     436: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     441: astore        21
     443: aload         21
     445: checkcast     #197                // class IFile
     448: astore        23
     450: iconst_0
     451: istore        25
     453: aload         23
     455: invokeinterface #214,  1          // InterfaceMethod IFile.getName:()Ljava/lang/String;
     460: aload         13
     462: iconst_5
     463: invokestatic  #187                // Method kotlin/text/StringsKt.drop:(Ljava/lang/String;I)Ljava/lang/String;
     466: invokestatic  #195                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     469: ifeq          424
     472: aload         21
     474: goto          478
     477: aconst_null
     478: dup
     479: ldc           #216                // String null cannot be cast to non-null type <root>.Directory
     481: invokestatic  #219                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;Ljava/lang/String;)V
     484: checkcast     #14                 // class Directory
     487: astore        11
     489: goto          177
     492: goto          177
     495: aload         11
     497: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     500: new           #14                 // class Directory
     503: dup
     504: aload         13
     506: iconst_4
     507: invokestatic  #187                // Method kotlin/text/StringsKt.drop:(Ljava/lang/String;I)Ljava/lang/String;
     510: iconst_0
     511: new           #27                 // class java/util/ArrayList
     514: dup
     515: invokespecial #28                 // Method java/util/ArrayList."<init>":()V
     518: checkcast     #50                 // class java/util/List
     521: aload         11
     523: invokespecial #156                // Method Directory."<init>":(Ljava/lang/String;ILjava/util/List;LDirectory;)V
     526: invokeinterface #220,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     531: pop
     532: goto          177
     535: aload         13
     537: checkcast     #222                // class java/lang/CharSequence
     540: iconst_1
     541: anewarray     #167                // class java/lang/String
     544: astore        16
     546: aload         16
     548: iconst_0
     549: ldc           #224                // String
     551: aastore
     552: aload         16
     554: iconst_0
     555: iconst_0
     556: bipush        6
     558: aconst_null
     559: invokestatic  #228                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     562: astore        15
     564: aload         11
     566: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     569: new           #230                // class File
     572: dup
     573: aload         15
     575: iconst_1
     576: invokeinterface #234,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     581: checkcast     #167                // class java/lang/String
     584: aload         15
     586: iconst_0
     587: invokeinterface #234,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     592: checkcast     #167                // class java/lang/String
     595: invokestatic  #238                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     598: invokespecial #241                // Method File."<init>":(Ljava/lang/String;I)V
     601: invokeinterface #220,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     606: pop
     607: goto          177
     610: aload         11
     612: aload         11
     614: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     617: checkcast     #25                 // class java/lang/Iterable
     620: astore        12
     622: astore        17
     624: iconst_0
     625: istore        13
     627: aload         12
     629: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     634: astore        14
     636: aload         14
     638: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     643: ifeq          688
     646: aload         14
     648: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     653: astore        15
     655: iload         13
     657: aload         15
     659: checkcast     #197                // class IFile
     662: astore        16
     664: istore        22
     666: iconst_0
     667: istore        18
     669: aload         16
     671: invokeinterface #198,  1          // InterfaceMethod IFile.getSize:()I
     676: istore        24
     678: iload         22
     680: iload         24
     682: iadd
     683: istore        13
     685: goto          636
     688: iload         13
     690: istore        22
     692: aload         17
     694: iload         22
     696: invokevirtual #202                // Method Directory.setSize:(I)V
     699: aload         10
     701: aload         10
     703: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     706: checkcast     #25                 // class java/lang/Iterable
     709: astore        12
     711: astore        17
     713: iconst_0
     714: istore        13
     716: aload         12
     718: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     723: astore        14
     725: aload         14
     727: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     732: ifeq          777
     735: aload         14
     737: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     742: astore        15
     744: iload         13
     746: aload         15
     748: checkcast     #197                // class IFile
     751: astore        16
     753: istore        22
     755: iconst_0
     756: istore        18
     758: aload         16
     760: invokeinterface #198,  1          // InterfaceMethod IFile.getSize:()I
     765: istore        24
     767: iload         22
     769: iload         24
     771: iadd
     772: istore        13
     774: goto          725
     777: iload         13
     779: istore        22
     781: aload         17
     783: iload         22
     785: invokevirtual #202                // Method Directory.setSize:(I)V
     788: getstatic     #58                 // Field Day7.Companion:LDay7$Companion;
     791: aload         10
     793: invokespecial #60                 // Method sumLessThan100k:(LDirectory;)I
     796: istore        6
     798: aload         4
     800: aload         5
     802: invokestatic  #247                // Method kotlin/io/CloseableKt.closeFinally:(Ljava/io/Closeable;Ljava/lang/Throwable;)V
     805: iload         6
     807: goto          831
     810: astore        7
     812: aload         7
     814: astore        5
     816: aload         7
     818: athrow
     819: astore        7
     821: aload         4
     823: aload         5
     825: invokestatic  #247                // Method kotlin/io/CloseableKt.closeFinally:(Ljava/io/Closeable;Ljava/lang/Throwable;)V
     828: aload         7
     830: athrow
     831: nop
     832: ireturn
    Exception table:
       from    to  target type
         116   798   810   Class java/lang/Throwable
         116   798   819   any
         810   819   819   any
         819   821   819   any

  public final int process2(java.io.InputStream);
    Code:
       0: aload_1
       1: ifnonnull     14
       4: new           #120                // class java/lang/Exception
       7: dup
       8: ldc           #122                // String Input missing
      10: invokespecial #125                // Method java/lang/Exception."<init>":(Ljava/lang/String;)V
      13: athrow
      14: aload_1
      15: astore_2
      16: getstatic     #131                // Field kotlin/text/Charsets.UTF_8:Ljava/nio/charset/Charset;
      19: astore_3
      20: new           #133                // class java/io/InputStreamReader
      23: dup
      24: aload_2
      25: aload_3
      26: invokespecial #136                // Method java/io/InputStreamReader."<init>":(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
      29: checkcast     #138                // class java/io/Reader
      32: astore        4
      34: sipush        8192
      37: istore        5
      39: aload         4
      41: instanceof    #140                // class java/io/BufferedReader
      44: ifeq          55
      47: aload         4
      49: checkcast     #140                // class java/io/BufferedReader
      52: goto          66
      55: new           #140                // class java/io/BufferedReader
      58: dup
      59: aload         4
      61: iload         5
      63: invokespecial #143                // Method java/io/BufferedReader."<init>":(Ljava/io/Reader;I)V
      66: checkcast     #138                // class java/io/Reader
      69: astore_2
      70: nop
      71: iconst_0
      72: istore_3
      73: aload_2
      74: astore        4
      76: sipush        8192
      79: istore        5
      81: aload         4
      83: instanceof    #140                // class java/io/BufferedReader
      86: ifeq          97
      89: aload         4
      91: checkcast     #140                // class java/io/BufferedReader
      94: goto          108
      97: new           #140                // class java/io/BufferedReader
     100: dup
     101: aload         4
     103: iload         5
     105: invokespecial #143                // Method java/io/BufferedReader."<init>":(Ljava/io/Reader;I)V
     108: checkcast     #145                // class java/io/Closeable
     111: astore        4
     113: aconst_null
     114: astore        5
     116: nop
     117: aload         4
     119: checkcast     #140                // class java/io/BufferedReader
     122: astore        6
     124: iconst_0
     125: istore        7
     127: aload         6
     129: invokestatic  #151                // Method kotlin/io/TextStreamsKt.lineSequence:(Ljava/io/BufferedReader;)Lkotlin/sequences/Sequence;
     132: astore        8
     134: iconst_0
     135: istore        9
     137: new           #14                 // class Directory
     140: dup
     141: ldc           #153                // String /
     143: iconst_0
     144: new           #27                 // class java/util/ArrayList
     147: dup
     148: invokespecial #28                 // Method java/util/ArrayList."<init>":()V
     151: checkcast     #50                 // class java/util/List
     154: aconst_null
     155: invokespecial #156                // Method Directory."<init>":(Ljava/lang/String;ILjava/util/List;LDirectory;)V
     158: astore        10
     160: aload         10
     162: astore        11
     164: aload         8
     166: iconst_1
     167: invokestatic  #162                // Method kotlin/sequences/SequencesKt.drop:(Lkotlin/sequences/Sequence;I)Lkotlin/sequences/Sequence;
     170: invokeinterface #165,  1          // InterfaceMethod kotlin/sequences/Sequence.iterator:()Ljava/util/Iterator;
     175: astore        12
     177: aload         12
     179: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     184: ifeq          610
     187: aload         12
     189: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     194: checkcast     #167                // class java/lang/String
     197: astore        13
     199: aload         13
     201: iconst_4
     202: invokestatic  #173                // Method kotlin/text/StringsKt.take:(Ljava/lang/String;I)Ljava/lang/String;
     205: astore        14
     207: aload         14
     209: invokevirtual #176                // Method java/lang/String.hashCode:()I
     212: lookupswitch  { // 3
               1106397: 274
               1106691: 248
               3083571: 261
               default: 535
          }
     248: aload         14
     250: ldc           #178                // String $ ls
     252: invokevirtual #181                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
     255: ifne          492
     258: goto          535
     261: aload         14
     263: ldc           #183                // String dir
     265: invokevirtual #181                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
     268: ifne          495
     271: goto          535
     274: aload         14
     276: ldc           #185                // String $ cd
     278: invokevirtual #181                // Method java/lang/String.equals:(Ljava/lang/Object;)Z
     281: ifeq          535
     284: aload         13
     286: iconst_5
     287: invokestatic  #187                // Method kotlin/text/StringsKt.drop:(Ljava/lang/String;I)Ljava/lang/String;
     290: astore        15
     292: aload         15
     294: ldc           #189                // String ..
     296: invokestatic  #195                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     299: ifeq          405
     302: aload         11
     304: aload         11
     306: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     309: checkcast     #25                 // class java/lang/Iterable
     312: astore        16
     314: astore        17
     316: iconst_0
     317: istore        18
     319: aload         16
     321: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     326: astore        19
     328: aload         19
     330: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     335: ifeq          380
     338: aload         19
     340: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     345: astore        20
     347: iload         18
     349: aload         20
     351: checkcast     #197                // class IFile
     354: astore        21
     356: istore        22
     358: iconst_0
     359: istore        23
     361: aload         21
     363: invokeinterface #198,  1          // InterfaceMethod IFile.getSize:()I
     368: istore        24
     370: iload         22
     372: iload         24
     374: iadd
     375: istore        18
     377: goto          328
     380: iload         18
     382: istore        22
     384: aload         17
     386: iload         22
     388: invokevirtual #202                // Method Directory.setSize:(I)V
     391: aload         11
     393: invokevirtual #206                // Method Directory.getParent:()LDirectory;
     396: dup
     397: invokestatic  #210                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     400: astore        11
     402: goto          177
     405: aload         11
     407: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     410: checkcast     #25                 // class java/lang/Iterable
     413: astore        19
     415: aload         19
     417: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     422: astore        20
     424: aload         20
     426: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     431: ifeq          477
     434: aload         20
     436: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     441: astore        21
     443: aload         21
     445: checkcast     #197                // class IFile
     448: astore        23
     450: iconst_0
     451: istore        25
     453: aload         23
     455: invokeinterface #214,  1          // InterfaceMethod IFile.getName:()Ljava/lang/String;
     460: aload         13
     462: iconst_5
     463: invokestatic  #187                // Method kotlin/text/StringsKt.drop:(Ljava/lang/String;I)Ljava/lang/String;
     466: invokestatic  #195                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     469: ifeq          424
     472: aload         21
     474: goto          478
     477: aconst_null
     478: dup
     479: ldc           #216                // String null cannot be cast to non-null type <root>.Directory
     481: invokestatic  #219                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;Ljava/lang/String;)V
     484: checkcast     #14                 // class Directory
     487: astore        11
     489: goto          177
     492: goto          177
     495: aload         11
     497: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     500: new           #14                 // class Directory
     503: dup
     504: aload         13
     506: iconst_4
     507: invokestatic  #187                // Method kotlin/text/StringsKt.drop:(Ljava/lang/String;I)Ljava/lang/String;
     510: iconst_0
     511: new           #27                 // class java/util/ArrayList
     514: dup
     515: invokespecial #28                 // Method java/util/ArrayList."<init>":()V
     518: checkcast     #50                 // class java/util/List
     521: aload         11
     523: invokespecial #156                // Method Directory."<init>":(Ljava/lang/String;ILjava/util/List;LDirectory;)V
     526: invokeinterface #220,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     531: pop
     532: goto          177
     535: aload         13
     537: checkcast     #222                // class java/lang/CharSequence
     540: iconst_1
     541: anewarray     #167                // class java/lang/String
     544: astore        16
     546: aload         16
     548: iconst_0
     549: ldc           #224                // String
     551: aastore
     552: aload         16
     554: iconst_0
     555: iconst_0
     556: bipush        6
     558: aconst_null
     559: invokestatic  #228                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     562: astore        15
     564: aload         11
     566: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     569: new           #230                // class File
     572: dup
     573: aload         15
     575: iconst_1
     576: invokeinterface #234,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     581: checkcast     #167                // class java/lang/String
     584: aload         15
     586: iconst_0
     587: invokeinterface #234,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     592: checkcast     #167                // class java/lang/String
     595: invokestatic  #238                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     598: invokespecial #241                // Method File."<init>":(Ljava/lang/String;I)V
     601: invokeinterface #220,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     606: pop
     607: goto          177
     610: aload         11
     612: invokevirtual #206                // Method Directory.getParent:()LDirectory;
     615: ifnull        721
     618: aload         11
     620: aload         11
     622: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     625: checkcast     #25                 // class java/lang/Iterable
     628: astore        12
     630: astore        17
     632: iconst_0
     633: istore        13
     635: aload         12
     637: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     642: astore        14
     644: aload         14
     646: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     651: ifeq          696
     654: aload         14
     656: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     661: astore        15
     663: iload         13
     665: aload         15
     667: checkcast     #197                // class IFile
     670: astore        16
     672: istore        22
     674: iconst_0
     675: istore        18
     677: aload         16
     679: invokeinterface #198,  1          // InterfaceMethod IFile.getSize:()I
     684: istore        24
     686: iload         22
     688: iload         24
     690: iadd
     691: istore        13
     693: goto          644
     696: iload         13
     698: istore        22
     700: aload         17
     702: iload         22
     704: invokevirtual #202                // Method Directory.setSize:(I)V
     707: aload         11
     709: invokevirtual #206                // Method Directory.getParent:()LDirectory;
     712: dup
     713: invokestatic  #210                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     716: astore        11
     718: goto          610
     721: aload         10
     723: aload         10
     725: invokevirtual #23                 // Method Directory.getChildren:()Ljava/util/List;
     728: checkcast     #25                 // class java/lang/Iterable
     731: astore        12
     733: astore        17
     735: iconst_0
     736: istore        13
     738: aload         12
     740: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     745: astore        14
     747: aload         14
     749: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     754: ifeq          799
     757: aload         14
     759: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     764: astore        15
     766: iload         13
     768: aload         15
     770: checkcast     #197                // class IFile
     773: astore        16
     775: istore        22
     777: iconst_0
     778: istore        18
     780: aload         16
     782: invokeinterface #198,  1          // InterfaceMethod IFile.getSize:()I
     787: istore        24
     789: iload         22
     791: iload         24
     793: iadd
     794: istore        13
     796: goto          747
     799: iload         13
     801: istore        22
     803: aload         17
     805: iload         22
     807: invokevirtual #202                // Method Directory.setSize:(I)V
     810: ldc_w         #274                // int 40000000
     813: aload         10
     815: invokevirtual #18                 // Method Directory.getSize:()I
     818: isub
     819: istore        12
     821: getstatic     #58                 // Field Day7.Companion:LDay7$Companion;
     824: aload         10
     826: iload         12
     828: ineg
     829: invokespecial #97                 // Method dirsMoreThan:(LDirectory;I)Ljava/util/List;
     832: checkcast     #25                 // class java/lang/Iterable
     835: invokestatic  #278                // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     838: checkcast     #280                // class java/lang/Number
     841: invokevirtual #283                // Method java/lang/Number.intValue:()I
     844: istore        6
     846: aload         4
     848: aload         5
     850: invokestatic  #247                // Method kotlin/io/CloseableKt.closeFinally:(Ljava/io/Closeable;Ljava/lang/Throwable;)V
     853: iload         6
     855: goto          879
     858: astore        7
     860: aload         7
     862: astore        5
     864: aload         7
     866: athrow
     867: astore        7
     869: aload         4
     871: aload         5
     873: invokestatic  #247                // Method kotlin/io/CloseableKt.closeFinally:(Ljava/io/Closeable;Ljava/lang/Throwable;)V
     876: aload         7
     878: athrow
     879: nop
     880: ireturn
    Exception table:
       from    to  target type
         116   846   858   Class java/lang/Throwable
         116   846   867   any
         858   867   867   any
         867   869   867   any

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


import java.io.InputStream
import kotlin.math.sqrt

class Day8 {
    companion object {
        private fun readTreeMap(input: InputStream?): String {
            if (input == null) {
                throw Exception("Input missing")
            }

            return input.reader().readLines().joinToString("")
        }

        fun process(input: InputStream?): Int {
            val treeMap = readTreeMap(input)
            val side = sqrt(treeMap.length.toDouble()).toInt()

            return treeMap.mapIndexed { index, c ->
                val x = index % side
                val y = index / side

                if (x == 0 || x + 1 == side || y == 0 || y + 1 == side) {
                    print(1)
                    1
                } else {
                    if ((y * side until index).any { treeMap[it] >= c } &&
                        (index + 1 until (y + 1) * side).any { treeMap[it] >= c } &&
                        (x until index step side).any { treeMap[it] >= c } &&
                        ((index + side)..treeMap.length step side).any { treeMap[it] >= c }) {
                        print(0)
                        0
                    } else {
                        print(1)
                        1
                    }
                }
            }
                .sum()
        }

        private fun countVisibility(treeMap: String, start: Int, end: Int, step: Int, height: Char): Int {
            var index = start + step
            var sum = 0
            if (step > 0) {
                while (index < treeMap.length && index < end) {
                    sum++
                    if (treeMap[index] >= height) break
                    index += step
                }
            } else {
                while (index >= 0 && index > end) {
                    sum++
                    if (treeMap[index] >= height) break
                    index += step
                }
            }

            return sum
        }

        fun process2(input: InputStream?): Int {
            val treeMap = readTreeMap(input)
            val side = sqrt(treeMap.length.toDouble()).toInt()

            return treeMap.mapIndexed { index, c -> Pair(index, c) }.filter { pair ->
                val x = pair.first % side
                val y = pair.first / side

                if (x == 0 || x + 1 == side || y == 0 || y + 1 == side) {
                    true
                } else {
                    !((y * side until pair.first).any { treeMap[it] >= pair.second } &&
                            (pair.first + 1 until (y + 1) * side).any { treeMap[it] >= pair.second } &&
                            (x until pair.first step side).any { treeMap[it] >= pair.second } &&
                            ((pair.first + side)..treeMap.length step side).any { treeMap[it] >= pair.second })
                }
            }.maxOf { pair ->
                val x = pair.first % side
                val y = pair.first / side

                if (x == 0 || x + 1 == side || y == 0 || y + 1 == side) {
                    0
                } else {
                    val left = countVisibility(treeMap, pair.first, y * side - 1, -1, pair.second)
                    val right = countVisibility(treeMap, pair.first, (y + 1) * side, 1, pair.second)
                    val up = countVisibility(treeMap, pair.first, x - 1, -side, pair.second)
                    val down = countVisibility(treeMap, pair.first, treeMap.length, side, pair.second)

//                    val left = (pair.first - 1..y * side).takeWhile { treeMap[it] < pair.second }.count() + 1
//                    val right = (pair.first + 1 until (y + 1) * side).takeWhile { treeMap[it] < pair.second }
//                        .count() + 1
//                    val up = (pair.first - side..x step side).takeWhile { treeMap[it] < pair.second }.count() + 1
//                    val down = (pair.first + side..treeMap.length step side).takeWhile { treeMap[it] < pair.second }
//                        .count() + 1

                    println("${x},${y}: ${left * right * up * down}")

                    left * right * up * down
                }
            }
        }
    }

}

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

  private final java.lang.String readTreeMap(java.io.InputStream);
    Code:
       0: aload_1
       1: ifnonnull     14
       4: new           #14                 // class java/lang/Exception
       7: dup
       8: ldc           #16                 // String Input missing
      10: invokespecial #19                 // Method java/lang/Exception."<init>":(Ljava/lang/String;)V
      13: athrow
      14: aload_1
      15: astore_2
      16: getstatic     #25                 // Field kotlin/text/Charsets.UTF_8:Ljava/nio/charset/Charset;
      19: astore_3
      20: new           #27                 // class java/io/InputStreamReader
      23: dup
      24: aload_2
      25: aload_3
      26: invokespecial #30                 // Method java/io/InputStreamReader."<init>":(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
      29: checkcast     #32                 // class java/io/Reader
      32: invokestatic  #38                 // Method kotlin/io/TextStreamsKt.readLines:(Ljava/io/Reader;)Ljava/util/List;
      35: checkcast     #40                 // class java/lang/Iterable
      38: ldc           #42                 // String
      40: checkcast     #44                 // class java/lang/CharSequence
      43: aconst_null
      44: aconst_null
      45: iconst_0
      46: aconst_null
      47: aconst_null
      48: bipush        62
      50: aconst_null
      51: invokestatic  #50                 // 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;
      54: areturn

  public final int process(java.io.InputStream);
    Code:
       0: aload_0
       1: aload_1
       2: invokespecial #57                 // Method readTreeMap:(Ljava/io/InputStream;)Ljava/lang/String;
       5: astore_2
       6: aload_2
       7: invokevirtual #63                 // Method java/lang/String.length:()I
      10: i2d
      11: invokestatic  #69                 // Method java/lang/Math.sqrt:(D)D
      14: d2i
      15: istore_3
      16: aload_2
      17: checkcast     #44                 // class java/lang/CharSequence
      20: astore        4
      22: iconst_0
      23: istore        5
      25: aload         4
      27: astore        6
      29: new           #71                 // class java/util/ArrayList
      32: dup
      33: aload         4
      35: invokeinterface #72,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      40: invokespecial #75                 // Method java/util/ArrayList."<init>":(I)V
      43: checkcast     #77                 // class java/util/Collection
      46: astore        7
      48: iconst_0
      49: istore        8
      51: iconst_0
      52: istore        9
      54: iconst_0
      55: istore        10
      57: iload         10
      59: aload         6
      61: invokeinterface #72,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      66: if_icmpge     651
      69: aload         6
      71: iload         10
      73: invokeinterface #81,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      78: istore        11
      80: aload         7
      82: iload         9
      84: iinc          9, 1
      87: iload         11
      89: istore        12
      91: istore        13
      93: astore        23
      95: iconst_0
      96: istore        14
      98: iload         13
     100: iload_3
     101: irem
     102: istore        15
     104: iload         13
     106: iload_3
     107: idiv
     108: istore        16
     110: iload         15
     112: ifeq          136
     115: iload         15
     117: iconst_1
     118: iadd
     119: iload_3
     120: if_icmpeq     136
     123: iload         16
     125: ifeq          136
     128: iload         16
     130: iconst_1
     131: iadd
     132: iload_3
     133: if_icmpne     151
     136: iconst_1
     137: istore        17
     139: getstatic     #87                 // Field java/lang/System.out:Ljava/io/PrintStream;
     142: iload         17
     144: invokevirtual #92                 // Method java/io/PrintStream.print:(I)V
     147: iconst_1
     148: goto          632
     151: iload         16
     153: iload_3
     154: imul
     155: iload         13
     157: invokestatic  #98                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     160: checkcast     #40                 // class java/lang/Iterable
     163: astore        17
     165: iconst_0
     166: istore        18
     168: aload         17
     170: instanceof    #77                 // class java/util/Collection
     173: ifeq          193
     176: aload         17
     178: checkcast     #77                 // class java/util/Collection
     181: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     186: ifeq          193
     189: iconst_0
     190: goto          256
     193: aload         17
     195: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     200: astore        19
     202: aload         19
     204: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     209: ifeq          255
     212: aload         19
     214: checkcast     #113                // class kotlin/collections/IntIterator
     217: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     220: istore        20
     222: iload         20
     224: istore        21
     226: iconst_0
     227: istore        22
     229: aload_2
     230: iload         21
     232: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     235: iload         12
     237: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     240: iflt          247
     243: iconst_1
     244: goto          248
     247: iconst_0
     248: ifeq          202
     251: iconst_1
     252: goto          256
     255: iconst_0
     256: ifeq          620
     259: iload         13
     261: iconst_1
     262: iadd
     263: iload         16
     265: iconst_1
     266: iadd
     267: iload_3
     268: imul
     269: invokestatic  #98                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     272: checkcast     #40                 // class java/lang/Iterable
     275: astore        17
     277: iconst_0
     278: istore        18
     280: aload         17
     282: instanceof    #77                 // class java/util/Collection
     285: ifeq          305
     288: aload         17
     290: checkcast     #77                 // class java/util/Collection
     293: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     298: ifeq          305
     301: iconst_0
     302: goto          368
     305: aload         17
     307: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     312: astore        19
     314: aload         19
     316: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     321: ifeq          367
     324: aload         19
     326: checkcast     #113                // class kotlin/collections/IntIterator
     329: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     332: istore        20
     334: iload         20
     336: istore        21
     338: iconst_0
     339: istore        22
     341: aload_2
     342: iload         21
     344: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     347: iload         12
     349: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     352: iflt          359
     355: iconst_1
     356: goto          360
     359: iconst_0
     360: ifeq          314
     363: iconst_1
     364: goto          368
     367: iconst_0
     368: ifeq          620
     371: iload         15
     373: iload         13
     375: invokestatic  #98                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     378: checkcast     #125                // class kotlin/ranges/IntProgression
     381: iload_3
     382: invokestatic  #129                // Method kotlin/ranges/RangesKt.step:(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
     385: checkcast     #40                 // class java/lang/Iterable
     388: astore        17
     390: iconst_0
     391: istore        18
     393: aload         17
     395: instanceof    #77                 // class java/util/Collection
     398: ifeq          418
     401: aload         17
     403: checkcast     #77                 // class java/util/Collection
     406: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     411: ifeq          418
     414: iconst_0
     415: goto          481
     418: aload         17
     420: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     425: astore        19
     427: aload         19
     429: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     434: ifeq          480
     437: aload         19
     439: checkcast     #113                // class kotlin/collections/IntIterator
     442: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     445: istore        20
     447: iload         20
     449: istore        21
     451: iconst_0
     452: istore        22
     454: aload_2
     455: iload         21
     457: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     460: iload         12
     462: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     465: iflt          472
     468: iconst_1
     469: goto          473
     472: iconst_0
     473: ifeq          427
     476: iconst_1
     477: goto          481
     480: iconst_0
     481: ifeq          620
     484: new           #131                // class kotlin/ranges/IntRange
     487: dup
     488: iload         13
     490: iload_3
     491: iadd
     492: aload_2
     493: invokevirtual #63                 // Method java/lang/String.length:()I
     496: invokespecial #134                // Method kotlin/ranges/IntRange."<init>":(II)V
     499: checkcast     #125                // class kotlin/ranges/IntProgression
     502: iload_3
     503: invokestatic  #129                // Method kotlin/ranges/RangesKt.step:(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
     506: checkcast     #40                 // class java/lang/Iterable
     509: astore        17
     511: iconst_0
     512: istore        18
     514: aload         17
     516: instanceof    #77                 // class java/util/Collection
     519: ifeq          539
     522: aload         17
     524: checkcast     #77                 // class java/util/Collection
     527: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     532: ifeq          539
     535: iconst_0
     536: goto          602
     539: aload         17
     541: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     546: astore        19
     548: aload         19
     550: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     555: ifeq          601
     558: aload         19
     560: checkcast     #113                // class kotlin/collections/IntIterator
     563: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     566: istore        20
     568: iload         20
     570: istore        21
     572: iconst_0
     573: istore        22
     575: aload_2
     576: iload         21
     578: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     581: iload         12
     583: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     586: iflt          593
     589: iconst_1
     590: goto          594
     593: iconst_0
     594: ifeq          548
     597: iconst_1
     598: goto          602
     601: iconst_0
     602: ifeq          620
     605: iconst_0
     606: istore        17
     608: getstatic     #87                 // Field java/lang/System.out:Ljava/io/PrintStream;
     611: iload         17
     613: invokevirtual #92                 // Method java/io/PrintStream.print:(I)V
     616: iconst_0
     617: goto          632
     620: iconst_1
     621: istore        17
     623: getstatic     #87                 // Field java/lang/System.out:Ljava/io/PrintStream;
     626: iload         17
     628: invokevirtual #92                 // Method java/io/PrintStream.print:(I)V
     631: iconst_1
     632: nop
     633: invokestatic  #140                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     636: aload         23
     638: swap
     639: invokeinterface #144,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     644: pop
     645: iinc          10, 1
     648: goto          57
     651: aload         7
     653: checkcast     #146                // class java/util/List
     656: nop
     657: checkcast     #40                 // class java/lang/Iterable
     660: invokestatic  #150                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     663: ireturn

  private final int countVisibility(java.lang.String, int, int, int, char);
    Code:
       0: iload_2
       1: iload         4
       3: iadd
       4: istore        6
       6: iconst_0
       7: istore        7
       9: iload         4
      11: ifle          56
      14: iload         6
      16: aload_1
      17: invokevirtual #63                 // Method java/lang/String.length:()I
      20: if_icmpge     94
      23: iload         6
      25: iload_3
      26: if_icmpge     94
      29: iinc          7, 1
      32: aload_1
      33: iload         6
      35: invokevirtual #117                // Method java/lang/String.charAt:(I)C
      38: iload         5
      40: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
      43: ifge          94
      46: iload         6
      48: iload         4
      50: iadd
      51: istore        6
      53: goto          14
      56: iload         6
      58: iflt          94
      61: iload         6
      63: iload_3
      64: if_icmple     94
      67: iinc          7, 1
      70: aload_1
      71: iload         6
      73: invokevirtual #117                // Method java/lang/String.charAt:(I)C
      76: iload         5
      78: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
      81: ifge          94
      84: iload         6
      86: iload         4
      88: iadd
      89: istore        6
      91: goto          56
      94: iload         7
      96: ireturn

  public final int process2(java.io.InputStream);
    Code:
       0: aload_0
       1: aload_1
       2: invokespecial #57                 // Method readTreeMap:(Ljava/io/InputStream;)Ljava/lang/String;
       5: astore_2
       6: aload_2
       7: invokevirtual #63                 // Method java/lang/String.length:()I
      10: i2d
      11: invokestatic  #69                 // Method java/lang/Math.sqrt:(D)D
      14: d2i
      15: istore_3
      16: aload_2
      17: checkcast     #44                 // class java/lang/CharSequence
      20: astore        4
      22: iconst_0
      23: istore        5
      25: aload         4
      27: astore        6
      29: new           #71                 // class java/util/ArrayList
      32: dup
      33: aload         4
      35: invokeinterface #72,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      40: invokespecial #75                 // Method java/util/ArrayList."<init>":(I)V
      43: checkcast     #77                 // class java/util/Collection
      46: astore        7
      48: iconst_0
      49: istore        8
      51: iconst_0
      52: istore        9
      54: iconst_0
      55: istore        10
      57: iload         10
      59: aload         6
      61: invokeinterface #72,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      66: if_icmpge     130
      69: aload         6
      71: iload         10
      73: invokeinterface #81,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      78: istore        11
      80: aload         7
      82: iload         9
      84: iinc          9, 1
      87: iload         11
      89: istore        12
      91: istore        13
      93: astore        21
      95: iconst_0
      96: istore        14
      98: new           #189                // class kotlin/Pair
     101: dup
     102: iload         13
     104: invokestatic  #140                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     107: iload         12
     109: invokestatic  #194                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     112: invokespecial #197                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     115: aload         21
     117: swap
     118: invokeinterface #144,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     123: pop
     124: iinc          10, 1
     127: goto          57
     130: aload         7
     132: checkcast     #146                // class java/util/List
     135: nop
     136: checkcast     #40                 // class java/lang/Iterable
     139: astore        4
     141: nop
     142: iconst_0
     143: istore        5
     145: aload         4
     147: astore        6
     149: new           #71                 // class java/util/ArrayList
     152: dup
     153: invokespecial #198                // Method java/util/ArrayList."<init>":()V
     156: checkcast     #77                 // class java/util/Collection
     159: astore        7
     161: iconst_0
     162: istore        8
     164: aload         6
     166: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     171: astore        9
     173: aload         9
     175: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     180: ifeq          810
     183: aload         9
     185: invokeinterface #202,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     190: astore        10
     192: aload         10
     194: checkcast     #189                // class kotlin/Pair
     197: astore        11
     199: iconst_0
     200: istore        12
     202: aload         11
     204: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     207: checkcast     #207                // class java/lang/Number
     210: invokevirtual #210                // Method java/lang/Number.intValue:()I
     213: iload_3
     214: irem
     215: istore        13
     217: aload         11
     219: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     222: checkcast     #207                // class java/lang/Number
     225: invokevirtual #210                // Method java/lang/Number.intValue:()I
     228: iload_3
     229: idiv
     230: istore        14
     232: iload         13
     234: ifeq          258
     237: iload         13
     239: iconst_1
     240: iadd
     241: iload_3
     242: if_icmpeq     258
     245: iload         14
     247: ifeq          258
     250: iload         14
     252: iconst_1
     253: iadd
     254: iload_3
     255: if_icmpne     262
     258: iconst_1
     259: goto          793
     262: iload         14
     264: iload_3
     265: imul
     266: aload         11
     268: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     271: checkcast     #207                // class java/lang/Number
     274: invokevirtual #210                // Method java/lang/Number.intValue:()I
     277: invokestatic  #98                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     280: checkcast     #40                 // class java/lang/Iterable
     283: astore        15
     285: iconst_0
     286: istore        16
     288: aload         15
     290: instanceof    #77                 // class java/util/Collection
     293: ifeq          313
     296: aload         15
     298: checkcast     #77                 // class java/util/Collection
     301: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     306: ifeq          313
     309: iconst_0
     310: goto          385
     313: aload         15
     315: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     320: astore        17
     322: aload         17
     324: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     329: ifeq          384
     332: aload         17
     334: checkcast     #113                // class kotlin/collections/IntIterator
     337: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     340: istore        18
     342: iload         18
     344: istore        19
     346: iconst_0
     347: istore        20
     349: aload_2
     350: iload         19
     352: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     355: aload         11
     357: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     360: checkcast     #191                // class java/lang/Character
     363: invokevirtual #217                // Method java/lang/Character.charValue:()C
     366: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     369: iflt          376
     372: iconst_1
     373: goto          377
     376: iconst_0
     377: ifeq          322
     380: iconst_1
     381: goto          385
     384: iconst_0
     385: ifeq          788
     388: aload         11
     390: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     393: checkcast     #207                // class java/lang/Number
     396: invokevirtual #210                // Method java/lang/Number.intValue:()I
     399: iconst_1
     400: iadd
     401: iload         14
     403: iconst_1
     404: iadd
     405: iload_3
     406: imul
     407: invokestatic  #98                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     410: checkcast     #40                 // class java/lang/Iterable
     413: astore        15
     415: iconst_0
     416: istore        16
     418: aload         15
     420: instanceof    #77                 // class java/util/Collection
     423: ifeq          443
     426: aload         15
     428: checkcast     #77                 // class java/util/Collection
     431: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     436: ifeq          443
     439: iconst_0
     440: goto          515
     443: aload         15
     445: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     450: astore        17
     452: aload         17
     454: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     459: ifeq          514
     462: aload         17
     464: checkcast     #113                // class kotlin/collections/IntIterator
     467: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     470: istore        18
     472: iload         18
     474: istore        19
     476: iconst_0
     477: istore        20
     479: aload_2
     480: iload         19
     482: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     485: aload         11
     487: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     490: checkcast     #191                // class java/lang/Character
     493: invokevirtual #217                // Method java/lang/Character.charValue:()C
     496: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     499: iflt          506
     502: iconst_1
     503: goto          507
     506: iconst_0
     507: ifeq          452
     510: iconst_1
     511: goto          515
     514: iconst_0
     515: ifeq          788
     518: iload         13
     520: aload         11
     522: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     525: checkcast     #207                // class java/lang/Number
     528: invokevirtual #210                // Method java/lang/Number.intValue:()I
     531: invokestatic  #98                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     534: checkcast     #125                // class kotlin/ranges/IntProgression
     537: iload_3
     538: invokestatic  #129                // Method kotlin/ranges/RangesKt.step:(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
     541: checkcast     #40                 // class java/lang/Iterable
     544: astore        15
     546: iconst_0
     547: istore        16
     549: aload         15
     551: instanceof    #77                 // class java/util/Collection
     554: ifeq          574
     557: aload         15
     559: checkcast     #77                 // class java/util/Collection
     562: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     567: ifeq          574
     570: iconst_0
     571: goto          646
     574: aload         15
     576: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     581: astore        17
     583: aload         17
     585: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     590: ifeq          645
     593: aload         17
     595: checkcast     #113                // class kotlin/collections/IntIterator
     598: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     601: istore        18
     603: iload         18
     605: istore        19
     607: iconst_0
     608: istore        20
     610: aload_2
     611: iload         19
     613: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     616: aload         11
     618: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     621: checkcast     #191                // class java/lang/Character
     624: invokevirtual #217                // Method java/lang/Character.charValue:()C
     627: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     630: iflt          637
     633: iconst_1
     634: goto          638
     637: iconst_0
     638: ifeq          583
     641: iconst_1
     642: goto          646
     645: iconst_0
     646: ifeq          788
     649: new           #131                // class kotlin/ranges/IntRange
     652: dup
     653: aload         11
     655: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     658: checkcast     #207                // class java/lang/Number
     661: invokevirtual #210                // Method java/lang/Number.intValue:()I
     664: iload_3
     665: iadd
     666: aload_2
     667: invokevirtual #63                 // Method java/lang/String.length:()I
     670: invokespecial #134                // Method kotlin/ranges/IntRange."<init>":(II)V
     673: checkcast     #125                // class kotlin/ranges/IntProgression
     676: iload_3
     677: invokestatic  #129                // Method kotlin/ranges/RangesKt.step:(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
     680: checkcast     #40                 // class java/lang/Iterable
     683: astore        15
     685: iconst_0
     686: istore        16
     688: aload         15
     690: instanceof    #77                 // class java/util/Collection
     693: ifeq          713
     696: aload         15
     698: checkcast     #77                 // class java/util/Collection
     701: invokeinterface #102,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     706: ifeq          713
     709: iconst_0
     710: goto          785
     713: aload         15
     715: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     720: astore        17
     722: aload         17
     724: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     729: ifeq          784
     732: aload         17
     734: checkcast     #113                // class kotlin/collections/IntIterator
     737: invokevirtual #116                // Method kotlin/collections/IntIterator.nextInt:()I
     740: istore        18
     742: iload         18
     744: istore        19
     746: iconst_0
     747: istore        20
     749: aload_2
     750: iload         19
     752: invokevirtual #117                // Method java/lang/String.charAt:(I)C
     755: aload         11
     757: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     760: checkcast     #191                // class java/lang/Character
     763: invokevirtual #217                // Method java/lang/Character.charValue:()C
     766: invokestatic  #123                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
     769: iflt          776
     772: iconst_1
     773: goto          777
     776: iconst_0
     777: ifeq          722
     780: iconst_1
     781: goto          785
     784: iconst_0
     785: ifne          792
     788: iconst_1
     789: goto          793
     792: iconst_0
     793: nop
     794: ifeq          173
     797: aload         7
     799: aload         10
     801: invokeinterface #144,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     806: pop
     807: goto          173
     810: aload         7
     812: checkcast     #146                // class java/util/List
     815: nop
     816: checkcast     #40                 // class java/lang/Iterable
     819: invokeinterface #106,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     824: astore        5
     826: aload         5
     828: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     833: ifne          844
     836: new           #219                // class java/util/NoSuchElementException
     839: dup
     840: invokespecial #220                // Method java/util/NoSuchElementException."<init>":()V
     843: athrow
     844: aload         5
     846: invokeinterface #202,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     851: checkcast     #189                // class kotlin/Pair
     854: astore        6
     856: iconst_0
     857: istore        7
     859: aload         6
     861: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     864: checkcast     #207                // class java/lang/Number
     867: invokevirtual #210                // Method java/lang/Number.intValue:()I
     870: iload_3
     871: irem
     872: istore        8
     874: aload         6
     876: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     879: checkcast     #207                // class java/lang/Number
     882: invokevirtual #210                // Method java/lang/Number.intValue:()I
     885: iload_3
     886: idiv
     887: istore        9
     889: iload         8
     891: ifeq          915
     894: iload         8
     896: iconst_1
     897: iadd
     898: iload_3
     899: if_icmpeq     915
     902: iload         9
     904: ifeq          915
     907: iload         9
     909: iconst_1
     910: iadd
     911: iload_3
     912: if_icmpne     919
     915: iconst_0
     916: goto          1130
     919: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
     922: aload_2
     923: aload         6
     925: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     928: checkcast     #207                // class java/lang/Number
     931: invokevirtual #210                // Method java/lang/Number.intValue:()I
     934: iload         9
     936: iload_3
     937: imul
     938: iconst_1
     939: isub
     940: iconst_m1
     941: aload         6
     943: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     946: checkcast     #191                // class java/lang/Character
     949: invokevirtual #217                // Method java/lang/Character.charValue:()C
     952: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
     955: istore        10
     957: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
     960: aload_2
     961: aload         6
     963: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     966: checkcast     #207                // class java/lang/Number
     969: invokevirtual #210                // Method java/lang/Number.intValue:()I
     972: iload         9
     974: iconst_1
     975: iadd
     976: iload_3
     977: imul
     978: iconst_1
     979: aload         6
     981: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     984: checkcast     #191                // class java/lang/Character
     987: invokevirtual #217                // Method java/lang/Character.charValue:()C
     990: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
     993: istore        11
     995: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
     998: aload_2
     999: aload         6
    1001: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1004: checkcast     #207                // class java/lang/Number
    1007: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1010: iload         8
    1012: iconst_1
    1013: isub
    1014: iload_3
    1015: ineg
    1016: aload         6
    1018: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1021: checkcast     #191                // class java/lang/Character
    1024: invokevirtual #217                // Method java/lang/Character.charValue:()C
    1027: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
    1030: istore        12
    1032: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
    1035: aload_2
    1036: aload         6
    1038: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1041: checkcast     #207                // class java/lang/Number
    1044: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1047: aload_2
    1048: invokevirtual #63                 // Method java/lang/String.length:()I
    1051: iload_3
    1052: aload         6
    1054: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1057: checkcast     #191                // class java/lang/Character
    1060: invokevirtual #217                // Method java/lang/Character.charValue:()C
    1063: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
    1066: istore        13
    1068: new           #229                // class java/lang/StringBuilder
    1071: dup
    1072: invokespecial #230                // Method java/lang/StringBuilder."<init>":()V
    1075: iload         8
    1077: invokevirtual #234                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1080: bipush        44
    1082: invokevirtual #237                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    1085: iload         9
    1087: invokevirtual #234                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1090: ldc           #239                // String :
    1092: invokevirtual #242                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1095: iload         10
    1097: iload         11
    1099: imul
    1100: iload         12
    1102: imul
    1103: iload         13
    1105: imul
    1106: invokevirtual #234                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1109: invokevirtual #246                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1112: getstatic     #87                 // Field java/lang/System.out:Ljava/io/PrintStream;
    1115: swap
    1116: invokevirtual #250                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1119: iload         10
    1121: iload         11
    1123: imul
    1124: iload         12
    1126: imul
    1127: iload         13
    1129: imul
    1130: nop
    1131: istore        6
    1133: aload         5
    1135: invokeinterface #111,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1140: ifeq          1446
    1143: aload         5
    1145: invokeinterface #202,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1150: checkcast     #189                // class kotlin/Pair
    1153: astore        7
    1155: iconst_0
    1156: istore        8
    1158: aload         7
    1160: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1163: checkcast     #207                // class java/lang/Number
    1166: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1169: iload_3
    1170: irem
    1171: istore        9
    1173: aload         7
    1175: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1178: checkcast     #207                // class java/lang/Number
    1181: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1184: iload_3
    1185: idiv
    1186: istore        10
    1188: iload         9
    1190: ifeq          1214
    1193: iload         9
    1195: iconst_1
    1196: iadd
    1197: iload_3
    1198: if_icmpeq     1214
    1201: iload         10
    1203: ifeq          1214
    1206: iload         10
    1208: iconst_1
    1209: iadd
    1210: iload_3
    1211: if_icmpne     1218
    1214: iconst_0
    1215: goto          1429
    1218: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
    1221: aload_2
    1222: aload         7
    1224: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1227: checkcast     #207                // class java/lang/Number
    1230: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1233: iload         10
    1235: iload_3
    1236: imul
    1237: iconst_1
    1238: isub
    1239: iconst_m1
    1240: aload         7
    1242: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1245: checkcast     #191                // class java/lang/Character
    1248: invokevirtual #217                // Method java/lang/Character.charValue:()C
    1251: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
    1254: istore        11
    1256: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
    1259: aload_2
    1260: aload         7
    1262: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1265: checkcast     #207                // class java/lang/Number
    1268: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1271: iload         10
    1273: iconst_1
    1274: iadd
    1275: iload_3
    1276: imul
    1277: iconst_1
    1278: aload         7
    1280: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1283: checkcast     #191                // class java/lang/Character
    1286: invokevirtual #217                // Method java/lang/Character.charValue:()C
    1289: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
    1292: istore        12
    1294: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
    1297: aload_2
    1298: aload         7
    1300: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1303: checkcast     #207                // class java/lang/Number
    1306: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1309: iload         9
    1311: iconst_1
    1312: isub
    1313: iload_3
    1314: ineg
    1315: aload         7
    1317: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1320: checkcast     #191                // class java/lang/Character
    1323: invokevirtual #217                // Method java/lang/Character.charValue:()C
    1326: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
    1329: istore        13
    1331: getstatic     #225                // Field Day8.Companion:LDay8$Companion;
    1334: aload_2
    1335: aload         7
    1337: invokevirtual #205                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1340: checkcast     #207                // class java/lang/Number
    1343: invokevirtual #210                // Method java/lang/Number.intValue:()I
    1346: aload_2
    1347: invokevirtual #63                 // Method java/lang/String.length:()I
    1350: iload_3
    1351: aload         7
    1353: invokevirtual #213                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1356: checkcast     #191                // class java/lang/Character
    1359: invokevirtual #217                // Method java/lang/Character.charValue:()C
    1362: invokespecial #227                // Method countVisibility:(Ljava/lang/String;IIIC)I
    1365: istore        14
    1367: new           #229                // class java/lang/StringBuilder
    1370: dup
    1371: invokespecial #230                // Method java/lang/StringBuilder."<init>":()V
    1374: iload         9
    1376: invokevirtual #234                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1379: bipush        44
    1381: invokevirtual #237                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    1384: iload         10
    1386: invokevirtual #234                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1389: ldc           #239                // String :
    1391: invokevirtual #242                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1394: iload         11
    1396: iload         12
    1398: imul
    1399: iload         13
    1401: imul
    1402: iload         14
    1404: imul
    1405: invokevirtual #234                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1408: invokevirtual #246                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1411: getstatic     #87                 // Field java/lang/System.out:Ljava/io/PrintStream;
    1414: swap
    1415: invokevirtual #250                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1418: iload         11
    1420: iload         12
    1422: imul
    1423: iload         13
    1425: imul
    1426: iload         14
    1428: imul
    1429: nop
    1430: istore        7
    1432: iload         6
    1434: iload         7
    1436: if_icmpge     1133
    1439: iload         7
    1441: istore        6
    1443: goto          1133
    1446: iload         6
    1448: ireturn

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

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

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

  static {};
    Code:
       0: new           #13                 // class Day8$Companion
       3: dup
       4: aconst_null
       5: invokespecial #16                 // Method Day8$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #20                 // Field Companion:LDay8$Companion;
      11: return
}