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

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

%"class.std::vector.79" = type { %"struct.std::_Vector_base.80" }
%"struct.std::_Vector_base.80" = type { %"struct.std::_Vector_base<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.132" = type { %"struct.std::_Vector_base.133" }
%"struct.std::_Vector_base.133" = type { %"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sim::BasicTile" = type { %"class.std::map.100" }
%"class.std::map.100" = type { %"class.std::_Rb_tree.101" }
%"class.std::_Rb_tree.101" = type { %"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, bool>, std::_Select1st<std::pair<const sim::Direction, bool>>, std::less<sim::Direction>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, bool>, std::_Select1st<std::pair<const sim::Direction, bool>>, std::less<sim::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.140" = type <{ i32, i8, [3 x i8] }>
%"struct.std::pair.137" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim4Maze20mirrorAcrossVerticalERKSt6vectorIS1_INS_9BasicTileESaIS2_EESaIS4_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.79") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.132", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.sim::BasicTile", align 8
  %13 = alloca %"struct.std::pair.140", align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair.137", align 8
  %17 = alloca %"struct.std::pair.140", align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair.137", align 8
  %21 = alloca %"struct.std::pair.140", align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair.137", align 8
  %25 = alloca %"struct.std::pair.140", align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::pair.137", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %205, %2
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #4
  %34 = icmp ult i64 %31, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %29
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %213

36:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %158, %36
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %42)
          to label %44 unwind label %48

44:                                               ; preds = %37
  %45 = call noundef i64 @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #4
  %46 = icmp ult i64 %39, %45
  br i1 %46, label %52, label %47

47:                                               ; preds = %44
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %203

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  br label %202

52:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #4
  call void @_ZN3sim9BasicTileC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  %53 = getelementptr inbounds %"struct.sim::BasicTile", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !11
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #4
  %57 = sub i64 %56, 1
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = sub i64 %57, %59
  %61 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %60)
          to label %62 unwind label %161

62:                                               ; preds = %52
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %64)
          to label %66 unwind label %161

66:                                               ; preds = %62
  %67 = getelementptr inbounds %"struct.sim::BasicTile", ptr %65, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !11
  %68 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %67, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %69 unwind label %165

69:                                               ; preds = %66
  %70 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 1 dereferenceable(1) %68)
          to label %71 unwind label %165

71:                                               ; preds = %69
  %72 = trunc i64 %70 to i40
  store i40 %72, ptr %13, align 4
  %73 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %53, ptr noundef nonnull align 4 dereferenceable(5) %13)
          to label %74 unwind label %165

74:                                               ; preds = %71
  %75 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %76 = extractvalue { ptr, i8 } %73, 0
  store ptr %76, ptr %75, align 8
  %77 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %78 = extractvalue { ptr, i8 } %73, 1
  store i8 %78, ptr %77, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %79 = getelementptr inbounds %"struct.sim::BasicTile", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 1, ptr %18, align 4, !tbaa !11
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #4
  %83 = sub i64 %82, 1
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = sub i64 %83, %85
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %86)
          to label %88 unwind label %170

88:                                               ; preds = %74
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %90)
          to label %92 unwind label %170

92:                                               ; preds = %88
  %93 = getelementptr inbounds %"struct.sim::BasicTile", ptr %91, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 3, ptr %19, align 4, !tbaa !11
  %94 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %93, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %95 unwind label %174

95:                                               ; preds = %92
  %96 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 1 dereferenceable(1) %94)
          to label %97 unwind label %174

97:                                               ; preds = %95
  %98 = trunc i64 %96 to i40
  store i40 %98, ptr %17, align 4
  %99 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %79, ptr noundef nonnull align 4 dereferenceable(5) %17)
          to label %100 unwind label %174

100:                                              ; preds = %97
  %101 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 0
  %102 = extractvalue { ptr, i8 } %99, 0
  store ptr %102, ptr %101, align 8
  %103 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 1
  %104 = extractvalue { ptr, i8 } %99, 1
  store i8 %104, ptr %103, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %105 = getelementptr inbounds %"struct.sim::BasicTile", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 2, ptr %22, align 4, !tbaa !11
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #4
  %109 = sub i64 %108, 1
  %110 = load i32, ptr %6, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = sub i64 %109, %111
  %113 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %112)
          to label %114 unwind label %179

114:                                              ; preds = %100
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %116)
          to label %118 unwind label %179

118:                                              ; preds = %114
  %119 = getelementptr inbounds %"struct.sim::BasicTile", ptr %117, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 2, ptr %23, align 4, !tbaa !11
  %120 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %119, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %121 unwind label %183

121:                                              ; preds = %118
  %122 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 1 dereferenceable(1) %120)
          to label %123 unwind label %183

123:                                              ; preds = %121
  %124 = trunc i64 %122 to i40
  store i40 %124, ptr %21, align 4
  %125 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %105, ptr noundef nonnull align 4 dereferenceable(5) %21)
          to label %126 unwind label %183

126:                                              ; preds = %123
  %127 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 0
  %128 = extractvalue { ptr, i8 } %125, 0
  store ptr %128, ptr %127, align 8
  %129 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 1
  %130 = extractvalue { ptr, i8 } %125, 1
  store i8 %130, ptr %129, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  %131 = getelementptr inbounds %"struct.sim::BasicTile", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  store i32 3, ptr %26, align 4, !tbaa !11
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %133) #4
  %135 = sub i64 %134, 1
  %136 = load i32, ptr %6, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = sub i64 %135, %137
  %139 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef %138)
          to label %140 unwind label %188

140:                                              ; preds = %126
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %142)
          to label %144 unwind label %188

144:                                              ; preds = %140
  %145 = getelementptr inbounds %"struct.sim::BasicTile", ptr %143, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  store i32 1, ptr %27, align 4, !tbaa !11
  %146 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %145, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %147 unwind label %192

147:                                              ; preds = %144
  %148 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 1 dereferenceable(1) %146)
          to label %149 unwind label %192

149:                                              ; preds = %147
  %150 = trunc i64 %148 to i40
  store i40 %150, ptr %25, align 4
  %151 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %131, ptr noundef nonnull align 4 dereferenceable(5) %25)
          to label %152 unwind label %192

152:                                              ; preds = %149
  %153 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 0
  %154 = extractvalue { ptr, i8 } %151, 0
  store ptr %154, ptr %153, align 8
  %155 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 1
  %156 = extractvalue { ptr, i8 } %151, 1
  store i8 %156, ptr %155, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  invoke void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %157 unwind label %197

157:                                              ; preds = %152
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #4
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %9, align 4, !tbaa !9
  br label %37, !llvm.loop !13

161:                                              ; preds = %62, %52
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %10, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %11, align 4
  br label %169

165:                                              ; preds = %71, %69, %66
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %10, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %169

169:                                              ; preds = %165, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %201

170:                                              ; preds = %88, %74
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %10, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %11, align 4
  br label %178

174:                                              ; preds = %97, %95, %92
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %10, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %178

178:                                              ; preds = %174, %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %201

179:                                              ; preds = %114, %100
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %10, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %11, align 4
  br label %187

183:                                              ; preds = %123, %121, %118
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %10, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %187

187:                                              ; preds = %183, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %201

188:                                              ; preds = %140, %126
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %10, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %11, align 4
  br label %196

192:                                              ; preds = %149, %147, %144
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %10, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %196

196:                                              ; preds = %192, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %201

197:                                              ; preds = %152
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %10, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %11, align 4
  br label %201

201:                                              ; preds = %197, %196, %187, %178, %169
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #4
  br label %202

202:                                              ; preds = %201, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %212

203:                                              ; preds = %47
  invoke void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %204 unwind label %208

204:                                              ; preds = %203
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %6, align 4, !tbaa !9
  br label %29, !llvm.loop !15

208:                                              ; preds = %203
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %10, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %11, align 4
  br label %212

212:                                              ; preds = %208, %202
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %217

213:                                              ; preds = %35
  store i1 true, ptr %5, align 1
  store i32 1, ptr %7, align 4
  %214 = load i1, ptr %5, align 1
  br i1 %214, label %216, label %215

215:                                              ; preds = %213
  call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %216

216:                                              ; preds = %215, %213
  ret void

217:                                              ; preds = %212
  %218 = load ptr, ptr %10, align 8
  %219 = load i32, ptr %11, align 4
  %220 = insertvalue { ptr, i32 } poison, ptr %218, 0
  %221 = insertvalue { ptr, i32 } %220, i32 %219, 1
  resume { ptr, i32 } %221
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(5)) #2 align 2

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

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

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

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

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

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

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

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


; 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<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<sim::BasicTile>, std::allocator<std::vector<sim::BasicTile>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.132" = type { %"struct.std::_Vector_base.133" }
%"struct.std::_Vector_base.133" = type { %"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::BasicTile, std::allocator<sim::BasicTile>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sim::BasicTile" = type { %"class.std::map.100" }
%"class.std::map.100" = type { %"class.std::_Rb_tree.101" }
%"class.std::_Rb_tree.101" = type { %"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, bool>, std::_Select1st<std::pair<const sim::Direction, bool>>, std::less<sim::Direction>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, bool>, std::_Select1st<std::pair<const sim::Direction, bool>>, std::less<sim::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.140" = type <{ i32, i8, [3 x i8] }>

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim4Maze20mirrorAcrossVerticalERKSt6vectorIS1_INS_9BasicTileESaIS2_EESaIS4_EE(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector.79") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.132", align 8
  %4 = alloca %"struct.sim::BasicTile", align 8
  %5 = alloca %"struct.std::pair.140", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair.140", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair.140", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair.140", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  tail call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %17 = tail call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %104
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %104 ], [ 0, %2 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %18 = xor i64 %indvars.iv55, -1
  br label %19

19:                                               ; preds = %80, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %80 ], [ 0, %.lr.ph ]
  %20 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv55)
          to label %21 unwind label %25

21:                                               ; preds = %19
  %22 = call noundef i64 @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %23 = icmp ugt i64 %22, %indvars.iv
  br i1 %23, label %27, label %24

24:                                               ; preds = %21
  invoke void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %104 unwind label %107

25:                                               ; preds = %19
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %109

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #4
  call void @_ZN3sim9BasicTileC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  %28 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %29 = add i64 %28, %18
  %30 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %29)
          to label %31 unwind label %81

31:                                               ; preds = %27
  %32 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %indvars.iv)
          to label %33 unwind label %81

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  %34 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %35 unwind label %83

35:                                               ; preds = %33
  %36 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %37 unwind label %83

37:                                               ; preds = %35
  %38 = trunc i64 %36 to i40
  store i40 %38, ptr %5, align 8
  %39 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(5) %5)
          to label %40 unwind label %83

40:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  %41 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %42 = add i64 %41, %18
  %43 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %42)
          to label %44 unwind label %86

44:                                               ; preds = %40
  %45 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %indvars.iv)
          to label %46 unwind label %86

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 3, ptr %10, align 4, !tbaa !5
  %47 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %45, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %48 unwind label %88

48:                                               ; preds = %46
  %49 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(1) %47)
          to label %50 unwind label %88

50:                                               ; preds = %48
  %51 = trunc i64 %49 to i40
  store i40 %51, ptr %8, align 8
  %52 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(5) %8)
          to label %53 unwind label %88

53:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  store i32 2, ptr %12, align 4, !tbaa !5
  %54 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %55 = add i64 %54, %18
  %56 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %55)
          to label %57 unwind label %91

57:                                               ; preds = %53
  %58 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %indvars.iv)
          to label %59 unwind label %91

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  store i32 2, ptr %13, align 4, !tbaa !5
  %60 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %58, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %61 unwind label %93

61:                                               ; preds = %59
  %62 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 1 dereferenceable(1) %60)
          to label %63 unwind label %93

63:                                               ; preds = %61
  %64 = trunc i64 %62 to i40
  store i40 %64, ptr %11, align 8
  %65 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(5) %11)
          to label %66 unwind label %93

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 3, ptr %15, align 4, !tbaa !5
  %67 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %68 = add i64 %67, %18
  %69 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %68)
          to label %70 unwind label %96

70:                                               ; preds = %66
  %71 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %indvars.iv)
          to label %72 unwind label %96

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  store i32 1, ptr %16, align 4, !tbaa !5
  %73 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %71, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %74 unwind label %98

74:                                               ; preds = %72
  %75 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 1 dereferenceable(1) %73)
          to label %76 unwind label %98

76:                                               ; preds = %74
  %77 = trunc i64 %75 to i40
  store i40 %77, ptr %14, align 8
  %78 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(5) %14)
          to label %79 unwind label %98

79:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  invoke void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %80 unwind label %101

80:                                               ; preds = %79
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br label %19, !llvm.loop !9

81:                                               ; preds = %31, %27
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

83:                                               ; preds = %37, %35, %33
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %85

85:                                               ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %103

86:                                               ; preds = %44, %40
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %90

88:                                               ; preds = %50, %48, %46
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  br label %90

90:                                               ; preds = %88, %86
  %.pn43 = phi { ptr, i32 } [ %89, %88 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %103

91:                                               ; preds = %57, %53
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %95

93:                                               ; preds = %63, %61, %59
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  br label %95

95:                                               ; preds = %93, %91
  %.pn45 = phi { ptr, i32 } [ %94, %93 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br label %103

96:                                               ; preds = %70, %66
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %100

98:                                               ; preds = %76, %74, %72
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  br label %100

100:                                              ; preds = %98, %96
  %.pn47 = phi { ptr, i32 } [ %99, %98 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  br label %103

101:                                              ; preds = %79
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %103

103:                                              ; preds = %101, %100, %95, %90, %85
  %.pn49 = phi { ptr, i32 } [ %102, %101 ], [ %.pn47, %100 ], [ %.pn45, %95 ], [ %.pn43, %90 ], [ %.pn, %85 ]
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #4
  br label %109

104:                                              ; preds = %24
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %105 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %106 = icmp ugt i64 %105, %indvars.iv.next56
  br i1 %106, label %.lr.ph, label %._crit_edge, !llvm.loop !11

107:                                              ; preds = %24
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %109

109:                                              ; preds = %25, %103, %107
  %.pn49.pn.pn = phi { ptr, i32 } [ %108, %107 ], [ %.pn49, %103 ], [ %26, %25 ]
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %.pn49.pn.pn

._crit_edge:                                      ; preds = %104, %2
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(5)) local_unnamed_addr #2 align 2

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"_ZTSN3sim9DirectionE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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