fun main() {
    val d = Day24(readInput("inputs/Day24"))
    println(d.part1())
    println(d.part2())
}

class Day24(input: List<String>) {

    private val initialMapState: MapState = MapState.of(input)
    private val start: Point = Point(input.first().indexOfFirst { it == '.' }, 0)
    private val goal: Point = Point(input.last().indexOfFirst { it == '.' }, input.lastIndex)

    fun part1(): Int =
        solve().first

    fun part2(): Int {
        val toGoal = solve()
        val backToStart = solve(goal, start, toGoal.second, toGoal.first)
        val backToGoal = solve(start, goal, backToStart.second, backToStart.first)
        return backToGoal.first
    }

    private fun solve(
        startPlace: Point = start,
        stopPlace: Point = goal,
        startState: MapState = initialMapState,
        stepsSoFar: Int = 0
    ): Pair<Int, MapState> {
        val mapStates = mutableMapOf(stepsSoFar to startState)
        val queue = mutableListOf(PathAttempt(stepsSoFar, startPlace))
        val seen = mutableSetOf<PathAttempt>()

        while (queue.isNotEmpty()) {
            val thisAttempt = queue.removeFirst()
            if (thisAttempt !in seen) {
                seen += thisAttempt
                val nextMapState = mapStates.computeIfAbsent(thisAttempt.steps + 1) { key ->
                    mapStates.getValue(key - 1).nextState()
                }

                if (nextMapState.isOpen(thisAttempt.location)) queue.add(thisAttempt.next())
                val neighbors = thisAttempt.location.adjacents()
                if (stopPlace in neighbors) return Pair(thisAttempt.steps + 1, nextMapState)

                neighbors
                    .filter { it == start || (nextMapState.inBounds(it) && nextMapState.isOpen(it)) }
                    .forEach { neighbor ->
                        queue.add(thisAttempt.next(neighbor))
                    }
            }
        }

        throw IllegalStateException("No paths found")
    }

    private data class PathAttempt(val steps: Int, val location: Point) {
        fun next(place: Point = location): PathAttempt =
            PathAttempt(steps + 1, place)
    }

    private data class MapState(val boundary: Point, val blizzards: Set<Blizzard>) {
        private val unsafeSpots = blizzards.map { it.location }.toSet()

        fun isOpen(place: Point): Boolean =
            place !in unsafeSpots

        fun inBounds(place: Point): Boolean =
            place.x > 0 && place.y > 0 && place.x <= boundary.x && place.y <= boundary.y

        fun nextState(): MapState =
            copy(blizzards = blizzards.map { it.next(boundary) }.toSet())

        companion object {
            fun of(input: List<String>): MapState =
                MapState(
                    Point(input.first().lastIndex - 1, input.lastIndex - 1),
                    input.flatMapIndexed { y, row ->
                        row.mapIndexedNotNull { x, char ->
                            when (char) {
                                '>' -> Blizzard(Point(x, y), Point(1, 0))
                                '<' -> Blizzard(Point(x, y), Point(-1, 0))
                                'v' -> Blizzard(Point(x, y), Point(0, 1))
                                '^' -> Blizzard(Point(x, y), Point(0, -1))
                                else -> null
                            }
                        }
                    }.toSet()
                )
        }
    }

    private data class Blizzard(val location: Point, val offset: Point) {
        fun next(boundary: Point): Blizzard {
            var nextLocation = location + offset
            when {
                nextLocation.x == 0 -> nextLocation = Point(boundary.x, location.y)
                nextLocation.x > boundary.x -> nextLocation = Point(1, location.y)
                nextLocation.y == 0 -> nextLocation = Point(location.x, boundary.y)
                nextLocation.y > boundary.y -> nextLocation = Point(location.x, 1)
            }
            return copy(location = nextLocation)
        }
    }
}

Compiled from "Day24.kt"
final class Day24$Blizzard {
  private final Point location;

  private final Point offset;

  public Day24$Blizzard(Point, Point);
    Code:
       0: aload_1
       1: ldc           #9                  // String location
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String offset
       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: aload_1
      18: putfield      #23                 // Field location:LPoint;
      21: aload_0
      22: aload_2
      23: putfield      #25                 // Field offset:LPoint;
      26: return

  public final Point getLocation();
    Code:
       0: aload_0
       1: getfield      #23                 // Field location:LPoint;
       4: areturn

  public final Point getOffset();
    Code:
       0: aload_0
       1: getfield      #25                 // Field offset:LPoint;
       4: areturn

  public final Day24$Blizzard next(Point);
    Code:
       0: aload_1
       1: ldc           #34                 // String boundary
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #23                 // Field location:LPoint;
      10: aload_0
      11: getfield      #25                 // Field offset:LPoint;
      14: invokevirtual #40                 // Method Point.plus:(LPoint;)LPoint;
      17: astore_2
      18: nop
      19: aload_2
      20: invokevirtual #44                 // Method Point.getX:()I
      23: ifne          48
      26: new           #36                 // class Point
      29: dup
      30: aload_1
      31: invokevirtual #44                 // Method Point.getX:()I
      34: aload_0
      35: getfield      #23                 // Field location:LPoint;
      38: invokevirtual #47                 // Method Point.getY:()I
      41: invokespecial #50                 // Method Point."<init>":(II)V
      44: astore_2
      45: goto          134
      48: aload_2
      49: invokevirtual #44                 // Method Point.getX:()I
      52: aload_1
      53: invokevirtual #44                 // Method Point.getX:()I
      56: if_icmple     78
      59: new           #36                 // class Point
      62: dup
      63: iconst_1
      64: aload_0
      65: getfield      #23                 // Field location:LPoint;
      68: invokevirtual #47                 // Method Point.getY:()I
      71: invokespecial #50                 // Method Point."<init>":(II)V
      74: astore_2
      75: goto          134
      78: aload_2
      79: invokevirtual #47                 // Method Point.getY:()I
      82: ifne          107
      85: new           #36                 // class Point
      88: dup
      89: aload_0
      90: getfield      #23                 // Field location:LPoint;
      93: invokevirtual #44                 // Method Point.getX:()I
      96: aload_1
      97: invokevirtual #47                 // Method Point.getY:()I
     100: invokespecial #50                 // Method Point."<init>":(II)V
     103: astore_2
     104: goto          134
     107: aload_2
     108: invokevirtual #47                 // Method Point.getY:()I
     111: aload_1
     112: invokevirtual #47                 // Method Point.getY:()I
     115: if_icmple     134
     118: new           #36                 // class Point
     121: dup
     122: aload_0
     123: getfield      #23                 // Field location:LPoint;
     126: invokevirtual #44                 // Method Point.getX:()I
     129: iconst_1
     130: invokespecial #50                 // Method Point."<init>":(II)V
     133: astore_2
     134: aload_0
     135: aload_2
     136: aconst_null
     137: iconst_2
     138: aconst_null
     139: invokestatic  #54                 // Method copy$default:(LDay24$Blizzard;LPoint;LPoint;ILjava/lang/Object;)LDay24$Blizzard;
     142: areturn

  public final Point component1();
    Code:
       0: aload_0
       1: getfield      #23                 // Field location:LPoint;
       4: areturn

  public final Point component2();
    Code:
       0: aload_0
       1: getfield      #25                 // Field offset:LPoint;
       4: areturn

  public final Day24$Blizzard copy(Point, Point);
    Code:
       0: aload_1
       1: ldc           #9                  // String location
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String offset
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Day24$Blizzard
      15: dup
      16: aload_1
      17: aload_2
      18: invokespecial #61                 // Method "<init>":(LPoint;LPoint;)V
      21: areturn

  public static Day24$Blizzard copy$default(Day24$Blizzard, Point, Point, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #23                 // Field location:LPoint;
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #25                 // Field offset:LPoint;
      21: astore_2
      22: aload_0
      23: aload_1
      24: aload_2
      25: invokevirtual #63                 // Method copy:(LPoint;LPoint;)LDay24$Blizzard;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #67                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #68                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #70                 // String Blizzard(location=
       9: invokevirtual #74                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #23                 // Field location:LPoint;
      16: invokevirtual #77                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #79                 // String , offset=
      21: invokevirtual #74                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #25                 // Field offset:LPoint;
      28: invokevirtual #77                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #82                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #84                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #23                 // Field location:LPoint;
       4: invokevirtual #87                 // Method Point.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #25                 // Field offset:LPoint;
      16: invokevirtual #87                 // Method Point.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: 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 Day24$Blizzard
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day24$Blizzard
      20: astore_2
      21: aload_0
      22: getfield      #23                 // Field location:LPoint;
      25: aload_2
      26: getfield      #23                 // Field location:LPoint;
      29: invokestatic  #96                 // 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      #25                 // Field offset:LPoint;
      41: aload_2
      42: getfield      #25                 // Field offset:LPoint;
      45: invokestatic  #96                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: iconst_1
      54: ireturn
}

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

  private final Point boundary;

  private final java.util.Set<Day24$Blizzard> blizzards;

  private final java.util.Set<Point> unsafeSpots;

  public Day24$MapState(Point, java.util.Set<Day24$Blizzard>);
    Code:
       0: aload_1
       1: ldc           #10                 // String boundary
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String blizzards
       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 boundary:LPoint;
      21: aload_0
      22: aload_2
      23: putfield      #27                 // Field blizzards:Ljava/util/Set;
      26: aload_0
      27: aload_0
      28: getfield      #27                 // Field blizzards:Ljava/util/Set;
      31: checkcast     #29                 // class java/lang/Iterable
      34: astore_3
      35: astore        12
      37: iconst_0
      38: istore        4
      40: aload_3
      41: astore        5
      43: new           #31                 // class java/util/ArrayList
      46: dup
      47: aload_3
      48: bipush        10
      50: invokestatic  #37                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      53: invokespecial #40                 // Method java/util/ArrayList."<init>":(I)V
      56: checkcast     #42                 // class java/util/Collection
      59: astore        6
      61: iconst_0
      62: istore        7
      64: aload         5
      66: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      71: astore        8
      73: aload         8
      75: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      80: ifeq          123
      83: aload         8
      85: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      90: astore        9
      92: aload         6
      94: aload         9
      96: checkcast     #58                 // class Day24$Blizzard
      99: astore        10
     101: astore        13
     103: iconst_0
     104: istore        11
     106: aload         10
     108: invokevirtual #62                 // Method Day24$Blizzard.getLocation:()LPoint;
     111: aload         13
     113: swap
     114: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     119: pop
     120: goto          73
     123: aload         6
     125: checkcast     #68                 // class java/util/List
     128: nop
     129: aload         12
     131: swap
     132: checkcast     #29                 // class java/lang/Iterable
     135: invokestatic  #72                 // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     138: putfield      #75                 // Field unsafeSpots:Ljava/util/Set;
     141: return

  public final Point getBoundary();
    Code:
       0: aload_0
       1: getfield      #24                 // Field boundary:LPoint;
       4: areturn

  public final java.util.Set<Day24$Blizzard> getBlizzards();
    Code:
       0: aload_0
       1: getfield      #27                 // Field blizzards:Ljava/util/Set;
       4: areturn

  public final boolean isOpen(Point);
    Code:
       0: aload_1
       1: ldc           #102                // String place
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #75                 // Field unsafeSpots:Ljava/util/Set;
      10: aload_1
      11: invokeinterface #105,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
      16: ifne          23
      19: iconst_1
      20: goto          24
      23: iconst_0
      24: ireturn

  public final boolean inBounds(Point);
    Code:
       0: aload_1
       1: ldc           #102                // String place
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokevirtual #110                // Method Point.getX:()I
      10: ifle          52
      13: aload_1
      14: invokevirtual #113                // Method Point.getY:()I
      17: ifle          52
      20: aload_1
      21: invokevirtual #110                // Method Point.getX:()I
      24: aload_0
      25: getfield      #24                 // Field boundary:LPoint;
      28: invokevirtual #110                // Method Point.getX:()I
      31: if_icmpgt     52
      34: aload_1
      35: invokevirtual #113                // Method Point.getY:()I
      38: aload_0
      39: getfield      #24                 // Field boundary:LPoint;
      42: invokevirtual #113                // Method Point.getY:()I
      45: if_icmpgt     52
      48: iconst_1
      49: goto          53
      52: iconst_0
      53: ireturn

  public final Day24$MapState nextState();
    Code:
       0: aload_0
       1: aconst_null
       2: aload_0
       3: getfield      #27                 // Field blizzards:Ljava/util/Set;
       6: checkcast     #29                 // class java/lang/Iterable
       9: astore_1
      10: astore        11
      12: astore        10
      14: iconst_0
      15: istore_2
      16: aload_1
      17: astore_3
      18: new           #31                 // class java/util/ArrayList
      21: dup
      22: aload_1
      23: bipush        10
      25: invokestatic  #37                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      28: invokespecial #40                 // Method java/util/ArrayList."<init>":(I)V
      31: checkcast     #42                 // class java/util/Collection
      34: astore        4
      36: iconst_0
      37: istore        5
      39: aload_3
      40: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        6
      47: aload         6
      49: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          101
      57: aload         6
      59: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: astore        7
      66: aload         4
      68: aload         7
      70: checkcast     #58                 // class Day24$Blizzard
      73: astore        8
      75: astore        12
      77: iconst_0
      78: istore        9
      80: aload         8
      82: aload_0
      83: getfield      #24                 // Field boundary:LPoint;
      86: invokevirtual #118                // Method Day24$Blizzard.next:(LPoint;)LDay24$Blizzard;
      89: aload         12
      91: swap
      92: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      97: pop
      98: goto          47
     101: aload         4
     103: checkcast     #68                 // class java/util/List
     106: nop
     107: astore        12
     109: aload         10
     111: aload         11
     113: aload         12
     115: checkcast     #29                 // class java/lang/Iterable
     118: invokestatic  #72                 // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     121: iconst_1
     122: aconst_null
     123: invokestatic  #122                // Method copy$default:(LDay24$MapState;LPoint;Ljava/util/Set;ILjava/lang/Object;)LDay24$MapState;
     126: areturn

  public final Point component1();
    Code:
       0: aload_0
       1: getfield      #24                 // Field boundary:LPoint;
       4: areturn

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

  public final Day24$MapState copy(Point, java.util.Set<Day24$Blizzard>);
    Code:
       0: aload_1
       1: ldc           #10                 // String boundary
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #18                 // String blizzards
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #2                  // class Day24$MapState
      15: dup
      16: aload_1
      17: aload_2
      18: invokespecial #130                // Method "<init>":(LPoint;Ljava/util/Set;)V
      21: areturn

  public static Day24$MapState copy$default(Day24$MapState, Point, java.util.Set, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #24                 // Field boundary:LPoint;
      10: astore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #27                 // Field blizzards:Ljava/util/Set;
      21: astore_2
      22: aload_0
      23: aload_1
      24: aload_2
      25: invokevirtual #132                // Method copy:(LPoint;Ljava/util/Set;)LDay24$MapState;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #136                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #137                // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #139                // String MapState(boundary=
       9: invokevirtual #143                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #24                 // Field boundary:LPoint;
      16: invokevirtual #146                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #148                // String , blizzards=
      21: invokevirtual #143                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #27                 // Field blizzards:Ljava/util/Set;
      28: invokevirtual #146                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #151                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #153                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #24                 // Field boundary:LPoint;
       4: invokevirtual #156                // Method Point.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #27                 // Field blizzards:Ljava/util/Set;
      16: invokevirtual #157                // Method java/lang/Object.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: 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 Day24$MapState
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day24$MapState
      20: astore_2
      21: aload_0
      22: getfield      #24                 // Field boundary:LPoint;
      25: aload_2
      26: getfield      #24                 // Field boundary:LPoint;
      29: invokestatic  #164                // 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 blizzards:Ljava/util/Set;
      41: aload_2
      42: getfield      #27                 // Field blizzards:Ljava/util/Set;
      45: invokestatic  #164                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      48: ifne          53
      51: iconst_0
      52: ireturn
      53: iconst_1
      54: ireturn

  static {};
    Code:
       0: new           #168                // class Day24$MapState$Companion
       3: dup
       4: aconst_null
       5: invokespecial #171                // Method Day24$MapState$Companion."<init>":(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
       8: putstatic     #175                // Field Companion:LDay24$MapState$Companion;
      11: return
}

Compiled from "Day24.kt"
final class Day24$PathAttempt {
  private final int steps;

  private final Point location;

  public Day24$PathAttempt(int, Point);
    Code:
       0: aload_2
       1: ldc           #9                  // String location
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #18                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: iload_1
      12: putfield      #22                 // Field steps:I
      15: aload_0
      16: aload_2
      17: putfield      #25                 // Field location:LPoint;
      20: return

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

  public final Point getLocation();
    Code:
       0: aload_0
       1: getfield      #25                 // Field location:LPoint;
       4: areturn

  public final Day24$PathAttempt next(Point);
    Code:
       0: aload_1
       1: ldc           #35                 // String place
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class Day24$PathAttempt
       9: dup
      10: aload_0
      11: getfield      #22                 // Field steps:I
      14: iconst_1
      15: iadd
      16: aload_1
      17: invokespecial #37                 // Method "<init>":(ILPoint;)V
      20: areturn

  public static Day24$PathAttempt next$default(Day24$PathAttempt, Point, int, java.lang.Object);
    Code:
       0: iload_2
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #25                 // Field location:LPoint;
      10: astore_1
      11: aload_0
      12: aload_1
      13: invokevirtual #41                 // Method next:(LPoint;)LDay24$PathAttempt;
      16: areturn

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

  public final Point component2();
    Code:
       0: aload_0
       1: getfield      #25                 // Field location:LPoint;
       4: areturn

  public final Day24$PathAttempt copy(int, Point);
    Code:
       0: aload_2
       1: ldc           #9                  // String location
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #2                  // class Day24$PathAttempt
       9: dup
      10: iload_1
      11: aload_2
      12: invokespecial #37                 // Method "<init>":(ILPoint;)V
      15: areturn

  public static Day24$PathAttempt copy$default(Day24$PathAttempt, int, Point, int, java.lang.Object);
    Code:
       0: iload_3
       1: iconst_1
       2: iand
       3: ifeq          11
       6: aload_0
       7: getfield      #22                 // Field steps:I
      10: istore_1
      11: iload_3
      12: iconst_2
      13: iand
      14: ifeq          22
      17: aload_0
      18: getfield      #25                 // Field location:LPoint;
      21: astore_2
      22: aload_0
      23: iload_1
      24: aload_2
      25: invokevirtual #49                 // Method copy:(ILPoint;)LDay24$PathAttempt;
      28: areturn

  public java.lang.String toString();
    Code:
       0: new           #53                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #54                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #56                 // String PathAttempt(steps=
       9: invokevirtual #60                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #22                 // Field steps:I
      16: invokevirtual #63                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #65                 // String , location=
      21: invokevirtual #60                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #25                 // Field location:LPoint;
      28: invokevirtual #68                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: bipush        41
      33: invokevirtual #71                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      36: invokevirtual #73                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      39: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #22                 // 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      #25                 // Field location:LPoint;
      16: invokevirtual #83                 // Method Point.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: 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 Day24$PathAttempt
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class Day24$PathAttempt
      20: astore_2
      21: aload_0
      22: getfield      #22                 // Field steps:I
      25: aload_2
      26: getfield      #22                 // Field steps:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #25                 // Field location:LPoint;
      38: aload_2
      39: getfield      #25                 // Field location:LPoint;
      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: iconst_1
      51: ireturn
}

Compiled from "Day24.kt"
public final class Day24Kt {
  public static final void main();
    Code:
       0: new           #8                  // class Day24
       3: dup
       4: ldc           #10                 // String inputs/Day24
       6: invokestatic  #16                 // Method UtilsKt.readInput:(Ljava/lang/String;)Ljava/util/List;
       9: invokespecial #20                 // Method Day24."<init>":(Ljava/util/List;)V
      12: astore_0
      13: aload_0
      14: invokevirtual #24                 // Method Day24.part1:()I
      17: istore_1
      18: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
      21: iload_1
      22: invokevirtual #36                 // Method java/io/PrintStream.println:(I)V
      25: aload_0
      26: invokevirtual #39                 // Method Day24.part2:()I
      29: istore_1
      30: getstatic     #30                 // Field java/lang/System.out:Ljava/io/PrintStream;
      33: iload_1
      34: invokevirtual #36                 // Method java/io/PrintStream.println:(I)V
      37: return

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

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

  public final Day24$MapState of(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: new           #24                 // class Point
       9: dup
      10: aload_1
      11: invokestatic  #30                 // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      14: checkcast     #32                 // class java/lang/CharSequence
      17: invokestatic  #38                 // Method kotlin/text/StringsKt.getLastIndex:(Ljava/lang/CharSequence;)I
      20: iconst_1
      21: isub
      22: aload_1
      23: invokestatic  #41                 // Method kotlin/collections/CollectionsKt.getLastIndex:(Ljava/util/List;)I
      26: iconst_1
      27: isub
      28: invokespecial #44                 // Method Point."<init>":(II)V
      31: aload_1
      32: checkcast     #46                 // class java/lang/Iterable
      35: astore_2
      36: astore        30
      38: aload_2
      39: astore_3
      40: new           #48                 // class java/util/ArrayList
      43: dup
      44: invokespecial #49                 // Method java/util/ArrayList."<init>":()V
      47: checkcast     #51                 // class java/util/Collection
      50: astore        4
      52: iconst_0
      53: istore        5
      55: aload_3
      56: invokeinterface #55,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      61: astore        6
      63: aload         6
      65: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      70: ifeq          417
      73: aload         6
      75: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      80: astore        7
      82: iload         5
      84: iinc          5, 1
      87: istore        8
      89: iload         8
      91: ifge          97
      94: invokestatic  #68                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      97: iload         8
      99: aload         7
     101: checkcast     #70                 // class java/lang/String
     104: astore        9
     106: istore        10
     108: iconst_0
     109: istore        11
     111: aload         9
     113: checkcast     #32                 // class java/lang/CharSequence
     116: astore        12
     118: iconst_0
     119: istore        13
     121: aload         12
     123: astore        14
     125: new           #48                 // class java/util/ArrayList
     128: dup
     129: invokespecial #49                 // Method java/util/ArrayList."<init>":()V
     132: checkcast     #51                 // class java/util/Collection
     135: astore        15
     137: iconst_0
     138: istore        16
     140: aload         14
     142: astore        17
     144: iconst_0
     145: istore        18
     147: iconst_0
     148: istore        19
     150: iconst_0
     151: istore        20
     153: iload         20
     155: aload         17
     157: invokeinterface #74,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     162: if_icmpge     396
     165: aload         17
     167: iload         20
     169: invokeinterface #78,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     174: istore        21
     176: iload         19
     178: iinc          19, 1
     181: iload         21
     183: istore        22
     185: istore        23
     187: iconst_0
     188: istore        24
     190: iload         23
     192: iload         22
     194: istore        25
     196: istore        26
     198: iconst_0
     199: istore        27
     201: iload         25
     203: lookupswitch  { // 4
                    60: 274
                    62: 244
                    94: 334
                   118: 304
               default: 364
          }
     244: new           #80                 // class Day24$Blizzard
     247: dup
     248: new           #24                 // class Point
     251: dup
     252: iload         26
     254: iload         10
     256: invokespecial #44                 // Method Point."<init>":(II)V
     259: new           #24                 // class Point
     262: dup
     263: iconst_1
     264: iconst_0
     265: invokespecial #44                 // Method Point."<init>":(II)V
     268: invokespecial #83                 // Method Day24$Blizzard."<init>":(LPoint;LPoint;)V
     271: goto          365
     274: new           #80                 // class Day24$Blizzard
     277: dup
     278: new           #24                 // class Point
     281: dup
     282: iload         26
     284: iload         10
     286: invokespecial #44                 // Method Point."<init>":(II)V
     289: new           #24                 // class Point
     292: dup
     293: iconst_m1
     294: iconst_0
     295: invokespecial #44                 // Method Point."<init>":(II)V
     298: invokespecial #83                 // Method Day24$Blizzard."<init>":(LPoint;LPoint;)V
     301: goto          365
     304: new           #80                 // class Day24$Blizzard
     307: dup
     308: new           #24                 // class Point
     311: dup
     312: iload         26
     314: iload         10
     316: invokespecial #44                 // Method Point."<init>":(II)V
     319: new           #24                 // class Point
     322: dup
     323: iconst_0
     324: iconst_1
     325: invokespecial #44                 // Method Point."<init>":(II)V
     328: invokespecial #83                 // Method Day24$Blizzard."<init>":(LPoint;LPoint;)V
     331: goto          365
     334: new           #80                 // class Day24$Blizzard
     337: dup
     338: new           #24                 // class Point
     341: dup
     342: iload         26
     344: iload         10
     346: invokespecial #44                 // Method Point."<init>":(II)V
     349: new           #24                 // class Point
     352: dup
     353: iconst_0
     354: iconst_m1
     355: invokespecial #44                 // Method Point."<init>":(II)V
     358: invokespecial #83                 // Method Day24$Blizzard."<init>":(LPoint;LPoint;)V
     361: goto          365
     364: aconst_null
     365: nop
     366: dup
     367: ifnull        388
     370: astore        28
     372: iconst_0
     373: istore        29
     375: aload         15
     377: aload         28
     379: invokeinterface #87,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     384: pop
     385: goto          389
     388: pop
     389: nop
     390: iinc          20, 1
     393: goto          153
     396: nop
     397: aload         15
     399: checkcast     #89                 // class java/util/List
     402: nop
     403: checkcast     #46                 // class java/lang/Iterable
     406: nop
     407: aload         4
     409: swap
     410: invokestatic  #93                 // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     413: pop
     414: goto          63
     417: aload         4
     419: checkcast     #89                 // class java/util/List
     422: aload         30
     424: swap
     425: checkcast     #46                 // class java/lang/Iterable
     428: invokestatic  #97                 // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     431: astore        31
     433: astore        32
     435: new           #99                 // class Day24$MapState
     438: dup
     439: aload         32
     441: aload         31
     443: invokespecial #102                // Method Day24$MapState."<init>":(LPoint;Ljava/util/Set;)V
     446: areturn

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

Compiled from "Day24.kt"
public final class Day24 {
  private final Day24$MapState initialMapState;

  private final Point start;

  private final Point goal;

  public Day24(java.util.List<java.lang.String>);
    Code:
       0: aload_1
       1: ldc           #10                 // String input
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokespecial #19                 // Method java/lang/Object."<init>":()V
      10: aload_0
      11: getstatic     #25                 // Field Day24$MapState.Companion:LDay24$MapState$Companion;
      14: aload_1
      15: invokevirtual #31                 // Method Day24$MapState$Companion.of:(Ljava/util/List;)LDay24$MapState;
      18: putfield      #35                 // Field initialMapState:LDay24$MapState;
      21: aload_0
      22: aload_1
      23: invokestatic  #41                 // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      26: checkcast     #43                 // class java/lang/CharSequence
      29: astore_2
      30: astore        8
      32: iconst_0
      33: istore_3
      34: iconst_0
      35: istore        4
      37: aload_2
      38: invokeinterface #47,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      43: istore        5
      45: iload         4
      47: iload         5
      49: if_icmpge     91
      52: aload_2
      53: iload         4
      55: invokeinterface #51,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      60: istore        6
      62: iconst_0
      63: istore        7
      65: iload         6
      67: bipush        46
      69: if_icmpne     76
      72: iconst_1
      73: goto          77
      76: iconst_0
      77: ifeq          85
      80: iload         4
      82: goto          92
      85: iinc          4, 1
      88: goto          45
      91: iconst_m1
      92: istore        9
      94: aload         8
      96: iload         9
      98: iconst_0
      99: istore        10
     101: istore        11
     103: new           #53                 // class Point
     106: dup
     107: iload         11
     109: iload         10
     111: invokespecial #56                 // Method Point."<init>":(II)V
     114: putfield      #60                 // Field start:LPoint;
     117: aload_0
     118: aload_1
     119: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     122: checkcast     #43                 // class java/lang/CharSequence
     125: astore_2
     126: astore        8
     128: iconst_0
     129: istore_3
     130: iconst_0
     131: istore        4
     133: aload_2
     134: invokeinterface #47,  1           // InterfaceMethod java/lang/CharSequence.length:()I
     139: istore        5
     141: iload         4
     143: iload         5
     145: if_icmpge     187
     148: aload_2
     149: iload         4
     151: invokeinterface #51,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     156: istore        6
     158: iconst_0
     159: istore        7
     161: iload         6
     163: bipush        46
     165: if_icmpne     172
     168: iconst_1
     169: goto          173
     172: iconst_0
     173: ifeq          181
     176: iload         4
     178: goto          188
     181: iinc          4, 1
     184: goto          141
     187: iconst_m1
     188: istore        9
     190: aload         8
     192: iload         9
     194: aload_1
     195: invokestatic  #67                 // Method kotlin/collections/CollectionsKt.getLastIndex:(Ljava/util/List;)I
     198: istore        12
     200: istore        13
     202: new           #53                 // class Point
     205: dup
     206: iload         13
     208: iload         12
     210: invokespecial #56                 // Method Point."<init>":(II)V
     213: putfield      #70                 // Field goal:LPoint;
     216: return

  public final int part1();
    Code:
       0: aload_0
       1: aconst_null
       2: aconst_null
       3: aconst_null
       4: iconst_0
       5: bipush        15
       7: aconst_null
       8: invokestatic  #89                 // Method solve$default:(LDay24;LPoint;LPoint;LDay24$MapState;IILjava/lang/Object;)Lkotlin/Pair;
      11: invokevirtual #95                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      14: checkcast     #97                 // class java/lang/Number
      17: invokevirtual #100                // Method java/lang/Number.intValue:()I
      20: ireturn

  public final int part2();
    Code:
       0: aload_0
       1: aconst_null
       2: aconst_null
       3: aconst_null
       4: iconst_0
       5: bipush        15
       7: aconst_null
       8: invokestatic  #89                 // Method solve$default:(LDay24;LPoint;LPoint;LDay24$MapState;IILjava/lang/Object;)Lkotlin/Pair;
      11: astore_1
      12: aload_0
      13: aload_0
      14: getfield      #70                 // Field goal:LPoint;
      17: aload_0
      18: getfield      #60                 // Field start:LPoint;
      21: aload_1
      22: invokevirtual #104                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      25: checkcast     #21                 // class Day24$MapState
      28: aload_1
      29: invokevirtual #95                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      32: checkcast     #97                 // class java/lang/Number
      35: invokevirtual #100                // Method java/lang/Number.intValue:()I
      38: invokespecial #108                // Method solve:(LPoint;LPoint;LDay24$MapState;I)Lkotlin/Pair;
      41: astore_2
      42: aload_0
      43: aload_0
      44: getfield      #60                 // Field start:LPoint;
      47: aload_0
      48: getfield      #70                 // Field goal:LPoint;
      51: aload_2
      52: invokevirtual #104                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      55: checkcast     #21                 // class Day24$MapState
      58: aload_2
      59: invokevirtual #95                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      62: checkcast     #97                 // class java/lang/Number
      65: invokevirtual #100                // Method java/lang/Number.intValue:()I
      68: invokespecial #108                // Method solve:(LPoint;LPoint;LDay24$MapState;I)Lkotlin/Pair;
      71: astore_3
      72: aload_3
      73: invokevirtual #95                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      76: checkcast     #97                 // class java/lang/Number
      79: invokevirtual #100                // Method java/lang/Number.intValue:()I
      82: ireturn

  private final kotlin.Pair<java.lang.Integer, Day24$MapState> solve(Point, Point, Day24$MapState, int);
    Code:
       0: iconst_1
       1: anewarray     #91                 // class kotlin/Pair
       4: astore        6
       6: aload         6
       8: iconst_0
       9: iload         4
      11: invokestatic  #119                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: aload_3
      15: invokestatic  #125                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      18: aastore
      19: aload         6
      21: invokestatic  #131                // Method kotlin/collections/MapsKt.mutableMapOf:([Lkotlin/Pair;)Ljava/util/Map;
      24: astore        5
      26: iconst_1
      27: anewarray     #133                // class Day24$PathAttempt
      30: astore        7
      32: aload         7
      34: iconst_0
      35: new           #133                // class Day24$PathAttempt
      38: dup
      39: iload         4
      41: aload_1
      42: invokespecial #136                // Method Day24$PathAttempt."<init>":(ILPoint;)V
      45: aastore
      46: aload         7
      48: invokestatic  #140                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
      51: astore        6
      53: new           #142                // class java/util/LinkedHashSet
      56: dup
      57: invokespecial #143                // Method java/util/LinkedHashSet."<init>":()V
      60: checkcast     #145                // class java/util/Set
      63: astore        7
      65: aload         6
      67: checkcast     #147                // class java/util/Collection
      70: invokeinterface #151,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      75: ifne          82
      78: iconst_1
      79: goto          83
      82: iconst_0
      83: ifeq          437
      86: aload         6
      88: invokeinterface #154,  1          // InterfaceMethod java/util/List.removeFirst:()Ljava/lang/Object;
      93: dup
      94: ldc           #156                // String removeFirst(...)
      96: invokestatic  #159                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      99: checkcast     #133                // class Day24$PathAttempt
     102: astore        8
     104: aload         7
     106: aload         8
     108: invokeinterface #163,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     113: ifne          65
     116: aload         7
     118: checkcast     #147                // class java/util/Collection
     121: aload         8
     123: invokeinterface #166,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     128: pop
     129: aload         5
     131: aload         8
     133: invokevirtual #169                // Method Day24$PathAttempt.getSteps:()I
     136: iconst_1
     137: iadd
     138: invokestatic  #119                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     141: aload         5
     143: invokedynamic #189,  0            // InvokeDynamic #0:invoke:(Ljava/util/Map;)Lkotlin/jvm/functions/Function1;
     148: invokedynamic #200,  0            // InvokeDynamic #1:apply:(Lkotlin/jvm/functions/Function1;)Ljava/util/function/Function;
     153: invokeinterface #206,  3          // InterfaceMethod java/util/Map.computeIfAbsent:(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
     158: dup
     159: ldc           #208                // String computeIfAbsent(...)
     161: invokestatic  #159                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     164: checkcast     #21                 // class Day24$MapState
     167: astore        9
     169: aload         9
     171: aload         8
     173: invokevirtual #212                // Method Day24$PathAttempt.getLocation:()LPoint;
     176: invokevirtual #216                // Method Day24$MapState.isOpen:(LPoint;)Z
     179: ifeq          198
     182: aload         6
     184: aload         8
     186: aconst_null
     187: iconst_1
     188: aconst_null
     189: invokestatic  #220                // Method Day24$PathAttempt.next$default:(LDay24$PathAttempt;LPoint;ILjava/lang/Object;)LDay24$PathAttempt;
     192: invokeinterface #221,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     197: pop
     198: aload         8
     200: invokevirtual #212                // Method Day24$PathAttempt.getLocation:()LPoint;
     203: invokevirtual #225                // Method Point.adjacents:()Ljava/util/Set;
     206: astore        10
     208: aload         10
     210: aload_2
     211: invokeinterface #163,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     216: ifeq          239
     219: new           #91                 // class kotlin/Pair
     222: dup
     223: aload         8
     225: invokevirtual #169                // Method Day24$PathAttempt.getSteps:()I
     228: iconst_1
     229: iadd
     230: invokestatic  #119                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     233: aload         9
     235: invokespecial #228                // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
     238: areturn
     239: aload         10
     241: checkcast     #230                // class java/lang/Iterable
     244: astore        11
     246: nop
     247: iconst_0
     248: istore        12
     250: aload         11
     252: astore        13
     254: new           #232                // class java/util/ArrayList
     257: dup
     258: invokespecial #233                // Method java/util/ArrayList."<init>":()V
     261: checkcast     #147                // class java/util/Collection
     264: astore        14
     266: iconst_0
     267: istore        15
     269: aload         13
     271: invokeinterface #237,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     276: astore        16
     278: aload         16
     280: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     285: ifeq          360
     288: aload         16
     290: invokeinterface #245,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     295: astore        17
     297: aload         17
     299: checkcast     #53                 // class Point
     302: astore        18
     304: iconst_0
     305: istore        19
     307: aload         18
     309: aload_0
     310: getfield      #60                 // Field start:LPoint;
     313: invokestatic  #249                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     316: ifne          339
     319: aload         9
     321: aload         18
     323: invokevirtual #252                // Method Day24$MapState.inBounds:(LPoint;)Z
     326: ifeq          343
     329: aload         9
     331: aload         18
     333: invokevirtual #216                // Method Day24$MapState.isOpen:(LPoint;)Z
     336: ifeq          343
     339: iconst_1
     340: goto          344
     343: iconst_0
     344: ifeq          278
     347: aload         14
     349: aload         17
     351: invokeinterface #166,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     356: pop
     357: goto          278
     360: aload         14
     362: checkcast     #84                 // class java/util/List
     365: nop
     366: checkcast     #230                // class java/lang/Iterable
     369: astore        11
     371: nop
     372: iconst_0
     373: istore        12
     375: aload         11
     377: invokeinterface #237,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     382: astore        13
     384: aload         13
     386: invokeinterface #242,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     391: ifeq          433
     394: aload         13
     396: invokeinterface #245,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     401: astore        14
     403: aload         14
     405: checkcast     #53                 // class Point
     408: astore        15
     410: iconst_0
     411: istore        16
     413: aload         6
     415: aload         8
     417: aload         15
     419: invokevirtual #255                // Method Day24$PathAttempt.next:(LPoint;)LDay24$PathAttempt;
     422: invokeinterface #221,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     427: pop
     428: nop
     429: nop
     430: goto          384
     433: nop
     434: goto          65
     437: new           #257                // class java/lang/IllegalStateException
     440: dup
     441: ldc_w         #259                // String No paths found
     444: invokespecial #262                // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     447: athrow

  static kotlin.Pair solve$default(Day24, Point, Point, Day24$MapState, int, int, java.lang.Object);
    Code:
       0: iload         5
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #60                 // Field start:LPoint;
      11: astore_1
      12: iload         5
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #70                 // Field goal:LPoint;
      23: astore_2
      24: iload         5
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #35                 // Field initialMapState:LDay24$MapState;
      35: astore_3
      36: iload         5
      38: bipush        8
      40: iand
      41: ifeq          47
      44: iconst_0
      45: istore        4
      47: aload_0
      48: aload_1
      49: aload_2
      50: aload_3
      51: iload         4
      53: invokespecial #108                // Method solve:(LPoint;LPoint;LDay24$MapState;I)Lkotlin/Pair;
      56: areturn

  private static final Day24$MapState solve$lambda$2(java.util.Map, java.lang.Integer);
    Code:
       0: aload_1
       1: ldc_w         #292                // String key
       4: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: aload_1
       9: invokevirtual #293                // Method java/lang/Integer.intValue:()I
      12: iconst_1
      13: isub
      14: invokestatic  #119                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      17: invokestatic  #297                // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
      20: checkcast     #21                 // class Day24$MapState
      23: invokevirtual #301                // Method Day24$MapState.nextState:()LDay24$MapState;
      26: areturn

  private static final Day24$MapState solve$lambda$3(kotlin.jvm.functions.Function1, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: invokeinterface #307,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
       7: checkcast     #21                 // class Day24$MapState
      10: areturn
}