import kotlin.String
import kotlin.collections.List
import Day17.Coordinate
import java.util.*
import kotlin.math.max

object Day23 {

    /**
     * A more compact representation of a path than a list of coordinates.
     */
    data class Segment(val steps: Int, val start: Coordinate, val end: Coordinate)

    fun part1(input: List<String>): String {
        val startIndex = input[0].indexOf(".")
        val endIndex = input.last().indexOf(".")
        val startCoordinate = Coordinate(startIndex, 0)
        val endCoordinate = Coordinate(endIndex, input.size - 1)
        return maxSteps(startCoordinate, startCoordinate, endCoordinate, input, 0).toString()
    }

    data class StepInformation(
        val node: Segment,
        val visited: Set<Segment>,
        val steps: Int
    )

    private fun maxStepsExpanded(
        start: Segment,
        end: Segment,
        nodes: Set<Segment>,
        input: List<String>
    ): Int {
        val queue = PriorityQueue<StepInformation> { a, b -> -a.steps.compareTo(b.steps) }
        queue.add(StepInformation(start, setOf(start), start.steps))
        val startMap = nodes.associate { it.start to it }
        val endMap = nodes.associate { it.end to it }
        val nodeBeforeExit = getNeighbors(end.start, input).map { it.first }.filter { it in endMap }
            .map { endMap[it] }.filterNotNull().distinct().first()
        var max = 0
        var count = 0
        val startMemo = mutableMapOf<Segment, List<Segment>>()
        val endMemo = mutableMapOf<Segment, List<Segment>>()
        while (queue.isNotEmpty()) {
            count++
            if (count % 1000000 == 0) {
                println("Count: $count, queue size: ${queue.size}, current max: $max")
            }
            val stepInformation = queue.poll()
            val node = stepInformation.node
            val steps = stepInformation.steps
            val visited = stepInformation.visited
            if (node == end) {
                max = max(steps, max)
                continue
            }
            if (nodeBeforeExit in visited) {
                continue
            }

            val startNeighbors = startMemo.getOrPut(node) {
                getNeighbors(node.start, input).map { it.first }.filter { it in endMap }
                    .map { endMap[it]!! }
            }.filter { it !in visited }
            val endNeighbors = endMemo.getOrPut(node) {
                getNeighbors(node.end, input).map { it.first }.filter { it in startMap }
                    .map { startMap[it]!! }
            }.filter { it !in visited }
            queue.addAll(
                (startNeighbors + endNeighbors).distinct()
                    .map { StepInformation(it, visited + node, steps + it.steps) })
        }
        return max
    }

    private tailrec fun maxSteps(
        previousCoordinate: Coordinate,
        currentCoordinate: Coordinate,
        endCoordinate: Coordinate,
        input: List<String>,
        currentSteps: Int
    ): Int {
        if (currentCoordinate == endCoordinate) {
            return currentSteps
        }

        val nextCoordinates = getNeighborsDirectionally(previousCoordinate, currentCoordinate, input)
        val nextOpenSpace = nextCoordinates.find { it.second == '.' }
        if (nextOpenSpace != null) {
            return maxSteps(
                currentCoordinate,
                nextOpenSpace.first,
                endCoordinate,
                input,
                currentSteps + 1
            )
        }

        return nextCoordinates.maxOf { maxSteps(currentCoordinate, it.first, endCoordinate, input, currentSteps + 1) }
    }

    fun part2(input: List<String>): String {
        val startIndex = input[0].indexOf(".")
        val endIndex = input.last().indexOf(".")
        val startCoordinate = Coordinate(startIndex, 0)
        val endCoordinate = Coordinate(endIndex, input.size - 1)
        val nodes = buildSegments(startCoordinate, endCoordinate, input, 0)
        val start = nodes.find { it.start == startCoordinate }
        return maxStepsExpanded(start!!, nodes.find { it.end == endCoordinate }!!, nodes, input).toString()
    }

    data class SegmentBuildingInformation(
        val coordinate: Coordinate,
        val previousCoordinate: Coordinate,
        val steps: Int,
        val runningSegment: Segment
    )

    private fun buildSegments(
        startCoordinate: Coordinate,
        endCoordinate: Coordinate,
        input: List<String>,
        length: Int
    ): Set<Segment> {
        val queue = ArrayDeque<SegmentBuildingInformation>()
        queue.add(
            SegmentBuildingInformation(
                startCoordinate,
                startCoordinate,
                length,
                Segment(length, startCoordinate, startCoordinate)
            )
        )
        val segments = mutableSetOf<Segment>()
        while (queue.isNotEmpty()) {
            val stepInformation = queue.poll()
            val currentCoordinate = stepInformation.coordinate
            val previousCoordinate = stepInformation.previousCoordinate
            val length = stepInformation.steps
            val runningNode = stepInformation.runningSegment
            if (currentCoordinate == endCoordinate) {
                val updatedNode = runningNode.copy(end = endCoordinate, steps = length)
                if (updatedNode !in segments) {
                    segments.add(updatedNode)
                }
            }
            val nextCoordinates = getNeighborsDirectionally(previousCoordinate, currentCoordinate, input)

            val nextOpenSpace = nextCoordinates.find { it.second == '.' }
            if (nextOpenSpace != null) {
                val currentCharacter = input[currentCoordinate.y][currentCoordinate.x]
                // We have to treat >, < etc as their own segment because otherwise we can lead to duplicate counting
                if (currentCharacter != '.') {
                    val updatedNode = runningNode.copy(end = currentCoordinate, steps = length)
                    if (updatedNode !in segments) {
                        segments.add(updatedNode)
                    }
                    queue.addFirst(
                        SegmentBuildingInformation(
                            nextOpenSpace.first,
                            currentCoordinate,
                            1,
                            Segment(1, nextOpenSpace.first, nextOpenSpace.first)
                        )
                    )
                } else {
                    queue.addFirst(SegmentBuildingInformation(nextOpenSpace.first, currentCoordinate, length + 1, runningNode))
                }
            } else {
                val updatedNode = runningNode.copy(end = currentCoordinate, steps = length)
                if (updatedNode !in segments) {
                    segments.add(updatedNode)
                }
                val neighbors = nextCoordinates.map {
                    SegmentBuildingInformation(
                        it.first,
                        currentCoordinate,
                        1,
                        Segment(1, it.first, it.first)
                    )
                }
                for (nextNeighbor in neighbors) {
                    queue.addFirst(nextNeighbor)
                }
            }
        }
        return segments
    }

    fun getNeighborsDirectionally(
        previousCoordinate: Coordinate,
        currentCoordinate: Coordinate,
        input: List<String>
    ): List<Pair<Coordinate, Char>> {
        val left = currentCoordinate.copy(x = currentCoordinate.x - 1)
        val right = currentCoordinate.copy(x = currentCoordinate.x + 1)
        val up = currentCoordinate.copy(y = currentCoordinate.y - 1)
        val down = currentCoordinate.copy(y = currentCoordinate.y + 1)
        val nextCoordinates = getNeighbors(currentCoordinate, input)
            .filter { it.first != previousCoordinate }
            .filter {
                if (it.first == left) {
                    it.second != '>'
                } else if (it.first == right) {
                    it.second != '<'
                } else if (it.first == up) {
                    it.second != 'v'
                } else if (it.first == down) {
                    it.second != '^'
                } else {
                    throw Exception("Unknown direction")
                }
            }
        return nextCoordinates
    }

    fun getNeighbors(currentCoordinate: Coordinate, input: List<String>): List<Pair<Coordinate, Char>> {
        val left = currentCoordinate.copy(x = currentCoordinate.x - 1)
        val right = currentCoordinate.copy(x = currentCoordinate.x + 1)
        val up = currentCoordinate.copy(y = currentCoordinate.y - 1)
        val down = currentCoordinate.copy(y = currentCoordinate.y + 1)
        val nextCoordinates = listOf(
            left,
            right,
            up,
            down
        ).filter { it.x >= 0 && it.x < input[0].length && it.y >= 0 && it.y < input.size }
            .map { it to input[it.y][it.x] }
            .filter { it.second != '#' }
        return nextCoordinates
    }
}

Compiled from "Day23.kt"
public final class Day23$StepInformation {
  private final Day23$Segment node;

  private final java.util.Set<Day23$Segment> visited;

  private final int steps;

  public Day23$StepInformation(Day23$Segment, java.util.Set<Day23$Segment>, int);
    Code:
       0: aload_1
       1: ldc           #10                 // String node
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String visited
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #21                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: aload_1
      18: putfield      #24                 // Field node:LDay23$Segment;
      21: aload_0
      22: aload_2
      23: putfield      #27                 // Field visited:Ljava/util/Set;
      26: aload_0
      27: iload_3
      28: putfield      #31                 // Field steps:I
      31: return

  public final Day23$Segment getNode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field node:LDay23$Segment;
       4: areturn

  public final java.util.Set<Day23$Segment> getVisited();
    Code:
       0: aload_0
       1: getfield      #27                 // Field visited:Ljava/util/Set;
       4: areturn

  public final int getSteps();
    Code:
       0: aload_0
       1: getfield      #31                 // Field steps:I
       4: ireturn

  public final Day23$Segment component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field node:LDay23$Segment;
       4: areturn

  public final java.util.Set<Day23$Segment> component2();
    Code:
       0: aload_0
       1: getfield      #27                 // Field visited:Ljava/util/Set;
       4: areturn

  public final int component3();
    Code:
       0: aload_0
       1: getfield      #31                 // Field steps:I
       4: ireturn

  public final Day23$StepInformation copy(Day23$Segment, java.util.Set<Day23$Segment>, int);
    Code:
       0: aload_1
       1: ldc           #10                 // String node
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String visited
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Day23$StepInformation
      15: dup
      16: aload_1
      17: aload_2
      18: iload_3
      19: invokespecial #48                 // Method "<init>":(LDay23$Segment;Ljava/util/Set;I)V
      22: areturn

  public static Day23$StepInformation copy$default(Day23$StepInformation, Day23$Segment, java.util.Set, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #24                 // Field node:LDay23$Segment;
      11: astore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #27                 // Field visited:Ljava/util/Set;
      23: astore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #31                 // Field steps:I
      35: istore_3
      36: aload_0
      37: aload_1
      38: aload_2
      39: iload_3
      40: invokevirtual #52                 // Method copy:(LDay23$Segment;Ljava/util/Set;I)LDay23$StepInformation;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #56                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #57                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #59                 // String StepInformation(node=
       9: invokevirtual #63                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field node:LDay23$Segment;
      16: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #68                 // String , visited=
      21: invokevirtual #63                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #27                 // Field visited:Ljava/util/Set;
      28: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: ldc           #70                 // String , steps=
      33: invokevirtual #63                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #31                 // Field steps:I
      40: invokevirtual #73                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #76                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #78                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field node:LDay23$Segment;
       4: invokevirtual #83                 // Method Day23$Segment.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #27                 // Field visited:Ljava/util/Set;
      16: invokevirtual #84                 // Method java/lang/Object.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #31                 // Field steps:I
      29: invokestatic  #89                 // Method java/lang/Integer.hashCode:(I)I
      32: iadd
      33: istore_1
      34: iload_1
      35: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Day23$StepInformation
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day23$StepInformation
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field node:LDay23$Segment;
      25: aload_2
      26: getfield      #24                 // Field node:LDay23$Segment;
      29: invokestatic  #97                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: aload_0
      38: getfield      #27                 // Field visited:Ljava/util/Set;
      41: aload_2
      42: getfield      #27                 // Field visited:Ljava/util/Set;
      45: invokestatic  #97                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: aload_0
      54: getfield      #31                 // Field steps:I
      57: aload_2
      58: getfield      #31                 // Field steps:I
      61: if_icmpeq     66
      64: iconst_0
      65: ireturn
      66: iconst_1
      67: ireturn
}

Compiled from "Day23.kt"
public final class Day23$Segment {
  private final int steps;

  private final Day17$Coordinate start;

  private final Day17$Coordinate end;

  public Day23$Segment(int, Day17$Coordinate, Day17$Coordinate);
    Code:
       0: aload_2
       1: ldc           #9                  // String start
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_3
       7: ldc           #17                 // String end
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #20                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: iload_1
      18: putfield      #24                 // Field steps:I
      21: aload_0
      22: aload_2
      23: putfield      #27                 // Field start:LDay17$Coordinate;
      26: aload_0
      27: aload_3
      28: putfield      #29                 // Field end:LDay17$Coordinate;
      31: return

  public final int getSteps();
    Code:
       0: aload_0
       1: getfield      #24                 // Field steps:I
       4: ireturn

  public final Day17$Coordinate getStart();
    Code:
       0: aload_0
       1: getfield      #27                 // Field start:LDay17$Coordinate;
       4: areturn

  public final Day17$Coordinate getEnd();
    Code:
       0: aload_0
       1: getfield      #29                 // Field end:LDay17$Coordinate;
       4: areturn

  public final int component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field steps:I
       4: ireturn

  public final Day17$Coordinate component2();
    Code:
       0: aload_0
       1: getfield      #27                 // Field start:LDay17$Coordinate;
       4: areturn

  public final Day17$Coordinate component3();
    Code:
       0: aload_0
       1: getfield      #29                 // Field end:LDay17$Coordinate;
       4: areturn

  public final Day23$Segment copy(int, Day17$Coordinate, Day17$Coordinate);
    Code:
       0: aload_2
       1: ldc           #9                  // String start
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_3
       7: ldc           #17                 // String end
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Day23$Segment
      15: dup
      16: iload_1
      17: aload_2
      18: aload_3
      19: invokespecial #43                 // Method "<init>":(ILDay17$Coordinate;LDay17$Coordinate;)V
      22: areturn

  public static Day23$Segment copy$default(Day23$Segment, int, Day17$Coordinate, Day17$Coordinate, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #24                 // Field steps:I
      11: istore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #27                 // Field start:LDay17$Coordinate;
      23: astore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #29                 // Field end:LDay17$Coordinate;
      35: astore_3
      36: aload_0
      37: iload_1
      38: aload_2
      39: aload_3
      40: invokevirtual #47                 // Method copy:(ILDay17$Coordinate;LDay17$Coordinate;)LDay23$Segment;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #51                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #52                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #54                 // String Segment(steps=
       9: invokevirtual #58                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field steps:I
      16: invokevirtual #61                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #63                 // String , start=
      21: invokevirtual #58                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #27                 // Field start:LDay17$Coordinate;
      28: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: ldc           #68                 // String , end=
      33: invokevirtual #58                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #29                 // Field end:LDay17$Coordinate;
      40: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #71                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #73                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field steps:I
       4: invokestatic  #79                 // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #27                 // Field start:LDay17$Coordinate;
      16: invokevirtual #83                 // Method Day17$Coordinate.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #29                 // Field end:LDay17$Coordinate;
      29: invokevirtual #83                 // Method Day17$Coordinate.hashCode:()I
      32: iadd
      33: istore_1
      34: iload_1
      35: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Day23$Segment
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day23$Segment
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field steps:I
      25: aload_2
      26: getfield      #24                 // Field steps:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #27                 // Field start:LDay17$Coordinate;
      38: aload_2
      39: getfield      #27                 // Field start:LDay17$Coordinate;
      42: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      45: ifne          50
      48: iconst_0
      49: ireturn
      50: aload_0
      51: getfield      #29                 // Field end:LDay17$Coordinate;
      54: aload_2
      55: getfield      #29                 // Field end:LDay17$Coordinate;
      58: invokestatic  #91                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      61: ifne          66
      64: iconst_0
      65: ireturn
      66: iconst_1
      67: ireturn
}

Compiled from "Day23.kt"
public final class Day23 {
  public static final Day23 INSTANCE;

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

  public final java.lang.String part1(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: iconst_0
       8: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      13: checkcast     #30                 // class java/lang/CharSequence
      16: ldc           #32                 // String .
      18: iconst_0
      19: iconst_0
      20: bipush        6
      22: aconst_null
      23: invokestatic  #38                 // Method kotlin/text/StringsKt.indexOf$default:(Ljava/lang/CharSequence;Ljava/lang/String;IZILjava/lang/Object;)I
      26: istore_2
      27: aload_1
      28: invokestatic  #44                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      31: checkcast     #30                 // class java/lang/CharSequence
      34: ldc           #32                 // String .
      36: iconst_0
      37: iconst_0
      38: bipush        6
      40: aconst_null
      41: invokestatic  #38                 // Method kotlin/text/StringsKt.indexOf$default:(Ljava/lang/CharSequence;Ljava/lang/String;IZILjava/lang/Object;)I
      44: istore_3
      45: new           #46                 // class Day17$Coordinate
      48: dup
      49: iload_2
      50: iconst_0
      51: invokespecial #49                 // Method Day17$Coordinate."<init>":(II)V
      54: astore        4
      56: new           #46                 // class Day17$Coordinate
      59: dup
      60: iload_3
      61: aload_1
      62: invokeinterface #53,  1           // InterfaceMethod java/util/List.size:()I
      67: iconst_1
      68: isub
      69: invokespecial #49                 // Method Day17$Coordinate."<init>":(II)V
      72: astore        5
      74: aload_0
      75: aload         4
      77: aload         4
      79: aload         5
      81: aload_1
      82: iconst_0
      83: invokespecial #57                 // Method maxSteps:(LDay17$Coordinate;LDay17$Coordinate;LDay17$Coordinate;Ljava/util/List;I)I
      86: invokestatic  #63                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
      89: areturn

  private final int maxStepsExpanded(Day23$Segment, Day23$Segment, java.util.Set<Day23$Segment>, java.util.List<java.lang.String>);
    Code:
       0: new           #75                 // class java/util/PriorityQueue
       3: dup
       4: invokedynamic #95,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function2;
       9: invokedynamic #106,  0            // InvokeDynamic #1:compare:(Lkotlin/jvm/functions/Function2;)Ljava/util/Comparator;
      14: invokespecial #109                // Method java/util/PriorityQueue."<init>":(Ljava/util/Comparator;)V
      17: astore        5
      19: aload         5
      21: new           #111                // class Day23$StepInformation
      24: dup
      25: aload_1
      26: aload_1
      27: invokestatic  #117                // Method kotlin/collections/SetsKt.setOf:(Ljava/lang/Object;)Ljava/util/Set;
      30: aload_1
      31: invokevirtual #122                // Method Day23$Segment.getSteps:()I
      34: invokespecial #125                // Method Day23$StepInformation."<init>":(LDay23$Segment;Ljava/util/Set;I)V
      37: invokevirtual #129                // Method java/util/PriorityQueue.add:(Ljava/lang/Object;)Z
      40: pop
      41: aload_3
      42: checkcast     #131                // class java/lang/Iterable
      45: astore        7
      47: iconst_0
      48: istore        8
      50: aload         7
      52: bipush        10
      54: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      57: invokestatic  #141                // Method kotlin/collections/MapsKt.mapCapacity:(I)I
      60: bipush        16
      62: invokestatic  #147                // Method kotlin/ranges/RangesKt.coerceAtLeast:(II)I
      65: istore        9
      67: aload         7
      69: astore        10
      71: new           #149                // class java/util/LinkedHashMap
      74: dup
      75: iload         9
      77: invokespecial #152                // Method java/util/LinkedHashMap."<init>":(I)V
      80: checkcast     #154                // class java/util/Map
      83: astore        11
      85: iconst_0
      86: istore        12
      88: aload         10
      90: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      95: astore        13
      97: aload         13
      99: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     104: ifeq          163
     107: aload         13
     109: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     114: astore        14
     116: aload         11
     118: astore        15
     120: aload         14
     122: checkcast     #119                // class Day23$Segment
     125: astore        16
     127: iconst_0
     128: istore        17
     130: aload         16
     132: invokevirtual #172                // Method Day23$Segment.getStart:()LDay17$Coordinate;
     135: aload         16
     137: invokestatic  #178                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     140: astore        16
     142: aload         15
     144: aload         16
     146: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     149: aload         16
     151: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     154: invokeinterface #189,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     159: pop
     160: goto          97
     163: aload         11
     165: nop
     166: astore        6
     168: aload_3
     169: checkcast     #131                // class java/lang/Iterable
     172: astore        8
     174: iconst_0
     175: istore        9
     177: aload         8
     179: bipush        10
     181: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     184: invokestatic  #141                // Method kotlin/collections/MapsKt.mapCapacity:(I)I
     187: bipush        16
     189: invokestatic  #147                // Method kotlin/ranges/RangesKt.coerceAtLeast:(II)I
     192: istore        10
     194: aload         8
     196: astore        11
     198: new           #149                // class java/util/LinkedHashMap
     201: dup
     202: iload         10
     204: invokespecial #152                // Method java/util/LinkedHashMap."<init>":(I)V
     207: checkcast     #154                // class java/util/Map
     210: astore        12
     212: iconst_0
     213: istore        13
     215: aload         11
     217: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     222: astore        14
     224: aload         14
     226: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     231: ifeq          290
     234: aload         14
     236: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     241: astore        15
     243: aload         12
     245: astore        16
     247: aload         15
     249: checkcast     #119                // class Day23$Segment
     252: astore        17
     254: iconst_0
     255: istore        18
     257: aload         17
     259: invokevirtual #192                // Method Day23$Segment.getEnd:()LDay17$Coordinate;
     262: aload         17
     264: invokestatic  #178                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     267: astore        17
     269: aload         16
     271: aload         17
     273: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     276: aload         17
     278: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     281: invokeinterface #189,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     286: pop
     287: goto          224
     290: aload         12
     292: nop
     293: astore        7
     295: aload_0
     296: aload_2
     297: invokevirtual #172                // Method Day23$Segment.getStart:()LDay17$Coordinate;
     300: aload         4
     302: invokevirtual #196                // Method getNeighbors:(LDay17$Coordinate;Ljava/util/List;)Ljava/util/List;
     305: checkcast     #131                // class java/lang/Iterable
     308: astore        9
     310: iconst_0
     311: istore        10
     313: aload         9
     315: astore        11
     317: new           #198                // class java/util/ArrayList
     320: dup
     321: aload         9
     323: bipush        10
     325: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     328: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
     331: checkcast     #201                // class java/util/Collection
     334: astore        12
     336: iconst_0
     337: istore        13
     339: aload         11
     341: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     346: astore        14
     348: aload         14
     350: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     355: ifeq          401
     358: aload         14
     360: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     365: astore        15
     367: aload         12
     369: aload         15
     371: checkcast     #180                // class kotlin/Pair
     374: astore        16
     376: astore        34
     378: iconst_0
     379: istore        17
     381: aload         16
     383: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     386: checkcast     #46                 // class Day17$Coordinate
     389: aload         34
     391: swap
     392: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     397: pop
     398: goto          348
     401: aload         12
     403: checkcast     #24                 // class java/util/List
     406: nop
     407: checkcast     #131                // class java/lang/Iterable
     410: astore        9
     412: nop
     413: iconst_0
     414: istore        10
     416: aload         9
     418: astore        11
     420: new           #198                // class java/util/ArrayList
     423: dup
     424: invokespecial #203                // Method java/util/ArrayList."<init>":()V
     427: checkcast     #201                // class java/util/Collection
     430: astore        12
     432: iconst_0
     433: istore        13
     435: aload         11
     437: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     442: astore        14
     444: aload         14
     446: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     451: ifeq          499
     454: aload         14
     456: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     461: astore        15
     463: aload         15
     465: checkcast     #46                 // class Day17$Coordinate
     468: astore        16
     470: iconst_0
     471: istore        17
     473: aload         7
     475: aload         16
     477: invokeinterface #206,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     482: nop
     483: ifeq          444
     486: aload         12
     488: aload         15
     490: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     495: pop
     496: goto          444
     499: aload         12
     501: checkcast     #24                 // class java/util/List
     504: nop
     505: checkcast     #131                // class java/lang/Iterable
     508: astore        9
     510: nop
     511: iconst_0
     512: istore        10
     514: aload         9
     516: astore        11
     518: new           #198                // class java/util/ArrayList
     521: dup
     522: aload         9
     524: bipush        10
     526: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     529: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
     532: checkcast     #201                // class java/util/Collection
     535: astore        12
     537: iconst_0
     538: istore        13
     540: aload         11
     542: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     547: astore        14
     549: aload         14
     551: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     556: ifeq          606
     559: aload         14
     561: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     566: astore        15
     568: aload         12
     570: aload         15
     572: checkcast     #46                 // class Day17$Coordinate
     575: astore        16
     577: astore        34
     579: iconst_0
     580: istore        17
     582: aload         7
     584: aload         16
     586: invokeinterface #209,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     591: checkcast     #119                // class Day23$Segment
     594: aload         34
     596: swap
     597: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     602: pop
     603: goto          549
     606: aload         12
     608: checkcast     #24                 // class java/util/List
     611: nop
     612: checkcast     #131                // class java/lang/Iterable
     615: invokestatic  #213                // Method kotlin/collections/CollectionsKt.filterNotNull:(Ljava/lang/Iterable;)Ljava/util/List;
     618: checkcast     #131                // class java/lang/Iterable
     621: invokestatic  #216                // Method kotlin/collections/CollectionsKt.distinct:(Ljava/lang/Iterable;)Ljava/util/List;
     624: invokestatic  #219                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     627: checkcast     #119                // class Day23$Segment
     630: astore        8
     632: iconst_0
     633: istore        9
     635: iconst_0
     636: istore        10
     638: new           #149                // class java/util/LinkedHashMap
     641: dup
     642: invokespecial #220                // Method java/util/LinkedHashMap."<init>":()V
     645: checkcast     #154                // class java/util/Map
     648: astore        11
     650: new           #149                // class java/util/LinkedHashMap
     653: dup
     654: invokespecial #220                // Method java/util/LinkedHashMap."<init>":()V
     657: checkcast     #154                // class java/util/Map
     660: astore        12
     662: aload         5
     664: checkcast     #201                // class java/util/Collection
     667: invokeinterface #223,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     672: ifne          679
     675: iconst_1
     676: goto          680
     679: iconst_0
     680: ifeq          1925
     683: iinc          10, 1
     686: iload         10
     688: ldc           #224                // int 1000000
     690: irem
     691: ifne          744
     694: new           #226                // class java/lang/StringBuilder
     697: dup
     698: invokespecial #227                // Method java/lang/StringBuilder."<init>":()V
     701: ldc           #229                // String Count:
     703: invokevirtual #233                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     706: iload         10
     708: invokevirtual #236                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     711: ldc           #238                // String , queue size:
     713: invokevirtual #233                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     716: aload         5
     718: invokevirtual #239                // Method java/util/PriorityQueue.size:()I
     721: invokevirtual #236                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     724: ldc           #241                // String , current max:
     726: invokevirtual #233                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     729: iload         9
     731: invokevirtual #236                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     734: invokevirtual #245                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     737: getstatic     #251                // Field java/lang/System.out:Ljava/io/PrintStream;
     740: swap
     741: invokevirtual #257                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     744: aload         5
     746: invokevirtual #260                // Method java/util/PriorityQueue.poll:()Ljava/lang/Object;
     749: checkcast     #111                // class Day23$StepInformation
     752: astore        13
     754: aload         13
     756: invokevirtual #264                // Method Day23$StepInformation.getNode:()LDay23$Segment;
     759: astore        14
     761: aload         13
     763: invokevirtual #265                // Method Day23$StepInformation.getSteps:()I
     766: istore        15
     768: aload         13
     770: invokevirtual #269                // Method Day23$StepInformation.getVisited:()Ljava/util/Set;
     773: astore        16
     775: aload         14
     777: aload_2
     778: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     781: ifeq          796
     784: iload         15
     786: iload         9
     788: invokestatic  #278                // Method java/lang/Math.max:(II)I
     791: istore        9
     793: goto          662
     796: aload         16
     798: aload         8
     800: invokeinterface #283,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     805: ifeq          811
     808: goto          662
     811: aload         11
     813: astore        18
     815: iconst_0
     816: istore        19
     818: aload         18
     820: aload         14
     822: invokeinterface #209,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     827: astore        20
     829: aload         20
     831: ifnonnull     1181
     834: iconst_0
     835: istore        21
     837: getstatic     #286                // Field INSTANCE:LDay23;
     840: aload         14
     842: invokevirtual #172                // Method Day23$Segment.getStart:()LDay17$Coordinate;
     845: aload         4
     847: invokevirtual #196                // Method getNeighbors:(LDay17$Coordinate;Ljava/util/List;)Ljava/util/List;
     850: checkcast     #131                // class java/lang/Iterable
     853: astore        22
     855: iconst_0
     856: istore        23
     858: aload         22
     860: astore        24
     862: new           #198                // class java/util/ArrayList
     865: dup
     866: aload         22
     868: bipush        10
     870: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     873: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
     876: checkcast     #201                // class java/util/Collection
     879: astore        25
     881: iconst_0
     882: istore        26
     884: aload         24
     886: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     891: astore        27
     893: aload         27
     895: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     900: ifeq          946
     903: aload         27
     905: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     910: astore        28
     912: aload         25
     914: aload         28
     916: checkcast     #180                // class kotlin/Pair
     919: astore        29
     921: astore        30
     923: iconst_0
     924: istore        31
     926: aload         29
     928: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     931: checkcast     #46                 // class Day17$Coordinate
     934: aload         30
     936: swap
     937: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     942: pop
     943: goto          893
     946: aload         25
     948: checkcast     #24                 // class java/util/List
     951: nop
     952: checkcast     #131                // class java/lang/Iterable
     955: astore        22
     957: nop
     958: iconst_0
     959: istore        23
     961: aload         22
     963: astore        24
     965: new           #198                // class java/util/ArrayList
     968: dup
     969: invokespecial #203                // Method java/util/ArrayList."<init>":()V
     972: checkcast     #201                // class java/util/Collection
     975: astore        25
     977: iconst_0
     978: istore        26
     980: aload         24
     982: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     987: astore        27
     989: aload         27
     991: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     996: ifeq          1044
     999: aload         27
    1001: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1006: astore        28
    1008: aload         28
    1010: checkcast     #46                 // class Day17$Coordinate
    1013: astore        29
    1015: iconst_0
    1016: istore        31
    1018: aload         7
    1020: aload         29
    1022: invokeinterface #206,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
    1027: nop
    1028: ifeq          989
    1031: aload         25
    1033: aload         28
    1035: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1040: pop
    1041: goto          989
    1044: aload         25
    1046: checkcast     #24                 // class java/util/List
    1049: nop
    1050: checkcast     #131                // class java/lang/Iterable
    1053: astore        22
    1055: nop
    1056: iconst_0
    1057: istore        23
    1059: aload         22
    1061: astore        24
    1063: new           #198                // class java/util/ArrayList
    1066: dup
    1067: aload         22
    1069: bipush        10
    1071: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1074: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
    1077: checkcast     #201                // class java/util/Collection
    1080: astore        25
    1082: iconst_0
    1083: istore        26
    1085: aload         24
    1087: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1092: astore        27
    1094: aload         27
    1096: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1101: ifeq          1155
    1104: aload         27
    1106: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1111: astore        28
    1113: aload         25
    1115: aload         28
    1117: checkcast     #46                 // class Day17$Coordinate
    1120: astore        29
    1122: astore        30
    1124: iconst_0
    1125: istore        31
    1127: aload         7
    1129: aload         29
    1131: invokeinterface #209,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    1136: dup
    1137: invokestatic  #289                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
    1140: checkcast     #119                // class Day23$Segment
    1143: aload         30
    1145: swap
    1146: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1151: pop
    1152: goto          1094
    1155: aload         25
    1157: checkcast     #24                 // class java/util/List
    1160: nop
    1161: nop
    1162: astore        32
    1164: aload         18
    1166: aload         14
    1168: aload         32
    1170: invokeinterface #189,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    1175: pop
    1176: aload         32
    1178: goto          1183
    1181: aload         20
    1183: nop
    1184: checkcast     #131                // class java/lang/Iterable
    1187: astore        18
    1189: nop
    1190: iconst_0
    1191: istore        19
    1193: aload         18
    1195: astore        20
    1197: new           #198                // class java/util/ArrayList
    1200: dup
    1201: invokespecial #203                // Method java/util/ArrayList."<init>":()V
    1204: checkcast     #201                // class java/util/Collection
    1207: astore        21
    1209: iconst_0
    1210: istore        22
    1212: aload         20
    1214: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1219: astore        23
    1221: aload         23
    1223: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1228: ifeq          1283
    1231: aload         23
    1233: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1238: astore        24
    1240: aload         24
    1242: checkcast     #119                // class Day23$Segment
    1245: astore        25
    1247: iconst_0
    1248: istore        26
    1250: aload         16
    1252: aload         25
    1254: invokeinterface #283,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
    1259: ifne          1266
    1262: iconst_1
    1263: goto          1267
    1266: iconst_0
    1267: ifeq          1221
    1270: aload         21
    1272: aload         24
    1274: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1279: pop
    1280: goto          1221
    1283: aload         21
    1285: checkcast     #24                 // class java/util/List
    1288: nop
    1289: astore        17
    1291: aload         12
    1293: astore        19
    1295: iconst_0
    1296: istore        20
    1298: aload         19
    1300: aload         14
    1302: invokeinterface #209,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    1307: astore        21
    1309: aload         21
    1311: ifnonnull     1661
    1314: iconst_0
    1315: istore        22
    1317: getstatic     #286                // Field INSTANCE:LDay23;
    1320: aload         14
    1322: invokevirtual #192                // Method Day23$Segment.getEnd:()LDay17$Coordinate;
    1325: aload         4
    1327: invokevirtual #196                // Method getNeighbors:(LDay17$Coordinate;Ljava/util/List;)Ljava/util/List;
    1330: checkcast     #131                // class java/lang/Iterable
    1333: astore        23
    1335: iconst_0
    1336: istore        24
    1338: aload         23
    1340: astore        25
    1342: new           #198                // class java/util/ArrayList
    1345: dup
    1346: aload         23
    1348: bipush        10
    1350: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1353: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
    1356: checkcast     #201                // class java/util/Collection
    1359: astore        26
    1361: iconst_0
    1362: istore        27
    1364: aload         25
    1366: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1371: astore        28
    1373: aload         28
    1375: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1380: ifeq          1426
    1383: aload         28
    1385: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1390: astore        29
    1392: aload         26
    1394: aload         29
    1396: checkcast     #180                // class kotlin/Pair
    1399: astore        30
    1401: astore        31
    1403: iconst_0
    1404: istore        32
    1406: aload         30
    1408: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
    1411: checkcast     #46                 // class Day17$Coordinate
    1414: aload         31
    1416: swap
    1417: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1422: pop
    1423: goto          1373
    1426: aload         26
    1428: checkcast     #24                 // class java/util/List
    1431: nop
    1432: checkcast     #131                // class java/lang/Iterable
    1435: astore        23
    1437: nop
    1438: iconst_0
    1439: istore        24
    1441: aload         23
    1443: astore        25
    1445: new           #198                // class java/util/ArrayList
    1448: dup
    1449: invokespecial #203                // Method java/util/ArrayList."<init>":()V
    1452: checkcast     #201                // class java/util/Collection
    1455: astore        26
    1457: iconst_0
    1458: istore        27
    1460: aload         25
    1462: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1467: astore        28
    1469: aload         28
    1471: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1476: ifeq          1524
    1479: aload         28
    1481: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1486: astore        29
    1488: aload         29
    1490: checkcast     #46                 // class Day17$Coordinate
    1493: astore        30
    1495: iconst_0
    1496: istore        32
    1498: aload         6
    1500: aload         30
    1502: invokeinterface #206,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
    1507: nop
    1508: ifeq          1469
    1511: aload         26
    1513: aload         29
    1515: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1520: pop
    1521: goto          1469
    1524: aload         26
    1526: checkcast     #24                 // class java/util/List
    1529: nop
    1530: checkcast     #131                // class java/lang/Iterable
    1533: astore        23
    1535: nop
    1536: iconst_0
    1537: istore        24
    1539: aload         23
    1541: astore        25
    1543: new           #198                // class java/util/ArrayList
    1546: dup
    1547: aload         23
    1549: bipush        10
    1551: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1554: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
    1557: checkcast     #201                // class java/util/Collection
    1560: astore        26
    1562: iconst_0
    1563: istore        27
    1565: aload         25
    1567: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1572: astore        28
    1574: aload         28
    1576: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1581: ifeq          1635
    1584: aload         28
    1586: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1591: astore        29
    1593: aload         26
    1595: aload         29
    1597: checkcast     #46                 // class Day17$Coordinate
    1600: astore        30
    1602: astore        31
    1604: iconst_0
    1605: istore        32
    1607: aload         6
    1609: aload         30
    1611: invokeinterface #209,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    1616: dup
    1617: invokestatic  #289                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
    1620: checkcast     #119                // class Day23$Segment
    1623: aload         31
    1625: swap
    1626: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1631: pop
    1632: goto          1574
    1635: aload         26
    1637: checkcast     #24                 // class java/util/List
    1640: nop
    1641: nop
    1642: astore        33
    1644: aload         19
    1646: aload         14
    1648: aload         33
    1650: invokeinterface #189,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    1655: pop
    1656: aload         33
    1658: goto          1663
    1661: aload         21
    1663: nop
    1664: checkcast     #131                // class java/lang/Iterable
    1667: astore        19
    1669: nop
    1670: iconst_0
    1671: istore        20
    1673: aload         19
    1675: astore        21
    1677: new           #198                // class java/util/ArrayList
    1680: dup
    1681: invokespecial #203                // Method java/util/ArrayList."<init>":()V
    1684: checkcast     #201                // class java/util/Collection
    1687: astore        22
    1689: iconst_0
    1690: istore        23
    1692: aload         21
    1694: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1699: astore        24
    1701: aload         24
    1703: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1708: ifeq          1763
    1711: aload         24
    1713: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1718: astore        25
    1720: aload         25
    1722: checkcast     #119                // class Day23$Segment
    1725: astore        26
    1727: iconst_0
    1728: istore        27
    1730: aload         16
    1732: aload         26
    1734: invokeinterface #283,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
    1739: ifne          1746
    1742: iconst_1
    1743: goto          1747
    1746: iconst_0
    1747: ifeq          1701
    1750: aload         22
    1752: aload         25
    1754: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1759: pop
    1760: goto          1701
    1763: aload         22
    1765: checkcast     #24                 // class java/util/List
    1768: nop
    1769: astore        18
    1771: aload         5
    1773: aload         17
    1775: checkcast     #201                // class java/util/Collection
    1778: aload         18
    1780: checkcast     #131                // class java/lang/Iterable
    1783: invokestatic  #293                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
    1786: checkcast     #131                // class java/lang/Iterable
    1789: invokestatic  #216                // Method kotlin/collections/CollectionsKt.distinct:(Ljava/lang/Iterable;)Ljava/util/List;
    1792: checkcast     #131                // class java/lang/Iterable
    1795: astore        19
    1797: astore        34
    1799: iconst_0
    1800: istore        20
    1802: aload         19
    1804: astore        21
    1806: new           #198                // class java/util/ArrayList
    1809: dup
    1810: aload         19
    1812: bipush        10
    1814: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1817: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
    1820: checkcast     #201                // class java/util/Collection
    1823: astore        22
    1825: iconst_0
    1826: istore        23
    1828: aload         21
    1830: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1835: astore        24
    1837: aload         24
    1839: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
    1844: ifeq          1906
    1847: aload         24
    1849: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1854: astore        25
    1856: aload         22
    1858: aload         25
    1860: checkcast     #119                // class Day23$Segment
    1863: astore        26
    1865: astore        35
    1867: iconst_0
    1868: istore        27
    1870: new           #111                // class Day23$StepInformation
    1873: dup
    1874: aload         26
    1876: aload         16
    1878: aload         14
    1880: invokestatic  #296                // Method kotlin/collections/SetsKt.plus:(Ljava/util/Set;Ljava/lang/Object;)Ljava/util/Set;
    1883: iload         15
    1885: aload         26
    1887: invokevirtual #122                // Method Day23$Segment.getSteps:()I
    1890: iadd
    1891: invokespecial #125                // Method Day23$StepInformation."<init>":(LDay23$Segment;Ljava/util/Set;I)V
    1894: aload         35
    1896: swap
    1897: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1902: pop
    1903: goto          1837
    1906: aload         22
    1908: checkcast     #24                 // class java/util/List
    1911: nop
    1912: aload         34
    1914: swap
    1915: checkcast     #201                // class java/util/Collection
    1918: invokevirtual #300                // Method java/util/PriorityQueue.addAll:(Ljava/util/Collection;)Z
    1921: pop
    1922: goto          662
    1925: iload         9
    1927: ireturn

  private final int maxSteps(Day17$Coordinate, Day17$Coordinate, Day17$Coordinate, java.util.List<java.lang.String>, int);
    Code:
       0: aload_0
       1: astore        6
       3: aload_2
       4: aload_3
       5: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
       8: ifeq          14
      11: iload         5
      13: ireturn
      14: aload         6
      16: aload_1
      17: aload_2
      18: aload         4
      20: invokevirtual #367                // Method getNeighborsDirectionally:(LDay17$Coordinate;LDay17$Coordinate;Ljava/util/List;)Ljava/util/List;
      23: astore        7
      25: aload         7
      27: checkcast     #131                // class java/lang/Iterable
      30: astore        10
      32: aload         10
      34: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      39: astore        11
      41: aload         11
      43: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      48: ifeq          99
      51: aload         11
      53: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      58: astore        12
      60: aload         12
      62: checkcast     #180                // class kotlin/Pair
      65: astore        13
      67: iconst_0
      68: istore        14
      70: aload         13
      72: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      75: checkcast     #369                // class java/lang/Character
      78: invokevirtual #373                // Method java/lang/Character.charValue:()C
      81: bipush        46
      83: if_icmpne     90
      86: iconst_1
      87: goto          91
      90: iconst_0
      91: ifeq          41
      94: aload         12
      96: goto          100
      99: aconst_null
     100: checkcast     #180                // class kotlin/Pair
     103: astore        8
     105: aload         8
     107: ifnull        164
     110: aload         6
     112: astore        9
     114: aload_2
     115: astore        10
     117: aload         8
     119: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     122: checkcast     #46                 // class Day17$Coordinate
     125: astore        11
     127: aload_3
     128: astore        12
     130: aload         4
     132: astore        13
     134: iload         5
     136: iconst_1
     137: iadd
     138: istore        14
     140: aload         9
     142: astore        6
     144: aload         10
     146: astore_1
     147: aload         11
     149: astore_2
     150: aload         12
     152: astore_3
     153: aload         13
     155: astore        4
     157: iload         14
     159: istore        5
     161: goto          3
     164: aload         7
     166: checkcast     #131                // class java/lang/Iterable
     169: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     174: astore        10
     176: aload         10
     178: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     183: ifne          194
     186: new           #375                // class java/util/NoSuchElementException
     189: dup
     190: invokespecial #376                // Method java/util/NoSuchElementException."<init>":()V
     193: athrow
     194: aload         10
     196: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     201: checkcast     #180                // class kotlin/Pair
     204: astore        11
     206: iconst_0
     207: istore        12
     209: getstatic     #286                // Field INSTANCE:LDay23;
     212: aload_2
     213: aload         11
     215: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     218: checkcast     #46                 // class Day17$Coordinate
     221: aload_3
     222: aload         4
     224: iload         5
     226: iconst_1
     227: iadd
     228: invokespecial #57                 // Method maxSteps:(LDay17$Coordinate;LDay17$Coordinate;LDay17$Coordinate;Ljava/util/List;I)I
     231: istore        11
     233: aload         10
     235: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     240: ifeq          296
     243: aload         10
     245: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     250: checkcast     #180                // class kotlin/Pair
     253: astore        12
     255: iconst_0
     256: istore        13
     258: getstatic     #286                // Field INSTANCE:LDay23;
     261: aload_2
     262: aload         12
     264: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     267: checkcast     #46                 // class Day17$Coordinate
     270: aload_3
     271: aload         4
     273: iload         5
     275: iconst_1
     276: iadd
     277: invokespecial #57                 // Method maxSteps:(LDay17$Coordinate;LDay17$Coordinate;LDay17$Coordinate;Ljava/util/List;I)I
     280: istore        12
     282: iload         11
     284: iload         12
     286: if_icmpge     233
     289: iload         12
     291: istore        11
     293: goto          233
     296: iload         11
     298: ireturn

  public final java.lang.String part2(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #16                 // String input
       3: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: iconst_0
       8: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      13: checkcast     #30                 // class java/lang/CharSequence
      16: ldc           #32                 // String .
      18: iconst_0
      19: iconst_0
      20: bipush        6
      22: aconst_null
      23: invokestatic  #38                 // Method kotlin/text/StringsKt.indexOf$default:(Ljava/lang/CharSequence;Ljava/lang/String;IZILjava/lang/Object;)I
      26: istore_2
      27: aload_1
      28: invokestatic  #44                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      31: checkcast     #30                 // class java/lang/CharSequence
      34: ldc           #32                 // String .
      36: iconst_0
      37: iconst_0
      38: bipush        6
      40: aconst_null
      41: invokestatic  #38                 // Method kotlin/text/StringsKt.indexOf$default:(Ljava/lang/CharSequence;Ljava/lang/String;IZILjava/lang/Object;)I
      44: istore_3
      45: new           #46                 // class Day17$Coordinate
      48: dup
      49: iload_2
      50: iconst_0
      51: invokespecial #49                 // Method Day17$Coordinate."<init>":(II)V
      54: astore        4
      56: new           #46                 // class Day17$Coordinate
      59: dup
      60: iload_3
      61: aload_1
      62: invokeinterface #53,  1           // InterfaceMethod java/util/List.size:()I
      67: iconst_1
      68: isub
      69: invokespecial #49                 // Method Day17$Coordinate."<init>":(II)V
      72: astore        5
      74: aload_0
      75: aload         4
      77: aload         5
      79: aload_1
      80: iconst_0
      81: invokespecial #388                // Method buildSegments:(LDay17$Coordinate;LDay17$Coordinate;Ljava/util/List;I)Ljava/util/Set;
      84: astore        6
      86: aload         6
      88: checkcast     #131                // class java/lang/Iterable
      91: astore        9
      93: aload         9
      95: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     100: astore        10
     102: aload         10
     104: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     109: ifeq          149
     112: aload         10
     114: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     119: astore        11
     121: aload         11
     123: checkcast     #119                // class Day23$Segment
     126: astore        12
     128: iconst_0
     129: istore        13
     131: aload         12
     133: invokevirtual #172                // Method Day23$Segment.getStart:()LDay17$Coordinate;
     136: aload         4
     138: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     141: ifeq          102
     144: aload         11
     146: goto          150
     149: aconst_null
     150: checkcast     #119                // class Day23$Segment
     153: astore        7
     155: aload_0
     156: aload         7
     158: dup
     159: invokestatic  #289                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     162: aload         6
     164: checkcast     #131                // class java/lang/Iterable
     167: astore        8
     169: astore        15
     171: astore        14
     173: aload         8
     175: astore        9
     177: aload         9
     179: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     184: astore        10
     186: aload         10
     188: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     193: ifeq          233
     196: aload         10
     198: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     203: astore        11
     205: aload         11
     207: checkcast     #119                // class Day23$Segment
     210: astore        12
     212: iconst_0
     213: istore        13
     215: aload         12
     217: invokevirtual #192                // Method Day23$Segment.getEnd:()LDay17$Coordinate;
     220: aload         5
     222: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     225: ifeq          186
     228: aload         11
     230: goto          234
     233: aconst_null
     234: astore        16
     236: aload         14
     238: aload         15
     240: aload         16
     242: dup
     243: invokestatic  #289                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     246: checkcast     #119                // class Day23$Segment
     249: aload         6
     251: aload_1
     252: invokespecial #390                // Method maxStepsExpanded:(LDay23$Segment;LDay23$Segment;Ljava/util/Set;Ljava/util/List;)I
     255: invokestatic  #63                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
     258: areturn

  private final java.util.Set<Day23$Segment> buildSegments(Day17$Coordinate, Day17$Coordinate, java.util.List<java.lang.String>, int);
    Code:
       0: new           #395                // class java/util/ArrayDeque
       3: dup
       4: invokespecial #396                // Method java/util/ArrayDeque."<init>":()V
       7: astore        5
       9: aload         5
      11: new           #398                // class Day23$SegmentBuildingInformation
      14: dup
      15: aload_1
      16: aload_1
      17: iload         4
      19: new           #119                // class Day23$Segment
      22: dup
      23: iload         4
      25: aload_1
      26: aload_1
      27: invokespecial #401                // Method Day23$Segment."<init>":(ILDay17$Coordinate;LDay17$Coordinate;)V
      30: invokespecial #404                // Method Day23$SegmentBuildingInformation."<init>":(LDay17$Coordinate;LDay17$Coordinate;ILDay23$Segment;)V
      33: invokevirtual #405                // Method java/util/ArrayDeque.add:(Ljava/lang/Object;)Z
      36: pop
      37: new           #407                // class java/util/LinkedHashSet
      40: dup
      41: invokespecial #408                // Method java/util/LinkedHashSet."<init>":()V
      44: checkcast     #280                // class java/util/Set
      47: astore        6
      49: aload         5
      51: checkcast     #201                // class java/util/Collection
      54: invokeinterface #223,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      59: ifne          66
      62: iconst_1
      63: goto          67
      66: iconst_0
      67: ifeq          614
      70: aload         5
      72: invokevirtual #409                // Method java/util/ArrayDeque.poll:()Ljava/lang/Object;
      75: checkcast     #398                // class Day23$SegmentBuildingInformation
      78: astore        7
      80: aload         7
      82: invokevirtual #412                // Method Day23$SegmentBuildingInformation.getCoordinate:()LDay17$Coordinate;
      85: astore        8
      87: aload         7
      89: invokevirtual #415                // Method Day23$SegmentBuildingInformation.getPreviousCoordinate:()LDay17$Coordinate;
      92: astore        9
      94: aload         7
      96: invokevirtual #416                // Method Day23$SegmentBuildingInformation.getSteps:()I
      99: istore        10
     101: aload         7
     103: invokevirtual #419                // Method Day23$SegmentBuildingInformation.getRunningSegment:()LDay23$Segment;
     106: astore        11
     108: aload         8
     110: aload_2
     111: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     114: ifeq          152
     117: aload         11
     119: iload         10
     121: aconst_null
     122: aload_2
     123: iconst_2
     124: aconst_null
     125: invokestatic  #423                // Method Day23$Segment.copy$default:(LDay23$Segment;ILDay17$Coordinate;LDay17$Coordinate;ILjava/lang/Object;)LDay23$Segment;
     128: astore        12
     130: aload         6
     132: aload         12
     134: invokeinterface #283,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     139: ifne          152
     142: aload         6
     144: aload         12
     146: invokeinterface #424,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     151: pop
     152: aload_0
     153: aload         9
     155: aload         8
     157: aload_3
     158: invokevirtual #367                // Method getNeighborsDirectionally:(LDay17$Coordinate;LDay17$Coordinate;Ljava/util/List;)Ljava/util/List;
     161: astore        12
     163: aload         12
     165: checkcast     #131                // class java/lang/Iterable
     168: astore        15
     170: aload         15
     172: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     177: astore        16
     179: aload         16
     181: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     186: ifeq          237
     189: aload         16
     191: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     196: astore        17
     198: aload         17
     200: checkcast     #180                // class kotlin/Pair
     203: astore        18
     205: iconst_0
     206: istore        19
     208: aload         18
     210: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     213: checkcast     #369                // class java/lang/Character
     216: invokevirtual #373                // Method java/lang/Character.charValue:()C
     219: bipush        46
     221: if_icmpne     228
     224: iconst_1
     225: goto          229
     228: iconst_0
     229: ifeq          179
     232: aload         17
     234: goto          238
     237: aconst_null
     238: checkcast     #180                // class kotlin/Pair
     241: astore        13
     243: aload         13
     245: ifnull        396
     248: aload_3
     249: aload         8
     251: invokevirtual #427                // Method Day17$Coordinate.getY:()I
     254: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     259: checkcast     #59                 // class java/lang/String
     262: aload         8
     264: invokevirtual #430                // Method Day17$Coordinate.getX:()I
     267: invokevirtual #434                // Method java/lang/String.charAt:(I)C
     270: istore        14
     272: iload         14
     274: bipush        46
     276: if_icmpeq     365
     279: aload         11
     281: iload         10
     283: aconst_null
     284: aload         8
     286: iconst_2
     287: aconst_null
     288: invokestatic  #423                // Method Day23$Segment.copy$default:(LDay23$Segment;ILDay17$Coordinate;LDay17$Coordinate;ILjava/lang/Object;)LDay23$Segment;
     291: astore        15
     293: aload         6
     295: aload         15
     297: invokeinterface #283,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     302: ifne          315
     305: aload         6
     307: aload         15
     309: invokeinterface #424,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     314: pop
     315: aload         5
     317: new           #398                // class Day23$SegmentBuildingInformation
     320: dup
     321: aload         13
     323: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     326: checkcast     #46                 // class Day17$Coordinate
     329: aload         8
     331: iconst_1
     332: new           #119                // class Day23$Segment
     335: dup
     336: iconst_1
     337: aload         13
     339: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     342: checkcast     #46                 // class Day17$Coordinate
     345: aload         13
     347: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     350: checkcast     #46                 // class Day17$Coordinate
     353: invokespecial #401                // Method Day23$Segment."<init>":(ILDay17$Coordinate;LDay17$Coordinate;)V
     356: invokespecial #404                // Method Day23$SegmentBuildingInformation."<init>":(LDay17$Coordinate;LDay17$Coordinate;ILDay23$Segment;)V
     359: invokevirtual #437                // Method java/util/ArrayDeque.addFirst:(Ljava/lang/Object;)V
     362: goto          49
     365: aload         5
     367: new           #398                // class Day23$SegmentBuildingInformation
     370: dup
     371: aload         13
     373: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     376: checkcast     #46                 // class Day17$Coordinate
     379: aload         8
     381: iload         10
     383: iconst_1
     384: iadd
     385: aload         11
     387: invokespecial #404                // Method Day23$SegmentBuildingInformation."<init>":(LDay17$Coordinate;LDay17$Coordinate;ILDay23$Segment;)V
     390: invokevirtual #437                // Method java/util/ArrayDeque.addFirst:(Ljava/lang/Object;)V
     393: goto          49
     396: aload         11
     398: iload         10
     400: aconst_null
     401: aload         8
     403: iconst_2
     404: aconst_null
     405: invokestatic  #423                // Method Day23$Segment.copy$default:(LDay23$Segment;ILDay17$Coordinate;LDay17$Coordinate;ILjava/lang/Object;)LDay23$Segment;
     408: astore        14
     410: aload         6
     412: aload         14
     414: invokeinterface #283,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     419: ifne          432
     422: aload         6
     424: aload         14
     426: invokeinterface #424,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     431: pop
     432: aload         12
     434: checkcast     #131                // class java/lang/Iterable
     437: astore        16
     439: iconst_0
     440: istore        17
     442: aload         16
     444: astore        18
     446: new           #198                // class java/util/ArrayList
     449: dup
     450: aload         16
     452: bipush        10
     454: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     457: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
     460: checkcast     #201                // class java/util/Collection
     463: astore        19
     465: iconst_0
     466: istore        20
     468: aload         18
     470: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     475: astore        21
     477: aload         21
     479: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     484: ifeq          565
     487: aload         21
     489: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     494: astore        22
     496: aload         19
     498: aload         22
     500: checkcast     #180                // class kotlin/Pair
     503: astore        23
     505: astore        25
     507: iconst_0
     508: istore        24
     510: new           #398                // class Day23$SegmentBuildingInformation
     513: dup
     514: aload         23
     516: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     519: checkcast     #46                 // class Day17$Coordinate
     522: aload         8
     524: iconst_1
     525: new           #119                // class Day23$Segment
     528: dup
     529: iconst_1
     530: aload         23
     532: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     535: checkcast     #46                 // class Day17$Coordinate
     538: aload         23
     540: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     543: checkcast     #46                 // class Day17$Coordinate
     546: invokespecial #401                // Method Day23$Segment."<init>":(ILDay17$Coordinate;LDay17$Coordinate;)V
     549: invokespecial #404                // Method Day23$SegmentBuildingInformation."<init>":(LDay17$Coordinate;LDay17$Coordinate;ILDay23$Segment;)V
     552: nop
     553: aload         25
     555: swap
     556: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     561: pop
     562: goto          477
     565: aload         19
     567: checkcast     #24                 // class java/util/List
     570: nop
     571: astore        15
     573: aload         15
     575: invokeinterface #438,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     580: astore        16
     582: aload         16
     584: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     589: ifeq          49
     592: aload         16
     594: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     599: checkcast     #398                // class Day23$SegmentBuildingInformation
     602: astore        17
     604: aload         5
     606: aload         17
     608: invokevirtual #437                // Method java/util/ArrayDeque.addFirst:(Ljava/lang/Object;)V
     611: goto          582
     614: aload         6
     616: areturn

  public final java.util.List<kotlin.Pair<Day17$Coordinate, java.lang.Character>> getNeighborsDirectionally(Day17$Coordinate, Day17$Coordinate, java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc_w         #452                // String previousCoordinate
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_2
       8: ldc_w         #453                // String currentCoordinate
      11: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      14: aload_3
      15: ldc           #16                 // String input
      17: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      20: aload_2
      21: aload_2
      22: invokevirtual #430                // Method Day17$Coordinate.getX:()I
      25: iconst_1
      26: isub
      27: iconst_0
      28: iconst_2
      29: aconst_null
      30: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      33: astore        4
      35: aload_2
      36: aload_2
      37: invokevirtual #430                // Method Day17$Coordinate.getX:()I
      40: iconst_1
      41: iadd
      42: iconst_0
      43: iconst_2
      44: aconst_null
      45: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      48: astore        5
      50: aload_2
      51: iconst_0
      52: aload_2
      53: invokevirtual #427                // Method Day17$Coordinate.getY:()I
      56: iconst_1
      57: isub
      58: iconst_1
      59: aconst_null
      60: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      63: astore        6
      65: aload_2
      66: iconst_0
      67: aload_2
      68: invokevirtual #427                // Method Day17$Coordinate.getY:()I
      71: iconst_1
      72: iadd
      73: iconst_1
      74: aconst_null
      75: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      78: astore        7
      80: aload_0
      81: aload_2
      82: aload_3
      83: invokevirtual #196                // Method getNeighbors:(LDay17$Coordinate;Ljava/util/List;)Ljava/util/List;
      86: checkcast     #131                // class java/lang/Iterable
      89: astore        9
      91: nop
      92: iconst_0
      93: istore        10
      95: aload         9
      97: astore        11
      99: new           #198                // class java/util/ArrayList
     102: dup
     103: invokespecial #203                // Method java/util/ArrayList."<init>":()V
     106: checkcast     #201                // class java/util/Collection
     109: astore        12
     111: iconst_0
     112: istore        13
     114: aload         11
     116: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     121: astore        14
     123: aload         14
     125: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     130: ifeq          185
     133: aload         14
     135: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     140: astore        15
     142: aload         15
     144: checkcast     #180                // class kotlin/Pair
     147: astore        16
     149: iconst_0
     150: istore        17
     152: aload         16
     154: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     157: aload_1
     158: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     161: ifne          168
     164: iconst_1
     165: goto          169
     168: iconst_0
     169: ifeq          123
     172: aload         12
     174: aload         15
     176: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     181: pop
     182: goto          123
     185: aload         12
     187: checkcast     #24                 // class java/util/List
     190: nop
     191: checkcast     #131                // class java/lang/Iterable
     194: astore        9
     196: nop
     197: iconst_0
     198: istore        10
     200: aload         9
     202: astore        11
     204: new           #198                // class java/util/ArrayList
     207: dup
     208: invokespecial #203                // Method java/util/ArrayList."<init>":()V
     211: checkcast     #201                // class java/util/Collection
     214: astore        12
     216: iconst_0
     217: istore        13
     219: aload         11
     221: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     226: astore        14
     228: aload         14
     230: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     235: ifeq          433
     238: aload         14
     240: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     245: astore        15
     247: aload         15
     249: checkcast     #180                // class kotlin/Pair
     252: astore        16
     254: iconst_0
     255: istore        17
     257: aload         16
     259: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     262: aload         4
     264: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     267: ifeq          294
     270: aload         16
     272: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     275: checkcast     #369                // class java/lang/Character
     278: invokevirtual #373                // Method java/lang/Character.charValue:()C
     281: bipush        62
     283: if_icmpeq     290
     286: iconst_1
     287: goto          416
     290: iconst_0
     291: goto          416
     294: aload         16
     296: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     299: aload         5
     301: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     304: ifeq          331
     307: aload         16
     309: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     312: checkcast     #369                // class java/lang/Character
     315: invokevirtual #373                // Method java/lang/Character.charValue:()C
     318: bipush        60
     320: if_icmpeq     327
     323: iconst_1
     324: goto          416
     327: iconst_0
     328: goto          416
     331: aload         16
     333: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     336: aload         6
     338: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     341: ifeq          368
     344: aload         16
     346: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     349: checkcast     #369                // class java/lang/Character
     352: invokevirtual #373                // Method java/lang/Character.charValue:()C
     355: bipush        118
     357: if_icmpeq     364
     360: iconst_1
     361: goto          416
     364: iconst_0
     365: goto          416
     368: aload         16
     370: invokevirtual #183                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     373: aload         7
     375: invokestatic  #273                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     378: ifeq          405
     381: aload         16
     383: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     386: checkcast     #369                // class java/lang/Character
     389: invokevirtual #373                // Method java/lang/Character.charValue:()C
     392: bipush        94
     394: if_icmpeq     401
     397: iconst_1
     398: goto          416
     401: iconst_0
     402: goto          416
     405: new           #458                // class java/lang/Exception
     408: dup
     409: ldc_w         #460                // String Unknown direction
     412: invokespecial #463                // Method java/lang/Exception."<init>":(Ljava/lang/String;)V
     415: athrow
     416: nop
     417: ifeq          228
     420: aload         12
     422: aload         15
     424: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     429: pop
     430: goto          228
     433: aload         12
     435: checkcast     #24                 // class java/util/List
     438: nop
     439: astore        8
     441: aload         8
     443: areturn

  public final java.util.List<kotlin.Pair<Day17$Coordinate, java.lang.Character>> getNeighbors(Day17$Coordinate, java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc_w         #453                // String currentCoordinate
       4: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_2
       8: ldc           #16                 // String input
      10: invokestatic  #22                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      13: aload_1
      14: aload_1
      15: invokevirtual #430                // Method Day17$Coordinate.getX:()I
      18: iconst_1
      19: isub
      20: iconst_0
      21: iconst_2
      22: aconst_null
      23: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      26: astore_3
      27: aload_1
      28: aload_1
      29: invokevirtual #430                // Method Day17$Coordinate.getX:()I
      32: iconst_1
      33: iadd
      34: iconst_0
      35: iconst_2
      36: aconst_null
      37: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      40: astore        4
      42: aload_1
      43: iconst_0
      44: aload_1
      45: invokevirtual #427                // Method Day17$Coordinate.getY:()I
      48: iconst_1
      49: isub
      50: iconst_1
      51: aconst_null
      52: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      55: astore        5
      57: aload_1
      58: iconst_0
      59: aload_1
      60: invokevirtual #427                // Method Day17$Coordinate.getY:()I
      63: iconst_1
      64: iadd
      65: iconst_1
      66: aconst_null
      67: invokestatic  #456                // Method Day17$Coordinate.copy$default:(LDay17$Coordinate;IIILjava/lang/Object;)LDay17$Coordinate;
      70: astore        6
      72: iconst_4
      73: anewarray     #46                 // class Day17$Coordinate
      76: astore        8
      78: aload         8
      80: iconst_0
      81: aload_3
      82: aastore
      83: aload         8
      85: iconst_1
      86: aload         4
      88: aastore
      89: aload         8
      91: iconst_2
      92: aload         5
      94: aastore
      95: aload         8
      97: iconst_3
      98: aload         6
     100: aastore
     101: aload         8
     103: invokestatic  #474                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     106: checkcast     #131                // class java/lang/Iterable
     109: astore        8
     111: nop
     112: iconst_0
     113: istore        9
     115: aload         8
     117: astore        10
     119: new           #198                // class java/util/ArrayList
     122: dup
     123: invokespecial #203                // Method java/util/ArrayList."<init>":()V
     126: checkcast     #201                // class java/util/Collection
     129: astore        11
     131: iconst_0
     132: istore        12
     134: aload         10
     136: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     141: astore        13
     143: aload         13
     145: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     150: ifeq          244
     153: aload         13
     155: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     160: astore        14
     162: aload         14
     164: checkcast     #46                 // class Day17$Coordinate
     167: astore        15
     169: iconst_0
     170: istore        16
     172: aload         15
     174: invokevirtual #430                // Method Day17$Coordinate.getX:()I
     177: iflt          227
     180: aload         15
     182: invokevirtual #430                // Method Day17$Coordinate.getX:()I
     185: aload_2
     186: iconst_0
     187: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     192: checkcast     #59                 // class java/lang/String
     195: invokevirtual #476                // Method java/lang/String.length:()I
     198: if_icmpge     227
     201: aload         15
     203: invokevirtual #427                // Method Day17$Coordinate.getY:()I
     206: iflt          227
     209: aload         15
     211: invokevirtual #427                // Method Day17$Coordinate.getY:()I
     214: aload_2
     215: invokeinterface #53,  1           // InterfaceMethod java/util/List.size:()I
     220: if_icmpge     227
     223: iconst_1
     224: goto          228
     227: iconst_0
     228: ifeq          143
     231: aload         11
     233: aload         14
     235: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     240: pop
     241: goto          143
     244: aload         11
     246: checkcast     #24                 // class java/util/List
     249: nop
     250: checkcast     #131                // class java/lang/Iterable
     253: astore        8
     255: nop
     256: iconst_0
     257: istore        9
     259: aload         8
     261: astore        10
     263: new           #198                // class java/util/ArrayList
     266: dup
     267: aload         8
     269: bipush        10
     271: invokestatic  #135                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     274: invokespecial #199                // Method java/util/ArrayList."<init>":(I)V
     277: checkcast     #201                // class java/util/Collection
     280: astore        11
     282: iconst_0
     283: istore        12
     285: aload         10
     287: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     292: astore        13
     294: aload         13
     296: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     301: ifeq          369
     304: aload         13
     306: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     311: astore        14
     313: aload         11
     315: aload         14
     317: checkcast     #46                 // class Day17$Coordinate
     320: astore        15
     322: astore        17
     324: iconst_0
     325: istore        16
     327: aload         15
     329: aload_2
     330: aload         15
     332: invokevirtual #427                // Method Day17$Coordinate.getY:()I
     335: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     340: checkcast     #59                 // class java/lang/String
     343: aload         15
     345: invokevirtual #430                // Method Day17$Coordinate.getX:()I
     348: invokevirtual #434                // Method java/lang/String.charAt:(I)C
     351: invokestatic  #479                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     354: invokestatic  #178                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     357: aload         17
     359: swap
     360: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     365: pop
     366: goto          294
     369: aload         11
     371: checkcast     #24                 // class java/util/List
     374: nop
     375: checkcast     #131                // class java/lang/Iterable
     378: astore        8
     380: nop
     381: iconst_0
     382: istore        9
     384: aload         8
     386: astore        10
     388: new           #198                // class java/util/ArrayList
     391: dup
     392: invokespecial #203                // Method java/util/ArrayList."<init>":()V
     395: checkcast     #201                // class java/util/Collection
     398: astore        11
     400: iconst_0
     401: istore        12
     403: aload         10
     405: invokeinterface #158,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     410: astore        13
     412: aload         13
     414: invokeinterface #164,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     419: ifeq          478
     422: aload         13
     424: invokeinterface #168,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     429: astore        14
     431: aload         14
     433: checkcast     #180                // class kotlin/Pair
     436: astore        15
     438: iconst_0
     439: istore        16
     441: aload         15
     443: invokevirtual #186                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     446: checkcast     #369                // class java/lang/Character
     449: invokevirtual #373                // Method java/lang/Character.charValue:()C
     452: bipush        35
     454: if_icmpeq     461
     457: iconst_1
     458: goto          462
     461: iconst_0
     462: ifeq          412
     465: aload         11
     467: aload         14
     469: invokeinterface #202,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     474: pop
     475: goto          412
     478: aload         11
     480: checkcast     #24                 // class java/util/List
     483: nop
     484: astore        7
     486: aload         7
     488: areturn

  private static final int maxStepsExpanded$lambda$0(Day23$StepInformation, Day23$StepInformation);
    Code:
       0: aload_0
       1: invokevirtual #265                // Method Day23$StepInformation.getSteps:()I
       4: aload_1
       5: invokevirtual #265                // Method Day23$StepInformation.getSteps:()I
       8: invokestatic  #484                // Method kotlin/jvm/internal/Intrinsics.compare:(II)I
      11: ineg
      12: ireturn

  private static final int maxStepsExpanded$lambda$1(kotlin.jvm.functions.Function2, java.lang.Object, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: aload_2
       3: invokeinterface #490,  3          // InterfaceMethod kotlin/jvm/functions/Function2.invoke:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
       8: checkcast     #492                // class java/lang/Number
      11: invokevirtual #495                // Method java/lang/Number.intValue:()I
      14: ireturn

  static {};
    Code:
       0: new           #2                  // class Day23
       3: dup
       4: invokespecial #501                // Method "<init>":()V
       7: putstatic     #286                // Field INSTANCE:LDay23;
      10: return
}

Compiled from "Day23.kt"
public final class Day23$SegmentBuildingInformation {
  private final Day17$Coordinate coordinate;

  private final Day17$Coordinate previousCoordinate;

  private final int steps;

  private final Day23$Segment runningSegment;

  public Day23$SegmentBuildingInformation(Day17$Coordinate, Day17$Coordinate, int, Day23$Segment);
    Code:
       0: aload_1
       1: ldc           #9                  // String coordinate
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String previousCoordinate
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload         4
      14: ldc           #19                 // String runningSegment
      16: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      19: aload_0
      20: invokespecial #22                 // Method java/lang/Object."<init>":()V
      23: aload_0
      24: aload_1
      25: putfield      #25                 // Field coordinate:LDay17$Coordinate;
      28: aload_0
      29: aload_2
      30: putfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
      33: aload_0
      34: iload_3
      35: putfield      #31                 // Field steps:I
      38: aload_0
      39: aload         4
      41: putfield      #34                 // Field runningSegment:LDay23$Segment;
      44: return

  public final Day17$Coordinate getCoordinate();
    Code:
       0: aload_0
       1: getfield      #25                 // Field coordinate:LDay17$Coordinate;
       4: areturn

  public final Day17$Coordinate getPreviousCoordinate();
    Code:
       0: aload_0
       1: getfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
       4: areturn

  public final int getSteps();
    Code:
       0: aload_0
       1: getfield      #31                 // Field steps:I
       4: ireturn

  public final Day23$Segment getRunningSegment();
    Code:
       0: aload_0
       1: getfield      #34                 // Field runningSegment:LDay23$Segment;
       4: areturn

  public final Day17$Coordinate component1();
    Code:
       0: aload_0
       1: getfield      #25                 // Field coordinate:LDay17$Coordinate;
       4: areturn

  public final Day17$Coordinate component2();
    Code:
       0: aload_0
       1: getfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
       4: areturn

  public final int component3();
    Code:
       0: aload_0
       1: getfield      #31                 // Field steps:I
       4: ireturn

  public final Day23$Segment component4();
    Code:
       0: aload_0
       1: getfield      #34                 // Field runningSegment:LDay23$Segment;
       4: areturn

  public final Day23$SegmentBuildingInformation copy(Day17$Coordinate, Day17$Coordinate, int, Day23$Segment);
    Code:
       0: aload_1
       1: ldc           #9                  // String coordinate
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String previousCoordinate
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload         4
      14: ldc           #19                 // String runningSegment
      16: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      19: new           #2                  // class Day23$SegmentBuildingInformation
      22: dup
      23: aload_1
      24: aload_2
      25: iload_3
      26: aload         4
      28: invokespecial #51                 // Method "<init>":(LDay17$Coordinate;LDay17$Coordinate;ILDay23$Segment;)V
      31: areturn

  public static Day23$SegmentBuildingInformation copy$default(Day23$SegmentBuildingInformation, Day17$Coordinate, Day17$Coordinate, int, Day23$Segment, int, java.lang.Object);
    Code:
       0: iload         5
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #25                 // Field coordinate:LDay17$Coordinate;
      11: astore_1
      12: iload         5
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
      23: astore_2
      24: iload         5
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #31                 // Field steps:I
      35: istore_3
      36: iload         5
      38: bipush        8
      40: iand
      41: ifeq          50
      44: aload_0
      45: getfield      #34                 // Field runningSegment:LDay23$Segment;
      48: astore        4
      50: aload_0
      51: aload_1
      52: aload_2
      53: iload_3
      54: aload         4
      56: invokevirtual #55                 // Method copy:(LDay17$Coordinate;LDay17$Coordinate;ILDay23$Segment;)LDay23$SegmentBuildingInformation;
      59: areturn

  public java.lang.String toString();
    Code:
       0: new           #59                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #60                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #62                 // String SegmentBuildingInformation(coordinate=
       9: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #25                 // Field coordinate:LDay17$Coordinate;
      16: invokevirtual #69                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #71                 // String , previousCoordinate=
      21: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
      28: invokevirtual #69                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: ldc           #73                 // String , steps=
      33: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #31                 // Field steps:I
      40: invokevirtual #76                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: ldc           #78                 // String , runningSegment=
      45: invokevirtual #66                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      48: aload_0
      49: getfield      #34                 // Field runningSegment:LDay23$Segment;
      52: invokevirtual #69                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      55: bipush        41
      57: invokevirtual #81                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      60: invokevirtual #83                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      63: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #25                 // Field coordinate:LDay17$Coordinate;
       4: invokevirtual #88                 // Method Day17$Coordinate.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
      16: invokevirtual #88                 // Method Day17$Coordinate.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #31                 // Field steps:I
      29: invokestatic  #93                 // Method java/lang/Integer.hashCode:(I)I
      32: iadd
      33: istore_1
      34: iload_1
      35: bipush        31
      37: imul
      38: aload_0
      39: getfield      #34                 // Field runningSegment:LDay23$Segment;
      42: invokevirtual #96                 // Method Day23$Segment.hashCode:()I
      45: iadd
      46: istore_1
      47: iload_1
      48: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class Day23$SegmentBuildingInformation
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day23$SegmentBuildingInformation
      20: astore_2
      21: aload_0
      22: getfield      #25                 // Field coordinate:LDay17$Coordinate;
      25: aload_2
      26: getfield      #25                 // Field coordinate:LDay17$Coordinate;
      29: invokestatic  #104                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      32: ifne          37
      35: iconst_0
      36: ireturn
      37: aload_0
      38: getfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
      41: aload_2
      42: getfield      #27                 // Field previousCoordinate:LDay17$Coordinate;
      45: invokestatic  #104                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: aload_0
      54: getfield      #31                 // Field steps:I
      57: aload_2
      58: getfield      #31                 // Field steps:I
      61: if_icmpeq     66
      64: iconst_0
      65: ireturn
      66: aload_0
      67: getfield      #34                 // Field runningSegment:LDay23$Segment;
      70: aload_2
      71: getfield      #34                 // Field runningSegment:LDay23$Segment;
      74: invokestatic  #104                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      77: ifne          82
      80: iconst_0
      81: ireturn
      82: iconst_1
      83: ireturn
}