package dev.aspid812.leetcode.problem0541

/* 541. Reverse String II
 * ----------------------
 *
 * Given a string `s` and an integer `k`, reverse the first `k` characters for every `2k` characters counting
 * from the start of the string.
 *
 * If there are fewer than `k` characters left, reverse all of them. If there are less than `2k` but greater than
 * or equal to `k` characters, then reverse the first `k` characters and left the other as original.
 *
 * ### Constraints:
 *
 *   * `1 <= s.length <= 10^4`
 *   * `s` consists of only lowercase English letters.
 *   * `1 <= k <= 10^4`
 */

import kotlin.math.min

class Solution {
    fun CharArray.swap(i: Int, j: Int) {
        val c = this[i]
        this[i] = this[j]
        this[j] = c
    }

    fun CharArray.reverse(start: Int, end: Int) {
        var i = start
        var j = end - 1
        while (i < j) {
            swap(i++, j--)
        }
    }

    fun reverseStr(str: String, k: Int): String {
        val s = str.toCharArray()
        for (i in s.indices.step(2 * k)) {
            s.reverse(i, min(i + k, s.size))
        }
        return String(s)
    }
}

fun main() {
    val s = Solution()

    println("${s.reverseStr(str="abcdefg", k=2)} == \"bacdfeg\"")
    println("${s.reverseStr(str="abcd", k=2)} == \"bacd\"")
}

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

  public final void swap(char[], int, int);
    Code:
       0: aload_1
       1: ldc           #15                 // String <this>
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: iload_2
       8: caload
       9: istore        4
      11: aload_1
      12: iload_2
      13: aload_1
      14: iload_3
      15: caload
      16: castore
      17: aload_1
      18: iload_3
      19: iload         4
      21: castore
      22: return

  public final void reverse(char[], int, int);
    Code:
       0: aload_1
       1: ldc           #15                 // String <this>
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_2
       7: istore        4
       9: iload_3
      10: iconst_1
      11: isub
      12: istore        5
      14: iload         4
      16: iload         5
      18: if_icmpge     39
      21: aload_0
      22: aload_1
      23: iload         4
      25: iinc          4, 1
      28: iload         5
      30: iinc          5, -1
      33: invokevirtual #31                 // Method swap:([CII)V
      36: goto          14
      39: return

  public final java.lang.String reverseStr(java.lang.String, int);
    Code:
       0: aload_1
       1: ldc           #38                 // String str
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #44                 // Method java/lang/String.toCharArray:()[C
      10: dup
      11: ldc           #46                 // String toCharArray(...)
      13: invokestatic  #49                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      16: astore_3
      17: aload_3
      18: arraylength
      19: iconst_m1
      20: iadd
      21: istore        4
      23: iconst_2
      24: iload_2
      25: imul
      26: istore        5
      28: iload         5
      30: ifgt          66
      33: new           #51                 // class java/lang/IllegalArgumentException
      36: dup
      37: new           #53                 // class java/lang/StringBuilder
      40: dup
      41: invokespecial #54                 // Method java/lang/StringBuilder."<init>":()V
      44: ldc           #56                 // String Step must be positive, was:
      46: invokevirtual #60                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      49: iload         5
      51: invokevirtual #63                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      54: bipush        46
      56: invokevirtual #66                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      59: invokevirtual #70                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      62: invokespecial #73                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      65: athrow
      66: iconst_0
      67: istore        6
      69: iconst_0
      70: iload         4
      72: iload         5
      74: invokestatic  #79                 // Method kotlin/internal/ProgressionUtilKt.getProgressionLastElement:(III)I
      77: istore        7
      79: iload         5
      81: istore        8
      83: iload         6
      85: iload         7
      87: if_icmpgt     123
      90: aload_0
      91: aload_3
      92: iload         6
      94: iload         6
      96: iload_2
      97: iadd
      98: aload_3
      99: arraylength
     100: invokestatic  #85                 // Method java/lang/Math.min:(II)I
     103: invokevirtual #87                 // Method reverse:([CII)V
     106: iload         6
     108: iload         7
     110: if_icmpeq     123
     113: iload         6
     115: iload         8
     117: iadd
     118: istore        6
     120: goto          90
     123: new           #40                 // class java/lang/String
     126: dup
     127: aload_3
     128: invokespecial #90                 // Method java/lang/String."<init>":([C)V
     131: areturn
}

Compiled from "Solution.kt"
public final class dev.aspid812.leetcode.problem0541.SolutionKt {
  public static final void main();
    Code:
       0: new           #8                  // class dev/aspid812/leetcode/problem0541/Solution
       3: dup
       4: invokespecial #11                 // Method dev/aspid812/leetcode/problem0541/Solution."<init>":()V
       7: astore_0
       8: new           #13                 // class java/lang/StringBuilder
      11: dup
      12: invokespecial #14                 // Method java/lang/StringBuilder."<init>":()V
      15: aload_0
      16: ldc           #16                 // String abcdefg
      18: iconst_2
      19: invokevirtual #20                 // Method dev/aspid812/leetcode/problem0541/Solution.reverseStr:(Ljava/lang/String;I)Ljava/lang/String;
      22: invokevirtual #24                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      25: ldc           #26                 // String  == \"bacdfeg\"
      27: invokevirtual #24                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      30: invokevirtual #30                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      33: getstatic     #36                 // Field java/lang/System.out:Ljava/io/PrintStream;
      36: swap
      37: invokevirtual #42                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      40: new           #13                 // class java/lang/StringBuilder
      43: dup
      44: invokespecial #14                 // Method java/lang/StringBuilder."<init>":()V
      47: aload_0
      48: ldc           #44                 // String abcd
      50: iconst_2
      51: invokevirtual #20                 // Method dev/aspid812/leetcode/problem0541/Solution.reverseStr:(Ljava/lang/String;I)Ljava/lang/String;
      54: invokevirtual #24                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      57: ldc           #46                 // String  == \"bacd\"
      59: invokevirtual #24                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      62: invokevirtual #30                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      65: getstatic     #36                 // Field java/lang/System.out:Ljava/io/PrintStream;
      68: swap
      69: invokevirtual #42                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      72: return

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


package dev.aspid812.leetcode.problem0056

/* 56. Merge Intervals
 * -------------------
 *
 * Given an array of `intervals` where `intervals[i] = [start_i, end_i]`, merge all overlapping intervals, and return
 * *an array of the non-overlapping intervals that cover all the intervals in the input*.
 *
 * ### Constraints:
 *
 *   * `1 <= intervals.length <= 10^4`
 *   * `intervals[i].length == 2`
 *   * `0 <= start_i <= end_i <= 10^4`
 */

typealias Interval = IntArray

class Solution {
    fun merge(intervals: Array<Interval>): Array<Interval> {
        intervals.sortBy { interval -> interval[0] }

        var span = intArrayOf(-1, -1)
        var (i, j) = Pair(0, 0)
        while (j < intervals.size) {
            if (span[1] < intervals[j][0]) {
                intervals[i] = intervals[j]
                span = intervals[i]
                i += 1
            }
            else if (span[1] < intervals[j][1]) {
                span[1] = intervals[j][1]
            }
            j += 1
        }

        return intervals.copyOfRange(0, i)
    }
}

fun makeIntervals(vararg intervals: IntRange): Array<Interval> {
    return intervals.map { range -> intArrayOf(range.start, range.endInclusive)}.toTypedArray()
}

fun main() {
    val s = Solution()

    // Since intervals [1,3] and [2,6] overlaps, merge them into [1,6].
    val intervals1 = makeIntervals(1..3, 2..6, 8..10, 15..18)
    println("${s.merge(intervals1).contentDeepToString()} == [[1,6],[8,10],[15,18]]")

    // Intervals [1,4] and [4,5] are considered overlapping.
    val intervals2 = makeIntervals(1..4, 4..5)
    println("${s.merge(intervals2).contentDeepToString()} == [[1,5]]")
}

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

  public final int[][] merge(int[][]);
    Code:
       0: aload_1
       1: ldc           #15                 // String intervals
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #23                 // class "[Ljava/lang/Object;"
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: arraylength
      15: iconst_1
      16: if_icmple     33
      19: aload_2
      20: new           #25                 // class dev/aspid812/leetcode/problem0056/Solution$merge$$inlined$sortBy$1
      23: dup
      24: invokespecial #26                 // Method dev/aspid812/leetcode/problem0056/Solution$merge$$inlined$sortBy$1."<init>":()V
      27: checkcast     #28                 // class java/util/Comparator
      30: invokestatic  #34                 // Method kotlin/collections/ArraysKt.sortWith:([Ljava/lang/Object;Ljava/util/Comparator;)V
      33: nop
      34: iconst_2
      35: newarray       int
      37: astore_3
      38: aload_3
      39: iconst_0
      40: iconst_m1
      41: iastore
      42: aload_3
      43: iconst_1
      44: iconst_m1
      45: iastore
      46: aload_3
      47: astore_2
      48: new           #36                 // class kotlin/Pair
      51: dup
      52: iconst_0
      53: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      56: iconst_0
      57: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      60: invokespecial #45                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      63: astore_3
      64: aload_3
      65: invokevirtual #49                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
      68: checkcast     #51                 // class java/lang/Number
      71: invokevirtual #55                 // Method java/lang/Number.intValue:()I
      74: istore        4
      76: aload_3
      77: invokevirtual #58                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      80: checkcast     #51                 // class java/lang/Number
      83: invokevirtual #55                 // Method java/lang/Number.intValue:()I
      86: istore        5
      88: iload         5
      90: aload_1
      91: checkcast     #23                 // class "[Ljava/lang/Object;"
      94: arraylength
      95: if_icmpge     156
      98: aload_2
      99: iconst_1
     100: iaload
     101: aload_1
     102: iload         5
     104: aaload
     105: iconst_0
     106: iaload
     107: if_icmpge     129
     110: aload_1
     111: iload         4
     113: aload_1
     114: iload         5
     116: aaload
     117: aastore
     118: aload_1
     119: iload         4
     121: aaload
     122: astore_2
     123: iinc          4, 1
     126: goto          150
     129: aload_2
     130: iconst_1
     131: iaload
     132: aload_1
     133: iload         5
     135: aaload
     136: iconst_1
     137: iaload
     138: if_icmpge     150
     141: aload_2
     142: iconst_1
     143: aload_1
     144: iload         5
     146: aaload
     147: iconst_1
     148: iaload
     149: iastore
     150: iinc          5, 1
     153: goto          88
     156: aload_1
     157: checkcast     #23                 // class "[Ljava/lang/Object;"
     160: iconst_0
     161: iload         4
     163: invokestatic  #62                 // Method kotlin/collections/ArraysKt.copyOfRange:([Ljava/lang/Object;II)[Ljava/lang/Object;
     166: checkcast     #64                 // class "[[I"
     169: areturn
}

Compiled from "Solution.kt"
public final class dev.aspid812.leetcode.problem0056.SolutionKt {
  public static final int[][] makeIntervals(kotlin.ranges.IntRange...);
    Code:
       0: aload_0
       1: ldc           #9                  // String intervals
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: astore_1
       8: iconst_0
       9: istore_2
      10: aload_1
      11: astore_3
      12: new           #17                 // class java/util/ArrayList
      15: dup
      16: aload_1
      17: arraylength
      18: invokespecial #21                 // Method java/util/ArrayList."<init>":(I)V
      21: checkcast     #23                 // class java/util/Collection
      24: astore        4
      26: iconst_0
      27: istore        5
      29: iconst_0
      30: istore        6
      32: aload_3
      33: arraylength
      34: istore        7
      36: iload         6
      38: iload         7
      40: if_icmpge     106
      43: aload_3
      44: iload         6
      46: aaload
      47: astore        8
      49: aload         4
      51: aload         8
      53: astore        9
      55: astore        12
      57: iconst_0
      58: istore        10
      60: iconst_2
      61: newarray       int
      63: astore        11
      65: aload         11
      67: iconst_0
      68: aload         9
      70: invokevirtual #29                 // Method kotlin/ranges/IntRange.getStart:()Ljava/lang/Integer;
      73: invokevirtual #35                 // Method java/lang/Integer.intValue:()I
      76: iastore
      77: aload         11
      79: iconst_1
      80: aload         9
      82: invokevirtual #38                 // Method kotlin/ranges/IntRange.getEndInclusive:()Ljava/lang/Integer;
      85: invokevirtual #35                 // Method java/lang/Integer.intValue:()I
      88: iastore
      89: aload         11
      91: aload         12
      93: swap
      94: invokeinterface #42,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      99: pop
     100: iinc          6, 1
     103: goto          36
     106: aload         4
     108: checkcast     #44                 // class java/util/List
     111: nop
     112: checkcast     #23                 // class java/util/Collection
     115: astore_1
     116: nop
     117: iconst_0
     118: istore_2
     119: aload_1
     120: astore_3
     121: aload_3
     122: iconst_0
     123: anewarray     #46                 // class "[I"
     126: invokeinterface #50,  2           // InterfaceMethod java/util/Collection.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
     131: checkcast     #52                 // class "[[I"
     134: areturn

  public static final void main();
    Code:
       0: new           #74                 // class dev/aspid812/leetcode/problem0056/Solution
       3: dup
       4: invokespecial #76                 // Method dev/aspid812/leetcode/problem0056/Solution."<init>":()V
       7: astore_0
       8: iconst_4
       9: anewarray     #25                 // class kotlin/ranges/IntRange
      12: astore_2
      13: aload_2
      14: iconst_0
      15: new           #25                 // class kotlin/ranges/IntRange
      18: dup
      19: iconst_1
      20: iconst_3
      21: invokespecial #79                 // Method kotlin/ranges/IntRange."<init>":(II)V
      24: aastore
      25: aload_2
      26: iconst_1
      27: new           #25                 // class kotlin/ranges/IntRange
      30: dup
      31: iconst_2
      32: bipush        6
      34: invokespecial #79                 // Method kotlin/ranges/IntRange."<init>":(II)V
      37: aastore
      38: aload_2
      39: iconst_2
      40: new           #25                 // class kotlin/ranges/IntRange
      43: dup
      44: bipush        8
      46: bipush        10
      48: invokespecial #79                 // Method kotlin/ranges/IntRange."<init>":(II)V
      51: aastore
      52: aload_2
      53: iconst_3
      54: new           #25                 // class kotlin/ranges/IntRange
      57: dup
      58: bipush        15
      60: bipush        18
      62: invokespecial #79                 // Method kotlin/ranges/IntRange."<init>":(II)V
      65: aastore
      66: aload_2
      67: invokestatic  #81                 // Method makeIntervals:([Lkotlin/ranges/IntRange;)[[I
      70: astore_1
      71: new           #83                 // class java/lang/StringBuilder
      74: dup
      75: invokespecial #84                 // Method java/lang/StringBuilder."<init>":()V
      78: aload_0
      79: aload_1
      80: invokevirtual #88                 // Method dev/aspid812/leetcode/problem0056/Solution.merge:([[I)[[I
      83: checkcast     #89                 // class "[Ljava/lang/Object;"
      86: invokestatic  #95                 // Method kotlin/collections/ArraysKt.contentDeepToString:([Ljava/lang/Object;)Ljava/lang/String;
      89: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      92: ldc           #101                // String  == [[1,6],[8,10],[15,18]]
      94: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      97: invokevirtual #105                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     100: getstatic     #111                // Field java/lang/System.out:Ljava/io/PrintStream;
     103: swap
     104: invokevirtual #117                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     107: iconst_2
     108: anewarray     #25                 // class kotlin/ranges/IntRange
     111: astore_3
     112: aload_3
     113: iconst_0
     114: new           #25                 // class kotlin/ranges/IntRange
     117: dup
     118: iconst_1
     119: iconst_4
     120: invokespecial #79                 // Method kotlin/ranges/IntRange."<init>":(II)V
     123: aastore
     124: aload_3
     125: iconst_1
     126: new           #25                 // class kotlin/ranges/IntRange
     129: dup
     130: iconst_4
     131: iconst_5
     132: invokespecial #79                 // Method kotlin/ranges/IntRange."<init>":(II)V
     135: aastore
     136: aload_3
     137: invokestatic  #81                 // Method makeIntervals:([Lkotlin/ranges/IntRange;)[[I
     140: astore_2
     141: new           #83                 // class java/lang/StringBuilder
     144: dup
     145: invokespecial #84                 // Method java/lang/StringBuilder."<init>":()V
     148: aload_0
     149: aload_2
     150: invokevirtual #88                 // Method dev/aspid812/leetcode/problem0056/Solution.merge:([[I)[[I
     153: checkcast     #89                 // class "[Ljava/lang/Object;"
     156: invokestatic  #95                 // Method kotlin/collections/ArraysKt.contentDeepToString:([Ljava/lang/Object;)Ljava/lang/String;
     159: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     162: ldc           #119                // String  == [[1,5]]
     164: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     167: invokevirtual #105                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     170: getstatic     #111                // Field java/lang/System.out:Ljava/io/PrintStream;
     173: swap
     174: invokevirtual #117                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     177: return

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

Compiled from "Comparisons.kt"
public final class dev.aspid812.leetcode.problem0056.Solution$merge$$inlined$sortBy$1<T> implements java.util.Comparator {
  public dev.aspid812.leetcode.problem0056.Solution$merge$$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 "[I"
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: iconst_0
      10: iaload
      11: invokestatic  #29                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: checkcast     #31                 // class java/lang/Comparable
      17: aload_2
      18: checkcast     #23                 // class "[I"
      21: astore_3
      22: astore        5
      24: iconst_0
      25: istore        4
      27: aload_3
      28: iconst_0
      29: iaload
      30: invokestatic  #29                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      33: aload         5
      35: swap
      36: checkcast     #31                 // class java/lang/Comparable
      39: invokestatic  #37                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      42: ireturn
}


package dev.aspid812.leetcode.problem0539

/* 539. Minimum Time Difference
 * ----------------------------
 * Given a list of 24-hour clock time points in **"HH:MM"** format, return the *minimum **minutes** difference
 * between any two time-points in the list*.
 *
 * ### Constraints:
 *
 *   * `2 <= timePoints <= 2 * 10^4`
 *   * `timePoints[i]` is in the format **"HH:MM"**.
 */

class Solution {
    fun findMinDifference(timePoints: List<String>): Int {
        return timePoints.asSequence()
            .map { timePoint ->
                val hours = timePoint.substringBefore(':').toInt()
                val minutes = timePoint.substringAfter(':').toInt()
                hours * 60 + minutes
            }
            .sorted()
            .let { seq ->
                val instant = seq.iterator().next()
                seq + (instant + 1440)
            }
            .zipWithNext { start, end -> end - start }
            .minOrNull() ?: 1440
    }
}

fun main() {
    val s = Solution()

    val timePoints1 = listOf("23:59", "00:00")
    println("${s.findMinDifference(timePoints1)} == 1")

    val timePoints2 = listOf("00:00", "23:59", "00:00")
    println("${s.findMinDifference(timePoints2)} == 1")
}

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

  public final int findMinDifference(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String timePoints
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #24                 // class java/lang/Iterable
      10: invokestatic  #30                 // Method kotlin/collections/CollectionsKt.asSequence:(Ljava/lang/Iterable;)Lkotlin/sequences/Sequence;
      13: invokedynamic #50,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      18: invokestatic  #56                 // Method kotlin/sequences/SequencesKt.map:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      21: invokestatic  #60                 // Method kotlin/sequences/SequencesKt.sorted:(Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
      24: astore_2
      25: iconst_0
      26: istore_3
      27: aload_2
      28: invokeinterface #66,  1           // InterfaceMethod kotlin/sequences/Sequence.iterator:()Ljava/util/Iterator;
      33: invokeinterface #72,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      38: checkcast     #74                 // class java/lang/Number
      41: invokevirtual #78                 // Method java/lang/Number.intValue:()I
      44: istore        4
      46: aload_2
      47: iload         4
      49: sipush        1440
      52: iadd
      53: invokestatic  #84                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      56: invokestatic  #88                 // Method kotlin/sequences/SequencesKt.plus:(Lkotlin/sequences/Sequence;Ljava/lang/Object;)Lkotlin/sequences/Sequence;
      59: nop
      60: invokedynamic #100,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function2;
      65: invokestatic  #104                // Method kotlin/sequences/SequencesKt.zipWithNext:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function2;)Lkotlin/sequences/Sequence;
      68: invokestatic  #108                // Method kotlin/sequences/SequencesKt.minOrNull:(Lkotlin/sequences/Sequence;)Ljava/lang/Comparable;
      71: checkcast     #80                 // class java/lang/Integer
      74: dup
      75: ifnull        84
      78: invokevirtual #109                // Method java/lang/Integer.intValue:()I
      81: goto          88
      84: pop
      85: sipush        1440
      88: ireturn

  private static final int findMinDifference$lambda$0(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #119                // String timePoint
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: bipush        58
       9: aconst_null
      10: iconst_2
      11: aconst_null
      12: invokestatic  #125                // Method kotlin/text/StringsKt.substringBefore$default:(Ljava/lang/String;CLjava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
      15: invokestatic  #128                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      18: istore_1
      19: aload_0
      20: bipush        58
      22: aconst_null
      23: iconst_2
      24: aconst_null
      25: invokestatic  #131                // Method kotlin/text/StringsKt.substringAfter$default:(Ljava/lang/String;CLjava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
      28: invokestatic  #128                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      31: istore_2
      32: iload_1
      33: bipush        60
      35: imul
      36: iload_2
      37: iadd
      38: ireturn

  private static final int findMinDifference$lambda$2(int, int);
    Code:
       0: iload_1
       1: iload_0
       2: isub
       3: ireturn
}

Compiled from "Solution.kt"
public final class dev.aspid812.leetcode.problem0539.SolutionKt {
  public static final void main();
    Code:
       0: new           #8                  // class dev/aspid812/leetcode/problem0539/Solution
       3: dup
       4: invokespecial #11                 // Method dev/aspid812/leetcode/problem0539/Solution."<init>":()V
       7: astore_0
       8: iconst_2
       9: anewarray     #13                 // class java/lang/String
      12: astore_2
      13: aload_2
      14: iconst_0
      15: ldc           #15                 // String 23:59
      17: aastore
      18: aload_2
      19: iconst_1
      20: ldc           #17                 // String 00:00
      22: aastore
      23: aload_2
      24: invokestatic  #23                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      27: astore_1
      28: new           #25                 // class java/lang/StringBuilder
      31: dup
      32: invokespecial #26                 // Method java/lang/StringBuilder."<init>":()V
      35: aload_0
      36: aload_1
      37: invokevirtual #30                 // Method dev/aspid812/leetcode/problem0539/Solution.findMinDifference:(Ljava/util/List;)I
      40: invokevirtual #34                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: ldc           #36                 // String  == 1
      45: invokevirtual #39                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      48: invokevirtual #43                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: getstatic     #49                 // Field java/lang/System.out:Ljava/io/PrintStream;
      54: swap
      55: invokevirtual #55                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      58: iconst_3
      59: anewarray     #13                 // class java/lang/String
      62: astore_3
      63: aload_3
      64: iconst_0
      65: ldc           #17                 // String 00:00
      67: aastore
      68: aload_3
      69: iconst_1
      70: ldc           #15                 // String 23:59
      72: aastore
      73: aload_3
      74: iconst_2
      75: ldc           #17                 // String 00:00
      77: aastore
      78: aload_3
      79: invokestatic  #23                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      82: astore_2
      83: new           #25                 // class java/lang/StringBuilder
      86: dup
      87: invokespecial #26                 // Method java/lang/StringBuilder."<init>":()V
      90: aload_0
      91: aload_2
      92: invokevirtual #30                 // Method dev/aspid812/leetcode/problem0539/Solution.findMinDifference:(Ljava/util/List;)I
      95: invokevirtual #34                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      98: ldc           #36                 // String  == 1
     100: invokevirtual #39                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     103: invokevirtual #43                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     106: getstatic     #49                 // Field java/lang/System.out:Ljava/io/PrintStream;
     109: swap
     110: invokevirtual #55                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     113: return

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


package challenges

class Day03(private val input: List<String>) {
    private val offset = input[0].length + 1
    private val inputStr = input.fold("") { acc, s -> acc.plus("$s.") }
    private val regex = "\\d+".toRegex()
    fun getPart1(): Int = calcRanges(inputStr, offset, input.size).filter { pair -> pair.second.any { !isDigitOrDot(inputStr[it]) } }.sumOf { it.first }

    fun getPart2(): Int {
        var sum = 0
        val ranges = input.map { regex.findAll(it).flatMap { match -> match.range.toList().map { it to match.value.toInt() } }.toMap() }

        for ((lineIdx, line) in input.withIndex()) {
            var gearIdx = line.indexOf('*')

            while (gearIdx >= 0) {
                val factors = arrayListOf<Int>()

                // check line above
                if (lineIdx > 0) {
                    if (gearIdx > 0) ranges[lineIdx - 1][gearIdx - 1]?.let { factors.add(it) }
                    if (ranges[lineIdx - 1][gearIdx - 1] != ranges[lineIdx - 1][gearIdx]) ranges[lineIdx - 1][gearIdx]?.let { factors.add(it) }
                    if (gearIdx < line.length && ranges[lineIdx - 1][gearIdx] != ranges[lineIdx - 1][gearIdx + 1]) ranges[lineIdx - 1][gearIdx + 1]?.let { factors.add(it) }
                }

                // check same line
                if (gearIdx > 0) ranges[lineIdx][gearIdx - 1]?.let { factors.add(it) }
                if (gearIdx < line.length) ranges[lineIdx][gearIdx + 1]?.let { factors.add(it) }

                // check below line
                if (lineIdx < input.size) {
                    if (gearIdx > 0) ranges[lineIdx + 1][gearIdx - 1]?.let { factors.add(it) }
                    if (ranges[lineIdx + 1][gearIdx - 1] != ranges[lineIdx + 1][gearIdx]) ranges[lineIdx + 1][gearIdx]?.let { factors.add(it) }
                    if (gearIdx < line.length && ranges[lineIdx + 1][gearIdx] != ranges[lineIdx + 1][gearIdx + 1]) ranges[lineIdx + 1][gearIdx + 1]?.let { factors.add(it) }

                }

                if (factors.size == 2) sum += factors[0] * factors[1]

                gearIdx = line.indexOf('*', gearIdx + 1)
            }
        }

        return sum
    }

    // Part 1 helper
    private fun calcRanges(inputStr: String, offset: Int, lines: Int): Sequence<Pair<Int, List<Int>>> = "\\d+".toRegex().findAll(inputStr).map { match ->
            var base = match.range.toList()
            if (match.range.first % offset != 0) base = base.plus(match.range.first - 1)
            if (match.range.last % offset != offset-1) base = base.plus(match.range.last + 1)

            var valuesOfInterest = base.map { it - offset }.plus(base.map { it + offset })

            if (match.range.first % offset != 0) valuesOfInterest = valuesOfInterest.plus(match.range.first - 1)
            if (match.range.last % offset != offset-1) valuesOfInterest = valuesOfInterest.plus(match.range.last + 1)

            valuesOfInterest = valuesOfInterest.filter { it >= 0 && it < offset * lines }

            match.value.toInt() to valuesOfInterest
        }

    private fun isDigitOrDot(c: Char): Boolean = c.isDigit() || c == '.'

    // Part 2 helper

}

Compiled from "Day03.kt"
public final class challenges.Day03 {
  private final java.util.List<java.lang.String> input;

  private final int offset;

  private final java.lang.String inputStr;

  private final kotlin.text.Regex regex;

  public challenges.Day03(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #10                 // String input
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: aload_1
      12: putfield      #22                 // Field input:Ljava/util/List;
      15: aload_0
      16: aload_0
      17: getfield      #22                 // Field input:Ljava/util/List;
      20: iconst_0
      21: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      26: checkcast     #30                 // class java/lang/String
      29: invokevirtual #34                 // Method java/lang/String.length:()I
      32: iconst_1
      33: iadd
      34: putfield      #38                 // Field offset:I
      37: aload_0
      38: aload_0
      39: getfield      #22                 // Field input:Ljava/util/List;
      42: checkcast     #40                 // class java/lang/Iterable
      45: astore_2
      46: ldc           #42                 // String
      48: astore_3
      49: astore        11
      51: iconst_0
      52: istore        4
      54: aload_3
      55: astore        5
      57: aload_2
      58: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      63: astore        6
      65: aload         6
      67: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      72: ifeq          128
      75: aload         6
      77: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      82: astore        7
      84: aload         5
      86: aload         7
      88: checkcast     #30                 // class java/lang/String
      91: astore        8
      93: astore        9
      95: iconst_0
      96: istore        10
      98: new           #58                 // class java/lang/StringBuilder
     101: dup
     102: invokespecial #59                 // Method java/lang/StringBuilder."<init>":()V
     105: aload         9
     107: invokevirtual #63                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     110: aload         8
     112: invokevirtual #63                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     115: bipush        46
     117: invokevirtual #66                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     120: invokevirtual #70                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     123: astore        5
     125: goto          65
     128: aload         5
     130: aload         11
     132: swap
     133: putfield      #74                 // Field inputStr:Ljava/lang/String;
     136: aload_0
     137: new           #76                 // class kotlin/text/Regex
     140: dup
     141: ldc           #78                 // String \\d+
     143: invokespecial #81                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     146: putfield      #85                 // Field regex:Lkotlin/text/Regex;
     149: return

  public final int getPart1();
    Code:
       0: aload_0
       1: aload_0
       2: getfield      #74                 // Field inputStr:Ljava/lang/String;
       5: aload_0
       6: getfield      #38                 // Field offset:I
       9: aload_0
      10: getfield      #22                 // Field input:Ljava/util/List;
      13: invokeinterface #101,  1          // InterfaceMethod java/util/List.size:()I
      18: invokespecial #105                // Method calcRanges:(Ljava/lang/String;II)Lkotlin/sequences/Sequence;
      21: aload_0
      22: invokedynamic #125,  0            // InvokeDynamic #0:invoke:(Lchallenges/Day03;)Lkotlin/jvm/functions/Function1;
      27: invokestatic  #131                // Method kotlin/sequences/SequencesKt.filter:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      30: astore_1
      31: iconst_0
      32: istore_2
      33: aload_1
      34: invokeinterface #134,  1          // InterfaceMethod kotlin/sequences/Sequence.iterator:()Ljava/util/Iterator;
      39: astore_3
      40: aload_3
      41: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload_3
      50: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      55: astore        4
      57: iload_2
      58: aload         4
      60: checkcast     #136                // class kotlin/Pair
      63: astore        5
      65: istore        7
      67: iconst_0
      68: istore        6
      70: aload         5
      72: invokevirtual #139                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      75: checkcast     #141                // class java/lang/Number
      78: invokevirtual #144                // Method java/lang/Number.intValue:()I
      81: istore        8
      83: iload         7
      85: iload         8
      87: iadd
      88: istore_2
      89: goto          40
      92: iload_2
      93: ireturn

  public final int getPart2();
    Code:
       0: iconst_0
       1: istore_1
       2: aload_0
       3: getfield      #22                 // Field input:Ljava/util/List;
       6: checkcast     #40                 // class java/lang/Iterable
       9: astore_3
      10: iconst_0
      11: istore        4
      13: aload_3
      14: astore        5
      16: new           #150                // class java/util/ArrayList
      19: dup
      20: aload_3
      21: bipush        10
      23: invokestatic  #156                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      26: invokespecial #159                // Method java/util/ArrayList."<init>":(I)V
      29: checkcast     #161                // class java/util/Collection
      32: astore        6
      34: iconst_0
      35: istore        7
      37: aload         5
      39: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      44: astore        8
      46: aload         8
      48: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      53: ifeq          117
      56: aload         8
      58: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      63: astore        9
      65: aload         6
      67: aload         9
      69: checkcast     #30                 // class java/lang/String
      72: astore        10
      74: astore        13
      76: iconst_0
      77: istore        11
      79: aload_0
      80: getfield      #85                 // Field regex:Lkotlin/text/Regex;
      83: aload         10
      85: checkcast     #163                // class java/lang/CharSequence
      88: iconst_0
      89: iconst_2
      90: aconst_null
      91: invokestatic  #167                // Method kotlin/text/Regex.findAll$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/sequences/Sequence;
      94: invokedynamic #176,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function1;
      99: invokestatic  #179                // Method kotlin/sequences/SequencesKt.flatMapIterable:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
     102: invokestatic  #185                // Method kotlin/collections/MapsKt.toMap:(Lkotlin/sequences/Sequence;)Ljava/util/Map;
     105: aload         13
     107: swap
     108: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     113: pop
     114: goto          46
     117: aload         6
     119: checkcast     #24                 // class java/util/List
     122: nop
     123: astore_2
     124: aload_0
     125: getfield      #22                 // Field input:Ljava/util/List;
     128: checkcast     #40                 // class java/lang/Iterable
     131: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     136: astore_3
     137: iconst_0
     138: istore        4
     140: aload_3
     141: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     146: ifeq          1010
     149: iload         4
     151: istore        5
     153: iload         4
     155: iconst_1
     156: iadd
     157: istore        4
     159: aload_3
     160: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     165: checkcast     #30                 // class java/lang/String
     168: astore        6
     170: aload         6
     172: checkcast     #163                // class java/lang/CharSequence
     175: bipush        42
     177: iconst_0
     178: iconst_0
     179: bipush        6
     181: aconst_null
     182: invokestatic  #195                // Method kotlin/text/StringsKt.indexOf$default:(Ljava/lang/CharSequence;CIZILjava/lang/Object;)I
     185: istore        7
     187: iload         7
     189: iflt          140
     192: new           #150                // class java/util/ArrayList
     195: dup
     196: invokespecial #196                // Method java/util/ArrayList."<init>":()V
     199: astore        8
     201: iload         5
     203: ifle          504
     206: iload         7
     208: ifle          270
     211: aload_2
     212: iload         5
     214: iconst_1
     215: isub
     216: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     221: checkcast     #198                // class java/util/Map
     224: iload         7
     226: iconst_1
     227: isub
     228: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     231: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     236: checkcast     #200                // class java/lang/Integer
     239: dup
     240: ifnull        268
     243: checkcast     #141                // class java/lang/Number
     246: invokevirtual #144                // Method java/lang/Number.intValue:()I
     249: istore        11
     251: iconst_0
     252: istore        12
     254: aload         8
     256: iload         11
     258: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     261: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     264: pop
     265: goto          270
     268: pop
     269: nop
     270: aload_2
     271: iload         5
     273: iconst_1
     274: isub
     275: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     280: checkcast     #198                // class java/util/Map
     283: iload         7
     285: iconst_1
     286: isub
     287: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     290: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     295: aload_2
     296: iload         5
     298: iconst_1
     299: isub
     300: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     305: checkcast     #198                // class java/util/Map
     308: iload         7
     310: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     313: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     318: invokestatic  #211                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     321: ifne          381
     324: aload_2
     325: iload         5
     327: iconst_1
     328: isub
     329: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     334: checkcast     #198                // class java/util/Map
     337: iload         7
     339: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     342: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     347: checkcast     #200                // class java/lang/Integer
     350: dup
     351: ifnull        379
     354: checkcast     #141                // class java/lang/Number
     357: invokevirtual #144                // Method java/lang/Number.intValue:()I
     360: istore        11
     362: iconst_0
     363: istore        12
     365: aload         8
     367: iload         11
     369: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     372: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     375: pop
     376: goto          381
     379: pop
     380: nop
     381: iload         7
     383: aload         6
     385: invokevirtual #34                 // Method java/lang/String.length:()I
     388: if_icmpge     504
     391: aload_2
     392: iload         5
     394: iconst_1
     395: isub
     396: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     401: checkcast     #198                // class java/util/Map
     404: iload         7
     406: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     409: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     414: aload_2
     415: iload         5
     417: iconst_1
     418: isub
     419: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     424: checkcast     #198                // class java/util/Map
     427: iload         7
     429: iconst_1
     430: iadd
     431: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     434: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     439: invokestatic  #211                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     442: ifne          504
     445: aload_2
     446: iload         5
     448: iconst_1
     449: isub
     450: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     455: checkcast     #198                // class java/util/Map
     458: iload         7
     460: iconst_1
     461: iadd
     462: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     465: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     470: checkcast     #200                // class java/lang/Integer
     473: dup
     474: ifnull        502
     477: checkcast     #141                // class java/lang/Number
     480: invokevirtual #144                // Method java/lang/Number.intValue:()I
     483: istore        11
     485: iconst_0
     486: istore        12
     488: aload         8
     490: iload         11
     492: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     495: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     498: pop
     499: goto          504
     502: pop
     503: nop
     504: iload         7
     506: ifle          566
     509: aload_2
     510: iload         5
     512: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     517: checkcast     #198                // class java/util/Map
     520: iload         7
     522: iconst_1
     523: isub
     524: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     527: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     532: checkcast     #200                // class java/lang/Integer
     535: dup
     536: ifnull        564
     539: checkcast     #141                // class java/lang/Number
     542: invokevirtual #144                // Method java/lang/Number.intValue:()I
     545: istore        11
     547: iconst_0
     548: istore        12
     550: aload         8
     552: iload         11
     554: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     557: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     560: pop
     561: goto          566
     564: pop
     565: nop
     566: iload         7
     568: aload         6
     570: invokevirtual #34                 // Method java/lang/String.length:()I
     573: if_icmpge     633
     576: aload_2
     577: iload         5
     579: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     584: checkcast     #198                // class java/util/Map
     587: iload         7
     589: iconst_1
     590: iadd
     591: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     594: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     599: checkcast     #200                // class java/lang/Integer
     602: dup
     603: ifnull        631
     606: checkcast     #141                // class java/lang/Number
     609: invokevirtual #144                // Method java/lang/Number.intValue:()I
     612: istore        11
     614: iconst_0
     615: istore        12
     617: aload         8
     619: iload         11
     621: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     624: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     627: pop
     628: goto          633
     631: pop
     632: nop
     633: iload         5
     635: aload_0
     636: getfield      #22                 // Field input:Ljava/util/List;
     639: invokeinterface #101,  1          // InterfaceMethod java/util/List.size:()I
     644: if_icmpge     945
     647: iload         7
     649: ifle          711
     652: aload_2
     653: iload         5
     655: iconst_1
     656: iadd
     657: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     662: checkcast     #198                // class java/util/Map
     665: iload         7
     667: iconst_1
     668: isub
     669: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     672: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     677: checkcast     #200                // class java/lang/Integer
     680: dup
     681: ifnull        709
     684: checkcast     #141                // class java/lang/Number
     687: invokevirtual #144                // Method java/lang/Number.intValue:()I
     690: istore        11
     692: iconst_0
     693: istore        12
     695: aload         8
     697: iload         11
     699: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     702: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     705: pop
     706: goto          711
     709: pop
     710: nop
     711: aload_2
     712: iload         5
     714: iconst_1
     715: iadd
     716: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     721: checkcast     #198                // class java/util/Map
     724: iload         7
     726: iconst_1
     727: isub
     728: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     731: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     736: aload_2
     737: iload         5
     739: iconst_1
     740: iadd
     741: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     746: checkcast     #198                // class java/util/Map
     749: iload         7
     751: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     754: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     759: invokestatic  #211                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     762: ifne          822
     765: aload_2
     766: iload         5
     768: iconst_1
     769: iadd
     770: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     775: checkcast     #198                // class java/util/Map
     778: iload         7
     780: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     783: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     788: checkcast     #200                // class java/lang/Integer
     791: dup
     792: ifnull        820
     795: checkcast     #141                // class java/lang/Number
     798: invokevirtual #144                // Method java/lang/Number.intValue:()I
     801: istore        11
     803: iconst_0
     804: istore        12
     806: aload         8
     808: iload         11
     810: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     813: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     816: pop
     817: goto          822
     820: pop
     821: nop
     822: iload         7
     824: aload         6
     826: invokevirtual #34                 // Method java/lang/String.length:()I
     829: if_icmpge     945
     832: aload_2
     833: iload         5
     835: iconst_1
     836: iadd
     837: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     842: checkcast     #198                // class java/util/Map
     845: iload         7
     847: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     850: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     855: aload_2
     856: iload         5
     858: iconst_1
     859: iadd
     860: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     865: checkcast     #198                // class java/util/Map
     868: iload         7
     870: iconst_1
     871: iadd
     872: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     875: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     880: invokestatic  #211                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     883: ifne          945
     886: aload_2
     887: iload         5
     889: iconst_1
     890: iadd
     891: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     896: checkcast     #198                // class java/util/Map
     899: iload         7
     901: iconst_1
     902: iadd
     903: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     906: invokeinterface #206,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     911: checkcast     #200                // class java/lang/Integer
     914: dup
     915: ifnull        943
     918: checkcast     #141                // class java/lang/Number
     921: invokevirtual #144                // Method java/lang/Number.intValue:()I
     924: istore        11
     926: iconst_0
     927: istore        12
     929: aload         8
     931: iload         11
     933: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     936: invokevirtual #207                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     939: pop
     940: goto          945
     943: pop
     944: nop
     945: aload         8
     947: invokevirtual #212                // Method java/util/ArrayList.size:()I
     950: iconst_2
     951: if_icmpne     988
     954: iload_1
     955: aload         8
     957: iconst_0
     958: invokevirtual #213                // Method java/util/ArrayList.get:(I)Ljava/lang/Object;
     961: checkcast     #141                // class java/lang/Number
     964: invokevirtual #144                // Method java/lang/Number.intValue:()I
     967: aload         8
     969: iconst_1
     970: invokevirtual #213                // Method java/util/ArrayList.get:(I)Ljava/lang/Object;
     973: dup
     974: ldc           #215                // String get(...)
     976: invokestatic  #218                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     979: checkcast     #141                // class java/lang/Number
     982: invokevirtual #144                // Method java/lang/Number.intValue:()I
     985: imul
     986: iadd
     987: istore_1
     988: aload         6
     990: checkcast     #163                // class java/lang/CharSequence
     993: bipush        42
     995: iload         7
     997: iconst_1
     998: iadd
     999: iconst_0
    1000: iconst_4
    1001: aconst_null
    1002: invokestatic  #195                // Method kotlin/text/StringsKt.indexOf$default:(Ljava/lang/CharSequence;CIZILjava/lang/Object;)I
    1005: istore        7
    1007: goto          187
    1010: iload_1
    1011: ireturn

  private final kotlin.sequences.Sequence<kotlin.Pair<java.lang.Integer, java.util.List<java.lang.Integer>>> calcRanges(java.lang.String, int, int);
    Code:
       0: new           #76                 // class kotlin/text/Regex
       3: dup
       4: ldc           #78                 // String \\d+
       6: invokespecial #81                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
       9: aload_1
      10: checkcast     #163                // class java/lang/CharSequence
      13: iconst_0
      14: iconst_2
      15: aconst_null
      16: invokestatic  #167                // Method kotlin/text/Regex.findAll$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/sequences/Sequence;
      19: iload_2
      20: iload_3
      21: invokedynamic #252,  0            // InvokeDynamic #2:invoke:(II)Lkotlin/jvm/functions/Function1;
      26: invokestatic  #255                // Method kotlin/sequences/SequencesKt.map:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      29: areturn

  private final boolean isDigitOrDot(char);
    Code:
       0: iload_1
       1: invokestatic  #263                // Method java/lang/Character.isDigit:(C)Z
       4: ifne          13
       7: iload_1
       8: bipush        46
      10: if_icmpne     17
      13: iconst_1
      14: goto          18
      17: iconst_0
      18: ireturn

  private static final boolean getPart1$lambda$2(challenges.Day03, kotlin.Pair);
    Code:
       0: aload_1
       1: ldc_w         #267                // String pair
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: invokevirtual #270                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      11: checkcast     #40                 // class java/lang/Iterable
      14: astore_2
      15: iconst_0
      16: istore_3
      17: aload_2
      18: instanceof    #161                // class java/util/Collection
      21: ifeq          40
      24: aload_2
      25: checkcast     #161                // class java/util/Collection
      28: invokeinterface #273,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      33: ifeq          40
      36: iconst_0
      37: goto          109
      40: aload_2
      41: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      46: astore        4
      48: aload         4
      50: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      55: ifeq          108
      58: aload         4
      60: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      65: astore        5
      67: aload         5
      69: checkcast     #141                // class java/lang/Number
      72: invokevirtual #144                // Method java/lang/Number.intValue:()I
      75: istore        6
      77: iconst_0
      78: istore        7
      80: aload_0
      81: aload_0
      82: getfield      #74                 // Field inputStr:Ljava/lang/String;
      85: iload         6
      87: invokevirtual #277                // Method java/lang/String.charAt:(I)C
      90: invokespecial #279                // Method isDigitOrDot:(C)Z
      93: ifne          100
      96: iconst_1
      97: goto          101
     100: iconst_0
     101: ifeq          48
     104: iconst_1
     105: goto          109
     108: iconst_0
     109: ireturn

  private static final java.lang.Iterable getPart2$lambda$6$lambda$5(kotlin.text.MatchResult);
    Code:
       0: aload_0
       1: ldc_w         #285                // String match
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
      13: checkcast     #40                 // class java/lang/Iterable
      16: invokestatic  #295                // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
      19: checkcast     #40                 // class java/lang/Iterable
      22: astore_1
      23: iconst_0
      24: istore_2
      25: aload_1
      26: astore_3
      27: new           #150                // class java/util/ArrayList
      30: dup
      31: aload_1
      32: bipush        10
      34: invokestatic  #156                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      37: invokespecial #159                // Method java/util/ArrayList."<init>":(I)V
      40: checkcast     #161                // class java/util/Collection
      43: astore        4
      45: iconst_0
      46: istore        5
      48: aload_3
      49: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      54: astore        6
      56: aload         6
      58: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      63: ifeq          124
      66: aload         6
      68: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      73: astore        7
      75: aload         4
      77: aload         7
      79: checkcast     #141                // class java/lang/Number
      82: invokevirtual #144                // Method java/lang/Number.intValue:()I
      85: istore        8
      87: astore        10
      89: iconst_0
      90: istore        9
      92: iload         8
      94: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      97: aload_0
      98: invokeinterface #298,  1          // InterfaceMethod kotlin/text/MatchResult.getValue:()Ljava/lang/String;
     103: invokestatic  #302                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     106: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     109: invokestatic  #308                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     112: aload         10
     114: swap
     115: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     120: pop
     121: goto          56
     124: aload         4
     126: checkcast     #24                 // class java/util/List
     129: nop
     130: checkcast     #40                 // class java/lang/Iterable
     133: areturn

  private static final kotlin.Pair calcRanges$lambda$18(int, int, kotlin.text.MatchResult);
    Code:
       0: aload_2
       1: ldc_w         #285                // String match
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_2
       8: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
      13: checkcast     #40                 // class java/lang/Iterable
      16: invokestatic  #295                // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
      19: astore_3
      20: aload_2
      21: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
      26: invokevirtual #314                // Method kotlin/ranges/IntRange.getFirst:()I
      29: iload_0
      30: irem
      31: ifeq          56
      34: aload_3
      35: checkcast     #161                // class java/util/Collection
      38: aload_2
      39: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
      44: invokevirtual #314                // Method kotlin/ranges/IntRange.getFirst:()I
      47: iconst_1
      48: isub
      49: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      52: invokestatic  #318                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      55: astore_3
      56: aload_2
      57: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
      62: invokevirtual #321                // Method kotlin/ranges/IntRange.getLast:()I
      65: iload_0
      66: irem
      67: iload_0
      68: iconst_1
      69: isub
      70: if_icmpeq     95
      73: aload_3
      74: checkcast     #161                // class java/util/Collection
      77: aload_2
      78: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
      83: invokevirtual #321                // Method kotlin/ranges/IntRange.getLast:()I
      86: iconst_1
      87: iadd
      88: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      91: invokestatic  #318                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
      94: astore_3
      95: aload_3
      96: checkcast     #40                 // class java/lang/Iterable
      99: astore        5
     101: iconst_0
     102: istore        6
     104: aload         5
     106: astore        7
     108: new           #150                // class java/util/ArrayList
     111: dup
     112: aload         5
     114: bipush        10
     116: invokestatic  #156                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     119: invokespecial #159                // Method java/util/ArrayList."<init>":(I)V
     122: checkcast     #161                // class java/util/Collection
     125: astore        8
     127: iconst_0
     128: istore        9
     130: aload         7
     132: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     137: astore        10
     139: aload         10
     141: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     146: ifeq          194
     149: aload         10
     151: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     156: astore        11
     158: aload         8
     160: aload         11
     162: checkcast     #141                // class java/lang/Number
     165: invokevirtual #144                // Method java/lang/Number.intValue:()I
     168: istore        12
     170: astore        14
     172: iconst_0
     173: istore        13
     175: iload         12
     177: iload_0
     178: isub
     179: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     182: aload         14
     184: swap
     185: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     190: pop
     191: goto          139
     194: aload         8
     196: checkcast     #24                 // class java/util/List
     199: nop
     200: checkcast     #161                // class java/util/Collection
     203: aload_3
     204: checkcast     #40                 // class java/lang/Iterable
     207: astore        5
     209: astore        14
     211: iconst_0
     212: istore        6
     214: aload         5
     216: astore        7
     218: new           #150                // class java/util/ArrayList
     221: dup
     222: aload         5
     224: bipush        10
     226: invokestatic  #156                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     229: invokespecial #159                // Method java/util/ArrayList."<init>":(I)V
     232: checkcast     #161                // class java/util/Collection
     235: astore        8
     237: iconst_0
     238: istore        9
     240: aload         7
     242: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     247: astore        10
     249: aload         10
     251: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     256: ifeq          304
     259: aload         10
     261: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     266: astore        11
     268: aload         8
     270: aload         11
     272: checkcast     #141                // class java/lang/Number
     275: invokevirtual #144                // Method java/lang/Number.intValue:()I
     278: istore        12
     280: astore        15
     282: iconst_0
     283: istore        13
     285: iload         12
     287: iload_0
     288: iadd
     289: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     292: aload         15
     294: swap
     295: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     300: pop
     301: goto          249
     304: aload         8
     306: checkcast     #24                 // class java/util/List
     309: nop
     310: aload         14
     312: swap
     313: checkcast     #40                 // class java/lang/Iterable
     316: invokestatic  #324                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     319: astore        4
     321: aload_2
     322: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
     327: invokevirtual #314                // Method kotlin/ranges/IntRange.getFirst:()I
     330: iload_0
     331: irem
     332: ifeq          359
     335: aload         4
     337: checkcast     #161                // class java/util/Collection
     340: aload_2
     341: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
     346: invokevirtual #314                // Method kotlin/ranges/IntRange.getFirst:()I
     349: iconst_1
     350: isub
     351: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     354: invokestatic  #318                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     357: astore        4
     359: aload_2
     360: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
     365: invokevirtual #321                // Method kotlin/ranges/IntRange.getLast:()I
     368: iload_0
     369: irem
     370: iload_0
     371: iconst_1
     372: isub
     373: if_icmpeq     400
     376: aload         4
     378: checkcast     #161                // class java/util/Collection
     381: aload_2
     382: invokeinterface #291,  1          // InterfaceMethod kotlin/text/MatchResult.getRange:()Lkotlin/ranges/IntRange;
     387: invokevirtual #321                // Method kotlin/ranges/IntRange.getLast:()I
     390: iconst_1
     391: iadd
     392: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     395: invokestatic  #318                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     398: astore        4
     400: aload         4
     402: checkcast     #40                 // class java/lang/Iterable
     405: astore        5
     407: iconst_0
     408: istore        6
     410: aload         5
     412: astore        7
     414: new           #150                // class java/util/ArrayList
     417: dup
     418: invokespecial #196                // Method java/util/ArrayList."<init>":()V
     421: checkcast     #161                // class java/util/Collection
     424: astore        8
     426: iconst_0
     427: istore        9
     429: aload         7
     431: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     436: astore        10
     438: aload         10
     440: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     445: ifeq          504
     448: aload         10
     450: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     455: astore        11
     457: aload         11
     459: checkcast     #141                // class java/lang/Number
     462: invokevirtual #144                // Method java/lang/Number.intValue:()I
     465: istore        12
     467: iconst_0
     468: istore        13
     470: iload         12
     472: iflt          487
     475: iload         12
     477: iload_0
     478: iload_1
     479: imul
     480: if_icmpge     487
     483: iconst_1
     484: goto          488
     487: iconst_0
     488: ifeq          438
     491: aload         8
     493: aload         11
     495: invokeinterface #189,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     500: pop
     501: goto          438
     504: aload         8
     506: checkcast     #24                 // class java/util/List
     509: nop
     510: astore        4
     512: aload_2
     513: invokeinterface #298,  1          // InterfaceMethod kotlin/text/MatchResult.getValue:()Ljava/lang/String;
     518: invokestatic  #302                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     521: invokestatic  #204                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     524: aload         4
     526: invokestatic  #308                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     529: areturn
}