; LLVM IR from mackorone/mms :: old/v2/src/maze/tomasz (TomaszMazeGenerator)

; 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.79" = type { %"struct.std::_Vector_base.80" }
%"struct.std::_Vector_base.80" = type { %"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_Vector_impl" }
%"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_Vector_impl" = type { %"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_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<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl" }
%"struct.std::_Deque_base<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl" = type { %"struct.std::_Deque_base<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::map.64" = type { %"class.std::_Rb_tree.65" }
%"class.std::_Rb_tree.65" = type { %"struct.std::_Rb_tree<tomasz::Direction, std::pair<const tomasz::Direction, bool>, std::_Select1st<std::pair<const tomasz::Direction, bool>>, std::less<tomasz::Direction>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<tomasz::Direction, std::pair<const tomasz::Direction, bool>, std::_Select1st<std::pair<const tomasz::Direction, bool>>, std::less<tomasz::Direction>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::initializer_list.70" = type { ptr, i64 }
%"struct.std::pair.71" = type <{ i32, i8, [3 x i8] }>
%"struct.std::less.74" = type { i8 }
%"class.std::allocator.76" = type { i8 }
%"class.tomasz::TomaszMazeGenerator" = type { %class.IMazeAlgorithm, double, double, i32, i32, %"class.std::vector.55", %"class.std::stack", i32, i32, i32, ptr }
%class.IMazeAlgorithm = type { ptr }
%"class.std::vector.55" = type { %"struct.std::_Vector_base.56" }
%"struct.std::_Vector_base.56" = type { %"struct.std::_Vector_base<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>, std::allocator<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>, std::allocator<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>, std::allocator<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>, std::allocator<std::vector<tomasz::TomaszMazeGenerator::TomMazeGenTile>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile" = type { i32, i32, i32, i8, i8, %"class.std::map.64" }

@constinit.17 = external hidden constant [4 x { i32, i8 }], align 4

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef, i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEC2ESt16initializer_listIS6_ERKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6tomasz19TomaszMazeGenerator23updateDistanceFromStartEii(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector.79", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::queue", align 8
  %14 = alloca %"class.std::map.64", align 8
  %15 = alloca %"class.std::initializer_list.70", align 8
  %16 = alloca [4 x %"struct.std::pair.71"], align 4
  %17 = alloca %"struct.std::less.74", align 1
  %18 = alloca %"class.std::allocator.76", align 1
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %40 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %68, %3
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = getelementptr inbounds %"class.tomasz::TomaszMazeGenerator", ptr %40, i32 0, i32 7
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = icmp slt i32 %42, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %71

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %60, %47
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = getelementptr inbounds %"class.tomasz::TomaszMazeGenerator", ptr %40, i32 0, i32 8
  %51 = load i32, ptr %50, align 4, !tbaa !27
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %48
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %67

54:                                               ; preds = %48
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %55, i32 noundef %56, i32 noundef 4)
          to label %58 unwind label %63

58:                                               ; preds = %54
  %59 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %57, i32 0, i32 2
  store i32 -1, ptr %59, align 8, !tbaa !28
  br label %60

60:                                               ; preds = %58
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %10, align 4, !tbaa !9
  br label %48, !llvm.loop !39

63:                                               ; preds = %54
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %11, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %392

67:                                               ; preds = %53
  call void @_ZNSt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %7, align 4, !tbaa !9
  br label %41, !llvm.loop !41

71:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #5
  call void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEEC2IS6_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 @constinit.17, i64 32, i1 false), !tbaa.struct !42
  %72 = getelementptr inbounds %"class.std::initializer_list.70", ptr %15, i32 0, i32 0
  store ptr %16, ptr %72, align 8, !tbaa !44
  %73 = getelementptr inbounds %"class.std::initializer_list.70", ptr %15, i32 0, i32 1
  store i64 4, ptr %73, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaISt4pairIKN6tomasz9DirectionEbEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  %74 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  %76 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %77 = load i64, ptr %76, align 8
  invoke void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEC2ESt16initializer_listIS6_ERKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr %75, i64 %77, ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %78 unwind label %133

78:                                               ; preds = %71
  call void @_ZNSt15__new_allocatorISt4pairIKN6tomasz9DirectionEbEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %79, i32 noundef %80, i32 noundef 4)
          to label %82 unwind label %137

82:                                               ; preds = %78
  store ptr %81, ptr %19, align 8, !tbaa !5
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %83, i32 0, i32 2
  store i32 0, ptr %84, align 8, !tbaa !28
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %85 unwind label %137

85:                                               ; preds = %82
  br label %86

86:                                               ; preds = %386, %85
  %87 = invoke noundef zeroext i1 @_ZNKSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %88 unwind label %137

88:                                               ; preds = %86
  %89 = zext i1 %87 to i32
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %389

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %93 unwind label %141

93:                                               ; preds = %91
  %94 = load ptr, ptr %92, align 8, !tbaa !5
  store ptr %94, ptr %20, align 8, !tbaa !5
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %95 unwind label %141

95:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !47
  store i32 %98, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !48
  store i32 %101, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %102 = load ptr, ptr %20, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %102, i32 0, i32 2
  %104 = load i32, ptr %103, align 8, !tbaa !28
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %23, align 4, !tbaa !9
  %106 = load ptr, ptr %20, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %106, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !49
  %108 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %107, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %109 unwind label %145

109:                                              ; preds = %95
  %110 = load i8, ptr %108, align 1, !tbaa !50, !range !51, !noundef !52
  %111 = trunc i8 %110 to i1
  %112 = zext i1 %111 to i32
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %122

114:                                              ; preds = %109
  %115 = load i32, ptr %21, align 4, !tbaa !9
  %116 = load i32, ptr %22, align 4, !tbaa !9
  %117 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %115, i32 noundef %116, i32 noundef 0)
          to label %118 unwind label %145

118:                                              ; preds = %114
  %119 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %117, i32 0, i32 2
  %120 = load i32, ptr %119, align 8, !tbaa !28
  %121 = icmp eq i32 %120, -1
  br label %122

122:                                              ; preds = %118, %109
  %123 = phi i1 [ false, %109 ], [ %121, %118 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br i1 %123, label %124, label %153

124:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %125 = load i32, ptr %21, align 4, !tbaa !9
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %125, i32 noundef %126, i32 noundef 0)
          to label %128 unwind label %149

128:                                              ; preds = %124
  store ptr %127, ptr %25, align 8, !tbaa !5
  %129 = load i32, ptr %23, align 4, !tbaa !9
  %130 = load ptr, ptr %25, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %130, i32 0, i32 2
  store i32 %129, ptr %131, align 8, !tbaa !28
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %132 unwind label %149

132:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %153

133:                                              ; preds = %71
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %11, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %12, align 4
  call void @_ZNSt15__new_allocatorISt4pairIKN6tomasz9DirectionEbEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %391

137:                                              ; preds = %86, %82, %78
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %11, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %12, align 4
  br label %390

141:                                              ; preds = %93, %91
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %11, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %12, align 4
  br label %388

145:                                              ; preds = %114, %95
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %11, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %387

149:                                              ; preds = %128, %124
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %11, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %387

153:                                              ; preds = %132, %122
  %154 = load ptr, ptr %20, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %154, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store i32 1, ptr %26, align 4, !tbaa !49
  %156 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %155, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %157 unwind label %181

157:                                              ; preds = %153
  %158 = load i8, ptr %156, align 1, !tbaa !50, !range !51, !noundef !52
  %159 = trunc i8 %158 to i1
  %160 = zext i1 %159 to i32
  %161 = icmp eq i32 %160, 0
  br i1 %161, label %162, label %170

162:                                              ; preds = %157
  %163 = load i32, ptr %21, align 4, !tbaa !9
  %164 = load i32, ptr %22, align 4, !tbaa !9
  %165 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %163, i32 noundef %164, i32 noundef 1)
          to label %166 unwind label %181

166:                                              ; preds = %162
  %167 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %165, i32 0, i32 2
  %168 = load i32, ptr %167, align 8, !tbaa !28
  %169 = icmp eq i32 %168, -1
  br label %170

170:                                              ; preds = %166, %157
  %171 = phi i1 [ false, %157 ], [ %169, %166 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br i1 %171, label %172, label %189

172:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %173 = load i32, ptr %21, align 4, !tbaa !9
  %174 = load i32, ptr %22, align 4, !tbaa !9
  %175 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %173, i32 noundef %174, i32 noundef 1)
          to label %176 unwind label %185

176:                                              ; preds = %172
  store ptr %175, ptr %27, align 8, !tbaa !5
  %177 = load i32, ptr %23, align 4, !tbaa !9
  %178 = load ptr, ptr %27, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %178, i32 0, i32 2
  store i32 %177, ptr %179, align 8, !tbaa !28
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %180 unwind label %185

180:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %189

181:                                              ; preds = %162, %153
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %11, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %387

185:                                              ; preds = %176, %172
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %11, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %387

189:                                              ; preds = %180, %170
  %190 = load ptr, ptr %20, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %190, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 2, ptr %28, align 4, !tbaa !49
  %192 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %191, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %193 unwind label %217

193:                                              ; preds = %189
  %194 = load i8, ptr %192, align 1, !tbaa !50, !range !51, !noundef !52
  %195 = trunc i8 %194 to i1
  %196 = zext i1 %195 to i32
  %197 = icmp eq i32 %196, 0
  br i1 %197, label %198, label %206

198:                                              ; preds = %193
  %199 = load i32, ptr %21, align 4, !tbaa !9
  %200 = load i32, ptr %22, align 4, !tbaa !9
  %201 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %199, i32 noundef %200, i32 noundef 2)
          to label %202 unwind label %217

202:                                              ; preds = %198
  %203 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %201, i32 0, i32 2
  %204 = load i32, ptr %203, align 8, !tbaa !28
  %205 = icmp eq i32 %204, -1
  br label %206

206:                                              ; preds = %202, %193
  %207 = phi i1 [ false, %193 ], [ %205, %202 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br i1 %207, label %208, label %225

208:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %209 = load i32, ptr %21, align 4, !tbaa !9
  %210 = load i32, ptr %22, align 4, !tbaa !9
  %211 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %209, i32 noundef %210, i32 noundef 2)
          to label %212 unwind label %221

212:                                              ; preds = %208
  store ptr %211, ptr %29, align 8, !tbaa !5
  %213 = load i32, ptr %23, align 4, !tbaa !9
  %214 = load ptr, ptr %29, align 8, !tbaa !5
  %215 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %214, i32 0, i32 2
  store i32 %213, ptr %215, align 8, !tbaa !28
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %216 unwind label %221

216:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %225

217:                                              ; preds = %198, %189
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %11, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %387

221:                                              ; preds = %212, %208
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %11, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %387

225:                                              ; preds = %216, %206
  %226 = load ptr, ptr %20, align 8, !tbaa !5
  %227 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %226, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 3, ptr %30, align 4, !tbaa !49
  %228 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %227, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %229 unwind label %253

229:                                              ; preds = %225
  %230 = load i8, ptr %228, align 1, !tbaa !50, !range !51, !noundef !52
  %231 = trunc i8 %230 to i1
  %232 = zext i1 %231 to i32
  %233 = icmp eq i32 %232, 0
  br i1 %233, label %234, label %242

234:                                              ; preds = %229
  %235 = load i32, ptr %21, align 4, !tbaa !9
  %236 = load i32, ptr %22, align 4, !tbaa !9
  %237 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %235, i32 noundef %236, i32 noundef 3)
          to label %238 unwind label %253

238:                                              ; preds = %234
  %239 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %237, i32 0, i32 2
  %240 = load i32, ptr %239, align 8, !tbaa !28
  %241 = icmp eq i32 %240, -1
  br label %242

242:                                              ; preds = %238, %229
  %243 = phi i1 [ false, %229 ], [ %241, %238 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br i1 %243, label %244, label %261

244:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %245 = load i32, ptr %21, align 4, !tbaa !9
  %246 = load i32, ptr %22, align 4, !tbaa !9
  %247 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %40, i32 noundef %245, i32 noundef %246, i32 noundef 3)
          to label %248 unwind label %257

248:                                              ; preds = %244
  store ptr %247, ptr %31, align 8, !tbaa !5
  %249 = load i32, ptr %23, align 4, !tbaa !9
  %250 = load ptr, ptr %31, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.tomasz::TomaszMazeGenerator::TomMazeGenTile", ptr %250, i32 0, i32 2
  store i32 %249, ptr %251, align 8, !tbaa !28
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %252 unwind label %257

252:                                              ; preds = %248
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %261

253:                                              ; preds = %234, %225
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %11, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %387

257:                                              ; preds = %248, %244
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %11, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %387

261:                                              ; preds = %252, %242
  %262 = load i32, ptr %21, align 4, !tbaa !9
  %263 = load i32, ptr %5, align 4, !tbaa !9
  %264 = icmp eq i32 %262, %263
  br i1 %264, label %265, label %277

265:                                              ; preds = %261
  %266 = load i32, ptr %22, align 4, !tbaa !9
  %267 = add nsw i32 %266, 1
  %268 = load i32, ptr %6, align 4, !tbaa !9
  %269 = icmp eq i32 %267, %268
  br i1 %269, label %270, label %277

270:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  store i32 0, ptr %32, align 4, !tbaa !49
  %271 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %272 unwind label %273

272:                                              ; preds = %270
  store i8 1, ptr %271, align 1, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %277

273:                                              ; preds = %270
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %11, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %387

277:                                              ; preds = %272, %265, %261
  %278 = load i32, ptr %21, align 4, !tbaa !9
  %279 = add nsw i32 %278, 1
  %280 = load i32, ptr %5, align 4, !tbaa !9
  %281 = icmp eq i32 %279, %280
  br i1 %281, label %282, label %293

282:                                              ; preds = %277
  %283 = load i32, ptr %22, align 4, !tbaa !9
  %284 = load i32, ptr %6, align 4, !tbaa !9
  %285 = icmp eq i32 %283, %284
  br i1 %285, label %286, label %293

286:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store i32 1, ptr %33, align 4, !tbaa !49
  %287 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %288 unwind label %289

288:                                              ; preds = %286
  store i8 1, ptr %287, align 1, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  br label %293

289:                                              ; preds = %286
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %11, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  br label %387

293:                                              ; preds = %288, %282, %277
  %294 = load i32, ptr %21, align 4, !tbaa !9
  %295 = load i32, ptr %5, align 4, !tbaa !9
  %296 = icmp eq i32 %294, %295
  br i1 %296, label %297, label %309

297:                                              ; preds = %293
  %298 = load i32, ptr %22, align 4, !tbaa !9
  %299 = sub nsw i32 %298, 1
  %300 = load i32, ptr %6, align 4, !tbaa !9
  %301 = icmp eq i32 %299, %300
  br i1 %301, label %302, label %309

302:                                              ; preds = %297
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  store i32 2, ptr %34, align 4, !tbaa !49
  %303 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %304 unwind label %305

304:                                              ; preds = %302
  store i8 1, ptr %303, align 1, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %309

305:                                              ; preds = %302
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %11, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %387

309:                                              ; preds = %304, %297, %293
  %310 = load i32, ptr %21, align 4, !tbaa !9
  %311 = sub nsw i32 %310, 1
  %312 = load i32, ptr %5, align 4, !tbaa !9
  %313 = icmp eq i32 %311, %312
  br i1 %313, label %314, label %325

314:                                              ; preds = %309
  %315 = load i32, ptr %22, align 4, !tbaa !9
  %316 = load i32, ptr %6, align 4, !tbaa !9
  %317 = icmp eq i32 %315, %316
  br i1 %317, label %318, label %325

318:                                              ; preds = %314
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  store i32 3, ptr %35, align 4, !tbaa !49
  %319 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %320 unwind label %321

320:                                              ; preds = %318
  store i8 1, ptr %319, align 1, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %325

321:                                              ; preds = %318
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %11, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %387

325:                                              ; preds = %320, %314, %309
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  store i32 0, ptr %36, align 4, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  %326 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %327 unwind label %364

327:                                              ; preds = %325
  %328 = load i8, ptr %326, align 1, !tbaa !50, !range !51, !noundef !52
  %329 = trunc i8 %328 to i1
  %330 = zext i1 %329 to i32
  %331 = icmp eq i32 %330, 1
  br i1 %331, label %332, label %361

332:                                              ; preds = %327
  store i32 1, ptr %37, align 4, !tbaa !49
  %333 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %37)
          to label %334 unwind label %368

334:                                              ; preds = %332
  %335 = load i8, ptr %333, align 1, !tbaa !50, !range !51, !noundef !52
  %336 = trunc i8 %335 to i1
  %337 = zext i1 %336 to i32
  %338 = icmp eq i32 %337, 1
  br i1 %338, label %339, label %361

339:                                              ; preds = %334
  store i32 2, ptr %38, align 4, !tbaa !49
  %340 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %38)
          to label %341 unwind label %372

341:                                              ; preds = %339
  %342 = load i8, ptr %340, align 1, !tbaa !50, !range !51, !noundef !52
  %343 = trunc i8 %342 to i1
  %344 = zext i1 %343 to i32
  %345 = icmp eq i32 %344, 1
  br i1 %345, label %346, label %361

346:                                              ; preds = %341
  store i32 3, ptr %39, align 4, !tbaa !49
  %347 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %348 unwind label %376

348:                                              ; preds = %346
  %349 = load i8, ptr %347, align 1, !tbaa !50, !range !51, !noundef !52
  %350 = trunc i8 %349 to i1
  %351 = zext i1 %350 to i32
  %352 = icmp eq i32 %351, 1
  br i1 %352, label %353, label %361

353:                                              ; preds = %348
  %354 = load i32, ptr %5, align 4, !tbaa !9
  %355 = icmp ne i32 %354, 0
  br i1 %355, label %359, label %356

356:                                              ; preds = %353
  %357 = load i32, ptr %6, align 4, !tbaa !9
  %358 = icmp ne i32 %357, 0
  br label %359

359:                                              ; preds = %356, %353
  %360 = phi i1 [ true, %353 ], [ %358, %356 ]
  br label %361

361:                                              ; preds = %359, %348, %341, %334, %327
  %362 = phi i1 [ false, %348 ], [ false, %341 ], [ false, %334 ], [ false, %327 ], [ %360, %359 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br i1 %362, label %363, label %383

363:                                              ; preds = %361
  store i32 9, ptr %8, align 4
  br label %384

364:                                              ; preds = %325
  %365 = landingpad { ptr, i32 }
          cleanup
  %366 = extractvalue { ptr, i32 } %365, 0
  store ptr %366, ptr %11, align 8
  %367 = extractvalue { ptr, i32 } %365, 1
  store i32 %367, ptr %12, align 4
  br label %382

368:                                              ; preds = %332
  %369 = landingpad { ptr, i32 }
          cleanup
  %370 = extractvalue { ptr, i32 } %369, 0
  store ptr %370, ptr %11, align 8
  %371 = extractvalue { ptr, i32 } %369, 1
  store i32 %371, ptr %12, align 4
  br label %381

372:                                              ; preds = %339
  %373 = landingpad { ptr, i32 }
          cleanup
  %374 = extractvalue { ptr, i32 } %373, 0
  store ptr %374, ptr %11, align 8
  %375 = extractvalue { ptr, i32 } %373, 1
  store i32 %375, ptr %12, align 4
  br label %380

376:                                              ; preds = %346
  %377 = landingpad { ptr, i32 }
          cleanup
  %378 = extractvalue { ptr, i32 } %377, 0
  store ptr %378, ptr %11, align 8
  %379 = extractvalue { ptr, i32 } %377, 1
  store i32 %379, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  br label %380

380:                                              ; preds = %376, %372
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %381

381:                                              ; preds = %380, %368
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  br label %382

382:                                              ; preds = %381, %364
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br label %387

383:                                              ; preds = %361
  store i32 0, ptr %8, align 4
  br label %384

384:                                              ; preds = %383, %363
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %385 = load i32, ptr %8, align 4
  switch i32 %385, label %397 [
    i32 0, label %386
    i32 9, label %389
  ]

386:                                              ; preds = %384
  br label %86, !llvm.loop !53

387:                                              ; preds = %382, %321, %305, %289, %273, %257, %253, %221, %217, %185, %181, %149, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %388

388:                                              ; preds = %387, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %390

389:                                              ; preds = %384, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #5
  call void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #5
  ret void

390:                                              ; preds = %388, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  br label %391

391:                                              ; preds = %390, %133
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #5
  call void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #5
  br label %392

392:                                              ; preds = %391, %63
  %393 = load ptr, ptr %11, align 8
  %394 = load i32, ptr %12, align 4
  %395 = insertvalue { ptr, i32 } poison, ptr %393, 0
  %396 = insertvalue { ptr, i32 } %395, i32 %394, 1
  resume { ptr, i32 } %396

397:                                              ; preds = %384
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(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 zeroext i1 @_ZNKSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #5 = { 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, !10, i64 136}
!12 = !{!"_ZTSN6tomasz19TomaszMazeGeneratorE", !13, i64 0, !14, i64 8, !14, i64 16, !10, i64 24, !10, i64 28, !15, i64 32, !19, i64 56, !10, i64 136, !10, i64 140, !26, i64 144, !6, i64 152}
!13 = !{!"_ZTS14IMazeAlgorithm"}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIS_IN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt5stackIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE", !20, i64 0}
!20 = !{!"_ZTSSt5dequeIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSSt11_Deque_baseIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE11_Deque_implE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !24, i64 8, !25, i64 16, !25, i64 48}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSSt15_Deque_iteratorIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = !{!"_ZTSN6tomasz9DirectionE", !7, i64 0}
!27 = !{!12, !10, i64 140}
!28 = !{!29, !10, i64 8}
!29 = !{!"_ZTSN6tomasz19TomaszMazeGenerator14TomMazeGenTileE", !10, i64 0, !10, i64 4, !10, i64 8, !30, i64 12, !30, i64 13, !31, i64 16}
!30 = !{!"bool", !7, i64 0}
!31 = !{!"_ZTSSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE", !32, i64 0}
!32 = !{!"_ZTSSt8_Rb_treeIN6tomasz9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !33, i64 0}
!33 = !{!"_ZTSNSt8_Rb_treeIN6tomasz9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !34, i64 0, !36, i64 8}
!34 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN6tomasz9DirectionEEE", !35, i64 0}
!35 = !{!"_ZTSSt4lessIN6tomasz9DirectionEE"}
!36 = !{!"_ZTSSt15_Rb_tree_header", !37, i64 0, !24, i64 32}
!37 = !{!"_ZTSSt18_Rb_tree_node_base", !38, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!38 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}
!42 = !{i64 0, i64 32, !43}
!43 = !{!7, !7, i64 0}
!44 = !{!45, !6, i64 0}
!45 = !{!"_ZTSSt16initializer_listISt4pairIKN6tomasz9DirectionEbEE", !6, i64 0, !24, i64 8}
!46 = !{!45, !24, i64 8}
!47 = !{!29, !10, i64 4}
!48 = !{!29, !10, i64 0}
!49 = !{!26, !26, i64 0}
!50 = !{!30, !30, i64 0}
!51 = !{i8 0, i8 2}
!52 = !{}
!53 = distinct !{!53, !40}


; 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.79" = type { %"struct.std::_Vector_base.80" }
%"struct.std::_Vector_base.80" = type { %"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_Vector_impl" }
%"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_Vector_impl" = type { %"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<tomasz::TomaszMazeGenerator::TomMazeGenTile, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile>>::_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<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl" }
%"struct.std::_Deque_base<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl" = type { %"struct.std::_Deque_base<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<tomasz::TomaszMazeGenerator::TomMazeGenTile *, std::allocator<tomasz::TomaszMazeGenerator::TomMazeGenTile *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::map.64" = type { %"class.std::_Rb_tree.65" }
%"class.std::_Rb_tree.65" = type { %"struct.std::_Rb_tree<tomasz::Direction, std::pair<const tomasz::Direction, bool>, std::_Select1st<std::pair<const tomasz::Direction, bool>>, std::less<tomasz::Direction>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<tomasz::Direction, std::pair<const tomasz::Direction, bool>, std::_Select1st<std::pair<const tomasz::Direction, bool>>, std::less<tomasz::Direction>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair.71" = type <{ i32, i8, [3 x i8] }>
%"struct.std::less.74" = type { i8 }
%"class.std::allocator.76" = type { i8 }

@constinit.17 = external hidden local_unnamed_addr constant [4 x { i32, i8 }], align 4

; 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 nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEC2ESt16initializer_listIS6_ERKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6tomasz19TomaszMazeGenerator23updateDistanceFromStartEii(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.79", align 8
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca %"class.std::map.64", align 8
  %7 = alloca [4 x %"struct.std::pair.71"], align 4
  %8 = alloca %"struct.std::less.74", align 1
  %9 = alloca %"class.std::allocator.76", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = getelementptr inbounds i8, ptr %0, i64 136
  %28 = load i32, ptr %27, align 8, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph92, label %._crit_edge93

.lr.ph92:                                         ; preds = %3
  %30 = getelementptr inbounds i8, ptr %0, i64 140
  br label %31

._crit_edge93:                                    ; preds = %._crit_edge, %3
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #5
  call void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEEC2IS6_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %7, ptr noundef nonnull align 4 dereferenceable(32) @constinit.17, i64 32, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaISt4pairIKN6tomasz9DirectionEbEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEC2ESt16initializer_listIS6_ERKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr nonnull %7, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %45 unwind label %76

31:                                               ; preds = %.lr.ph92, %._crit_edge
  %.090 = phi i32 [ 0, %.lr.ph92 ], [ %34, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %32 = load i32, ptr %30, align 4, !tbaa !27
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %38, %31
  call void @_ZNSt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  %34 = add nuw nsw i32 %.090, 1
  %35 = load i32, ptr %27, align 8, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %31, label %._crit_edge93, !llvm.loop !28

.lr.ph:                                           ; preds = %31, %38
  %.06589 = phi i32 [ %40, %38 ], [ 0, %31 ]
  %37 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %.090, i32 noundef %.06589, i32 noundef 4)
          to label %38 unwind label %43

38:                                               ; preds = %.lr.ph
  %39 = getelementptr inbounds i8, ptr %37, i64 8
  store i32 -1, ptr %39, align 8, !tbaa !30
  %40 = add nuw nsw i32 %.06589, 1
  %41 = load i32, ptr %30, align 4, !tbaa !27
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !41

43:                                               ; preds = %.lr.ph
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %214

45:                                               ; preds = %._crit_edge93
  call void @_ZNSt15__new_allocatorISt4pairIKN6tomasz9DirectionEbEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %46 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %1, i32 noundef %2, i32 noundef 4)
          to label %47 unwind label %78

47:                                               ; preds = %45
  store ptr %46, ptr %10, align 8, !tbaa !42
  %48 = getelementptr inbounds i8, ptr %46, i64 8
  store i32 0, ptr %48, align 8, !tbaa !30
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %.preheader unwind label %78

.preheader:                                       ; preds = %47
  %49 = call noundef zeroext i1 @_ZNKSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %49, label %.thread, label %.lr.ph94

.lr.ph94:                                         ; preds = %.preheader
  %50 = or i32 %2, %1
  %.not = icmp eq i32 %50, 0
  br label %51

51:                                               ; preds = %.lr.ph94, %210
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %53 = load ptr, ptr %52, align 8, !tbaa !42
  call void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %54 = getelementptr inbounds i8, ptr %53, i64 4
  %55 = load i32, ptr %54, align 4, !tbaa !43
  %56 = load i32, ptr %53, align 8, !tbaa !44
  %57 = getelementptr inbounds i8, ptr %53, i64 8
  %58 = load i32, ptr %57, align 8, !tbaa !30
  %59 = add nsw i32 %58, 1
  %60 = getelementptr inbounds i8, ptr %53, i64 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  store i32 0, ptr %11, align 4, !tbaa !45
  %61 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %60, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %62 unwind label %80

62:                                               ; preds = %51
  %63 = load i8, ptr %61, align 1, !tbaa !46, !range !47, !noundef !48
  %64 = icmp eq i8 %63, 0
  br i1 %64, label %65, label %.critedge

65:                                               ; preds = %62
  %66 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 0)
          to label %67 unwind label %80

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %66, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !30
  %70 = icmp eq i32 %69, -1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br i1 %70, label %71, label %84

71:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %72 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 0)
          to label %73 unwind label %82

73:                                               ; preds = %71
  store ptr %72, ptr %12, align 8, !tbaa !42
  %74 = getelementptr inbounds i8, ptr %72, i64 8
  store i32 %59, ptr %74, align 8, !tbaa !30
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %75 unwind label %82

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %84

76:                                               ; preds = %._crit_edge93
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIKN6tomasz9DirectionEbEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %213

78:                                               ; preds = %47, %45
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %212

80:                                               ; preds = %65, %51
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %212

82:                                               ; preds = %73, %71
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %212

.critedge:                                        ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %84

84:                                               ; preds = %.critedge, %75, %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  store i32 1, ptr %13, align 4, !tbaa !45
  %85 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %60, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %86 unwind label %100

86:                                               ; preds = %84
  %87 = load i8, ptr %85, align 1, !tbaa !46, !range !47, !noundef !48
  %88 = icmp eq i8 %87, 0
  br i1 %88, label %89, label %.critedge2

89:                                               ; preds = %86
  %90 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 1)
          to label %91 unwind label %100

91:                                               ; preds = %89
  %92 = getelementptr inbounds i8, ptr %90, i64 8
  %93 = load i32, ptr %92, align 8, !tbaa !30
  %94 = icmp eq i32 %93, -1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br i1 %94, label %95, label %104

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %96 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 1)
          to label %97 unwind label %102

97:                                               ; preds = %95
  store ptr %96, ptr %14, align 8, !tbaa !42
  %98 = getelementptr inbounds i8, ptr %96, i64 8
  store i32 %59, ptr %98, align 8, !tbaa !30
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %99 unwind label %102

99:                                               ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %104

100:                                              ; preds = %89, %84
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %212

102:                                              ; preds = %97, %95
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %212

.critedge2:                                       ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %104

104:                                              ; preds = %.critedge2, %99, %91
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  store i32 2, ptr %15, align 4, !tbaa !45
  %105 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %60, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %106 unwind label %120

106:                                              ; preds = %104
  %107 = load i8, ptr %105, align 1, !tbaa !46, !range !47, !noundef !48
  %108 = icmp eq i8 %107, 0
  br i1 %108, label %109, label %.critedge4

109:                                              ; preds = %106
  %110 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 2)
          to label %111 unwind label %120

111:                                              ; preds = %109
  %112 = getelementptr inbounds i8, ptr %110, i64 8
  %113 = load i32, ptr %112, align 8, !tbaa !30
  %114 = icmp eq i32 %113, -1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  br i1 %114, label %115, label %124

115:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  %116 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 2)
          to label %117 unwind label %122

117:                                              ; preds = %115
  store ptr %116, ptr %16, align 8, !tbaa !42
  %118 = getelementptr inbounds i8, ptr %116, i64 8
  store i32 %59, ptr %118, align 8, !tbaa !30
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %119 unwind label %122

119:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %124

120:                                              ; preds = %109, %104
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  br label %212

122:                                              ; preds = %117, %115
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %212

.critedge4:                                       ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  br label %124

124:                                              ; preds = %.critedge4, %119, %111
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #5
  store i32 3, ptr %17, align 4, !tbaa !45
  %125 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %60, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %126 unwind label %140

126:                                              ; preds = %124
  %127 = load i8, ptr %125, align 1, !tbaa !46, !range !47, !noundef !48
  %128 = icmp eq i8 %127, 0
  br i1 %128, label %129, label %.critedge6

129:                                              ; preds = %126
  %130 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 3)
          to label %131 unwind label %140

131:                                              ; preds = %129
  %132 = getelementptr inbounds i8, ptr %130, i64 8
  %133 = load i32, ptr %132, align 8, !tbaa !30
  %134 = icmp eq i32 %133, -1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  br i1 %134, label %135, label %144

135:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  %136 = invoke noundef ptr @_ZN6tomasz19TomaszMazeGenerator7getTileEiiNS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %55, i32 noundef %56, i32 noundef 3)
          to label %137 unwind label %142

137:                                              ; preds = %135
  store ptr %136, ptr %18, align 8, !tbaa !42
  %138 = getelementptr inbounds i8, ptr %136, i64 8
  store i32 %59, ptr %138, align 8, !tbaa !30
  invoke void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %139 unwind label %142

139:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  br label %144

140:                                              ; preds = %129, %124
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  br label %212

142:                                              ; preds = %137, %135
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  br label %212

.critedge6:                                       ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  br label %144

144:                                              ; preds = %.critedge6, %139, %131
  %145 = icmp eq i32 %55, %1
  %146 = add nsw i32 %56, 1
  %147 = icmp eq i32 %146, %2
  %or.cond = select i1 %145, i1 %147, i1 false
  br i1 %or.cond, label %148, label %153

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #5
  store i32 0, ptr %19, align 4, !tbaa !45
  %149 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %150 unwind label %151

150:                                              ; preds = %148
  store i8 1, ptr %149, align 1, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #5
  br label %153

151:                                              ; preds = %148
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #5
  br label %212

153:                                              ; preds = %150, %144
  %154 = add nsw i32 %55, 1
  %155 = icmp eq i32 %154, %1
  %156 = icmp eq i32 %56, %2
  %or.cond83 = select i1 %155, i1 %156, i1 false
  br i1 %or.cond83, label %157, label %162

157:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #5
  store i32 1, ptr %20, align 4, !tbaa !45
  %158 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %159 unwind label %160

159:                                              ; preds = %157
  store i8 1, ptr %158, align 1, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #5
  br label %162

160:                                              ; preds = %157
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #5
  br label %212

162:                                              ; preds = %159, %153
  %163 = add nsw i32 %56, -1
  %164 = icmp eq i32 %163, %2
  %or.cond85 = select i1 %145, i1 %164, i1 false
  br i1 %or.cond85, label %165, label %170

165:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #5
  store i32 2, ptr %21, align 4, !tbaa !45
  %166 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %167 unwind label %168

167:                                              ; preds = %165
  store i8 1, ptr %166, align 1, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #5
  br label %170

168:                                              ; preds = %165
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #5
  br label %212

170:                                              ; preds = %167, %162
  %171 = add nsw i32 %55, -1
  %172 = icmp eq i32 %171, %1
  %or.cond86 = select i1 %172, i1 %156, i1 false
  br i1 %or.cond86, label %173, label %178

173:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #5
  store i32 3, ptr %22, align 4, !tbaa !45
  %174 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %175 unwind label %176

175:                                              ; preds = %173
  store i8 1, ptr %174, align 1, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #5
  br label %178

176:                                              ; preds = %173
  %177 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #5
  br label %212

178:                                              ; preds = %175, %170
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #5
  store i32 0, ptr %23, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #5
  %179 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %180 unwind label %199

180:                                              ; preds = %178
  %181 = load i8, ptr %179, align 1, !tbaa !46, !range !47, !noundef !48
  %182 = trunc nuw i8 %181 to i1
  br i1 %182, label %183, label %.critedge8

183:                                              ; preds = %180
  store i32 1, ptr %24, align 4, !tbaa !45
  %184 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %185 unwind label %201

185:                                              ; preds = %183
  %186 = load i8, ptr %184, align 1, !tbaa !46, !range !47, !noundef !48
  %187 = trunc nuw i8 %186 to i1
  br i1 %187, label %188, label %.critedge8

188:                                              ; preds = %185
  store i32 2, ptr %25, align 4, !tbaa !45
  %189 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %190 unwind label %203

190:                                              ; preds = %188
  %191 = load i8, ptr %189, align 1, !tbaa !46, !range !47, !noundef !48
  %192 = trunc nuw i8 %191 to i1
  br i1 %192, label %193, label %.critedge8

193:                                              ; preds = %190
  store i32 3, ptr %26, align 4, !tbaa !45
  %194 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %195 unwind label %205

195:                                              ; preds = %193
  %196 = load i8, ptr %194, align 1, !tbaa !46, !range !47, !noundef !48
  %197 = trunc nuw i8 %196 to i1
  br i1 %197, label %198, label %.critedge8

198:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  br i1 %.not, label %210, label %.thread

199:                                              ; preds = %178
  %200 = landingpad { ptr, i32 }
          cleanup
  br label %209

201:                                              ; preds = %183
  %202 = landingpad { ptr, i32 }
          cleanup
  br label %208

203:                                              ; preds = %188
  %204 = landingpad { ptr, i32 }
          cleanup
  br label %207

205:                                              ; preds = %193
  %206 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  br label %207

207:                                              ; preds = %205, %203
  %.pn = phi { ptr, i32 } [ %206, %205 ], [ %204, %203 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  br label %208

208:                                              ; preds = %207, %201
  %.pn.pn = phi { ptr, i32 } [ %.pn, %207 ], [ %202, %201 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #5
  br label %209

209:                                              ; preds = %208, %199
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %208 ], [ %200, %199 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  br label %212

.critedge8:                                       ; preds = %180, %185, %190, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  br label %210

210:                                              ; preds = %198, %.critedge8
  %211 = call noundef zeroext i1 @_ZNKSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %211, label %.thread, label %51

.thread:                                          ; preds = %210, %198, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #5
  call void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  ret void

212:                                              ; preds = %80, %82, %100, %102, %120, %122, %140, %142, %151, %160, %168, %176, %209, %78
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %79, %78 ], [ %.pn.pn.pn, %209 ], [ %177, %176 ], [ %169, %168 ], [ %161, %160 ], [ %152, %151 ], [ %143, %142 ], [ %141, %140 ], [ %123, %122 ], [ %121, %120 ], [ %103, %102 ], [ %101, %100 ], [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @_ZNSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  br label %213

213:                                              ; preds = %212, %76
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %212 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #5
  call void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  br label %214

214:                                              ; preds = %213, %43
  %.pn80 = phi { ptr, i32 } [ %44, %43 ], [ %.pn.pn.pn.pn.pn.pn, %213 ]
  resume { ptr, i32 } %.pn80
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE4pushERKS3_(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 zeroext i1 @_ZNKSt5queueIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #5 = { 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, !11, i64 136}
!6 = !{!"_ZTSN6tomasz19TomaszMazeGeneratorE", !7, i64 0, !8, i64 8, !8, i64 16, !11, i64 24, !11, i64 28, !12, i64 32, !17, i64 56, !11, i64 136, !11, i64 140, !24, i64 144, !16, i64 152}
!7 = !{!"_ZTS14IMazeAlgorithm"}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTSSt6vectorIS_IN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS2_EESaIS4_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseISt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EESaIS5_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EESaIS5_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EESaIS5_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!"_ZTSSt5stackIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESt5dequeIS3_SaIS3_EEE", !18, i64 0}
!18 = !{!"_ZTSSt5dequeIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSSt11_Deque_baseIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE11_Deque_implE", !21, i64 0}
!21 = !{!"_ZTSNSt11_Deque_baseIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileESaIS3_EE16_Deque_impl_dataE", !16, i64 0, !22, i64 8, !23, i64 16, !23, i64 48}
!22 = !{!"long", !9, i64 0}
!23 = !{!"_ZTSSt15_Deque_iteratorIPN6tomasz19TomaszMazeGenerator14TomMazeGenTileERS3_PS3_E", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!24 = !{!"_ZTSN6tomasz9DirectionE", !9, i64 0}
!25 = !{i64 0, i64 32, !26}
!26 = !{!9, !9, i64 0}
!27 = !{!6, !11, i64 140}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!31, !11, i64 8}
!31 = !{!"_ZTSN6tomasz19TomaszMazeGenerator14TomMazeGenTileE", !11, i64 0, !11, i64 4, !11, i64 8, !32, i64 12, !32, i64 13, !33, i64 16}
!32 = !{!"bool", !9, i64 0}
!33 = !{!"_ZTSSt3mapIN6tomasz9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE", !34, i64 0}
!34 = !{!"_ZTSSt8_Rb_treeIN6tomasz9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !35, i64 0}
!35 = !{!"_ZTSNSt8_Rb_treeIN6tomasz9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !36, i64 0, !38, i64 8}
!36 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN6tomasz9DirectionEEE", !37, i64 0}
!37 = !{!"_ZTSSt4lessIN6tomasz9DirectionEE"}
!38 = !{!"_ZTSSt15_Rb_tree_header", !39, i64 0, !22, i64 32}
!39 = !{!"_ZTSSt18_Rb_tree_node_base", !40, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!40 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!41 = distinct !{!41, !29}
!42 = !{!16, !16, i64 0}
!43 = !{!31, !11, i64 4}
!44 = !{!31, !11, i64 0}
!45 = !{!24, !24, i64 0}
!46 = !{!32, !32, i64 0}
!47 = !{i8 0, i8 2}
!48 = !{}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass