; LLVM IR from gazebosim/gz-physics :: tpe/lib/src/aabb_tree/AABB.ll (ZN4aabb4Tree10insertLeafEj)

; 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.aabb::AABB" = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.aabb::Tree" = type <{ i32, [4 x i8], %"class.std::vector.0", i32, i32, i32, i32, i8, [7 x i8], double, %"class.std::vector.5", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::unordered_map", i8, [7 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<aabb::Node, std::allocator<aabb::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<aabb::Node, std::allocator<aabb::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<aabb::Node, std::allocator<aabb::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aabb::Node, std::allocator<aabb::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.aabb::Node" = type { %"class.aabb::AABB", i32, i32, i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN4aabb4Tree10insertLeafEj = external hidden unnamed_addr constant [42 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4aabb4Tree12allocateNodeEv(ptr noundef nonnull align 8 dereferenceable(233)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4aabb4Tree10insertLeafEj(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.aabb::AABB", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca %"class.aabb::AABB", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca %"class.aabb::AABB", align 8
  %18 = alloca %"class.aabb::AABB", align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca %"class.aabb::AABB", align 8
  %23 = alloca %"class.aabb::AABB", align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %32 = load ptr, ptr %3, align 8
  %33 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = icmp eq i32 %34, -1
  br i1 %35, label %36, label %45

36:                                               ; preds = %2
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 0
  store i32 %37, ptr %38, align 8, !tbaa !11
  %39 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %40 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = zext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %42) #6
  %44 = getelementptr inbounds %"struct.aabb::Node", ptr %43, i32 0, i32 1
  store i32 -1, ptr %44, align 8, !tbaa !35
  br label %439

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #6
  %46 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %47 = load i32, ptr %4, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %48) #6
  %50 = getelementptr inbounds %"struct.aabb::Node", ptr %49, i32 0, i32 0
  call void @_ZN4aabb4AABBC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(80) %50)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %51 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !11
  store i32 %52, ptr %6, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %230, %45
  %54 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #6
  %58 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %57)
  %59 = xor i1 %58, true
  br i1 %59, label %60, label %235

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %61 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %62 = load i32, ptr %6, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %63) #6
  %65 = getelementptr inbounds %"struct.aabb::Node", ptr %64, i32 0, i32 3
  %66 = load i32, ptr %65, align 8, !tbaa !38
  store i32 %66, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %67 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #6
  %71 = getelementptr inbounds %"struct.aabb::Node", ptr %70, i32 0, i32 4
  %72 = load i32, ptr %71, align 4, !tbaa !39
  store i32 %72, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %73 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #6
  %77 = getelementptr inbounds %"struct.aabb::Node", ptr %76, i32 0, i32 0
  %78 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %77)
  store double %78, ptr %9, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %10)
          to label %79 unwind label %109

79:                                               ; preds = %60
  %80 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82) #6
  %84 = getelementptr inbounds %"struct.aabb::Node", ptr %83, i32 0, i32 0
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(80) %84, ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %85 unwind label %113

85:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %86 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %10)
  store double %86, ptr %13, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %87 = load double, ptr %13, align 8, !tbaa !40
  %88 = fmul double 2.000000e+00, %87
  store double %88, ptr %14, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %89 = load double, ptr %13, align 8, !tbaa !40
  %90 = load double, ptr %9, align 8, !tbaa !40
  %91 = fsub double %89, %90
  %92 = fmul double 2.000000e+00, %91
  store double %92, ptr %15, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %93 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = zext i32 %94 to i64
  %96 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %95) #6
  %97 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %96)
  br i1 %97, label %98, label %126

98:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 80, ptr %17) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %17)
          to label %99 unwind label %117

99:                                               ; preds = %98
  %100 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %101 = load i32, ptr %7, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %102) #6
  %104 = getelementptr inbounds %"struct.aabb::Node", ptr %103, i32 0, i32 0
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %17, ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(80) %104)
          to label %105 unwind label %121

105:                                              ; preds = %99
  %106 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %17)
  %107 = load double, ptr %15, align 8, !tbaa !40
  %108 = fadd double %106, %107
  store double %108, ptr %16, align 8, !tbaa !40
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %17) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #6
  br label %155

109:                                              ; preds = %60
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %12, align 4
  br label %234

113:                                              ; preds = %79
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  br label %233

117:                                              ; preds = %98
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %11, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %12, align 4
  br label %125

121:                                              ; preds = %99
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %11, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %12, align 4
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %17) #6
  br label %125

125:                                              ; preds = %121, %117
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #6
  br label %232

126:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %127 unwind label %146

127:                                              ; preds = %126
  %128 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %130) #6
  %132 = getelementptr inbounds %"struct.aabb::Node", ptr %131, i32 0, i32 0
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %18, ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(80) %132)
          to label %133 unwind label %150

133:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %134 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %135 = load i32, ptr %7, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %136) #6
  %138 = getelementptr inbounds %"struct.aabb::Node", ptr %137, i32 0, i32 0
  %139 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %138)
  store double %139, ptr %19, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %140 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
  store double %140, ptr %20, align 8, !tbaa !40
  %141 = load double, ptr %20, align 8, !tbaa !40
  %142 = load double, ptr %19, align 8, !tbaa !40
  %143 = fsub double %141, %142
  %144 = load double, ptr %15, align 8, !tbaa !40
  %145 = fadd double %143, %144
  store double %145, ptr %16, align 8, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #6
  br label %155

146:                                              ; preds = %126
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %11, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %12, align 4
  br label %154

150:                                              ; preds = %127
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %11, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %12, align 4
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #6
  br label %154

154:                                              ; preds = %150, %146
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #6
  br label %232

155:                                              ; preds = %133, %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %156 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %157 = load i32, ptr %8, align 4, !tbaa !9
  %158 = zext i32 %157 to i64
  %159 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %156, i64 noundef %158) #6
  %160 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %159)
  br i1 %160, label %161, label %181

161:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 80, ptr %22) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %162 unwind label %172

162:                                              ; preds = %161
  %163 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %164 = load i32, ptr %8, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %165) #6
  %167 = getelementptr inbounds %"struct.aabb::Node", ptr %166, i32 0, i32 0
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %22, ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(80) %167)
          to label %168 unwind label %176

168:                                              ; preds = %162
  %169 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
  %170 = load double, ptr %15, align 8, !tbaa !40
  %171 = fadd double %169, %170
  store double %171, ptr %21, align 8, !tbaa !40
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %22) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #6
  br label %210

172:                                              ; preds = %161
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %11, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %12, align 4
  br label %180

176:                                              ; preds = %162
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %11, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %12, align 4
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %22) #6
  br label %180

180:                                              ; preds = %176, %172
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #6
  br label %231

181:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 80, ptr %23) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %23)
          to label %182 unwind label %201

182:                                              ; preds = %181
  %183 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %184 = load i32, ptr %8, align 4, !tbaa !9
  %185 = zext i32 %184 to i64
  %186 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %183, i64 noundef %185) #6
  %187 = getelementptr inbounds %"struct.aabb::Node", ptr %186, i32 0, i32 0
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %23, ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(80) %187)
          to label %188 unwind label %205

188:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %189 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %190 = load i32, ptr %8, align 4, !tbaa !9
  %191 = zext i32 %190 to i64
  %192 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %189, i64 noundef %191) #6
  %193 = getelementptr inbounds %"struct.aabb::Node", ptr %192, i32 0, i32 0
  %194 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %193)
  store double %194, ptr %24, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %195 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %23)
  store double %195, ptr %25, align 8, !tbaa !40
  %196 = load double, ptr %25, align 8, !tbaa !40
  %197 = load double, ptr %24, align 8, !tbaa !40
  %198 = fsub double %196, %197
  %199 = load double, ptr %15, align 8, !tbaa !40
  %200 = fadd double %198, %199
  store double %200, ptr %21, align 8, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %23) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %23) #6
  br label %210

201:                                              ; preds = %181
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %11, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %12, align 4
  br label %209

205:                                              ; preds = %182
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %11, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %12, align 4
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %23) #6
  br label %209

209:                                              ; preds = %205, %201
  call void @llvm.lifetime.end.p0(i64 80, ptr %23) #6
  br label %231

210:                                              ; preds = %188, %168
  %211 = load double, ptr %14, align 8, !tbaa !40
  %212 = load double, ptr %16, align 8, !tbaa !40
  %213 = fcmp olt double %211, %212
  br i1 %213, label %214, label %219

214:                                              ; preds = %210
  %215 = load double, ptr %14, align 8, !tbaa !40
  %216 = load double, ptr %21, align 8, !tbaa !40
  %217 = fcmp olt double %215, %216
  br i1 %217, label %218, label %219

218:                                              ; preds = %214
  store i32 3, ptr %26, align 4
  br label %228

219:                                              ; preds = %214, %210
  %220 = load double, ptr %16, align 8, !tbaa !40
  %221 = load double, ptr %21, align 8, !tbaa !40
  %222 = fcmp olt double %220, %221
  br i1 %222, label %223, label %225

223:                                              ; preds = %219
  %224 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %224, ptr %6, align 4, !tbaa !9
  br label %227

225:                                              ; preds = %219
  %226 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %226, ptr %6, align 4, !tbaa !9
  br label %227

227:                                              ; preds = %225, %223
  store i32 0, ptr %26, align 4
  br label %228

228:                                              ; preds = %227, %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %229 = load i32, ptr %26, align 4
  switch i32 %229, label %447 [
    i32 0, label %230
    i32 3, label %235
  ]

230:                                              ; preds = %228
  br label %53, !llvm.loop !41

231:                                              ; preds = %209, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %232

232:                                              ; preds = %231, %154, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %233

233:                                              ; preds = %232, %113
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  br label %234

234:                                              ; preds = %233, %109
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %441

235:                                              ; preds = %228, %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %236 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %236, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %237 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %238 = load i32, ptr %27, align 4, !tbaa !9
  %239 = zext i32 %238 to i64
  %240 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %239) #6
  %241 = getelementptr inbounds %"struct.aabb::Node", ptr %240, i32 0, i32 1
  %242 = load i32, ptr %241, align 8, !tbaa !35
  store i32 %242, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %243 = invoke noundef i32 @_ZN4aabb4Tree12allocateNodeEv(ptr noundef nonnull align 8 dereferenceable(233) %32)
          to label %244 unwind label %292

244:                                              ; preds = %235
  store i32 %243, ptr %29, align 4, !tbaa !9
  %245 = load i32, ptr %28, align 4, !tbaa !9
  %246 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %247 = load i32, ptr %29, align 4, !tbaa !9
  %248 = zext i32 %247 to i64
  %249 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %246, i64 noundef %248) #6
  %250 = getelementptr inbounds %"struct.aabb::Node", ptr %249, i32 0, i32 1
  store i32 %245, ptr %250, align 8, !tbaa !35
  %251 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %252 = load i32, ptr %29, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %251, i64 noundef %253) #6
  %255 = getelementptr inbounds %"struct.aabb::Node", ptr %254, i32 0, i32 0
  %256 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %257 = load i32, ptr %27, align 4, !tbaa !9
  %258 = zext i32 %257 to i64
  %259 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef %258) #6
  %260 = getelementptr inbounds %"struct.aabb::Node", ptr %259, i32 0, i32 0
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %255, ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(80) %260)
          to label %261 unwind label %292

261:                                              ; preds = %244
  %262 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %263 = load i32, ptr %27, align 4, !tbaa !9
  %264 = zext i32 %263 to i64
  %265 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %262, i64 noundef %264) #6
  %266 = getelementptr inbounds %"struct.aabb::Node", ptr %265, i32 0, i32 5
  %267 = load i32, ptr %266, align 8, !tbaa !43
  %268 = add nsw i32 %267, 1
  %269 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %270 = load i32, ptr %29, align 4, !tbaa !9
  %271 = zext i32 %270 to i64
  %272 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %269, i64 noundef %271) #6
  %273 = getelementptr inbounds %"struct.aabb::Node", ptr %272, i32 0, i32 5
  store i32 %268, ptr %273, align 8, !tbaa !43
  %274 = load i32, ptr %28, align 4, !tbaa !9
  %275 = icmp ne i32 %274, -1
  br i1 %275, label %276, label %328

276:                                              ; preds = %261
  %277 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %278 = load i32, ptr %28, align 4, !tbaa !9
  %279 = zext i32 %278 to i64
  %280 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %277, i64 noundef %279) #6
  %281 = getelementptr inbounds %"struct.aabb::Node", ptr %280, i32 0, i32 3
  %282 = load i32, ptr %281, align 8, !tbaa !38
  %283 = load i32, ptr %27, align 4, !tbaa !9
  %284 = icmp eq i32 %282, %283
  br i1 %284, label %285, label %296

285:                                              ; preds = %276
  %286 = load i32, ptr %29, align 4, !tbaa !9
  %287 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %288 = load i32, ptr %28, align 4, !tbaa !9
  %289 = zext i32 %288 to i64
  %290 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %287, i64 noundef %289) #6
  %291 = getelementptr inbounds %"struct.aabb::Node", ptr %290, i32 0, i32 3
  store i32 %286, ptr %291, align 8, !tbaa !38
  br label %303

292:                                              ; preds = %365, %244, %235
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %11, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %12, align 4
  br label %440

296:                                              ; preds = %276
  %297 = load i32, ptr %29, align 4, !tbaa !9
  %298 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %299 = load i32, ptr %28, align 4, !tbaa !9
  %300 = zext i32 %299 to i64
  %301 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %298, i64 noundef %300) #6
  %302 = getelementptr inbounds %"struct.aabb::Node", ptr %301, i32 0, i32 4
  store i32 %297, ptr %302, align 4, !tbaa !39
  br label %303

303:                                              ; preds = %296, %285
  %304 = load i32, ptr %27, align 4, !tbaa !9
  %305 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %306 = load i32, ptr %29, align 4, !tbaa !9
  %307 = zext i32 %306 to i64
  %308 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %305, i64 noundef %307) #6
  %309 = getelementptr inbounds %"struct.aabb::Node", ptr %308, i32 0, i32 3
  store i32 %304, ptr %309, align 8, !tbaa !38
  %310 = load i32, ptr %4, align 4, !tbaa !9
  %311 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %312 = load i32, ptr %29, align 4, !tbaa !9
  %313 = zext i32 %312 to i64
  %314 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %311, i64 noundef %313) #6
  %315 = getelementptr inbounds %"struct.aabb::Node", ptr %314, i32 0, i32 4
  store i32 %310, ptr %315, align 4, !tbaa !39
  %316 = load i32, ptr %29, align 4, !tbaa !9
  %317 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %318 = load i32, ptr %27, align 4, !tbaa !9
  %319 = zext i32 %318 to i64
  %320 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %317, i64 noundef %319) #6
  %321 = getelementptr inbounds %"struct.aabb::Node", ptr %320, i32 0, i32 1
  store i32 %316, ptr %321, align 8, !tbaa !35
  %322 = load i32, ptr %29, align 4, !tbaa !9
  %323 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %324 = load i32, ptr %4, align 4, !tbaa !9
  %325 = zext i32 %324 to i64
  %326 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %323, i64 noundef %325) #6
  %327 = getelementptr inbounds %"struct.aabb::Node", ptr %326, i32 0, i32 1
  store i32 %322, ptr %327, align 8, !tbaa !35
  br label %355

328:                                              ; preds = %261
  %329 = load i32, ptr %27, align 4, !tbaa !9
  %330 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %331 = load i32, ptr %29, align 4, !tbaa !9
  %332 = zext i32 %331 to i64
  %333 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %330, i64 noundef %332) #6
  %334 = getelementptr inbounds %"struct.aabb::Node", ptr %333, i32 0, i32 3
  store i32 %329, ptr %334, align 8, !tbaa !38
  %335 = load i32, ptr %4, align 4, !tbaa !9
  %336 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %337 = load i32, ptr %29, align 4, !tbaa !9
  %338 = zext i32 %337 to i64
  %339 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %336, i64 noundef %338) #6
  %340 = getelementptr inbounds %"struct.aabb::Node", ptr %339, i32 0, i32 4
  store i32 %335, ptr %340, align 4, !tbaa !39
  %341 = load i32, ptr %29, align 4, !tbaa !9
  %342 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %343 = load i32, ptr %27, align 4, !tbaa !9
  %344 = zext i32 %343 to i64
  %345 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %342, i64 noundef %344) #6
  %346 = getelementptr inbounds %"struct.aabb::Node", ptr %345, i32 0, i32 1
  store i32 %341, ptr %346, align 8, !tbaa !35
  %347 = load i32, ptr %29, align 4, !tbaa !9
  %348 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %349 = load i32, ptr %4, align 4, !tbaa !9
  %350 = zext i32 %349 to i64
  %351 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %348, i64 noundef %350) #6
  %352 = getelementptr inbounds %"struct.aabb::Node", ptr %351, i32 0, i32 1
  store i32 %347, ptr %352, align 8, !tbaa !35
  %353 = load i32, ptr %29, align 4, !tbaa !9
  %354 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 0
  store i32 %353, ptr %354, align 8, !tbaa !11
  br label %355

355:                                              ; preds = %328, %303
  %356 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %357 = load i32, ptr %4, align 4, !tbaa !9
  %358 = zext i32 %357 to i64
  %359 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %356, i64 noundef %358) #6
  %360 = getelementptr inbounds %"struct.aabb::Node", ptr %359, i32 0, i32 1
  %361 = load i32, ptr %360, align 8, !tbaa !35
  store i32 %361, ptr %6, align 4, !tbaa !9
  br label %362

362:                                              ; preds = %427, %355
  %363 = load i32, ptr %6, align 4, !tbaa !9
  %364 = icmp ne i32 %363, -1
  br i1 %364, label %365, label %438

365:                                              ; preds = %362
  %366 = load i32, ptr %6, align 4, !tbaa !9
  %367 = invoke noundef i32 @_ZN4aabb4Tree7balanceEj(ptr noundef nonnull align 8 dereferenceable(233) %32, i32 noundef %366)
          to label %368 unwind label %292

368:                                              ; preds = %365
  store i32 %367, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %369 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %370 = load i32, ptr %6, align 4, !tbaa !9
  %371 = zext i32 %370 to i64
  %372 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %369, i64 noundef %371) #6
  %373 = getelementptr inbounds %"struct.aabb::Node", ptr %372, i32 0, i32 3
  %374 = load i32, ptr %373, align 8, !tbaa !38
  store i32 %374, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %375 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %376 = load i32, ptr %6, align 4, !tbaa !9
  %377 = zext i32 %376 to i64
  %378 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %375, i64 noundef %377) #6
  %379 = getelementptr inbounds %"struct.aabb::Node", ptr %378, i32 0, i32 4
  %380 = load i32, ptr %379, align 4, !tbaa !39
  store i32 %380, ptr %31, align 4, !tbaa !9
  %381 = load i32, ptr %30, align 4, !tbaa !9
  %382 = icmp ne i32 %381, -1
  br i1 %382, label %383, label %384

383:                                              ; preds = %368
  br label %386

384:                                              ; preds = %368
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 799, ptr noundef @__PRETTY_FUNCTION__._ZN4aabb4Tree10insertLeafEj) #7
  unreachable

385:                                              ; No predecessors!
  br label %386

386:                                              ; preds = %385, %383
  %387 = load i32, ptr %31, align 4, !tbaa !9
  %388 = icmp ne i32 %387, -1
  br i1 %388, label %389, label %390

389:                                              ; preds = %386
  br label %392

390:                                              ; preds = %386
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 800, ptr noundef @__PRETTY_FUNCTION__._ZN4aabb4Tree10insertLeafEj) #7
  unreachable

391:                                              ; No predecessors!
  br label %392

392:                                              ; preds = %391, %389
  %393 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %394 = load i32, ptr %30, align 4, !tbaa !9
  %395 = zext i32 %394 to i64
  %396 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %393, i64 noundef %395) #6
  %397 = getelementptr inbounds %"struct.aabb::Node", ptr %396, i32 0, i32 5
  %398 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %399 = load i32, ptr %31, align 4, !tbaa !9
  %400 = zext i32 %399 to i64
  %401 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %398, i64 noundef %400) #6
  %402 = getelementptr inbounds %"struct.aabb::Node", ptr %401, i32 0, i32 5
  %403 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %397, ptr noundef nonnull align 4 dereferenceable(4) %402)
          to label %404 unwind label %434

404:                                              ; preds = %392
  %405 = load i32, ptr %403, align 4, !tbaa !9
  %406 = add nsw i32 1, %405
  %407 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %408 = load i32, ptr %6, align 4, !tbaa !9
  %409 = zext i32 %408 to i64
  %410 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %407, i64 noundef %409) #6
  %411 = getelementptr inbounds %"struct.aabb::Node", ptr %410, i32 0, i32 5
  store i32 %406, ptr %411, align 8, !tbaa !43
  %412 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %413 = load i32, ptr %6, align 4, !tbaa !9
  %414 = zext i32 %413 to i64
  %415 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %412, i64 noundef %414) #6
  %416 = getelementptr inbounds %"struct.aabb::Node", ptr %415, i32 0, i32 0
  %417 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %418 = load i32, ptr %30, align 4, !tbaa !9
  %419 = zext i32 %418 to i64
  %420 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %417, i64 noundef %419) #6
  %421 = getelementptr inbounds %"struct.aabb::Node", ptr %420, i32 0, i32 0
  %422 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %423 = load i32, ptr %31, align 4, !tbaa !9
  %424 = zext i32 %423 to i64
  %425 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %422, i64 noundef %424) #6
  %426 = getelementptr inbounds %"struct.aabb::Node", ptr %425, i32 0, i32 0
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %416, ptr noundef nonnull align 8 dereferenceable(80) %421, ptr noundef nonnull align 8 dereferenceable(80) %426)
          to label %427 unwind label %434

427:                                              ; preds = %404
  %428 = getelementptr inbounds %"class.aabb::Tree", ptr %32, i32 0, i32 2
  %429 = load i32, ptr %6, align 4, !tbaa !9
  %430 = zext i32 %429 to i64
  %431 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %428, i64 noundef %430) #6
  %432 = getelementptr inbounds %"struct.aabb::Node", ptr %431, i32 0, i32 1
  %433 = load i32, ptr %432, align 8, !tbaa !35
  store i32 %433, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %362, !llvm.loop !44

434:                                              ; preds = %404, %392
  %435 = landingpad { ptr, i32 }
          cleanup
  %436 = extractvalue { ptr, i32 } %435, 0
  store ptr %436, ptr %11, align 8
  %437 = extractvalue { ptr, i32 } %435, 1
  store i32 %437, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %440

438:                                              ; preds = %362
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #6
  br label %439

439:                                              ; preds = %438, %36
  ret void

440:                                              ; preds = %434, %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %441

441:                                              ; preds = %440, %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #6
  br label %442

442:                                              ; preds = %441
  %443 = load ptr, ptr %11, align 8
  %444 = load i32, ptr %12, align 4
  %445 = insertvalue { ptr, i32 } poison, ptr %443, 0
  %446 = insertvalue { ptr, i32 } %445, i32 %444, 1
  resume { ptr, i32 } %446

447:                                              ; preds = %228
  unreachable
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

declare void @_ZN4aabb4AABBC1Ev(ptr)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN4aabb4TreeE", !10, i64 0, !13, i64 8, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !17, i64 48, !18, i64 56, !19, i64 64, !25, i64 104, !25, i64 128, !25, i64 152, !29, i64 176, !17, i64 232}
!13 = !{!"_ZTSSt6vectorIN4aabb4NodeESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN4aabb4NodeESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIbSaIbEE", !20, i64 0}
!20 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !21, i64 0}
!21 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !23, i64 0, !23, i64 16, !6, i64 32}
!23 = !{!"_ZTSSt13_Bit_iterator", !24, i64 0}
!24 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !10, i64 8}
!25 = !{!"_ZTSSt6vectorIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE", !30, i64 0}
!30 = !{!"_ZTSSt10_HashtableIjSt4pairIKjjESaIS2_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !31, i64 8, !32, i64 16, !31, i64 24, !33, i64 32, !6, i64 48}
!31 = !{!"long", !7, i64 0}
!32 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!33 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !34, i64 0, !31, i64 8}
!34 = !{!"float", !7, i64 0}
!35 = !{!36, !10, i64 80}
!36 = !{!"_ZTSN4aabb4NodeE", !37, i64 0, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100}
!37 = !{!"_ZTSN4aabb4AABBE", !25, i64 0, !25, i64 24, !25, i64 48, !18, i64 72}
!38 = !{!36, !10, i64 88}
!39 = !{!36, !10, i64 92}
!40 = !{!18, !18, i64 0}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!36, !10, i64 96}
!44 = distinct !{!44, !42}


; 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.aabb::AABB" = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN4aabb4Tree10insertLeafEj = external hidden unnamed_addr constant [42 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4aabb4Tree12allocateNodeEv(ptr noundef nonnull align 8 dereferenceable(233)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4aabb4Tree10insertLeafEj(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.aabb::AABB", align 8
  %4 = alloca %"class.aabb::AABB", align 8
  %5 = alloca %"class.aabb::AABB", align 8
  %6 = alloca %"class.aabb::AABB", align 8
  %7 = alloca %"class.aabb::AABB", align 8
  %8 = alloca %"class.aabb::AABB", align 8
  %9 = load i32, ptr %0, align 8, !tbaa !5
  %10 = icmp eq i32 %9, -1
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = zext i32 %1 to i64
  br i1 %10, label %13, label %16

13:                                               ; preds = %2
  store i32 %1, ptr %0, align 8, !tbaa !5
  %14 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12) #6
  %15 = getelementptr inbounds i8, ptr %14, i64 80
  store i32 -1, ptr %15, align 8, !tbaa !33
  br label %182

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #6
  %17 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12) #6
  call void @_ZN4aabb4AABBC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %17)
  %18 = load i32, ptr %0, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %96, %16
  %.0 = phi i32 [ %18, %16 ], [ %., %96 ]
  %20 = zext i32 %.0 to i64
  %21 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %22 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
  br i1 %22, label %102, label %23

23:                                               ; preds = %19
  %24 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %25 = getelementptr inbounds i8, ptr %24, i64 88
  %26 = load i32, ptr %25, align 8, !tbaa !36
  %27 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %28 = getelementptr inbounds i8, ptr %27, i64 92
  %29 = load i32, ptr %28, align 4, !tbaa !37
  %30 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %31 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %30)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %32 unwind label %47

32:                                               ; preds = %23
  %33 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(80) %33, ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %34 unwind label %49

34:                                               ; preds = %32
  %35 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %36 = fmul double %35, 2.000000e+00
  %37 = fsub double %35, %31
  %38 = fmul double %37, 2.000000e+00
  %39 = zext i32 %26 to i64
  %40 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %39) #6
  %41 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %40)
  br i1 %41, label %42, label %56

42:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %43 unwind label %51

43:                                               ; preds = %42
  %44 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %39) #6
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %44)
          to label %45 unwind label %53

45:                                               ; preds = %43
  %46 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #6
  br label %69

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %101

49:                                               ; preds = %32
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %100

51:                                               ; preds = %42
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %43
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #6
  br label %55

55:                                               ; preds = %53, %51
  %.pn106 = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #6
  br label %100

56:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %57 unwind label %64

57:                                               ; preds = %56
  %58 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %39) #6
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %58)
          to label %59 unwind label %66

59:                                               ; preds = %57
  %60 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %39) #6
  %61 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %60)
  %62 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %63 = fsub double %62, %61
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #6
  br label %69

64:                                               ; preds = %56
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %68

66:                                               ; preds = %57
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  br label %68

68:                                               ; preds = %66, %64
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #6
  br label %100

69:                                               ; preds = %59, %45
  %.pn108 = phi double [ %46, %45 ], [ %63, %59 ]
  %.098 = fadd double %38, %.pn108
  %70 = zext i32 %29 to i64
  %71 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %70) #6
  %72 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %71)
  br i1 %72, label %73, label %83

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %74 unwind label %78

74:                                               ; preds = %73
  %75 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %70) #6
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %75)
          to label %76 unwind label %80

76:                                               ; preds = %74
  %77 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #6
  br label %96

78:                                               ; preds = %73
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %82

80:                                               ; preds = %74
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #6
  br label %82

82:                                               ; preds = %80, %78
  %.pn111 = phi { ptr, i32 } [ %81, %80 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #6
  br label %100

83:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #6
  invoke void @_ZN4aabb4AABBC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %84 unwind label %91

84:                                               ; preds = %83
  %85 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %70) #6
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %85)
          to label %86 unwind label %93

86:                                               ; preds = %84
  %87 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %70) #6
  %88 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %87)
  %89 = call noundef double @_ZNK4aabb4AABB14getSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %90 = fsub double %89, %88
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #6
  br label %96

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

93:                                               ; preds = %84
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #6
  br label %95

95:                                               ; preds = %93, %91
  %.pn109 = phi { ptr, i32 } [ %94, %93 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #6
  br label %100

96:                                               ; preds = %86, %76
  %.pn117 = phi double [ %77, %76 ], [ %90, %86 ]
  %.099 = fadd double %38, %.pn117
  %97 = fcmp olt double %36, %.098
  %98 = fcmp olt double %36, %.099
  %or.cond = and i1 %97, %98
  %99 = fcmp olt double %.098, %.099
  %. = select i1 %99, i32 %26, i32 %29
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  br i1 %or.cond, label %102, label %19

100:                                              ; preds = %55, %68, %95, %82, %49
  %.pn111.pn.pn.pn = phi { ptr, i32 } [ %50, %49 ], [ %.pn106, %55 ], [ %.pn, %68 ], [ %.pn111, %82 ], [ %.pn109, %95 ]
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  br label %101

101:                                              ; preds = %100, %47
  %.pn111.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn111.pn.pn.pn, %100 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  br label %183

102:                                              ; preds = %96, %19
  %103 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %104 = getelementptr inbounds i8, ptr %103, i64 80
  %105 = load i32, ptr %104, align 8, !tbaa !33
  %106 = invoke noundef i32 @_ZN4aabb4Tree12allocateNodeEv(ptr noundef nonnull align 8 dereferenceable(233) %0)
          to label %107 unwind label %.loopexit.split-lp

107:                                              ; preds = %102
  %108 = zext i32 %106 to i64
  %109 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #6
  %110 = getelementptr inbounds i8, ptr %109, i64 80
  store i32 %105, ptr %110, align 8, !tbaa !33
  %111 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #6
  %112 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %111, ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %112)
          to label %113 unwind label %.loopexit.split-lp

113:                                              ; preds = %107
  %114 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %115 = getelementptr inbounds i8, ptr %114, i64 96
  %116 = load i32, ptr %115, align 8, !tbaa !38
  %117 = add nsw i32 %116, 1
  %118 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #6
  %119 = getelementptr inbounds i8, ptr %118, i64 96
  store i32 %117, ptr %119, align 8, !tbaa !38
  %.not = icmp eq i32 %105, -1
  br i1 %.not, label %140, label %120

120:                                              ; preds = %113
  %121 = zext i32 %105 to i64
  %122 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %121) #6
  %123 = getelementptr inbounds i8, ptr %122, i64 88
  %124 = load i32, ptr %123, align 8, !tbaa !36
  %125 = icmp eq i32 %124, %.0
  %126 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %121) #6
  br i1 %125, label %127, label %129

127:                                              ; preds = %120
  %128 = getelementptr inbounds i8, ptr %126, i64 88
  store i32 %106, ptr %128, align 8, !tbaa !36
  br label %131

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %183

.loopexit.split-lp:                               ; preds = %102, %107
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %183

129:                                              ; preds = %120
  %130 = getelementptr inbounds i8, ptr %126, i64 92
  store i32 %106, ptr %130, align 4, !tbaa !37
  br label %131

131:                                              ; preds = %129, %127
  %132 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #6
  %133 = getelementptr inbounds i8, ptr %132, i64 88
  store i32 %.0, ptr %133, align 8, !tbaa !36
  %134 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #6
  %135 = getelementptr inbounds i8, ptr %134, i64 92
  store i32 %1, ptr %135, align 4, !tbaa !37
  %136 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %137 = getelementptr inbounds i8, ptr %136, i64 80
  store i32 %106, ptr %137, align 8, !tbaa !33
  %138 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12) #6
  %139 = getelementptr inbounds i8, ptr %138, i64 80
  br label %149

140:                                              ; preds = %113
  %141 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #6
  %142 = getelementptr inbounds i8, ptr %141, i64 88
  store i32 %.0, ptr %142, align 8, !tbaa !36
  %143 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #6
  %144 = getelementptr inbounds i8, ptr %143, i64 92
  store i32 %1, ptr %144, align 4, !tbaa !37
  %145 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #6
  %146 = getelementptr inbounds i8, ptr %145, i64 80
  store i32 %106, ptr %146, align 8, !tbaa !33
  %147 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12) #6
  %148 = getelementptr inbounds i8, ptr %147, i64 80
  store i32 %106, ptr %148, align 8, !tbaa !33
  br label %149

149:                                              ; preds = %140, %131
  %.sink = phi ptr [ %0, %140 ], [ %139, %131 ]
  store i32 %106, ptr %.sink, align 8, !tbaa !39
  %150 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12) #6
  %.4.in135 = getelementptr inbounds i8, ptr %150, i64 80
  %.4136 = load i32, ptr %.4.in135, align 8, !tbaa !33
  %.not118137 = icmp eq i32 %.4136, -1
  br i1 %.not118137, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %149, %178
  %.4138 = phi i32 [ %.4, %178 ], [ %.4136, %149 ]
  %151 = invoke noundef i32 @_ZN4aabb4Tree7balanceEj(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %.4138)
          to label %152 unwind label %.loopexit

152:                                              ; preds = %.lr.ph
  %153 = zext i32 %151 to i64
  %154 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %153) #6
  %155 = getelementptr inbounds i8, ptr %154, i64 88
  %156 = load i32, ptr %155, align 8, !tbaa !36
  %157 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %153) #6
  %158 = getelementptr inbounds i8, ptr %157, i64 92
  %159 = load i32, ptr %158, align 4, !tbaa !37
  %.not119 = icmp eq i32 %156, -1
  br i1 %.not119, label %160, label %161

160:                                              ; preds = %152
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 799, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4aabb4Tree10insertLeafEj) #7
  unreachable

161:                                              ; preds = %152
  %.not120 = icmp eq i32 %159, -1
  br i1 %.not120, label %162, label %163

162:                                              ; preds = %161
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 800, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4aabb4Tree10insertLeafEj) #7
  unreachable

163:                                              ; preds = %161
  %164 = zext i32 %156 to i64
  %165 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %164) #6
  %166 = getelementptr inbounds i8, ptr %165, i64 96
  %167 = zext i32 %159 to i64
  %168 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %167) #6
  %169 = getelementptr inbounds i8, ptr %168, i64 96
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %166, ptr noundef nonnull align 4 dereferenceable(4) %169)
  %171 = load i32, ptr %170, align 4, !tbaa !39
  %172 = add nsw i32 %171, 1
  %173 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %153) #6
  %174 = getelementptr inbounds i8, ptr %173, i64 96
  store i32 %172, ptr %174, align 8, !tbaa !38
  %175 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %153) #6
  %176 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %164) #6
  %177 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %167) #6
  invoke void @_ZN4aabb4AABB5mergeERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(80) %175, ptr noundef nonnull align 8 dereferenceable(80) %176, ptr noundef nonnull align 8 dereferenceable(80) %177)
          to label %178 unwind label %180

178:                                              ; preds = %163
  %179 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %153) #6
  %.4.in = getelementptr inbounds i8, ptr %179, i64 80
  %.4 = load i32, ptr %.4.in, align 8, !tbaa !33
  %.not118 = icmp eq i32 %.4, -1
  br i1 %.not118, label %._crit_edge, label %.lr.ph, !llvm.loop !40

180:                                              ; preds = %163
  %181 = landingpad { ptr, i32 }
          cleanup
  br label %183

._crit_edge:                                      ; preds = %178, %149
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #6
  br label %182

182:                                              ; preds = %._crit_edge, %13
  ret void

183:                                              ; preds = %.loopexit, %.loopexit.split-lp, %180, %101
  %.pn121.pn = phi { ptr, i32 } [ %.pn111.pn.pn.pn.pn, %101 ], [ %181, %180 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn121.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

declare void @_ZN4aabb4AABBC1Ev(ptr) local_unnamed_addr

attributes #0 = { noreturn nounwind "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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTSN4aabb4TreeE", !7, i64 0, !10, i64 8, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !15, i64 48, !16, i64 56, !17, i64 64, !23, i64 104, !23, i64 128, !23, i64 152, !27, i64 176, !15, i64 232}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIN4aabb4NodeESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIN4aabb4NodeESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIbSaIbEE", !18, i64 0}
!18 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !19, i64 0}
!19 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !21, i64 0, !21, i64 16, !14, i64 32}
!21 = !{!"_ZTSSt13_Bit_iterator", !22, i64 0}
!22 = !{!"_ZTSSt18_Bit_iterator_base", !14, i64 0, !7, i64 8}
!23 = !{!"_ZTSSt6vectorIdSaIdEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!27 = !{!"_ZTSSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE", !28, i64 0}
!28 = !{!"_ZTSSt10_HashtableIjSt4pairIKjjESaIS2_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !14, i64 0, !29, i64 8, !30, i64 16, !29, i64 24, !31, i64 32, !14, i64 48}
!29 = !{!"long", !8, i64 0}
!30 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !14, i64 0}
!31 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !32, i64 0, !29, i64 8}
!32 = !{!"float", !8, i64 0}
!33 = !{!34, !7, i64 80}
!34 = !{!"_ZTSN4aabb4NodeE", !35, i64 0, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100}
!35 = !{!"_ZTSN4aabb4AABBE", !23, i64 0, !23, i64 24, !23, i64 48, !16, i64 72}
!36 = !{!34, !7, i64 88}
!37 = !{!34, !7, i64 92}
!38 = !{!34, !7, i64 96}
!39 = !{!7, !7, i64 0}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass