package advent.of.code.day06

import java.io.File
import kotlin.math.abs

data class Point(val x: Int, val y: Int) {

    fun distance(b: Point) = abs(x - b.x) + abs(y - b.y)
}

val input: List<Point> = File("day06.txt").readLines().map {
    val parts = it.split(",")
    Point(parts[0].trim().toInt(), parts[1].trim().toInt())
}

fun part1(): Int {
    val topLeftBig = Point(
        input.map { it.x }.min()!! - 10,
        input.map { it.y }.min()!! - 10
    )
    val topLeft = Point(
        input.map { it.x }.min()!!,
        input.map { it.y }.min()!!
    )
    val bottomRightBig = Point(
        input.map { it.x }.max()!! + 10,
        input.map { it.y }.max()!! + 10
    )
    val bottomRight = Point(
        input.map { it.x }.max()!!,
        input.map { it.y }.max()!!
    )

    val areas = mutableMapOf<Point, Int>()

    for (x in (topLeft.x..bottomRight.x))
        for (y in (topLeft.y..bottomRight.y)) {
            val current = Point(x, y)
            val distances = input.sortedBy { current.distance(it) }.map { Pair(it, it.distance(current)) }
            if (distances[0].second != distances[1].second)
                areas.compute(distances[0].first) { _, a -> (a ?: 0) + 1 }
        }

    val areasBig = mutableMapOf<Point, Int>()

    for (x in (topLeftBig.x..bottomRightBig.x))
        for (y in (topLeftBig.y..bottomRightBig.y)) {
            val current = Point(x, y)
            val distances = input.sortedBy { current.distance(it) }.map { Pair(it, it.distance(current)) }
            if (distances[0].second != distances[1].second)
                areasBig.compute(distances[0].first) { _, a -> (a ?: 0) + 1 }
        }

    return areas.filter { areasBig[it.key] == it.value }.values.max()!!
}

fun part2(): Int {
    val topLeft = Point(
        input.map { it.x }.min()!!,
        input.map { it.y }.min()!!
    )
    val bottomRight = Point(
        input.map { it.x }.max()!!,
        input.map { it.y }.max()!!
    )

    var area = 0

    for (x in (topLeft.x..bottomRight.x))
        for (y in (topLeft.y..bottomRight.y)) {
            val current = Point(x, y)
            val allDists = input.map { it.distance(current) }.sum()
            if (allDists <= 10000)
                area++
        }

    return area
}

Compiled from "Comparisons.kt"
public final class advent.of.code.day06.SolutionKt$part1$$inlined$sortedBy$2<T> implements java.util.Comparator {
  final advent.of.code.day06.Point $current$inlined;

  public advent.of.code.day06.SolutionKt$part1$$inlined$sortedBy$2(advent.of.code.day06.Point);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $current$inlined:Ladvent/of/code/day06/Point;
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #28                 // class advent/of/code/day06/Point
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_0
       9: getfield      #18                 // Field $current$inlined:Ladvent/of/code/day06/Point;
      12: aload_3
      13: invokevirtual #32                 // Method advent/of/code/day06/Point.distance:(Ladvent/of/code/day06/Point;)I
      16: invokestatic  #38                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      19: checkcast     #40                 // class java/lang/Comparable
      22: aload_2
      23: checkcast     #28                 // class advent/of/code/day06/Point
      26: astore_3
      27: astore        5
      29: iconst_0
      30: istore        4
      32: aload_0
      33: getfield      #18                 // Field $current$inlined:Ladvent/of/code/day06/Point;
      36: aload_3
      37: invokevirtual #32                 // Method advent/of/code/day06/Point.distance:(Ladvent/of/code/day06/Point;)I
      40: invokestatic  #38                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      43: aload         5
      45: swap
      46: checkcast     #40                 // class java/lang/Comparable
      49: invokestatic  #46                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      52: ireturn
}

Compiled from "Comparisons.kt"
public final class advent.of.code.day06.SolutionKt$part1$$inlined$sortedBy$1<T> implements java.util.Comparator {
  final advent.of.code.day06.Point $current$inlined;

  public advent.of.code.day06.SolutionKt$part1$$inlined$sortedBy$1(advent.of.code.day06.Point);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $current$inlined:Ladvent/of/code/day06/Point;
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #28                 // class advent/of/code/day06/Point
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_0
       9: getfield      #18                 // Field $current$inlined:Ladvent/of/code/day06/Point;
      12: aload_3
      13: invokevirtual #32                 // Method advent/of/code/day06/Point.distance:(Ladvent/of/code/day06/Point;)I
      16: invokestatic  #38                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      19: checkcast     #40                 // class java/lang/Comparable
      22: aload_2
      23: checkcast     #28                 // class advent/of/code/day06/Point
      26: astore_3
      27: astore        5
      29: iconst_0
      30: istore        4
      32: aload_0
      33: getfield      #18                 // Field $current$inlined:Ladvent/of/code/day06/Point;
      36: aload_3
      37: invokevirtual #32                 // Method advent/of/code/day06/Point.distance:(Ladvent/of/code/day06/Point;)I
      40: invokestatic  #38                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      43: aload         5
      45: swap
      46: checkcast     #40                 // class java/lang/Comparable
      49: invokestatic  #46                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      52: ireturn
}

Compiled from "Solution.kt"
public final class advent.of.code.day06.SolutionKt {
  private static final java.util.List<advent.of.code.day06.Point> input;

  public static final java.util.List<advent.of.code.day06.Point> getInput();
    Code:
       0: getstatic     #12                 // Field input:Ljava/util/List;
       3: areturn

  public static final int part1();
    Code:
       0: getstatic     #12                 // Field input:Ljava/util/List;
       3: checkcast     #16                 // class java/lang/Iterable
       6: astore_1
       7: iconst_0
       8: istore_2
       9: aload_1
      10: astore_3
      11: new           #18                 // class java/util/ArrayList
      14: dup
      15: aload_1
      16: bipush        10
      18: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #30                 // class java/util/Collection
      27: astore        4
      29: iconst_0
      30: istore        5
      32: aload_3
      33: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      38: astore        6
      40: aload         6
      42: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      47: ifeq          93
      50: aload         6
      52: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      57: astore        7
      59: aload         4
      61: aload         7
      63: checkcast     #46                 // class advent/of/code/day06/Point
      66: astore        8
      68: astore        22
      70: iconst_0
      71: istore        9
      73: aload         8
      75: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
      78: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      81: aload         22
      83: swap
      84: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      89: pop
      90: goto          40
      93: aload         4
      95: checkcast     #61                 // class java/util/List
      98: nop
      99: checkcast     #16                 // class java/lang/Iterable
     102: invokestatic  #65                 // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     105: dup
     106: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     109: checkcast     #73                 // class java/lang/Number
     112: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     115: bipush        10
     117: isub
     118: getstatic     #12                 // Field input:Ljava/util/List;
     121: checkcast     #16                 // class java/lang/Iterable
     124: astore_1
     125: istore        22
     127: iconst_0
     128: istore_2
     129: aload_1
     130: astore_3
     131: new           #18                 // class java/util/ArrayList
     134: dup
     135: aload_1
     136: bipush        10
     138: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     141: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     144: checkcast     #30                 // class java/util/Collection
     147: astore        4
     149: iconst_0
     150: istore        5
     152: aload_3
     153: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     158: astore        6
     160: aload         6
     162: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     167: ifeq          213
     170: aload         6
     172: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     177: astore        7
     179: aload         4
     181: aload         7
     183: checkcast     #46                 // class advent/of/code/day06/Point
     186: astore        8
     188: astore        23
     190: iconst_0
     191: istore        9
     193: aload         8
     195: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     198: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     201: aload         23
     203: swap
     204: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     209: pop
     210: goto          160
     213: aload         4
     215: checkcast     #61                 // class java/util/List
     218: nop
     219: astore        23
     221: iload         22
     223: aload         23
     225: checkcast     #16                 // class java/lang/Iterable
     228: invokestatic  #65                 // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     231: dup
     232: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     235: checkcast     #73                 // class java/lang/Number
     238: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     241: bipush        10
     243: isub
     244: istore        24
     246: istore        25
     248: new           #46                 // class advent/of/code/day06/Point
     251: dup
     252: iload         25
     254: iload         24
     256: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
     259: astore_0
     260: getstatic     #12                 // Field input:Ljava/util/List;
     263: checkcast     #16                 // class java/lang/Iterable
     266: astore_2
     267: iconst_0
     268: istore_3
     269: aload_2
     270: astore        4
     272: new           #18                 // class java/util/ArrayList
     275: dup
     276: aload_2
     277: bipush        10
     279: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     282: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     285: checkcast     #30                 // class java/util/Collection
     288: astore        5
     290: iconst_0
     291: istore        6
     293: aload         4
     295: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     300: astore        7
     302: aload         7
     304: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     309: ifeq          355
     312: aload         7
     314: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     319: astore        8
     321: aload         5
     323: aload         8
     325: checkcast     #46                 // class advent/of/code/day06/Point
     328: astore        9
     330: astore        22
     332: iconst_0
     333: istore        10
     335: aload         9
     337: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
     340: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     343: aload         22
     345: swap
     346: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     351: pop
     352: goto          302
     355: aload         5
     357: checkcast     #61                 // class java/util/List
     360: nop
     361: checkcast     #16                 // class java/lang/Iterable
     364: invokestatic  #65                 // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     367: dup
     368: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     371: checkcast     #73                 // class java/lang/Number
     374: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     377: getstatic     #12                 // Field input:Ljava/util/List;
     380: checkcast     #16                 // class java/lang/Iterable
     383: astore_2
     384: istore        22
     386: iconst_0
     387: istore_3
     388: aload_2
     389: astore        4
     391: new           #18                 // class java/util/ArrayList
     394: dup
     395: aload_2
     396: bipush        10
     398: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     401: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     404: checkcast     #30                 // class java/util/Collection
     407: astore        5
     409: iconst_0
     410: istore        6
     412: aload         4
     414: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     419: astore        7
     421: aload         7
     423: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     428: ifeq          474
     431: aload         7
     433: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     438: astore        8
     440: aload         5
     442: aload         8
     444: checkcast     #46                 // class advent/of/code/day06/Point
     447: astore        9
     449: astore        23
     451: iconst_0
     452: istore        10
     454: aload         9
     456: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     459: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     462: aload         23
     464: swap
     465: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     470: pop
     471: goto          421
     474: aload         5
     476: checkcast     #61                 // class java/util/List
     479: nop
     480: astore        23
     482: iload         22
     484: aload         23
     486: checkcast     #16                 // class java/lang/Iterable
     489: invokestatic  #65                 // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     492: dup
     493: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     496: checkcast     #73                 // class java/lang/Number
     499: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     502: istore        26
     504: istore        27
     506: new           #46                 // class advent/of/code/day06/Point
     509: dup
     510: iload         27
     512: iload         26
     514: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
     517: astore_1
     518: getstatic     #12                 // Field input:Ljava/util/List;
     521: checkcast     #16                 // class java/lang/Iterable
     524: astore_3
     525: iconst_0
     526: istore        4
     528: aload_3
     529: astore        5
     531: new           #18                 // class java/util/ArrayList
     534: dup
     535: aload_3
     536: bipush        10
     538: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     541: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     544: checkcast     #30                 // class java/util/Collection
     547: astore        6
     549: iconst_0
     550: istore        7
     552: aload         5
     554: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     559: astore        8
     561: aload         8
     563: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     568: ifeq          614
     571: aload         8
     573: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     578: astore        9
     580: aload         6
     582: aload         9
     584: checkcast     #46                 // class advent/of/code/day06/Point
     587: astore        10
     589: astore        22
     591: iconst_0
     592: istore        11
     594: aload         10
     596: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
     599: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     602: aload         22
     604: swap
     605: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     610: pop
     611: goto          561
     614: aload         6
     616: checkcast     #61                 // class java/util/List
     619: nop
     620: checkcast     #16                 // class java/lang/Iterable
     623: invokestatic  #85                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     626: dup
     627: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     630: checkcast     #73                 // class java/lang/Number
     633: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     636: bipush        10
     638: iadd
     639: getstatic     #12                 // Field input:Ljava/util/List;
     642: checkcast     #16                 // class java/lang/Iterable
     645: astore_3
     646: istore        22
     648: iconst_0
     649: istore        4
     651: aload_3
     652: astore        5
     654: new           #18                 // class java/util/ArrayList
     657: dup
     658: aload_3
     659: bipush        10
     661: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     664: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     667: checkcast     #30                 // class java/util/Collection
     670: astore        6
     672: iconst_0
     673: istore        7
     675: aload         5
     677: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     682: astore        8
     684: aload         8
     686: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     691: ifeq          737
     694: aload         8
     696: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     701: astore        9
     703: aload         6
     705: aload         9
     707: checkcast     #46                 // class advent/of/code/day06/Point
     710: astore        10
     712: astore        23
     714: iconst_0
     715: istore        11
     717: aload         10
     719: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     722: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     725: aload         23
     727: swap
     728: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     733: pop
     734: goto          684
     737: aload         6
     739: checkcast     #61                 // class java/util/List
     742: nop
     743: astore        23
     745: iload         22
     747: aload         23
     749: checkcast     #16                 // class java/lang/Iterable
     752: invokestatic  #85                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     755: dup
     756: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     759: checkcast     #73                 // class java/lang/Number
     762: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     765: bipush        10
     767: iadd
     768: istore        28
     770: istore        29
     772: new           #46                 // class advent/of/code/day06/Point
     775: dup
     776: iload         29
     778: iload         28
     780: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
     783: astore_2
     784: getstatic     #12                 // Field input:Ljava/util/List;
     787: checkcast     #16                 // class java/lang/Iterable
     790: astore        4
     792: iconst_0
     793: istore        5
     795: aload         4
     797: astore        6
     799: new           #18                 // class java/util/ArrayList
     802: dup
     803: aload         4
     805: bipush        10
     807: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     810: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     813: checkcast     #30                 // class java/util/Collection
     816: astore        7
     818: iconst_0
     819: istore        8
     821: aload         6
     823: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     828: astore        9
     830: aload         9
     832: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     837: ifeq          883
     840: aload         9
     842: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     847: astore        10
     849: aload         7
     851: aload         10
     853: checkcast     #46                 // class advent/of/code/day06/Point
     856: astore        11
     858: astore        22
     860: iconst_0
     861: istore        12
     863: aload         11
     865: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
     868: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     871: aload         22
     873: swap
     874: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     879: pop
     880: goto          830
     883: aload         7
     885: checkcast     #61                 // class java/util/List
     888: nop
     889: checkcast     #16                 // class java/lang/Iterable
     892: invokestatic  #85                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     895: dup
     896: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     899: checkcast     #73                 // class java/lang/Number
     902: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     905: getstatic     #12                 // Field input:Ljava/util/List;
     908: checkcast     #16                 // class java/lang/Iterable
     911: astore        4
     913: istore        22
     915: iconst_0
     916: istore        5
     918: aload         4
     920: astore        6
     922: new           #18                 // class java/util/ArrayList
     925: dup
     926: aload         4
     928: bipush        10
     930: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     933: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     936: checkcast     #30                 // class java/util/Collection
     939: astore        7
     941: iconst_0
     942: istore        8
     944: aload         6
     946: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     951: astore        9
     953: aload         9
     955: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     960: ifeq          1006
     963: aload         9
     965: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     970: astore        10
     972: aload         7
     974: aload         10
     976: checkcast     #46                 // class advent/of/code/day06/Point
     979: astore        11
     981: astore        23
     983: iconst_0
     984: istore        12
     986: aload         11
     988: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     991: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     994: aload         23
     996: swap
     997: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1002: pop
    1003: goto          953
    1006: aload         7
    1008: checkcast     #61                 // class java/util/List
    1011: nop
    1012: astore        23
    1014: iload         22
    1016: aload         23
    1018: checkcast     #16                 // class java/lang/Iterable
    1021: invokestatic  #85                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
    1024: dup
    1025: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
    1028: checkcast     #73                 // class java/lang/Number
    1031: invokevirtual #76                 // Method java/lang/Number.intValue:()I
    1034: istore        30
    1036: istore        31
    1038: new           #46                 // class advent/of/code/day06/Point
    1041: dup
    1042: iload         31
    1044: iload         30
    1046: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
    1049: astore_3
    1050: new           #87                 // class java/util/LinkedHashMap
    1053: dup
    1054: invokespecial #90                 // Method java/util/LinkedHashMap."<init>":()V
    1057: checkcast     #92                 // class java/util/Map
    1060: astore        4
    1062: aload_1
    1063: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
    1066: istore        5
    1068: aload_3
    1069: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
    1072: istore        6
    1074: iload         5
    1076: iload         6
    1078: if_icmpgt     1358
    1081: aload_1
    1082: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
    1085: istore        7
    1087: aload_3
    1088: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
    1091: istore        8
    1093: iload         7
    1095: iload         8
    1097: if_icmpgt     1345
    1100: new           #46                 // class advent/of/code/day06/Point
    1103: dup
    1104: iload         5
    1106: iload         7
    1108: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
    1111: astore        9
    1113: getstatic     #12                 // Field input:Ljava/util/List;
    1116: checkcast     #16                 // class java/lang/Iterable
    1119: astore        11
    1121: iconst_0
    1122: istore        12
    1124: aload         11
    1126: new           #94                 // class advent/of/code/day06/SolutionKt$part1$$inlined$sortedBy$1
    1129: dup
    1130: aload         9
    1132: invokespecial #97                 // Method advent/of/code/day06/SolutionKt$part1$$inlined$sortedBy$1."<init>":(Ladvent/of/code/day06/Point;)V
    1135: checkcast     #99                 // class java/util/Comparator
    1138: invokestatic  #103                // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
    1141: checkcast     #16                 // class java/lang/Iterable
    1144: astore        11
    1146: nop
    1147: iconst_0
    1148: istore        12
    1150: aload         11
    1152: astore        13
    1154: new           #18                 // class java/util/ArrayList
    1157: dup
    1158: aload         11
    1160: bipush        10
    1162: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1165: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
    1168: checkcast     #30                 // class java/util/Collection
    1171: astore        14
    1173: iconst_0
    1174: istore        15
    1176: aload         13
    1178: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1183: astore        16
    1185: aload         16
    1187: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1192: ifeq          1249
    1195: aload         16
    1197: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1202: astore        17
    1204: aload         14
    1206: aload         17
    1208: checkcast     #46                 // class advent/of/code/day06/Point
    1211: astore        18
    1213: astore        21
    1215: iconst_0
    1216: istore        19
    1218: new           #105                // class kotlin/Pair
    1221: dup
    1222: aload         18
    1224: aload         18
    1226: aload         9
    1228: invokevirtual #109                // Method advent/of/code/day06/Point.distance:(Ladvent/of/code/day06/Point;)I
    1231: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1234: invokespecial #112                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
    1237: aload         21
    1239: swap
    1240: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1245: pop
    1246: goto          1185
    1249: aload         14
    1251: checkcast     #61                 // class java/util/List
    1254: nop
    1255: astore        10
    1257: aload         10
    1259: iconst_0
    1260: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1265: checkcast     #105                // class kotlin/Pair
    1268: invokevirtual #119                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1271: checkcast     #73                 // class java/lang/Number
    1274: invokevirtual #76                 // Method java/lang/Number.intValue:()I
    1277: aload         10
    1279: iconst_1
    1280: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1285: checkcast     #105                // class kotlin/Pair
    1288: invokevirtual #119                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1291: checkcast     #73                 // class java/lang/Number
    1294: invokevirtual #76                 // Method java/lang/Number.intValue:()I
    1297: if_icmpeq     1332
    1300: aload         4
    1302: aload         10
    1304: iconst_0
    1305: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1310: checkcast     #105                // class kotlin/Pair
    1313: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1316: invokedynamic #141,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function2;
    1321: invokedynamic #152,  0            // InvokeDynamic #1:apply:(Lkotlin/jvm/functions/Function2;)Ljava/util/function/BiFunction;
    1326: invokeinterface #156,  3          // InterfaceMethod java/util/Map.compute:(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
    1331: pop
    1332: iload         7
    1334: iload         8
    1336: if_icmpeq     1345
    1339: iinc          7, 1
    1342: goto          1100
    1345: iload         5
    1347: iload         6
    1349: if_icmpeq     1358
    1352: iinc          5, 1
    1355: goto          1081
    1358: new           #87                 // class java/util/LinkedHashMap
    1361: dup
    1362: invokespecial #90                 // Method java/util/LinkedHashMap."<init>":()V
    1365: checkcast     #92                 // class java/util/Map
    1368: astore        5
    1370: aload_0
    1371: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
    1374: istore        6
    1376: aload_2
    1377: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
    1380: istore        7
    1382: iload         6
    1384: iload         7
    1386: if_icmpgt     1666
    1389: aload_0
    1390: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
    1393: istore        8
    1395: aload_2
    1396: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
    1399: istore        9
    1401: iload         8
    1403: iload         9
    1405: if_icmpgt     1653
    1408: new           #46                 // class advent/of/code/day06/Point
    1411: dup
    1412: iload         6
    1414: iload         8
    1416: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
    1419: astore        10
    1421: getstatic     #12                 // Field input:Ljava/util/List;
    1424: checkcast     #16                 // class java/lang/Iterable
    1427: astore        12
    1429: iconst_0
    1430: istore        13
    1432: aload         12
    1434: new           #158                // class advent/of/code/day06/SolutionKt$part1$$inlined$sortedBy$2
    1437: dup
    1438: aload         10
    1440: invokespecial #159                // Method advent/of/code/day06/SolutionKt$part1$$inlined$sortedBy$2."<init>":(Ladvent/of/code/day06/Point;)V
    1443: checkcast     #99                 // class java/util/Comparator
    1446: invokestatic  #103                // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
    1449: checkcast     #16                 // class java/lang/Iterable
    1452: astore        12
    1454: nop
    1455: iconst_0
    1456: istore        13
    1458: aload         12
    1460: astore        14
    1462: new           #18                 // class java/util/ArrayList
    1465: dup
    1466: aload         12
    1468: bipush        10
    1470: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1473: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
    1476: checkcast     #30                 // class java/util/Collection
    1479: astore        15
    1481: iconst_0
    1482: istore        16
    1484: aload         14
    1486: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1491: astore        17
    1493: aload         17
    1495: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1500: ifeq          1557
    1503: aload         17
    1505: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1510: astore        18
    1512: aload         15
    1514: aload         18
    1516: checkcast     #46                 // class advent/of/code/day06/Point
    1519: astore        19
    1521: astore        21
    1523: iconst_0
    1524: istore        20
    1526: new           #105                // class kotlin/Pair
    1529: dup
    1530: aload         19
    1532: aload         19
    1534: aload         10
    1536: invokevirtual #109                // Method advent/of/code/day06/Point.distance:(Ladvent/of/code/day06/Point;)I
    1539: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1542: invokespecial #112                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
    1545: aload         21
    1547: swap
    1548: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1553: pop
    1554: goto          1493
    1557: aload         15
    1559: checkcast     #61                 // class java/util/List
    1562: nop
    1563: astore        11
    1565: aload         11
    1567: iconst_0
    1568: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1573: checkcast     #105                // class kotlin/Pair
    1576: invokevirtual #119                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1579: checkcast     #73                 // class java/lang/Number
    1582: invokevirtual #76                 // Method java/lang/Number.intValue:()I
    1585: aload         11
    1587: iconst_1
    1588: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1593: checkcast     #105                // class kotlin/Pair
    1596: invokevirtual #119                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
    1599: checkcast     #73                 // class java/lang/Number
    1602: invokevirtual #76                 // Method java/lang/Number.intValue:()I
    1605: if_icmpeq     1640
    1608: aload         5
    1610: aload         11
    1612: iconst_0
    1613: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1618: checkcast     #105                // class kotlin/Pair
    1621: invokevirtual #122                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1624: invokedynamic #164,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function2;
    1629: invokedynamic #169,  0            // InvokeDynamic #3:apply:(Lkotlin/jvm/functions/Function2;)Ljava/util/function/BiFunction;
    1634: invokeinterface #156,  3          // InterfaceMethod java/util/Map.compute:(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
    1639: pop
    1640: iload         8
    1642: iload         9
    1644: if_icmpeq     1653
    1647: iinc          8, 1
    1650: goto          1408
    1653: iload         6
    1655: iload         7
    1657: if_icmpeq     1666
    1660: iinc          6, 1
    1663: goto          1389
    1666: aload         4
    1668: astore        6
    1670: iconst_0
    1671: istore        7
    1673: aload         6
    1675: astore        8
    1677: new           #87                 // class java/util/LinkedHashMap
    1680: dup
    1681: invokespecial #90                 // Method java/util/LinkedHashMap."<init>":()V
    1684: checkcast     #92                 // class java/util/Map
    1687: astore        9
    1689: iconst_0
    1690: istore        10
    1692: aload         8
    1694: invokeinterface #173,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
    1699: invokeinterface #176,  1          // InterfaceMethod java/util/Set.iterator:()Ljava/util/Iterator;
    1704: astore        11
    1706: aload         11
    1708: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1713: ifeq          1816
    1716: aload         11
    1718: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1723: checkcast     #178                // class java/util/Map$Entry
    1726: astore        12
    1728: aload         12
    1730: astore        13
    1732: iconst_0
    1733: istore        14
    1735: aload         5
    1737: aload         13
    1739: invokeinterface #181,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    1744: invokeinterface #184,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    1749: checkcast     #51                 // class java/lang/Integer
    1752: aload         13
    1754: invokeinterface #187,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    1759: checkcast     #73                 // class java/lang/Number
    1762: invokevirtual #76                 // Method java/lang/Number.intValue:()I
    1765: istore        15
    1767: dup
    1768: ifnonnull     1775
    1771: pop
    1772: goto          1787
    1775: invokevirtual #188                // Method java/lang/Integer.intValue:()I
    1778: iload         15
    1780: if_icmpne     1787
    1783: iconst_1
    1784: goto          1788
    1787: iconst_0
    1788: ifeq          1706
    1791: aload         9
    1793: aload         12
    1795: invokeinterface #181,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    1800: aload         12
    1802: invokeinterface #187,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    1807: invokeinterface #191,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    1812: pop
    1813: goto          1706
    1816: aload         9
    1818: nop
    1819: invokeinterface #195,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
    1824: checkcast     #16                 // class java/lang/Iterable
    1827: invokestatic  #85                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
    1830: dup
    1831: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
    1834: checkcast     #73                 // class java/lang/Number
    1837: invokevirtual #76                 // Method java/lang/Number.intValue:()I
    1840: ireturn

  public static final int part2();
    Code:
       0: getstatic     #12                 // Field input:Ljava/util/List;
       3: checkcast     #16                 // class java/lang/Iterable
       6: astore_1
       7: iconst_0
       8: istore_2
       9: aload_1
      10: astore_3
      11: new           #18                 // class java/util/ArrayList
      14: dup
      15: aload_1
      16: bipush        10
      18: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #30                 // class java/util/Collection
      27: astore        4
      29: iconst_0
      30: istore        5
      32: aload_3
      33: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      38: astore        6
      40: aload         6
      42: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      47: ifeq          93
      50: aload         6
      52: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      57: astore        7
      59: aload         4
      61: aload         7
      63: checkcast     #46                 // class advent/of/code/day06/Point
      66: astore        8
      68: astore        19
      70: iconst_0
      71: istore        9
      73: aload         8
      75: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
      78: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      81: aload         19
      83: swap
      84: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      89: pop
      90: goto          40
      93: aload         4
      95: checkcast     #61                 // class java/util/List
      98: nop
      99: checkcast     #16                 // class java/lang/Iterable
     102: invokestatic  #65                 // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     105: dup
     106: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     109: checkcast     #73                 // class java/lang/Number
     112: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     115: getstatic     #12                 // Field input:Ljava/util/List;
     118: checkcast     #16                 // class java/lang/Iterable
     121: astore_1
     122: istore        19
     124: iconst_0
     125: istore_2
     126: aload_1
     127: astore_3
     128: new           #18                 // class java/util/ArrayList
     131: dup
     132: aload_1
     133: bipush        10
     135: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     138: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     141: checkcast     #30                 // class java/util/Collection
     144: astore        4
     146: iconst_0
     147: istore        5
     149: aload_3
     150: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     155: astore        6
     157: aload         6
     159: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     164: ifeq          210
     167: aload         6
     169: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     174: astore        7
     176: aload         4
     178: aload         7
     180: checkcast     #46                 // class advent/of/code/day06/Point
     183: astore        8
     185: astore        20
     187: iconst_0
     188: istore        9
     190: aload         8
     192: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     195: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     198: aload         20
     200: swap
     201: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     206: pop
     207: goto          157
     210: aload         4
     212: checkcast     #61                 // class java/util/List
     215: nop
     216: astore        20
     218: iload         19
     220: aload         20
     222: checkcast     #16                 // class java/lang/Iterable
     225: invokestatic  #65                 // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     228: dup
     229: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     232: checkcast     #73                 // class java/lang/Number
     235: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     238: istore        21
     240: istore        22
     242: new           #46                 // class advent/of/code/day06/Point
     245: dup
     246: iload         22
     248: iload         21
     250: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
     253: astore_0
     254: getstatic     #12                 // Field input:Ljava/util/List;
     257: checkcast     #16                 // class java/lang/Iterable
     260: astore_2
     261: iconst_0
     262: istore_3
     263: aload_2
     264: astore        4
     266: new           #18                 // class java/util/ArrayList
     269: dup
     270: aload_2
     271: bipush        10
     273: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     276: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     279: checkcast     #30                 // class java/util/Collection
     282: astore        5
     284: iconst_0
     285: istore        6
     287: aload         4
     289: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     294: astore        7
     296: aload         7
     298: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     303: ifeq          349
     306: aload         7
     308: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     313: astore        8
     315: aload         5
     317: aload         8
     319: checkcast     #46                 // class advent/of/code/day06/Point
     322: astore        9
     324: astore        19
     326: iconst_0
     327: istore        10
     329: aload         9
     331: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
     334: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     337: aload         19
     339: swap
     340: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     345: pop
     346: goto          296
     349: aload         5
     351: checkcast     #61                 // class java/util/List
     354: nop
     355: checkcast     #16                 // class java/lang/Iterable
     358: invokestatic  #85                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     361: dup
     362: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     365: checkcast     #73                 // class java/lang/Number
     368: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     371: getstatic     #12                 // Field input:Ljava/util/List;
     374: checkcast     #16                 // class java/lang/Iterable
     377: astore_2
     378: istore        19
     380: iconst_0
     381: istore_3
     382: aload_2
     383: astore        4
     385: new           #18                 // class java/util/ArrayList
     388: dup
     389: aload_2
     390: bipush        10
     392: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     395: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     398: checkcast     #30                 // class java/util/Collection
     401: astore        5
     403: iconst_0
     404: istore        6
     406: aload         4
     408: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     413: astore        7
     415: aload         7
     417: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     422: ifeq          468
     425: aload         7
     427: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     432: astore        8
     434: aload         5
     436: aload         8
     438: checkcast     #46                 // class advent/of/code/day06/Point
     441: astore        9
     443: astore        20
     445: iconst_0
     446: istore        10
     448: aload         9
     450: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     453: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     456: aload         20
     458: swap
     459: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     464: pop
     465: goto          415
     468: aload         5
     470: checkcast     #61                 // class java/util/List
     473: nop
     474: astore        20
     476: iload         19
     478: aload         20
     480: checkcast     #16                 // class java/lang/Iterable
     483: invokestatic  #85                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     486: dup
     487: invokestatic  #71                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     490: checkcast     #73                 // class java/lang/Number
     493: invokevirtual #76                 // Method java/lang/Number.intValue:()I
     496: istore        23
     498: istore        24
     500: new           #46                 // class advent/of/code/day06/Point
     503: dup
     504: iload         24
     506: iload         23
     508: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
     511: astore_1
     512: iconst_0
     513: istore_2
     514: aload_0
     515: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
     518: istore_3
     519: aload_1
     520: invokevirtual #49                 // Method advent/of/code/day06/Point.getX:()I
     523: istore        4
     525: iload_3
     526: iload         4
     528: if_icmpgt     713
     531: aload_0
     532: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     535: istore        5
     537: aload_1
     538: invokevirtual #79                 // Method advent/of/code/day06/Point.getY:()I
     541: istore        6
     543: iload         5
     545: iload         6
     547: if_icmpgt     701
     550: new           #46                 // class advent/of/code/day06/Point
     553: dup
     554: iload_3
     555: iload         5
     557: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
     560: astore        7
     562: getstatic     #12                 // Field input:Ljava/util/List;
     565: checkcast     #16                 // class java/lang/Iterable
     568: astore        9
     570: iconst_0
     571: istore        10
     573: aload         9
     575: astore        11
     577: new           #18                 // class java/util/ArrayList
     580: dup
     581: aload         9
     583: bipush        10
     585: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     588: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     591: checkcast     #30                 // class java/util/Collection
     594: astore        12
     596: iconst_0
     597: istore        13
     599: aload         11
     601: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     606: astore        14
     608: aload         14
     610: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     615: ifeq          663
     618: aload         14
     620: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     625: astore        15
     627: aload         12
     629: aload         15
     631: checkcast     #46                 // class advent/of/code/day06/Point
     634: astore        16
     636: astore        18
     638: iconst_0
     639: istore        17
     641: aload         16
     643: aload         7
     645: invokevirtual #109                // Method advent/of/code/day06/Point.distance:(Ladvent/of/code/day06/Point;)I
     648: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     651: aload         18
     653: swap
     654: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     659: pop
     660: goto          608
     663: aload         12
     665: checkcast     #61                 // class java/util/List
     668: nop
     669: checkcast     #16                 // class java/lang/Iterable
     672: invokestatic  #242                // Method kotlin/collections/CollectionsKt.sumOfInt:(Ljava/lang/Iterable;)I
     675: istore        8
     677: iload         8
     679: sipush        10000
     682: if_icmpgt     688
     685: iinc          2, 1
     688: iload         5
     690: iload         6
     692: if_icmpeq     701
     695: iinc          5, 1
     698: goto          550
     701: iload_3
     702: iload         4
     704: if_icmpeq     713
     707: iinc          3, 1
     710: goto          531
     713: iload_2
     714: ireturn

  private static final java.lang.Integer part1$lambda$11(advent.of.code.day06.Point, java.lang.Integer);
    Code:
       0: aload_0
       1: ldc           #251                // String <unused var>
       3: invokestatic  #255                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: dup
       8: ifnull        17
      11: invokevirtual #188                // Method java/lang/Integer.intValue:()I
      14: goto          19
      17: pop
      18: iconst_0
      19: iconst_1
      20: iadd
      21: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      24: areturn

  private static final java.lang.Integer part1$lambda$12(kotlin.jvm.functions.Function2, java.lang.Object, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: invokeinterface #261,  3          // InterfaceMethod kotlin/jvm/functions/Function2.invoke:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
       8: checkcast     #51                 // class java/lang/Integer
      11: areturn

  private static final java.lang.Integer part1$lambda$15(advent.of.code.day06.Point, java.lang.Integer);
    Code:
       0: aload_0
       1: ldc           #251                // String <unused var>
       3: invokestatic  #255                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: dup
       8: ifnull        17
      11: invokevirtual #188                // Method java/lang/Integer.intValue:()I
      14: goto          19
      17: pop
      18: iconst_0
      19: iconst_1
      20: iadd
      21: invokestatic  #55                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      24: areturn

  private static final java.lang.Integer part1$lambda$16(kotlin.jvm.functions.Function2, java.lang.Object, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: invokeinterface #261,  3          // InterfaceMethod kotlin/jvm/functions/Function2.invoke:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
       8: checkcast     #51                 // class java/lang/Integer
      11: areturn

  static {};
    Code:
       0: new           #268                // class java/io/File
       3: dup
       4: ldc_w         #270                // String day06.txt
       7: invokespecial #273                // Method java/io/File."<init>":(Ljava/lang/String;)V
      10: aconst_null
      11: iconst_1
      12: aconst_null
      13: invokestatic  #279                // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      16: checkcast     #16                 // class java/lang/Iterable
      19: astore_0
      20: iconst_0
      21: istore_1
      22: aload_0
      23: astore_2
      24: new           #18                 // class java/util/ArrayList
      27: dup
      28: aload_0
      29: bipush        10
      31: invokestatic  #24                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      34: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      37: checkcast     #30                 // class java/util/Collection
      40: astore_3
      41: iconst_0
      42: istore        4
      44: aload_2
      45: invokeinterface #34,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      50: astore        5
      52: aload         5
      54: invokeinterface #40,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      59: ifeq          180
      62: aload         5
      64: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      69: astore        6
      71: aload_3
      72: aload         6
      74: checkcast     #281                // class java/lang/String
      77: astore        7
      79: astore        11
      81: iconst_0
      82: istore        8
      84: aload         7
      86: checkcast     #283                // class java/lang/CharSequence
      89: iconst_1
      90: anewarray     #281                // class java/lang/String
      93: astore        9
      95: aload         9
      97: iconst_0
      98: ldc_w         #285                // String ,
     101: aastore
     102: aload         9
     104: iconst_0
     105: iconst_0
     106: bipush        6
     108: aconst_null
     109: invokestatic  #291                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     112: astore        10
     114: new           #46                 // class advent/of/code/day06/Point
     117: dup
     118: aload         10
     120: iconst_0
     121: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     126: checkcast     #281                // class java/lang/String
     129: checkcast     #283                // class java/lang/CharSequence
     132: invokestatic  #295                // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     135: invokevirtual #299                // Method java/lang/Object.toString:()Ljava/lang/String;
     138: invokestatic  #303                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     141: nop
     142: aload         10
     144: iconst_1
     145: invokeinterface #116,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     150: checkcast     #281                // class java/lang/String
     153: checkcast     #283                // class java/lang/CharSequence
     156: invokestatic  #295                // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     159: invokevirtual #299                // Method java/lang/Object.toString:()Ljava/lang/String;
     162: invokestatic  #303                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     165: invokespecial #82                 // Method advent/of/code/day06/Point."<init>":(II)V
     168: aload         11
     170: swap
     171: invokeinterface #59,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     176: pop
     177: goto          52
     180: aload_3
     181: checkcast     #61                 // class java/util/List
     184: nop
     185: putstatic     #12                 // Field input:Ljava/util/List;
     188: return
}


package advent.of.code.day12

import java.io.File

// STILL WRONG :(

data class PlantsInPots(val data: MutableSet<Long> = mutableSetOf()) {

    companion object {
        fun build(init: String): PlantsInPots {
            val instance = PlantsInPots()
            init.forEachIndexed { index, c -> instance[index.toLong()] = c }
            return instance
        }
    }

    fun copy() = PlantsInPots(data.toMutableSet())

    operator fun get(index: Long) = if (data.contains(index)) '#' else '.'

    operator fun set(index: Long, c: Char) = if (c == '#') data.add(index) else data.remove(index)

    fun sumPlantIndexes() = data.sum()

    fun plantCount() = data.size

    fun min() = data.min() ?: 0

    fun max() = data.max() ?: 0

    fun slice(middle: Long, borderSize: Long) =
        ((middle - borderSize)..(middle + borderSize)).map { get(it) }.joinToString("")

    override fun toString() =
        (-10..max()).joinToString("") { idx ->
            if (idx == 0L) get(idx).toString()
                .replace('#', 'X')
                .replace('.', 'o')
            else get(idx).toString()
        }
}

const val initState =
    "#...##.#...#..#.#####.##.#..###.#.#.###....#...#...####.#....##..##..#..#..#..#.#..##.####.#.#.###"

val rules = File("day12.txt").readLines().drop(2)
    .map { it.substring((0..4)) to it[9] }

fun calculate(lasIteration: Int): Long {
    val generation = PlantsInPots.build(initState)
//    println(info(0, generation))
    for (g in (1..lasIteration)) {
        val before = generation.copy()
        ((before.min() - 5)..(before.max() + 5))
            .map { pos ->
                val pattern = before.slice(pos, 2)
                val rule = rules.firstOrNull { pattern == it.first }
                generation[pos] = rule?.second ?: '.'
            }
//        println(info(g, generation))
    }
    return generation.sumPlantIndexes()
}

fun part1() = calculate(20)

fun part2(): Long {
    val res200 = calculate(200)
    val res300 = calculate(300)
//    val res400 = calculate(400)
    val diff = res300 - res200
//    println("${res400 - res300} ${res300 - res200}")
    return (50_000_000_000 - 200) / 100 * diff + res200
}

fun info(g: Int, gen: PlantsInPots) =
    g.toString().padStart(4, '0') +
            " - $gen" +
            " - ${gen.sumPlantIndexes()}" +
            " - ${gen.plantCount()}" +
            " - ${gen.min()}" +
            " - ${gen.max()}"

Compiled from "Solution.kt"
public final class advent.of.code.day12.SolutionKt {
  public static final java.lang.String initState;

  private static final java.util.List<kotlin.Pair<java.lang.String, java.lang.Character>> rules;

  public static final java.util.List<kotlin.Pair<java.lang.String, java.lang.Character>> getRules();
    Code:
       0: getstatic     #12                 // Field rules:Ljava/util/List;
       3: areturn

  public static final long calculate(int);
    Code:
       0: getstatic     #20                 // Field advent/of/code/day12/PlantsInPots.Companion:Ladvent/of/code/day12/PlantsInPots$Companion;
       3: ldc           #22                 // String #...##.#...#..#.#####.##.#..###.#.#.###....#...#...####.#....##..##..#..#..#..#.#..##.####.#.#.###
       5: invokevirtual #28                 // Method advent/of/code/day12/PlantsInPots$Companion.build:(Ljava/lang/String;)Ladvent/of/code/day12/PlantsInPots;
       8: astore_1
       9: iconst_1
      10: istore_2
      11: iload_2
      12: iload_0
      13: if_icmpgt     262
      16: aload_1
      17: invokevirtual #32                 // Method advent/of/code/day12/PlantsInPots.copy:()Ladvent/of/code/day12/PlantsInPots;
      20: astore_3
      21: new           #34                 // class kotlin/ranges/LongRange
      24: dup
      25: aload_3
      26: invokevirtual #38                 // Method advent/of/code/day12/PlantsInPots.min:()J
      29: iconst_5
      30: i2l
      31: lsub
      32: aload_3
      33: invokevirtual #41                 // Method advent/of/code/day12/PlantsInPots.max:()J
      36: iconst_5
      37: i2l
      38: ladd
      39: invokespecial #45                 // Method kotlin/ranges/LongRange."<init>":(JJ)V
      42: checkcast     #47                 // class java/lang/Iterable
      45: astore        4
      47: nop
      48: iconst_0
      49: istore        5
      51: aload         4
      53: astore        6
      55: new           #49                 // class java/util/ArrayList
      58: dup
      59: aload         4
      61: bipush        10
      63: invokestatic  #55                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      66: invokespecial #58                 // Method java/util/ArrayList."<init>":(I)V
      69: checkcast     #60                 // class java/util/Collection
      72: astore        7
      74: iconst_0
      75: istore        8
      77: aload         6
      79: invokeinterface #64,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      84: astore        9
      86: aload         9
      88: invokeinterface #70,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      93: ifeq          244
      96: aload         9
      98: checkcast     #72                 // class kotlin/collections/LongIterator
     101: invokevirtual #75                 // Method kotlin/collections/LongIterator.nextLong:()J
     104: lstore        10
     106: aload         7
     108: lload         10
     110: lstore        12
     112: astore        23
     114: iconst_0
     115: istore        14
     117: aload_3
     118: lload         12
     120: ldc2_w        #76                 // long 2l
     123: invokevirtual #81                 // Method advent/of/code/day12/PlantsInPots.slice:(JJ)Ljava/lang/String;
     126: astore        15
     128: getstatic     #12                 // Field rules:Ljava/util/List;
     131: checkcast     #47                 // class java/lang/Iterable
     134: astore        16
     136: iconst_0
     137: istore        17
     139: aload         16
     141: invokeinterface #64,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     146: astore        18
     148: aload         18
     150: invokeinterface #70,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     155: ifeq          195
     158: aload         18
     160: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     165: astore        19
     167: aload         19
     169: checkcast     #87                 // class kotlin/Pair
     172: astore        20
     174: iconst_0
     175: istore        21
     177: aload         15
     179: aload         20
     181: invokevirtual #90                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     184: invokestatic  #96                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     187: ifeq          148
     190: aload         19
     192: goto          196
     195: aconst_null
     196: checkcast     #87                 // class kotlin/Pair
     199: astore        22
     201: aload_1
     202: lload         12
     204: aload         22
     206: dup
     207: ifnull        222
     210: invokevirtual #99                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     213: checkcast     #101                // class java/lang/Character
     216: invokevirtual #105                // Method java/lang/Character.charValue:()C
     219: goto          225
     222: pop
     223: bipush        46
     225: invokevirtual #109                // Method advent/of/code/day12/PlantsInPots.set:(JC)Z
     228: pop
     229: nop
     230: aload         23
     232: getstatic     #115                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     235: invokeinterface #119,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     240: pop
     241: goto          86
     244: aload         7
     246: checkcast     #121                // class java/util/List
     249: nop
     250: pop
     251: iload_2
     252: iload_0
     253: if_icmpeq     262
     256: iinc          2, 1
     259: goto          16
     262: aload_1
     263: invokevirtual #124                // Method advent/of/code/day12/PlantsInPots.sumPlantIndexes:()J
     266: lreturn

  public static final long part1();
    Code:
       0: bipush        20
       2: invokestatic  #156                // Method calculate:(I)J
       5: lreturn

  public static final long part2();
    Code:
       0: sipush        200
       3: invokestatic  #156                // Method calculate:(I)J
       6: lstore_0
       7: sipush        300
      10: invokestatic  #156                // Method calculate:(I)J
      13: lstore_2
      14: lload_2
      15: lload_0
      16: lsub
      17: lstore        4
      19: ldc2_w        #158                // long 499999998l
      22: lload         4
      24: lmul
      25: lload_0
      26: ladd
      27: lreturn

  public static final java.lang.String info(int, advent.of.code.day12.PlantsInPots);
    Code:
       0: aload_1
       1: ldc           #166                // String gen
       3: invokestatic  #170                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #172                // class java/lang/StringBuilder
       9: dup
      10: invokespecial #175                // Method java/lang/StringBuilder."<init>":()V
      13: iload_0
      14: invokestatic  #179                // Method java/lang/String.valueOf:(I)Ljava/lang/String;
      17: iconst_4
      18: bipush        48
      20: invokestatic  #185                // Method kotlin/text/StringsKt.padStart:(Ljava/lang/String;IC)Ljava/lang/String;
      23: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      26: ldc           #191                // String  -
      28: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      31: aload_1
      32: invokevirtual #194                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      35: ldc           #191                // String  -
      37: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      40: aload_1
      41: invokevirtual #124                // Method advent/of/code/day12/PlantsInPots.sumPlantIndexes:()J
      44: invokevirtual #197                // Method java/lang/StringBuilder.append:(J)Ljava/lang/StringBuilder;
      47: ldc           #191                // String  -
      49: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      52: aload_1
      53: invokevirtual #201                // Method advent/of/code/day12/PlantsInPots.plantCount:()I
      56: invokevirtual #204                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      59: ldc           #191                // String  -
      61: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      64: aload_1
      65: invokevirtual #38                 // Method advent/of/code/day12/PlantsInPots.min:()J
      68: invokevirtual #197                // Method java/lang/StringBuilder.append:(J)Ljava/lang/StringBuilder;
      71: ldc           #191                // String  -
      73: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      76: aload_1
      77: invokevirtual #41                 // Method advent/of/code/day12/PlantsInPots.max:()J
      80: invokevirtual #197                // Method java/lang/StringBuilder.append:(J)Ljava/lang/StringBuilder;
      83: invokevirtual #208                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      86: areturn

  static {};
    Code:
       0: new           #211                // class java/io/File
       3: dup
       4: ldc           #213                // String day12.txt
       6: invokespecial #216                // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: aconst_null
      10: iconst_1
      11: aconst_null
      12: invokestatic  #222                // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      15: checkcast     #47                 // class java/lang/Iterable
      18: iconst_2
      19: invokestatic  #226                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
      22: checkcast     #47                 // class java/lang/Iterable
      25: astore_0
      26: nop
      27: iconst_0
      28: istore_1
      29: aload_0
      30: astore_2
      31: new           #49                 // class java/util/ArrayList
      34: dup
      35: aload_0
      36: bipush        10
      38: invokestatic  #55                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      41: invokespecial #58                 // Method java/util/ArrayList."<init>":(I)V
      44: checkcast     #60                 // class java/util/Collection
      47: astore_3
      48: iconst_0
      49: istore        4
      51: aload_2
      52: invokeinterface #64,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      57: astore        5
      59: aload         5
      61: invokeinterface #70,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      66: ifeq          130
      69: aload         5
      71: invokeinterface #85,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      76: astore        6
      78: aload_3
      79: aload         6
      81: checkcast     #153                // class java/lang/String
      84: astore        7
      86: astore        9
      88: iconst_0
      89: istore        8
      91: aload         7
      93: new           #228                // class kotlin/ranges/IntRange
      96: dup
      97: iconst_0
      98: iconst_4
      99: invokespecial #231                // Method kotlin/ranges/IntRange."<init>":(II)V
     102: invokestatic  #235                // Method kotlin/text/StringsKt.substring:(Ljava/lang/String;Lkotlin/ranges/IntRange;)Ljava/lang/String;
     105: aload         7
     107: bipush        9
     109: invokevirtual #239                // Method java/lang/String.charAt:(I)C
     112: invokestatic  #242                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     115: invokestatic  #248                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     118: aload         9
     120: swap
     121: invokeinterface #119,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     126: pop
     127: goto          59
     130: aload_3
     131: checkcast     #121                // class java/util/List
     134: nop
     135: putstatic     #12                 // Field rules:Ljava/util/List;
     138: return
}