import java.io.File

// I'm not proud of this, but it works.
fun main() {
    var lines: List<String> = File("Day07.txt").readLines()
    var fileSystem: MutableList<Obj> = mutableListOf()
    fileSystem.add(Obj("/", ObjectType.Directory, 0))
    var currentObj: Obj = fileSystem[0]
    for (i in 0..lines.size - 1) {
        //println("Current Line: " + lines[i])
        //currentObj.children.forEach { println("Object under " + currentObj.objName + " | " + it.objName + " | " +it.objType.toString() + " | " + it.parent!!.objName) }
        var parts = lines[i].split(" ")
        when (parts[0]) {
            "$" -> {
                when (parts[1]) {
                    "cd" -> {
                        when (parts[2]) {
                            "/" -> {
                                // Go to root
                                //println("Changing current obj to root")
                                currentObj = fileSystem[0]
                            }
                            ".." -> {
                                //println("Changing current obj to parent " + currentObj.parent!!.objName)
                                currentObj = currentObj.parent!!
                            }
                            else -> {
                                var target = currentObj.children.filter { it.objName == parts[2] }.first()
                                //println("Changing current obj to " + target.objName)
                                currentObj = target
                            }
                        }
                    }
                    "ls" -> {
                        //println("Listing directory: " + currentObj.objName)
                        var nextCommandLine = lines.slice(i+1..lines.size - 1).indexOfFirst { it.split(" ")[0] == "$" } + i + 1
                        if (i == nextCommandLine) {
                            nextCommandLine = lines.size
                        }
                        //println("nextCommandLine is " + nextCommandLine.toString())
                        //println("i is " + i.toString())

                        for (idx in i+1..nextCommandLine - 1) {
                            var lsParts = lines[idx].split(" ")
                            when (lsParts[0]) {
                                "dir" -> {
                                    if (currentObj.children.filter { it.objName == lsParts[1] && it.objType == ObjectType.Directory }.count() == 0) {
                                        //println("Adding directory: " + lsParts[1] + " to " + currentObj.objName)
                                        currentObj.children.add(Obj(lsParts[1], ObjectType.Directory, 0, currentObj))
                                    }
                                }
                                else -> {
                                    if (currentObj.children.filter { it.objName == lsParts[1] && it.objType == ObjectType.File }.count() == 0) {
                                        //println("Adding file: " + lsParts[1] + " to " + currentObj.objName)
                                        currentObj.children.add(Obj(lsParts[1], ObjectType.File, lsParts[0].toInt(), currentObj))
                                    }
                                }
                            }

                        }
                    }
                }
            }
            else -> {
                // This is a file
                print("")
            }
        }
    }
    println("------------")
    printStructure(fileSystem[0], 0)
    var sizes = getDirectoriesWithSizes(fileSystem[0])
    sizes.sortByDescending { it.size }
    sizes.forEach { println(it.path + " | " + it.size.toString()) }
    println("Part 1 size: " + sizes.filter { it.size < 100000 }.sumOf { it.size }.toString())

    var freeSpace = 70000000 - sizes[0].size
    println("Total Free Space is " + freeSpace.toString())
     var validSizes = sizes.filter { it.size + freeSpace > 30000000 }.toMutableList()
    validSizes.sortBy { it.size }
    validSizes.forEach {
        println("Valid Size: " + it.path + " | " + it.size.toString())
    }
    println("Smallest Directory To Achieve Goal is " + validSizes[0].path.toString() + " | " + validSizes[0].size.toString())

}

fun printStructure(obj: Obj, level: Int) {
    var indent = ""
    for (i in 0..level) {
        indent += "  "
    }
    indent += "- "
    if (obj.objType == ObjectType.Directory) {
        println(indent + obj.objName)

    } else {
        println(indent + obj.objName + " | " + obj.objSize.toString())
    }
    obj.children.forEach {
        printStructure(it, level + 1)
    }
}

fun getDirectoriesWithSizes(obj: Obj): MutableList<DirectoryInfo> {
    var directorySizes: MutableList<DirectoryInfo> = mutableListOf()
    if (obj.objType == ObjectType.Directory) {
        directorySizes.add(DirectoryInfo(obj.objName, 0))
    }
    obj.children.forEach {
        if (it.objType == ObjectType.Directory) {
            directorySizes.add(DirectoryInfo(it.objName, 0))
        } else {
            directorySizes[0].size += it.objSize
        }
    }
    obj.children.forEach {
        if (it.objType == ObjectType.Directory) {
            var childSizes = getDirectoriesWithSizes(it)
            directorySizes[0].size += childSizes[0].size
            directorySizes.addAll(childSizes)
        }
    }
    return directorySizes.filter { it.size > 0 }.toMutableList()
}

enum class ObjectType {
    Directory,
    File
}

class DirectoryInfo(path: String, size: Int) {
    var path: String = path
    var size: Int = size
}

class Obj(objName: String, objType: ObjectType, objSize: Int, parent: Obj? = null) {
    var objName: String = objName
    var objType: ObjectType = objType
    var objSize: Int = objSize
    var children: MutableList<Obj> = mutableListOf()
    var parent: Obj? = parent
}

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

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

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

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

Compiled from "Day07.kt"
public final class Day07Kt {
  public static final void main();
    Code:
       0: new           #8                  // class java/io/File
       3: dup
       4: ldc           #10                 // String Day07.txt
       6: invokespecial #14                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: aconst_null
      10: iconst_1
      11: aconst_null
      12: invokestatic  #20                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      15: astore_0
      16: new           #22                 // class java/util/ArrayList
      19: dup
      20: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
      23: checkcast     #26                 // class java/util/List
      26: astore_1
      27: aload_1
      28: new           #28                 // class Obj
      31: dup
      32: ldc           #30                 // String /
      34: getstatic     #36                 // Field ObjectType.Directory:LObjectType;
      37: iconst_0
      38: aconst_null
      39: bipush        8
      41: aconst_null
      42: invokespecial #39                 // Method Obj."<init>":(Ljava/lang/String;LObjectType;ILObj;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
      45: invokeinterface #43,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      50: pop
      51: aload_1
      52: iconst_0
      53: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      58: checkcast     #28                 // class Obj
      61: astore_2
      62: iconst_0
      63: istore_3
      64: aload_0
      65: invokeinterface #51,  1           // InterfaceMethod java/util/List.size:()I
      70: istore        4
      72: iload_3
      73: iload         4
      75: if_icmpge     947
      78: aconst_null
      79: astore        5
      81: aload_0
      82: iload_3
      83: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      88: checkcast     #53                 // class java/lang/CharSequence
      91: iconst_1
      92: anewarray     #55                 // class java/lang/String
      95: astore        6
      97: aload         6
      99: iconst_0
     100: ldc           #57                 // String
     102: aastore
     103: aload         6
     105: iconst_0
     106: iconst_0
     107: bipush        6
     109: aconst_null
     110: invokestatic  #63                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     113: astore        5
     115: aload         5
     117: iconst_0
     118: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     123: checkcast     #55                 // class java/lang/String
     126: ldc           #65                 // String $
     128: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     131: ifeq          932
     134: aload         5
     136: iconst_1
     137: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     142: checkcast     #55                 // class java/lang/String
     145: astore        7
     147: aload         7
     149: ldc           #73                 // String cd
     151: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     154: ifeq          337
     157: aload         5
     159: iconst_2
     160: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     165: checkcast     #55                 // class java/lang/String
     168: astore        8
     170: aload         8
     172: ldc           #30                 // String /
     174: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     177: ifeq          194
     180: aload_1
     181: iconst_0
     182: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     187: checkcast     #28                 // class Obj
     190: astore_2
     191: goto          941
     194: aload         8
     196: ldc           #75                 // String ..
     198: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     201: ifeq          216
     204: aload_2
     205: invokevirtual #79                 // Method Obj.getParent:()LObj;
     208: dup
     209: invokestatic  #83                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     212: astore_2
     213: goto          941
     216: aload_2
     217: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
     220: checkcast     #89                 // class java/lang/Iterable
     223: astore        10
     225: iconst_0
     226: istore        11
     228: aload         10
     230: astore        12
     232: new           #22                 // class java/util/ArrayList
     235: dup
     236: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
     239: checkcast     #91                 // class java/util/Collection
     242: astore        13
     244: iconst_0
     245: istore        14
     247: aload         12
     249: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     254: astore        15
     256: aload         15
     258: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     263: ifeq          317
     266: aload         15
     268: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     273: astore        16
     275: aload         16
     277: checkcast     #28                 // class Obj
     280: astore        17
     282: iconst_0
     283: istore        18
     285: aload         17
     287: invokevirtual #109                // Method Obj.getObjName:()Ljava/lang/String;
     290: aload         5
     292: iconst_2
     293: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     298: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     301: ifeq          256
     304: aload         13
     306: aload         16
     308: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     313: pop
     314: goto          256
     317: aload         13
     319: checkcast     #26                 // class java/util/List
     322: nop
     323: invokestatic  #116                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     326: checkcast     #28                 // class Obj
     329: astore        9
     331: aload         9
     333: astore_2
     334: goto          941
     337: aload         7
     339: ldc           #118                // String ls
     341: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     344: ifeq          941
     347: aload_0
     348: new           #120                // class kotlin/ranges/IntRange
     351: dup
     352: iload_3
     353: iconst_1
     354: iadd
     355: aload_0
     356: invokeinterface #51,  1           // InterfaceMethod java/util/List.size:()I
     361: iconst_1
     362: isub
     363: invokespecial #123                // Method kotlin/ranges/IntRange."<init>":(II)V
     366: invokestatic  #127                // Method kotlin/collections/CollectionsKt.slice:(Ljava/util/List;Lkotlin/ranges/IntRange;)Ljava/util/List;
     369: astore        9
     371: iconst_0
     372: istore        10
     374: iconst_0
     375: istore        11
     377: aload         9
     379: invokeinterface #128,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     384: astore        12
     386: aload         12
     388: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     393: ifeq          467
     396: aload         12
     398: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     403: astore        13
     405: aload         13
     407: checkcast     #55                 // class java/lang/String
     410: astore        14
     412: iconst_0
     413: istore        15
     415: aload         14
     417: checkcast     #53                 // class java/lang/CharSequence
     420: iconst_1
     421: anewarray     #55                 // class java/lang/String
     424: astore        16
     426: aload         16
     428: iconst_0
     429: ldc           #57                 // String
     431: aastore
     432: aload         16
     434: iconst_0
     435: iconst_0
     436: bipush        6
     438: aconst_null
     439: invokestatic  #63                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     442: iconst_0
     443: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     448: ldc           #65                 // String $
     450: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     453: ifeq          461
     456: iload         11
     458: goto          468
     461: iinc          11, 1
     464: goto          386
     467: iconst_m1
     468: iload_3
     469: iadd
     470: iconst_1
     471: iadd
     472: istore        8
     474: iload_3
     475: iload         8
     477: if_icmpne     488
     480: aload_0
     481: invokeinterface #51,  1           // InterfaceMethod java/util/List.size:()I
     486: istore        8
     488: iload_3
     489: iconst_1
     490: iadd
     491: istore        9
     493: iload         8
     495: iconst_1
     496: isub
     497: istore        10
     499: iload         9
     501: iload         10
     503: if_icmpgt     941
     506: aconst_null
     507: astore        11
     509: aload_0
     510: iload         9
     512: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     517: checkcast     #53                 // class java/lang/CharSequence
     520: iconst_1
     521: anewarray     #55                 // class java/lang/String
     524: astore        12
     526: aload         12
     528: iconst_0
     529: ldc           #57                 // String
     531: aastore
     532: aload         12
     534: iconst_0
     535: iconst_0
     536: bipush        6
     538: aconst_null
     539: invokestatic  #63                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     542: astore        11
     544: aload         11
     546: iconst_0
     547: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     552: checkcast     #55                 // class java/lang/String
     555: ldc           #130                // String dir
     557: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     560: ifeq          736
     563: aload_2
     564: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
     567: checkcast     #89                 // class java/lang/Iterable
     570: astore        13
     572: iconst_0
     573: istore        14
     575: aload         13
     577: astore        15
     579: new           #22                 // class java/util/ArrayList
     582: dup
     583: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
     586: checkcast     #91                 // class java/util/Collection
     589: astore        16
     591: iconst_0
     592: istore        17
     594: aload         15
     596: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     601: astore        18
     603: aload         18
     605: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     610: ifeq          683
     613: aload         18
     615: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     620: astore        19
     622: aload         19
     624: checkcast     #28                 // class Obj
     627: astore        20
     629: iconst_0
     630: istore        21
     632: aload         20
     634: invokevirtual #109                // Method Obj.getObjName:()Ljava/lang/String;
     637: aload         11
     639: iconst_1
     640: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     645: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     648: ifeq          666
     651: aload         20
     653: invokevirtual #134                // Method Obj.getObjType:()LObjectType;
     656: getstatic     #36                 // Field ObjectType.Directory:LObjectType;
     659: if_acmpne     666
     662: iconst_1
     663: goto          667
     666: iconst_0
     667: ifeq          603
     670: aload         16
     672: aload         19
     674: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     679: pop
     680: goto          603
     683: aload         16
     685: checkcast     #26                 // class java/util/List
     688: nop
     689: checkcast     #91                 // class java/util/Collection
     692: invokeinterface #135,  1          // InterfaceMethod java/util/Collection.size:()I
     697: ifne          919
     700: aload_2
     701: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
     704: new           #28                 // class Obj
     707: dup
     708: aload         11
     710: iconst_1
     711: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     716: checkcast     #55                 // class java/lang/String
     719: getstatic     #36                 // Field ObjectType.Directory:LObjectType;
     722: iconst_0
     723: aload_2
     724: invokespecial #138                // Method Obj."<init>":(Ljava/lang/String;LObjectType;ILObj;)V
     727: invokeinterface #43,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     732: pop
     733: goto          919
     736: aload_2
     737: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
     740: checkcast     #89                 // class java/lang/Iterable
     743: astore        13
     745: iconst_0
     746: istore        14
     748: aload         13
     750: astore        15
     752: new           #22                 // class java/util/ArrayList
     755: dup
     756: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
     759: checkcast     #91                 // class java/util/Collection
     762: astore        16
     764: iconst_0
     765: istore        17
     767: aload         15
     769: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     774: astore        18
     776: aload         18
     778: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     783: ifeq          856
     786: aload         18
     788: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     793: astore        19
     795: aload         19
     797: checkcast     #28                 // class Obj
     800: astore        20
     802: iconst_0
     803: istore        21
     805: aload         20
     807: invokevirtual #109                // Method Obj.getObjName:()Ljava/lang/String;
     810: aload         11
     812: iconst_1
     813: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     818: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     821: ifeq          839
     824: aload         20
     826: invokevirtual #134                // Method Obj.getObjType:()LObjectType;
     829: getstatic     #141                // Field ObjectType.File:LObjectType;
     832: if_acmpne     839
     835: iconst_1
     836: goto          840
     839: iconst_0
     840: ifeq          776
     843: aload         16
     845: aload         19
     847: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     852: pop
     853: goto          776
     856: aload         16
     858: checkcast     #26                 // class java/util/List
     861: nop
     862: checkcast     #91                 // class java/util/Collection
     865: invokeinterface #135,  1          // InterfaceMethod java/util/Collection.size:()I
     870: ifne          919
     873: aload_2
     874: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
     877: new           #28                 // class Obj
     880: dup
     881: aload         11
     883: iconst_1
     884: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     889: checkcast     #55                 // class java/lang/String
     892: getstatic     #141                // Field ObjectType.File:LObjectType;
     895: aload         11
     897: iconst_0
     898: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     903: checkcast     #55                 // class java/lang/String
     906: invokestatic  #147                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     909: aload_2
     910: invokespecial #138                // Method Obj."<init>":(Ljava/lang/String;LObjectType;ILObj;)V
     913: invokeinterface #43,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     918: pop
     919: iload         9
     921: iload         10
     923: if_icmpeq     941
     926: iinc          9, 1
     929: goto          506
     932: ldc           #149                // String
     934: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
     937: swap
     938: invokevirtual #160                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
     941: iinc          3, 1
     944: goto          72
     947: ldc           #162                // String ------------
     949: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
     952: swap
     953: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     956: aload_1
     957: iconst_0
     958: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     963: checkcast     #28                 // class Obj
     966: iconst_0
     967: invokestatic  #169                // Method printStructure:(LObj;I)V
     970: aload_1
     971: iconst_0
     972: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     977: checkcast     #28                 // class Obj
     980: invokestatic  #173                // Method getDirectoriesWithSizes:(LObj;)Ljava/util/List;
     983: astore_3
     984: aload_3
     985: astore        4
     987: iconst_0
     988: istore        5
     990: aload         4
     992: invokeinterface #51,  1           // InterfaceMethod java/util/List.size:()I
     997: iconst_1
     998: if_icmple     1016
    1001: aload         4
    1003: new           #175                // class Day07Kt$main$$inlined$sortByDescending$1
    1006: dup
    1007: invokespecial #176                // Method Day07Kt$main$$inlined$sortByDescending$1."<init>":()V
    1010: checkcast     #178                // class java/util/Comparator
    1013: invokestatic  #182                // Method kotlin/collections/CollectionsKt.sortWith:(Ljava/util/List;Ljava/util/Comparator;)V
    1016: nop
    1017: aload_3
    1018: checkcast     #89                 // class java/lang/Iterable
    1021: astore        4
    1023: iconst_0
    1024: istore        5
    1026: aload         4
    1028: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1033: astore        6
    1035: aload         6
    1037: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1042: ifeq          1107
    1045: aload         6
    1047: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1052: astore        7
    1054: aload         7
    1056: checkcast     #184                // class DirectoryInfo
    1059: astore        8
    1061: iconst_0
    1062: istore        9
    1064: new           #186                // class java/lang/StringBuilder
    1067: dup
    1068: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
    1071: aload         8
    1073: invokevirtual #190                // Method DirectoryInfo.getPath:()Ljava/lang/String;
    1076: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1079: ldc           #196                // String  |
    1081: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1084: aload         8
    1086: invokevirtual #199                // Method DirectoryInfo.getSize:()I
    1089: invokevirtual #202                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1092: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1095: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
    1098: swap
    1099: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1102: nop
    1103: nop
    1104: goto          1035
    1107: nop
    1108: new           #186                // class java/lang/StringBuilder
    1111: dup
    1112: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
    1115: ldc           #207                // String Part 1 size:
    1117: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1120: aload_3
    1121: checkcast     #89                 // class java/lang/Iterable
    1124: astore        4
    1126: astore        22
    1128: iconst_0
    1129: istore        5
    1131: aload         4
    1133: astore        6
    1135: new           #22                 // class java/util/ArrayList
    1138: dup
    1139: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
    1142: checkcast     #91                 // class java/util/Collection
    1145: astore        7
    1147: iconst_0
    1148: istore        8
    1150: aload         6
    1152: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1157: astore        9
    1159: aload         9
    1161: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1166: ifeq          1219
    1169: aload         9
    1171: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1176: astore        10
    1178: aload         10
    1180: checkcast     #184                // class DirectoryInfo
    1183: astore        11
    1185: iconst_0
    1186: istore        12
    1188: aload         11
    1190: invokevirtual #199                // Method DirectoryInfo.getSize:()I
    1193: ldc           #208                // int 100000
    1195: if_icmpge     1202
    1198: iconst_1
    1199: goto          1203
    1202: iconst_0
    1203: ifeq          1159
    1206: aload         7
    1208: aload         10
    1210: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1215: pop
    1216: goto          1159
    1219: aload         7
    1221: checkcast     #26                 // class java/util/List
    1224: nop
    1225: aload         22
    1227: swap
    1228: checkcast     #89                 // class java/lang/Iterable
    1231: astore        4
    1233: astore        22
    1235: iconst_0
    1236: istore        5
    1238: aload         4
    1240: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1245: astore        6
    1247: aload         6
    1249: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1254: ifeq          1297
    1257: aload         6
    1259: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1264: astore        7
    1266: iload         5
    1268: aload         7
    1270: checkcast     #184                // class DirectoryInfo
    1273: astore        8
    1275: istore        23
    1277: iconst_0
    1278: istore        9
    1280: aload         8
    1282: invokevirtual #199                // Method DirectoryInfo.getSize:()I
    1285: istore        24
    1287: iload         23
    1289: iload         24
    1291: iadd
    1292: istore        5
    1294: goto          1247
    1297: iload         5
    1299: istore        23
    1301: aload         22
    1303: iload         23
    1305: invokevirtual #202                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1308: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1311: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
    1314: swap
    1315: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1318: iconst_0
    1319: istore        4
    1321: ldc           #209                // int 70000000
    1323: aload_3
    1324: iconst_0
    1325: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1330: checkcast     #184                // class DirectoryInfo
    1333: invokevirtual #199                // Method DirectoryInfo.getSize:()I
    1336: isub
    1337: istore        4
    1339: new           #186                // class java/lang/StringBuilder
    1342: dup
    1343: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
    1346: ldc           #211                // String Total Free Space is
    1348: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1351: iload         4
    1353: invokevirtual #202                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1356: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1359: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
    1362: swap
    1363: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1366: aload_3
    1367: checkcast     #89                 // class java/lang/Iterable
    1370: astore        6
    1372: iconst_0
    1373: istore        7
    1375: aload         6
    1377: astore        8
    1379: new           #22                 // class java/util/ArrayList
    1382: dup
    1383: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
    1386: checkcast     #91                 // class java/util/Collection
    1389: astore        9
    1391: iconst_0
    1392: istore        10
    1394: aload         8
    1396: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1401: astore        11
    1403: aload         11
    1405: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1410: ifeq          1466
    1413: aload         11
    1415: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1420: astore        12
    1422: aload         12
    1424: checkcast     #184                // class DirectoryInfo
    1427: astore        13
    1429: iconst_0
    1430: istore        14
    1432: aload         13
    1434: invokevirtual #199                // Method DirectoryInfo.getSize:()I
    1437: iload         4
    1439: iadd
    1440: ldc           #212                // int 30000000
    1442: if_icmple     1449
    1445: iconst_1
    1446: goto          1450
    1449: iconst_0
    1450: ifeq          1403
    1453: aload         9
    1455: aload         12
    1457: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1462: pop
    1463: goto          1403
    1466: aload         9
    1468: checkcast     #26                 // class java/util/List
    1471: nop
    1472: checkcast     #91                 // class java/util/Collection
    1475: invokestatic  #216                // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
    1478: astore        5
    1480: aload         5
    1482: astore        6
    1484: iconst_0
    1485: istore        7
    1487: aload         6
    1489: invokeinterface #51,  1           // InterfaceMethod java/util/List.size:()I
    1494: iconst_1
    1495: if_icmple     1513
    1498: aload         6
    1500: new           #218                // class Day07Kt$main$$inlined$sortBy$1
    1503: dup
    1504: invokespecial #219                // Method Day07Kt$main$$inlined$sortBy$1."<init>":()V
    1507: checkcast     #178                // class java/util/Comparator
    1510: invokestatic  #182                // Method kotlin/collections/CollectionsKt.sortWith:(Ljava/util/List;Ljava/util/Comparator;)V
    1513: nop
    1514: aload         5
    1516: checkcast     #89                 // class java/lang/Iterable
    1519: astore        6
    1521: iconst_0
    1522: istore        7
    1524: aload         6
    1526: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1531: astore        8
    1533: aload         8
    1535: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1540: ifeq          1610
    1543: aload         8
    1545: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1550: astore        9
    1552: aload         9
    1554: checkcast     #184                // class DirectoryInfo
    1557: astore        10
    1559: iconst_0
    1560: istore        11
    1562: new           #186                // class java/lang/StringBuilder
    1565: dup
    1566: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
    1569: ldc           #221                // String Valid Size:
    1571: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1574: aload         10
    1576: invokevirtual #190                // Method DirectoryInfo.getPath:()Ljava/lang/String;
    1579: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1582: ldc           #196                // String  |
    1584: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1587: aload         10
    1589: invokevirtual #199                // Method DirectoryInfo.getSize:()I
    1592: invokevirtual #202                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1595: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1598: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
    1601: swap
    1602: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1605: nop
    1606: nop
    1607: goto          1533
    1610: nop
    1611: new           #186                // class java/lang/StringBuilder
    1614: dup
    1615: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
    1618: ldc           #223                // String Smallest Directory To Achieve Goal is
    1620: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1623: aload         5
    1625: iconst_0
    1626: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1631: checkcast     #184                // class DirectoryInfo
    1634: invokevirtual #190                // Method DirectoryInfo.getPath:()Ljava/lang/String;
    1637: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1640: ldc           #196                // String  |
    1642: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1645: aload         5
    1647: iconst_0
    1648: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1653: checkcast     #184                // class DirectoryInfo
    1656: invokevirtual #199                // Method DirectoryInfo.getSize:()I
    1659: invokevirtual #202                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1662: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1665: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
    1668: swap
    1669: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1672: return

  public static final void printStructure(Obj, int);
    Code:
       0: aload_0
       1: ldc_w         #275                // String obj
       4: invokestatic  #279                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: ldc           #149                // String
       9: astore_2
      10: iconst_0
      11: istore_3
      12: iload_3
      13: iload_1
      14: if_icmpgt     49
      17: new           #186                // class java/lang/StringBuilder
      20: dup
      21: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
      24: aload_2
      25: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      28: ldc_w         #281                // String
      31: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      34: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      37: astore_2
      38: iload_3
      39: iload_1
      40: if_icmpeq     49
      43: iinc          3, 1
      46: goto          17
      49: new           #186                // class java/lang/StringBuilder
      52: dup
      53: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
      56: aload_2
      57: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      60: ldc_w         #283                // String -
      63: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      66: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      69: astore_2
      70: aload_0
      71: invokevirtual #134                // Method Obj.getObjType:()LObjectType;
      74: getstatic     #36                 // Field ObjectType.Directory:LObjectType;
      77: if_acmpne     111
      80: new           #186                // class java/lang/StringBuilder
      83: dup
      84: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
      87: aload_2
      88: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      91: aload_0
      92: invokevirtual #109                // Method Obj.getObjName:()Ljava/lang/String;
      95: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      98: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     101: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
     104: swap
     105: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     108: goto          151
     111: new           #186                // class java/lang/StringBuilder
     114: dup
     115: invokespecial #187                // Method java/lang/StringBuilder."<init>":()V
     118: aload_2
     119: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     122: aload_0
     123: invokevirtual #109                // Method Obj.getObjName:()Ljava/lang/String;
     126: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     129: ldc           #196                // String  |
     131: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     134: aload_0
     135: invokevirtual #286                // Method Obj.getObjSize:()I
     138: invokevirtual #202                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     141: invokevirtual #205                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     144: getstatic     #155                // Field java/lang/System.out:Ljava/io/PrintStream;
     147: swap
     148: invokevirtual #165                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     151: aload_0
     152: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
     155: checkcast     #89                 // class java/lang/Iterable
     158: astore_3
     159: iconst_0
     160: istore        4
     162: aload_3
     163: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     168: astore        5
     170: aload         5
     172: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     177: ifeq          212
     180: aload         5
     182: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     187: astore        6
     189: aload         6
     191: checkcast     #28                 // class Obj
     194: astore        7
     196: iconst_0
     197: istore        8
     199: aload         7
     201: iload_1
     202: iconst_1
     203: iadd
     204: invokestatic  #169                // Method printStructure:(LObj;I)V
     207: nop
     208: nop
     209: goto          170
     212: nop
     213: return

  public static final java.util.List<DirectoryInfo> getDirectoriesWithSizes(Obj);
    Code:
       0: aload_0
       1: ldc_w         #275                // String obj
       4: invokestatic  #279                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aconst_null
       8: astore_1
       9: new           #22                 // class java/util/ArrayList
      12: dup
      13: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
      16: checkcast     #26                 // class java/util/List
      19: astore_1
      20: aload_0
      21: invokevirtual #134                // Method Obj.getObjType:()LObjectType;
      24: getstatic     #36                 // Field ObjectType.Directory:LObjectType;
      27: if_acmpne     49
      30: aload_1
      31: new           #184                // class DirectoryInfo
      34: dup
      35: aload_0
      36: invokevirtual #109                // Method Obj.getObjName:()Ljava/lang/String;
      39: iconst_0
      40: invokespecial #293                // Method DirectoryInfo."<init>":(Ljava/lang/String;I)V
      43: invokeinterface #43,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      48: pop
      49: aload_0
      50: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
      53: checkcast     #89                 // class java/lang/Iterable
      56: astore_2
      57: iconst_0
      58: istore_3
      59: aload_2
      60: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      65: astore        4
      67: aload         4
      69: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          163
      77: aload         4
      79: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      84: astore        5
      86: aload         5
      88: checkcast     #28                 // class Obj
      91: astore        6
      93: iconst_0
      94: istore        7
      96: aload         6
      98: invokevirtual #134                // Method Obj.getObjType:()LObjectType;
     101: getstatic     #36                 // Field ObjectType.Directory:LObjectType;
     104: if_acmpne     130
     107: aload_1
     108: new           #184                // class DirectoryInfo
     111: dup
     112: aload         6
     114: invokevirtual #109                // Method Obj.getObjName:()Ljava/lang/String;
     117: iconst_0
     118: invokespecial #293                // Method DirectoryInfo."<init>":(Ljava/lang/String;I)V
     121: invokeinterface #43,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     126: pop
     127: goto          158
     130: aload_1
     131: iconst_0
     132: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     137: checkcast     #184                // class DirectoryInfo
     140: astore        8
     142: aload         8
     144: aload         8
     146: invokevirtual #199                // Method DirectoryInfo.getSize:()I
     149: aload         6
     151: invokevirtual #286                // Method Obj.getObjSize:()I
     154: iadd
     155: invokevirtual #297                // Method DirectoryInfo.setSize:(I)V
     158: nop
     159: nop
     160: goto          67
     163: nop
     164: aload_0
     165: invokevirtual #87                 // Method Obj.getChildren:()Ljava/util/List;
     168: checkcast     #89                 // class java/lang/Iterable
     171: astore_2
     172: iconst_0
     173: istore_3
     174: aload_2
     175: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     180: astore        4
     182: aload         4
     184: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     189: ifeq          283
     192: aload         4
     194: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     199: astore        5
     201: aload         5
     203: checkcast     #28                 // class Obj
     206: astore        6
     208: iconst_0
     209: istore        7
     211: aload         6
     213: invokevirtual #134                // Method Obj.getObjType:()LObjectType;
     216: getstatic     #36                 // Field ObjectType.Directory:LObjectType;
     219: if_acmpne     278
     222: aload         6
     224: invokestatic  #173                // Method getDirectoriesWithSizes:(LObj;)Ljava/util/List;
     227: astore        8
     229: aload_1
     230: iconst_0
     231: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     236: checkcast     #184                // class DirectoryInfo
     239: astore        9
     241: aload         9
     243: aload         9
     245: invokevirtual #199                // Method DirectoryInfo.getSize:()I
     248: aload         8
     250: iconst_0
     251: invokeinterface #47,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     256: checkcast     #184                // class DirectoryInfo
     259: invokevirtual #199                // Method DirectoryInfo.getSize:()I
     262: iadd
     263: invokevirtual #297                // Method DirectoryInfo.setSize:(I)V
     266: aload_1
     267: aload         8
     269: checkcast     #91                 // class java/util/Collection
     272: invokeinterface #301,  2          // InterfaceMethod java/util/List.addAll:(Ljava/util/Collection;)Z
     277: pop
     278: nop
     279: nop
     280: goto          182
     283: nop
     284: aload_1
     285: checkcast     #89                 // class java/lang/Iterable
     288: astore_2
     289: iconst_0
     290: istore_3
     291: aload_2
     292: astore        4
     294: new           #22                 // class java/util/ArrayList
     297: dup
     298: invokespecial #24                 // Method java/util/ArrayList."<init>":()V
     301: checkcast     #91                 // class java/util/Collection
     304: astore        5
     306: iconst_0
     307: istore        6
     309: aload         4
     311: invokeinterface #95,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     316: astore        7
     318: aload         7
     320: invokeinterface #101,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     325: ifeq          376
     328: aload         7
     330: invokeinterface #105,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     335: astore        8
     337: aload         8
     339: checkcast     #184                // class DirectoryInfo
     342: astore        9
     344: iconst_0
     345: istore        10
     347: aload         9
     349: invokevirtual #199                // Method DirectoryInfo.getSize:()I
     352: ifle          359
     355: iconst_1
     356: goto          360
     359: iconst_0
     360: ifeq          318
     363: aload         5
     365: aload         8
     367: invokeinterface #110,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     372: pop
     373: goto          318
     376: aload         5
     378: checkcast     #26                 // class java/util/List
     381: nop
     382: checkcast     #91                 // class java/util/Collection
     385: invokestatic  #216                // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
     388: areturn

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