; LLVM IR from mackorone/mms :: old/v2/src/sim (Maze)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.74" = type { %"struct.std::_Vector_base.75" }
%"struct.std::_Vector_base.75" = type { %"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon = type { ptr, ptr, ptr }
%"class.std::vector.144" = type { %"struct.std::_Vector_base.145" }
%"struct.std::_Vector_base.145" = type { %"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl" }
%"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl" = type { %"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.149" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZN3simL10DIRECTIONSE = external hidden global %"class.std::vector", align 8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3sim4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim4Maze16setTileDistancesESt6vectorIS1_INS_4TileESaIS2_EESaIS4_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.74") align 8 %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %class.anon, align 8
  %8 = alloca %"class.std::vector.144", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::queue", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.149", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.149", align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %27 = call noundef i64 @_ZNKSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0)
  %30 = call noundef i64 @_ZNKSt6vectorIN3sim4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %32 = getelementptr inbounds %class.anon, ptr %7, i32 0, i32 0
  store ptr %1, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.anon, ptr %7, i32 0, i32 1
  store ptr %5, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds %class.anon, ptr %7, i32 0, i32 2
  store ptr %6, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @_ZNSt6vectorIPN3sim4TileESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = sub nsw i32 %35, 1
  %37 = sdiv i32 %36, 2
  %38 = sext i32 %37 to i64
  %39 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %38)
          to label %40 unwind label %91

40:                                               ; preds = %2
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = sub nsw i32 %41, 1
  %43 = sdiv i32 %42, 2
  %44 = sext i32 %43 to i64
  %45 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %44)
          to label %46 unwind label %91

46:                                               ; preds = %40
  store ptr %45, ptr %9, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %47 unwind label %91

47:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = srem i32 %48, 2
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %108

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = sdiv i32 %52, 2
  %54 = sext i32 %53 to i64
  %55 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %54)
          to label %56 unwind label %95

56:                                               ; preds = %51
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = sub nsw i32 %57, 1
  %59 = sdiv i32 %58, 2
  %60 = sext i32 %59 to i64
  %61 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %60)
          to label %62 unwind label %95

62:                                               ; preds = %56
  store ptr %61, ptr %12, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %63 unwind label %95

63:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = srem i32 %64, 2
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %107

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = sub nsw i32 %68, 1
  %70 = sdiv i32 %69, 2
  %71 = sext i32 %70 to i64
  %72 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %71)
          to label %73 unwind label %99

73:                                               ; preds = %67
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = sdiv i32 %74, 2
  %76 = sext i32 %75 to i64
  %77 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %76)
          to label %78 unwind label %99

78:                                               ; preds = %73
  store ptr %77, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %79 unwind label %99

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = sdiv i32 %80, 2
  %82 = sext i32 %81 to i64
  %83 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %82)
          to label %84 unwind label %103

84:                                               ; preds = %79
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = sdiv i32 %85, 2
  %87 = sext i32 %86 to i64
  %88 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %87)
          to label %89 unwind label %103

89:                                               ; preds = %84
  store ptr %88, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %90 unwind label %103

90:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %107

91:                                               ; preds = %46, %40, %2
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %10, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %232

95:                                               ; preds = %62, %56, %51
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %10, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %232

99:                                               ; preds = %78, %73, %67
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %10, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %232

103:                                              ; preds = %89, %84, %79
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %10, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %232

107:                                              ; preds = %90, %63
  br label %130

108:                                              ; preds = %47
  %109 = load i32, ptr %6, align 4, !tbaa !9
  %110 = srem i32 %109, 2
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %129

112:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %113 = load i32, ptr %5, align 4, !tbaa !9
  %114 = sub nsw i32 %113, 1
  %115 = sdiv i32 %114, 2
  %116 = sext i32 %115 to i64
  %117 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %116)
          to label %118 unwind label %125

118:                                              ; preds = %112
  %119 = load i32, ptr %6, align 4, !tbaa !9
  %120 = sdiv i32 %119, 2
  %121 = sext i32 %120 to i64
  %122 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %121)
          to label %123 unwind label %125

123:                                              ; preds = %118
  store ptr %122, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %124 unwind label %125

124:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %129

125:                                              ; preds = %123, %118, %112
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %10, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %232

129:                                              ; preds = %124, %108
  br label %130

130:                                              ; preds = %129, %107
  call void @llvm.lifetime.start.p0(i64 80, ptr %16) #6
  invoke void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %131 unwind label %141

131:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store ptr %8, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = call ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %132) #6
  %134 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.149", ptr %18, i32 0, i32 0
  store ptr %133, ptr %134, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = call ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #6
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.149", ptr %19, i32 0, i32 0
  store ptr %136, ptr %137, align 8
  br label %138

138:                                              ; preds = %151, %131
  %139 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3sim4TileESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br i1 %139, label %145, label %140

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %157

141:                                              ; preds = %130
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %10, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %11, align 4
  br label %231

145:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  store ptr %147, ptr %20, align 8, !tbaa !5
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZN3sim4Tile11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(232) %148, i32 noundef 0)
          to label %149 unwind label %153

149:                                              ; preds = %145
  invoke void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %150 unwind label %153

150:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %151

151:                                              ; preds = %150
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br label %138

153:                                              ; preds = %149, %145
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %10, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %230

157:                                              ; preds = %140
  br label %158

158:                                              ; preds = %227, %157
  %159 = invoke noundef zeroext i1 @_ZNKSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %160 unwind label %174

160:                                              ; preds = %158
  %161 = xor i1 %159, true
  br i1 %161, label %162, label %229

162:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %164 unwind label %178

164:                                              ; preds = %162
  %165 = load ptr, ptr %163, align 8, !tbaa !5
  store ptr %165, ptr %21, align 8, !tbaa !5
  invoke void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %166 unwind label %178

166:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store ptr @_ZN3simL10DIRECTIONSE, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %167 = call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #6
  %168 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %167, ptr %168, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %169 = call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #6
  %170 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %169, ptr %170, align 8
  br label %171

171:                                              ; preds = %224, %166
  %172 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  br i1 %172, label %182, label %173

173:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %227

174:                                              ; preds = %158
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %10, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %11, align 4
  br label %230

178:                                              ; preds = %164, %162
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %10, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %11, align 4
  br label %228

182:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  %184 = load i32, ptr %183, align 4, !tbaa !11
  store i32 %184, ptr %25, align 4, !tbaa !11
  %185 = load ptr, ptr %21, align 8, !tbaa !5
  %186 = load i32, ptr %25, align 4, !tbaa !11
  %187 = invoke noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %185, i32 noundef %186)
          to label %188 unwind label %214

188:                                              ; preds = %182
  br i1 %187, label %223, label %189

189:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %190 = load ptr, ptr %21, align 8, !tbaa !5
  %191 = invoke noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %190)
          to label %192 unwind label %218

192:                                              ; preds = %189
  %193 = load ptr, ptr %21, align 8, !tbaa !5
  %194 = invoke noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %193)
          to label %195 unwind label %218

195:                                              ; preds = %192
  %196 = load i32, ptr %25, align 4, !tbaa !11
  %197 = invoke noundef ptr @"_ZZN3sim4Maze16setTileDistancesESt6vectorIS1_INS_4TileESaIS2_EESaIS4_EEENK3$_0clEiiNS_9DirectionE"(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %191, i32 noundef %194, i32 noundef %196)
          to label %198 unwind label %218

198:                                              ; preds = %195
  store ptr %197, ptr %26, align 8, !tbaa !5
  %199 = load ptr, ptr %26, align 8, !tbaa !5
  %200 = icmp ne ptr %199, null
  br i1 %200, label %201, label %222

201:                                              ; preds = %198
  %202 = load ptr, ptr %26, align 8, !tbaa !5
  %203 = invoke noundef i32 @_ZNK3sim4Tile11getDistanceEv(ptr noundef nonnull align 8 dereferenceable(232) %202)
          to label %204 unwind label %218

204:                                              ; preds = %201
  %205 = icmp eq i32 %203, -1
  br i1 %205, label %206, label %222

206:                                              ; preds = %204
  %207 = load ptr, ptr %26, align 8, !tbaa !5
  %208 = load ptr, ptr %21, align 8, !tbaa !5
  %209 = invoke noundef i32 @_ZNK3sim4Tile11getDistanceEv(ptr noundef nonnull align 8 dereferenceable(232) %208)
          to label %210 unwind label %218

210:                                              ; preds = %206
  %211 = add nsw i32 %209, 1
  invoke void @_ZN3sim4Tile11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(232) %207, i32 noundef %211)
          to label %212 unwind label %218

212:                                              ; preds = %210
  invoke void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %213 unwind label %218

213:                                              ; preds = %212
  br label %222

214:                                              ; preds = %182
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %10, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %11, align 4
  br label %226

218:                                              ; preds = %212, %210, %206, %201, %195, %192, %189
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %10, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %226

222:                                              ; preds = %213, %204, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %223

223:                                              ; preds = %222, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %224

224:                                              ; preds = %223
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br label %171

226:                                              ; preds = %218, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %228

227:                                              ; preds = %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %158, !llvm.loop !13

228:                                              ; preds = %226, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %230

229:                                              ; preds = %160
  call void @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %16) #6
  call void @_ZNSt6vectorIPN3sim4TileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

230:                                              ; preds = %228, %174, %153
  call void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #6
  br label %231

231:                                              ; preds = %230, %141
  call void @llvm.lifetime.end.p0(i64 80, ptr %16) #6
  br label %232

232:                                              ; preds = %231, %125, %103, %99, %95, %91
  call void @_ZNSt6vectorIPN3sim4TileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %233

233:                                              ; preds = %232
  %234 = load ptr, ptr %10, align 8
  %235 = load i32, ptr %11, align 4
  %236 = insertvalue { ptr, i32 } poison, ptr %234, 0
  %237 = insertvalue { ptr, i32 } %236, i32 %235, 1
  resume { ptr, i32 } %237
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPN3sim4TileESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3sim4TileESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare void @_ZN3sim4Tile11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

declare noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZZN3sim4Maze16setTileDistancesESt6vectorIS1_INS_4TileESaIS2_EESaIS4_EEENK3$_0clEiiNS_9DirectionE"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) #5 align 2

declare noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232)) #4

declare noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232)) #4

declare noundef i32 @_ZNK3sim4Tile11getDistanceEv(ptr noundef nonnull align 8 dereferenceable(232)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPN3sim4TileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN3sim9DirectionE", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.74" = type { %"struct.std::_Vector_base.75" }
%"struct.std::_Vector_base.75" = type { %"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<sim::Tile>, std::allocator<std::vector<sim::Tile>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon = type { ptr, ptr, ptr }
%"class.std::vector.144" = type { %"struct.std::_Vector_base.145" }
%"struct.std::_Vector_base.145" = type { %"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Tile *, std::allocator<sim::Tile *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl" }
%"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl" = type { %"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<sim::Tile *, std::allocator<sim::Tile *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.149" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZN3simL10DIRECTIONSE = external hidden global %"class.std::vector", align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3sim4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim4Maze16setTileDistancesESt6vectorIS1_INS_4TileESaIS2_EESaIS4_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.74") align 8 %0, ptr noundef nonnull %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %class.anon, align 8
  %6 = alloca %"class.std::vector.144", align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::queue", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.149", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.149", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %19 = tail call noundef i64 @_ZNKSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %21 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0)
  %22 = tail call noundef i64 @_ZNKSt6vectorIN3sim4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  store ptr %1, ptr %5, align 8, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %3, ptr %24, align 8, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %4, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIPN3sim4TileESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  %28 = sdiv i32 %27, 2
  %29 = sext i32 %28 to i64
  %30 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %29)
          to label %31 unwind label %81

31:                                               ; preds = %2
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, -1
  %34 = sdiv i32 %33, 2
  %35 = sext i32 %34 to i64
  %36 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %35)
          to label %37 unwind label %81

37:                                               ; preds = %31
  store ptr %36, ptr %7, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %38 unwind label %81

38:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = and i32 %39, 1
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %89

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %43 = ashr exact i32 %39, 1
  %44 = sext i32 %43 to i64
  %45 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44)
          to label %46 unwind label %83

46:                                               ; preds = %42
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = add nsw i32 %47, -1
  %49 = sdiv i32 %48, 2
  %50 = sext i32 %49 to i64
  %51 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %50)
          to label %52 unwind label %83

52:                                               ; preds = %46
  store ptr %51, ptr %8, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %53 unwind label %83

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = and i32 %54, 1
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %107

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  %60 = sdiv i32 %59, 2
  %61 = sext i32 %60 to i64
  %62 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %61)
          to label %63 unwind label %85

63:                                               ; preds = %57
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = sdiv i32 %64, 2
  %66 = sext i32 %65 to i64
  %67 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %66)
          to label %68 unwind label %85

68:                                               ; preds = %63
  store ptr %67, ptr %9, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %69 unwind label %85

69:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = sdiv i32 %70, 2
  %72 = sext i32 %71 to i64
  %73 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %72)
          to label %74 unwind label %87

74:                                               ; preds = %69
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sdiv i32 %75, 2
  %77 = sext i32 %76 to i64
  %78 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %77)
          to label %79 unwind label %87

79:                                               ; preds = %74
  store ptr %78, ptr %10, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %80 unwind label %87

80:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %107

81:                                               ; preds = %37, %31, %2
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %161

83:                                               ; preds = %52, %46, %42
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %161

85:                                               ; preds = %68, %63, %57
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %161

87:                                               ; preds = %79, %74, %69
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %161

89:                                               ; preds = %38
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = and i32 %90, 1
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %107

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %94 = add nsw i32 %39, -1
  %95 = ashr exact i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %96)
          to label %98 unwind label %105

98:                                               ; preds = %93
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = sdiv i32 %99, 2
  %101 = sext i32 %100 to i64
  %102 = invoke noundef nonnull align 8 dereferenceable(232) ptr @_ZNSt6vectorIN3sim4TileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %101)
          to label %103 unwind label %105

103:                                              ; preds = %98
  store ptr %102, ptr %11, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %104 unwind label %105

104:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %107

105:                                              ; preds = %103, %98, %93
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %161

107:                                              ; preds = %89, %104, %53, %80
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %12) #6
  invoke void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
          to label %108 unwind label %113

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %109 = call ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %109, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %110 = call ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %110, ptr %14, align 8
  %111 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3sim4TileESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %111, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %118, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %112 = call noundef zeroext i1 @_ZNKSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  br i1 %112, label %._crit_edge24, label %.lr.ph23

113:                                              ; preds = %107
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %160

.lr.ph:                                           ; preds = %108, %118
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  store ptr %116, ptr %15, align 8, !tbaa !9
  invoke void @_ZN3sim4Tile11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(232) %116, i32 noundef 0)
          to label %117 unwind label %121

117:                                              ; preds = %.lr.ph
  invoke void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %118 unwind label %121

118:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %120 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3sim4TileESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %120, label %.lr.ph, label %._crit_edge

121:                                              ; preds = %117, %.lr.ph
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %159

.lr.ph23:                                         ; preds = %._crit_edge, %._crit_edge21
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  %124 = load ptr, ptr %123, align 8, !tbaa !9
  call void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %125 = call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #6
  store ptr %125, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %126 = call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #6
  store ptr %126, ptr %17, align 8
  %127 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %127, label %.lr.ph20, label %._crit_edge21

._crit_edge21:                                    ; preds = %155, %.lr.ph23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  %128 = call noundef zeroext i1 @_ZNKSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  br i1 %128, label %._crit_edge24, label %.lr.ph23, !llvm.loop !11

.lr.ph20:                                         ; preds = %.lr.ph23, %155
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %130 = load i32, ptr %129, align 4, !tbaa !13
  %131 = invoke noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %124, i32 noundef %130)
          to label %132 unwind label %150

132:                                              ; preds = %.lr.ph20
  br i1 %131, label %155, label %133

133:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %134 = invoke noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %124)
          to label %135 unwind label %152

135:                                              ; preds = %133
  %136 = invoke noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %124)
          to label %137 unwind label %152

137:                                              ; preds = %135
  %138 = invoke noundef ptr @"_ZZN3sim4Maze16setTileDistancesESt6vectorIS1_INS_4TileESaIS2_EESaIS4_EEENK3$_0clEiiNS_9DirectionE"(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %134, i32 noundef %136, i32 noundef %130)
          to label %139 unwind label %152

139:                                              ; preds = %137
  store ptr %138, ptr %18, align 8, !tbaa !9
  %.not = icmp eq ptr %138, null
  br i1 %.not, label %154, label %140

140:                                              ; preds = %139
  %141 = invoke noundef i32 @_ZNK3sim4Tile11getDistanceEv(ptr noundef nonnull align 8 dereferenceable(232) %138)
          to label %142 unwind label %152

142:                                              ; preds = %140
  %143 = icmp eq i32 %141, -1
  br i1 %143, label %144, label %154

144:                                              ; preds = %142
  %145 = load ptr, ptr %18, align 8, !tbaa !9
  %146 = invoke noundef i32 @_ZNK3sim4Tile11getDistanceEv(ptr noundef nonnull align 8 dereferenceable(232) %124)
          to label %147 unwind label %152

147:                                              ; preds = %144
  %148 = add nsw i32 %146, 1
  invoke void @_ZN3sim4Tile11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(232) %145, i32 noundef %148)
          to label %149 unwind label %152

149:                                              ; preds = %147
  invoke void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %154 unwind label %152

150:                                              ; preds = %.lr.ph20
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %158

152:                                              ; preds = %149, %147, %144, %140, %137, %135, %133
  %153 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %158

154:                                              ; preds = %149, %142, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %155

155:                                              ; preds = %154, %132
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %157 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %157, label %.lr.ph20, label %._crit_edge21

158:                                              ; preds = %152, %150
  %.pn = phi { ptr, i32 } [ %153, %152 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %159

._crit_edge24:                                    ; preds = %._crit_edge21, %._crit_edge
  call void @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %12) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #6
  call void @_ZNSt6vectorIPN3sim4TileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret void

159:                                              ; preds = %158, %121
  %.pn15 = phi { ptr, i32 } [ %122, %121 ], [ %.pn, %158 ]
  call void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %12) #6
  br label %160

160:                                              ; preds = %159, %113
  %.pn15.pn = phi { ptr, i32 } [ %.pn15, %159 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #6
  br label %161

161:                                              ; preds = %160, %105, %87, %85, %83, %81
  %.pn15.pn.pn = phi { ptr, i32 } [ %.pn15.pn, %160 ], [ %88, %87 ], [ %86, %85 ], [ %84, %83 ], [ %106, %105 ], [ %82, %81 ]
  call void @_ZNSt6vectorIPN3sim4TileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn15.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPN3sim4TileESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN3sim4TileESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN3sim4TileESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3sim4TileESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare void @_ZN3sim4Tile11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN3sim4TileESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZZN3sim4Maze16setTileDistancesESt6vectorIS1_INS_4TileESaIS2_EESaIS4_EEENK3$_0clEiiNS_9DirectionE"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

declare noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #4

declare noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #4

declare noundef i32 @_ZNK3sim4Tile11getDistanceEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_IN3sim4TileESaIS1_EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIPN3sim4TileESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPN3sim4TileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN3sim9DirectionE", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass