; 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 }
%"class.std::initializer_list.143" = type { ptr, i64 }
%"class.std::allocator.134" = type { i8 }

; 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 @_ZN3sim4Maze22rotateCounterClockwiseERKSt6vectorIS1_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 i32, align 4
  %14 = alloca %"struct.std::pair.140", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair.137", align 8
  %18 = alloca %"struct.std::pair.140", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair.137", align 8
  %22 = alloca %"struct.std::pair.140", align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair.137", align 8
  %26 = alloca %"struct.std::pair.140", align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::pair.137", align 8
  %30 = alloca %"class.std::vector.132", align 8
  %31 = alloca %"class.std::initializer_list.143", align 8
  %32 = alloca [1 x %"struct.sim::BasicTile"], align 8
  %33 = alloca ptr, align 8
  %34 = alloca %"class.std::allocator.134", align 1
  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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %261, %2
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  %40 = icmp ult i64 %37, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45)
          to label %47 unwind label %55

47:                                               ; preds = %42
  %48 = call noundef i64 @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #5
  %49 = sub i64 %48, 1
  %50 = trunc i64 %49 to i32
  store i32 %50, ptr %9, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %255, %47
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = icmp sge i32 %52, 0
  br i1 %53, label %59, label %54

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

55:                                               ; preds = %42
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %10, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %11, align 4
  br label %259

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #5
  call void @_ZN3sim9BasicTileC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62)
          to label %64 unwind label %180

64:                                               ; preds = %59
  %65 = call noundef i64 @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #5
  %66 = sub i64 %65, 1
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = sub i64 %66, %68
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %13, align 4, !tbaa !9
  %71 = getelementptr inbounds %"struct.sim::BasicTile", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !11
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74)
          to label %76 unwind label %184

76:                                               ; preds = %64
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %78)
          to label %80 unwind label %184

80:                                               ; preds = %76
  %81 = getelementptr inbounds %"struct.sim::BasicTile", ptr %79, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1, ptr %16, align 4, !tbaa !11
  %82 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %81, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %83 unwind label %188

83:                                               ; preds = %80
  %84 = 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) %82)
          to label %85 unwind label %188

85:                                               ; preds = %83
  %86 = trunc i64 %84 to i40
  store i40 %86, ptr %14, align 4
  %87 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %71, ptr noundef nonnull align 4 dereferenceable(5) %14)
          to label %88 unwind label %188

88:                                               ; preds = %85
  %89 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %90 = extractvalue { ptr, i8 } %87, 0
  store ptr %90, ptr %89, align 8
  %91 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %92 = extractvalue { ptr, i8 } %87, 1
  store i8 %92, ptr %91, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %93 = getelementptr inbounds %"struct.sim::BasicTile", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 1, ptr %19, align 4, !tbaa !11
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96)
          to label %98 unwind label %193

98:                                               ; preds = %88
  %99 = load i32, ptr %9, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %100)
          to label %102 unwind label %193

102:                                              ; preds = %98
  %103 = getelementptr inbounds %"struct.sim::BasicTile", ptr %101, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 2, ptr %20, align 4, !tbaa !11
  %104 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %103, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %105 unwind label %197

105:                                              ; preds = %102
  %106 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 1 dereferenceable(1) %104)
          to label %107 unwind label %197

107:                                              ; preds = %105
  %108 = trunc i64 %106 to i40
  store i40 %108, ptr %18, align 4
  %109 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %93, ptr noundef nonnull align 4 dereferenceable(5) %18)
          to label %110 unwind label %197

110:                                              ; preds = %107
  %111 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 0
  %112 = extractvalue { ptr, i8 } %109, 0
  store ptr %112, ptr %111, align 8
  %113 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 1
  %114 = extractvalue { ptr, i8 } %109, 1
  store i8 %114, ptr %113, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %115 = getelementptr inbounds %"struct.sim::BasicTile", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 2, ptr %23, align 4, !tbaa !11
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = load i32, ptr %6, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef %118)
          to label %120 unwind label %202

120:                                              ; preds = %110
  %121 = load i32, ptr %9, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %122)
          to label %124 unwind label %202

124:                                              ; preds = %120
  %125 = getelementptr inbounds %"struct.sim::BasicTile", ptr %123, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 3, ptr %24, align 4, !tbaa !11
  %126 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %125, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %127 unwind label %206

127:                                              ; preds = %124
  %128 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 1 dereferenceable(1) %126)
          to label %129 unwind label %206

129:                                              ; preds = %127
  %130 = trunc i64 %128 to i40
  store i40 %130, ptr %22, align 4
  %131 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %115, ptr noundef nonnull align 4 dereferenceable(5) %22)
          to label %132 unwind label %206

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

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

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

149:                                              ; preds = %146
  %150 = invoke i64 @_ZSt9make_pairIN3sim9DirectionERKbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 1 dereferenceable(1) %148)
          to label %151 unwind label %215

151:                                              ; preds = %149
  %152 = trunc i64 %150 to i40
  store i40 %152, ptr %26, align 4
  %153 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %137, ptr noundef nonnull align 4 dereferenceable(5) %26)
          to label %154 unwind label %215

154:                                              ; preds = %151
  %155 = getelementptr inbounds { ptr, i8 }, ptr %29, i32 0, i32 0
  %156 = extractvalue { ptr, i8 } %153, 0
  store ptr %156, ptr %155, align 8
  %157 = getelementptr inbounds { ptr, i8 }, ptr %29, i32 0, i32 1
  %158 = extractvalue { ptr, i8 } %153, 1
  store i8 %158, ptr %157, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  %159 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = icmp ule i64 %159, %161
  br i1 %162, label %163, label %248

163:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr %32) #5
  store ptr %32, ptr %33, align 8
  invoke void @_ZN3sim9BasicTileC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %164 unwind label %220

164:                                              ; preds = %163
  %165 = getelementptr inbounds %"class.std::initializer_list.143", ptr %31, i32 0, i32 0
  store ptr %32, ptr %165, align 8, !tbaa !13
  %166 = getelementptr inbounds %"class.std::initializer_list.143", ptr %31, i32 0, i32 1
  store i64 1, ptr %166, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #5
  call void @_ZNSaIN3sim9BasicTileEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  %167 = getelementptr inbounds { ptr, i64 }, ptr %31, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8
  %169 = getelementptr inbounds { ptr, i64 }, ptr %31, i32 0, i32 1
  %170 = load i64, ptr %169, align 8
  invoke void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr %168, i64 %170, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %171 unwind label %231

171:                                              ; preds = %164
  invoke void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %172 unwind label %235

172:                                              ; preds = %171
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  call void @_ZNSt15__new_allocatorIN3sim9BasicTileEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #5
  %173 = getelementptr inbounds [1 x %"struct.sim::BasicTile"], ptr %32, i32 0, i32 0
  %174 = getelementptr inbounds %"struct.sim::BasicTile", ptr %173, i64 1
  br label %175

175:                                              ; preds = %175, %172
  %176 = phi ptr [ %174, %172 ], [ %177, %175 ]
  %177 = getelementptr inbounds %"struct.sim::BasicTile", ptr %176, i64 -1
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %177) #5
  %178 = icmp eq ptr %177, %173
  br i1 %178, label %179, label %175

179:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #5
  br label %254

180:                                              ; preds = %252, %248, %59
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %10, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %11, align 4
  br label %258

184:                                              ; preds = %76, %64
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %10, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %11, align 4
  br label %192

188:                                              ; preds = %85, %83, %80
  %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
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %192

192:                                              ; preds = %188, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %258

193:                                              ; preds = %98, %88
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %10, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %11, align 4
  br label %201

197:                                              ; preds = %107, %105, %102
  %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
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %201

201:                                              ; preds = %197, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %258

202:                                              ; preds = %120, %110
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %10, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %11, align 4
  br label %210

206:                                              ; preds = %129, %127, %124
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %10, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %210

210:                                              ; preds = %206, %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %258

211:                                              ; preds = %142, %132
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %10, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %11, align 4
  br label %219

215:                                              ; preds = %151, %149, %146
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %10, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %219

219:                                              ; preds = %215, %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %258

220:                                              ; preds = %163
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %10, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %11, align 4
  %224 = load ptr, ptr %33, align 8
  %225 = icmp eq ptr %32, %224
  br i1 %225, label %230, label %226

226:                                              ; preds = %226, %220
  %227 = phi ptr [ %224, %220 ], [ %228, %226 ]
  %228 = getelementptr inbounds %"struct.sim::BasicTile", ptr %227, i64 -1
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %228) #5
  %229 = icmp eq ptr %228, %32
  br i1 %229, label %230, label %226

230:                                              ; preds = %226, %220
  br label %247

231:                                              ; preds = %164
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %10, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %11, align 4
  br label %239

235:                                              ; preds = %171
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %10, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %11, align 4
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  br label %239

239:                                              ; preds = %235, %231
  call void @_ZNSt15__new_allocatorIN3sim9BasicTileEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #5
  %240 = getelementptr inbounds [1 x %"struct.sim::BasicTile"], ptr %32, i32 0, i32 0
  %241 = getelementptr inbounds %"struct.sim::BasicTile", ptr %240, i64 1
  br label %242

242:                                              ; preds = %242, %239
  %243 = phi ptr [ %241, %239 ], [ %244, %242 ]
  %244 = getelementptr inbounds %"struct.sim::BasicTile", ptr %243, i64 -1
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %244) #5
  %245 = icmp eq ptr %244, %240
  br i1 %245, label %246, label %242

246:                                              ; preds = %242
  br label %247

247:                                              ; preds = %246, %230
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #5
  br label %258

248:                                              ; preds = %154
  %249 = load i32, ptr %13, align 4, !tbaa !9
  %250 = sext i32 %249 to i64
  %251 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %250)
          to label %252 unwind label %180

252:                                              ; preds = %248
  invoke void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %251, ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %253 unwind label %180

253:                                              ; preds = %252
  br label %254

254:                                              ; preds = %253, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %9, align 4, !tbaa !9
  %257 = sub nsw i32 %256, 1
  store i32 %257, ptr %9, align 4, !tbaa !9
  br label %51, !llvm.loop !17

258:                                              ; preds = %247, %219, %210, %201, %192, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  br label %259

259:                                              ; preds = %258, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %268

260:                                              ; preds = %54
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %6, align 4, !tbaa !9
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %6, align 4, !tbaa !9
  br label %35, !llvm.loop !19

264:                                              ; preds = %41
  store i1 true, ptr %5, align 1
  store i32 1, ptr %7, align 4
  %265 = load i1, ptr %5, align 1
  br i1 %265, label %267, label %266

266:                                              ; preds = %264
  call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %267

267:                                              ; preds = %266, %264
  ret void

268:                                              ; preds = %259
  %269 = load ptr, ptr %10, align 8
  %270 = load i32, ptr %11, align 4
  %271 = insertvalue { ptr, i32 } poison, ptr %269, 0
  %272 = insertvalue { ptr, i32 } %271, i32 %270, 1
  resume { ptr, i32 } %272
}

; 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 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3sim9BasicTileC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !12, i64 0}
!12 = !{!"_ZTSN3sim9DirectionE", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt16initializer_listIN3sim9BasicTileEE", !6, i64 0, !15, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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] }>
%"class.std::allocator.134" = type { 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 @_ZN3sim4Maze22rotateCounterClockwiseERKSt6vectorIS1_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
  %17 = alloca %"class.std::vector.132", align 8
  %18 = alloca [1 x %"struct.sim::BasicTile"], align 8
  %19 = alloca %"class.std::allocator.134", align 1
  tail call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %20 = tail call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %.not65 = icmp eq i64 %20, 0
  br i1 %.not65, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %2, %._crit_edge
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %._crit_edge ], [ 0, %2 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %21 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv67)
          to label %22 unwind label %29

22:                                               ; preds = %.lr.ph63
  %23 = call noundef i64 @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %24 = trunc i64 %23 to i32
  %.03459 = add i32 %24, -1
  %25 = icmp sgt i32 %.03459, -1
  br i1 %25, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %22
  %26 = zext nneg i32 %.03459 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %117, %22
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %27 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %28 = icmp ugt i64 %27, %indvars.iv.next68
  br i1 %28, label %.lr.ph63, label %._crit_edge64, !llvm.loop !5

29:                                               ; preds = %.lr.ph63
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %120

.lr.ph:                                           ; preds = %.lr.ph.preheader, %117
  %indvars.iv = phi i64 [ %26, %.lr.ph.preheader ], [ %indvars.iv.next, %117 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  call void @_ZN3sim9BasicTileC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  %31 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv67)
          to label %32 unwind label %86

32:                                               ; preds = %.lr.ph
  %33 = call noundef i64 @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %34 = xor i64 %indvars.iv, -1
  %35 = add i64 %33, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !7
  %36 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv67)
          to label %37 unwind label %88

37:                                               ; preds = %32
  %38 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %indvars.iv)
          to label %39 unwind label %88

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 1, ptr %7, align 4, !tbaa !7
  %40 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %38, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %41 unwind label %90

41:                                               ; preds = %39
  %42 = 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) %40)
          to label %43 unwind label %90

43:                                               ; preds = %41
  %44 = trunc i64 %42 to i40
  store i40 %44, ptr %5, align 8
  %45 = 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 %46 unwind label %90

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store i32 1, ptr %9, align 4, !tbaa !7
  %47 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv67)
          to label %48 unwind label %93

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3sim9BasicTileESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %indvars.iv)
          to label %50 unwind label %93

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store i32 2, ptr %10, align 4, !tbaa !7
  %51 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %49, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %52 unwind label %95

52:                                               ; preds = %50
  %53 = 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) %51)
          to label %54 unwind label %95

54:                                               ; preds = %52
  %55 = trunc i64 %53 to i40
  store i40 %55, ptr %8, align 8
  %56 = 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 %57 unwind label %95

57:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  store i32 2, ptr %12, align 4, !tbaa !7
  %58 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv67)
          to label %59 unwind label %98

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

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

63:                                               ; preds = %61
  %64 = 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) %62)
          to label %65 unwind label %100

65:                                               ; preds = %63
  %66 = trunc i64 %64 to i40
  store i40 %66, ptr %11, align 8
  %67 = 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 %68 unwind label %100

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  store i32 3, ptr %15, align 4, !tbaa !7
  %69 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv67)
          to label %70 unwind label %103

70:                                               ; preds = %68
  %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 %103

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  store i32 0, ptr %16, align 4, !tbaa !7
  %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 %105

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 %105

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 %105

79:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  %80 = call noundef i64 @_ZNKSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %sext = shl i64 %35, 32
  %81 = ashr exact i64 %sext, 32
  %.not = icmp ugt i64 %80, %81
  br i1 %.not, label %114, label %82

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %18) #5
  invoke void @_ZN3sim9BasicTileC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %18, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %83 unwind label %108

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #5
  call void @_ZNSaIN3sim9BasicTileEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr nonnull %18, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %84 unwind label %110

84:                                               ; preds = %83
  invoke void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %85 unwind label %112

85:                                               ; preds = %84
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @_ZNSt15__new_allocatorIN3sim9BasicTileEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #5
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #5
  br label %117

86:                                               ; preds = %116, %114, %.lr.ph
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %119

88:                                               ; preds = %37, %32
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %43, %41, %39
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %92

92:                                               ; preds = %90, %88
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %119

93:                                               ; preds = %48, %46
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %54, %52, %50
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %97

97:                                               ; preds = %95, %93
  %.pn48 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %119

98:                                               ; preds = %59, %57
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %102

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

102:                                              ; preds = %100, %98
  %.pn50 = phi { ptr, i32 } [ %101, %100 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %119

103:                                              ; preds = %70, %68
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %107

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

107:                                              ; preds = %105, %103
  %.pn52 = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %119

108:                                              ; preds = %82
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

110:                                              ; preds = %83
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

112:                                              ; preds = %84
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %112, %110
  %.pn54 = phi { ptr, i32 } [ %113, %112 ], [ %111, %110 ]
  call void @_ZNSt15__new_allocatorIN3sim9BasicTileEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #5
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %108
  %.pn54.pn = phi { ptr, i32 } [ %109, %108 ], [ %.pn54, %.loopexit.loopexit ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #5
  br label %119

114:                                              ; preds = %79
  %115 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %81)
          to label %116 unwind label %86

116:                                              ; preds = %114
  invoke void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %115, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %117 unwind label %86

117:                                              ; preds = %116, %85
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %118 = icmp sgt i64 %indvars.iv, 0
  br i1 %118, label %.lr.ph, label %._crit_edge, !llvm.loop !11

119:                                              ; preds = %.loopexit, %107, %102, %97, %92, %86
  %.pn54.pn.pn = phi { ptr, i32 } [ %.pn54.pn, %.loopexit ], [ %87, %86 ], [ %.pn52, %107 ], [ %.pn50, %102 ], [ %.pn48, %97 ], [ %.pn, %92 ]
  call void @_ZN3sim9BasicTileD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  br label %120

120:                                              ; preds = %119, %29
  %.pn54.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn, %119 ], [ %30, %29 ]
  call void @_ZNSt6vectorIN3sim9BasicTileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIS_IN3sim9BasicTileESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %.pn54.pn.pn.pn

._crit_edge64:                                    ; preds = %._crit_edge, %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 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3sim9BasicTileC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_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 void @_ZNSt15__new_allocatorIN3sim9BasicTileEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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


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