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

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

%"struct.std::_Bit_reference" = type { ptr, i64 }
%"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::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.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 }
%"class.aabb::AABB" = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", double }

@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4aabb4TreeC2EjdRKSt6vectorIbSaIbEERKS1_IdSaIdEEjb(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %5, i1 noundef zeroext %6) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store double %2, ptr %10, align 8, !tbaa !11
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store i32 %5, ptr %13, align 4, !tbaa !9
  %20 = zext i1 %6 to i8
  store i8 %20, ptr %14, align 1, !tbaa !13
  %21 = load ptr, ptr %8, align 8
  %22 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 2
  call void @_ZNSt6vectorIN4aabb4NodeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  %23 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 6
  %24 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %24, ptr %23, align 4, !tbaa !15
  %25 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 9
  %26 = load double, ptr %10, align 8, !tbaa !11
  store double %26, ptr %25, align 8, !tbaa !37
  %27 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 10
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %27, ptr noundef nonnull align 8 dereferenceable(40) %28)
          to label %29 unwind label %46

29:                                               ; preds = %7
  %30 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 11
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %32 unwind label %50

32:                                               ; preds = %29
  %33 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 12
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %34 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 13
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  %35 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 14
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #6
  %36 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 15
  %37 = load i8, ptr %14, align 1, !tbaa !13, !range !38, !noundef !39
  %38 = trunc i8 %37 to i1
  %39 = zext i1 %38 to i8
  store i8 %39, ptr %36, align 8, !tbaa !40
  %40 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 6
  %41 = load i32, ptr %40, align 4, !tbaa !15
  %42 = icmp ult i32 %41, 2
  br i1 %42, label %43, label %62

43:                                               ; preds = %32
  %44 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef @.str.7)
          to label %45 unwind label %54

45:                                               ; preds = %43
  invoke void @__cxa_throw(ptr %44, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #7
          to label %200 unwind label %58

46:                                               ; preds = %7
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %15, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %16, align 4
  br label %194

50:                                               ; preds = %29
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %15, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %16, align 4
  br label %193

54:                                               ; preds = %43
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %15, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %16, align 4
  call void @__cxa_free_exception(ptr %44) #6
  br label %192

58:                                               ; preds = %138, %117, %83, %78, %45
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %15, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %16, align 4
  br label %192

62:                                               ; preds = %32
  %63 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 10
  %64 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %63) #6
  %65 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 6
  %66 = load i32, ptr %65, align 4, !tbaa !15
  %67 = zext i32 %66 to i64
  %68 = icmp ne i64 %64, %67
  br i1 %68, label %76, label %69

69:                                               ; preds = %62
  %70 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 11
  %71 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #6
  %72 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 6
  %73 = load i32, ptr %72, align 4, !tbaa !15
  %74 = zext i32 %73 to i64
  %75 = icmp ne i64 %71, %74
  br i1 %75, label %76, label %83

76:                                               ; preds = %69, %62
  %77 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %77, ptr noundef @.str.2)
          to label %78 unwind label %79

78:                                               ; preds = %76
  invoke void @__cxa_throw(ptr %77, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #7
          to label %200 unwind label %58

79:                                               ; preds = %76
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %15, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %16, align 4
  call void @__cxa_free_exception(ptr %77) #6
  br label %192

83:                                               ; preds = %69
  %84 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 0
  store i32 -1, ptr %84, align 8, !tbaa !41
  %85 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 15
  store i8 1, ptr %85, align 8, !tbaa !40
  %86 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 3
  store i32 0, ptr %86, align 8, !tbaa !42
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 4
  store i32 %87, ptr %88, align 4, !tbaa !43
  %89 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 2
  %90 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 4
  %91 = load i32, ptr %90, align 4, !tbaa !43
  %92 = zext i32 %91 to i64
  invoke void @_ZNSt6vectorIN4aabb4NodeESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %92)
          to label %93 unwind label %58

93:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %114, %93
  %95 = load i32, ptr %17, align 4, !tbaa !9
  %96 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 4
  %97 = load i32, ptr %96, align 4, !tbaa !43
  %98 = sub i32 %97, 1
  %99 = icmp ult i32 %95, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %117

101:                                              ; preds = %94
  %102 = load i32, ptr %17, align 4, !tbaa !9
  %103 = add i32 %102, 1
  %104 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 2
  %105 = load i32, ptr %17, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #6
  %108 = getelementptr inbounds %"struct.aabb::Node", ptr %107, i32 0, i32 2
  store i32 %103, ptr %108, align 4, !tbaa !44
  %109 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 2
  %110 = load i32, ptr %17, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef %111) #6
  %113 = getelementptr inbounds %"struct.aabb::Node", ptr %112, i32 0, i32 5
  store i32 -1, ptr %113, align 8, !tbaa !47
  br label %114

114:                                              ; preds = %101
  %115 = load i32, ptr %17, align 4, !tbaa !9
  %116 = add i32 %115, 1
  store i32 %116, ptr %17, align 4, !tbaa !9
  br label %94, !llvm.loop !48

117:                                              ; preds = %100
  %118 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 2
  %119 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 4
  %120 = load i32, ptr %119, align 4, !tbaa !43
  %121 = sub i32 %120, 1
  %122 = zext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %122) #6
  %124 = getelementptr inbounds %"struct.aabb::Node", ptr %123, i32 0, i32 2
  store i32 -1, ptr %124, align 4, !tbaa !44
  %125 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 2
  %126 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 4
  %127 = load i32, ptr %126, align 4, !tbaa !43
  %128 = sub i32 %127, 1
  %129 = zext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %129) #6
  %131 = getelementptr inbounds %"struct.aabb::Node", ptr %130, i32 0, i32 5
  store i32 -1, ptr %131, align 8, !tbaa !47
  %132 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 5
  store i32 0, ptr %132, align 8, !tbaa !50
  %133 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 7
  store i8 0, ptr %133, align 8, !tbaa !51
  %134 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 13
  %135 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 6
  %136 = load i32, ptr %135, align 4, !tbaa !15
  %137 = zext i32 %136 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %137)
          to label %138 unwind label %58

138:                                              ; preds = %117
  %139 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 12
  %140 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 6
  %141 = load i32, ptr %140, align 4, !tbaa !15
  %142 = zext i32 %141 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %142)
          to label %143 unwind label %58

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %188, %143
  %145 = load i32, ptr %18, align 4, !tbaa !9
  %146 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 6
  %147 = load i32, ptr %146, align 4, !tbaa !15
  %148 = icmp ult i32 %145, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %191

150:                                              ; preds = %144
  %151 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 11
  %152 = load i32, ptr %18, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %153) #6
  %155 = load double, ptr %154, align 8, !tbaa !11
  %156 = fmul double 5.000000e-01, %155
  %157 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 13
  %158 = load i32, ptr %18, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %159) #6
  store double %156, ptr %160, align 8, !tbaa !11
  %161 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 11
  %162 = load i32, ptr %18, align 4, !tbaa !9
  %163 = zext i32 %162 to i64
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %163) #6
  %165 = load double, ptr %164, align 8, !tbaa !11
  %166 = fmul double -5.000000e-01, %165
  %167 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 12
  %168 = load i32, ptr %18, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %169) #6
  store double %166, ptr %170, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %171 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 10
  %172 = load i32, ptr %18, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %171, i64 noundef %173)
          to label %175 unwind label %183

175:                                              ; preds = %150
  %176 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %177 = extractvalue { ptr, i64 } %174, 0
  store ptr %177, ptr %176, align 8
  %178 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %179 = extractvalue { ptr, i64 } %174, 1
  store i64 %179, ptr %178, align 8
  %180 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br i1 %180, label %181, label %187

181:                                              ; preds = %175
  %182 = getelementptr inbounds %"class.aabb::Tree", ptr %21, i32 0, i32 7
  store i8 1, ptr %182, align 8, !tbaa !51
  br label %187

183:                                              ; preds = %150
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %15, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %192

187:                                              ; preds = %181, %175
  br label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %18, align 4, !tbaa !9
  %190 = add i32 %189, 1
  store i32 %190, ptr %18, align 4, !tbaa !9
  br label %144, !llvm.loop !52

191:                                              ; preds = %149
  ret void

192:                                              ; preds = %183, %79, %58, %54
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  br label %193

193:                                              ; preds = %192, %50
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %27) #6
  br label %194

194:                                              ; preds = %193, %46
  call void @_ZNSt6vectorIN4aabb4NodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %15, align 8
  %197 = load i32, ptr %16, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199

200:                                              ; preds = %78, %45
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1 align 2

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

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !10, i64 44}
!16 = !{!"_ZTSN4aabb4TreeE", !10, i64 0, !17, i64 8, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !14, i64 48, !12, i64 56, !21, i64 64, !27, i64 104, !27, i64 128, !27, i64 152, !31, i64 176, !14, i64 232}
!17 = !{!"_ZTSSt6vectorIN4aabb4NodeESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN4aabb4NodeESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIbSaIbEE", !22, i64 0}
!22 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !23, i64 0}
!23 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !25, i64 0, !25, i64 16, !6, i64 32}
!25 = !{!"_ZTSSt13_Bit_iterator", !26, i64 0}
!26 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !10, i64 8}
!27 = !{!"_ZTSSt6vectorIdSaIdEE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE", !32, i64 0}
!32 = !{!"_ZTSSt10_HashtableIjSt4pairIKjjESaIS2_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !33, i64 8, !34, i64 16, !33, i64 24, !35, i64 32, !6, i64 48}
!33 = !{!"long", !7, i64 0}
!34 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!35 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !36, i64 0, !33, i64 8}
!36 = !{!"float", !7, i64 0}
!37 = !{!16, !12, i64 56}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!16, !14, i64 232}
!41 = !{!16, !10, i64 0}
!42 = !{!16, !10, i64 32}
!43 = !{!16, !10, i64 36}
!44 = !{!45, !10, i64 84}
!45 = !{!"_ZTSN4aabb4NodeE", !46, i64 0, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100}
!46 = !{!"_ZTSN4aabb4AABBE", !27, i64 0, !27, i64 24, !27, i64 48, !12, i64 72}
!47 = !{!45, !10, i64 96}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}
!50 = !{!16, !10, i64 40}
!51 = !{!16, !14, i64 48}
!52 = distinct !{!52, !49}


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

%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN4aabb4NodeESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 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 #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4aabb4TreeC2EjdRKSt6vectorIbSaIbEERKS1_IdSaIdEEjb(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %5, i1 noundef zeroext %6) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = zext i1 %6 to i8
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZNSt6vectorIN4aabb4NodeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 %1, ptr %11, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  store double %2, ptr %12, align 8, !tbaa !33
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %14 unwind label %25

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %16 unwind label %27

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 128
  tail call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %18 = getelementptr inbounds i8, ptr %0, i64 152
  tail call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #6
  %20 = getelementptr inbounds i8, ptr %0, i64 232
  store i8 %9, ptr %20, align 8, !tbaa !34
  %21 = load i32, ptr %11, align 4, !tbaa !5
  %22 = icmp ult i32 %21, 2
  br i1 %22, label %23, label %33

23:                                               ; preds = %16
  %24 = tail call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull @.str.7)
          to label %.invoke unwind label %29

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

27:                                               ; preds = %14
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %99

29:                                               ; preds = %23
  %30 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %24) #6
  br label %98

31:                                               ; preds = %.invoke, %72, %._crit_edge, %46
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %98

33:                                               ; preds = %16
  %34 = tail call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  %35 = load i32, ptr %11, align 4, !tbaa !5
  %36 = zext i32 %35 to i64
  %.not = icmp eq i64 %34, %36
  br i1 %.not, label %37, label %41

37:                                               ; preds = %33
  %38 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %39 = load i32, ptr %11, align 4, !tbaa !5
  %40 = zext i32 %39 to i64
  %.not26 = icmp eq i64 %38, %40
  br i1 %.not26, label %46, label %41

41:                                               ; preds = %37, %33
  %42 = tail call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull @.str.2)
          to label %.invoke unwind label %44

.invoke:                                          ; preds = %23, %41
  %43 = phi ptr [ %42, %41 ], [ %24, %23 ]
  invoke void @__cxa_throw(ptr nonnull %43, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #7
          to label %.cont unwind label %31

.cont:                                            ; preds = %.invoke
  unreachable

44:                                               ; preds = %41
  %45 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %42) #6
  br label %98

46:                                               ; preds = %37
  store i32 -1, ptr %0, align 8, !tbaa !35
  store i8 1, ptr %20, align 8, !tbaa !34
  %47 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 0, ptr %47, align 8, !tbaa !36
  %48 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 %5, ptr %48, align 4, !tbaa !37
  %49 = zext i32 %5 to i64
  invoke void @_ZNSt6vectorIN4aabb4NodeESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %49)
          to label %.preheader30 unwind label %31

.preheader30:                                     ; preds = %46
  %50 = load i32, ptr %48, align 4, !tbaa !37
  %.not35 = icmp eq i32 %50, 1
  br i1 %.not35, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %51 = zext i32 %69 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.preheader30, %._crit_edge.loopexit
  %.lcssa = phi i64 [ %51, %._crit_edge.loopexit ], [ 0, %.preheader30 ]
  %52 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.lcssa) #6
  %53 = getelementptr inbounds i8, ptr %52, i64 84
  store i32 -1, ptr %53, align 4, !tbaa !38
  %54 = load i32, ptr %48, align 4, !tbaa !37
  %55 = add i32 %54, -1
  %56 = zext i32 %55 to i64
  %57 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %56) #6
  %58 = getelementptr inbounds i8, ptr %57, i64 96
  store i32 -1, ptr %58, align 8, !tbaa !41
  %59 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 0, ptr %59, align 8, !tbaa !42
  %60 = getelementptr inbounds i8, ptr %0, i64 48
  store i8 0, ptr %60, align 8, !tbaa !43
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = zext i32 %61 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %62)
          to label %72 unwind label %31

.lr.ph:                                           ; preds = %.preheader30, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader30 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #6
  %64 = getelementptr inbounds i8, ptr %63, i64 84
  %65 = trunc nuw i64 %indvars.iv.next to i32
  store i32 %65, ptr %64, align 4, !tbaa !38
  %66 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #6
  %67 = getelementptr inbounds i8, ptr %66, i64 96
  store i32 -1, ptr %67, align 8, !tbaa !41
  %68 = load i32, ptr %48, align 4, !tbaa !37
  %69 = add i32 %68, -1
  %70 = zext i32 %69 to i64
  %71 = icmp ult i64 %indvars.iv.next, %70
  br i1 %71, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !44

72:                                               ; preds = %._crit_edge
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = zext i32 %73 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %74)
          to label %.preheader unwind label %31

.preheader:                                       ; preds = %72
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %.not36 = icmp eq i32 %75, 0
  br i1 %.not36, label %._crit_edge34, label %.lr.ph33

.lr.ph33:                                         ; preds = %.preheader
  %76 = getelementptr inbounds i8, ptr %8, i64 8
  br label %77

._crit_edge34:                                    ; preds = %94, %.preheader
  ret void

77:                                               ; preds = %.lr.ph33, %94
  %indvars.iv39 = phi i64 [ 0, %.lr.ph33 ], [ %indvars.iv.next40, %94 ]
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv39) #6
  %79 = load double, ptr %78, align 8, !tbaa !46
  %80 = fmul double %79, 5.000000e-01
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv39) #6
  store double %80, ptr %81, align 8, !tbaa !46
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv39) #6
  %83 = load double, ptr %82, align 8, !tbaa !46
  %84 = fmul double %83, -5.000000e-01
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv39) #6
  store double %84, ptr %85, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %86 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %indvars.iv39)
          to label %87 unwind label %92

87:                                               ; preds = %77
  %88 = extractvalue { ptr, i64 } %86, 0
  store ptr %88, ptr %8, align 8
  %89 = extractvalue { ptr, i64 } %86, 1
  store i64 %89, ptr %76, align 8
  %90 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br i1 %90, label %91, label %94

91:                                               ; preds = %87
  store i8 1, ptr %60, align 8, !tbaa !43
  br label %94

92:                                               ; preds = %77
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br label %98

94:                                               ; preds = %87, %91
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = zext i32 %95 to i64
  %97 = icmp ult i64 %indvars.iv.next40, %96
  br i1 %97, label %77, label %._crit_edge34, !llvm.loop !47

98:                                               ; preds = %92, %44, %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ], [ %45, %44 ], [ %93, %92 ]
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %99

99:                                               ; preds = %98, %27
  %.pn.pn = phi { ptr, i32 } [ %.pn, %98 ], [ %28, %27 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  br label %100

100:                                              ; preds = %99, %25
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %99 ], [ %26, %25 ]
  call void @_ZNSt6vectorIN4aabb4NodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 44}
!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 = !{!6, !16, i64 56}
!34 = !{!6, !15, i64 232}
!35 = !{!6, !7, i64 0}
!36 = !{!6, !7, i64 32}
!37 = !{!6, !7, i64 36}
!38 = !{!39, !7, i64 84}
!39 = !{!"_ZTSN4aabb4NodeE", !40, i64 0, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100}
!40 = !{!"_ZTSN4aabb4AABBE", !23, i64 0, !23, i64 24, !23, i64 48, !16, i64 72}
!41 = !{!39, !7, i64 96}
!42 = !{!6, !7, i64 40}
!43 = !{!6, !15, i64 48}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = !{!16, !16, i64 0}
!47 = distinct !{!47, !45}


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