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

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

%"class.std::vector" = 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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.std::allocator" = type { i8 }
%"class.aabb::AABB" = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", double }
%"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.std::pair.14" = type { i32, i32 }
%"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.2 = external hidden unnamed_addr constant [34 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.3 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b = external hidden unnamed_addr constant [98 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(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)) #1 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) #1 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 noundef double @_ZNK4aabb4AABB18computeSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4aabb4AABB13computeCentreEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(80)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4aabb4AABB8containsERKS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; 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) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #7

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKjjELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext %4) #5 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %16 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca i32, align 4
  %21 = alloca %"class.aabb::AABB", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::vector", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  %25 = zext i1 %4 to i8
  store i8 %25, ptr %11, align 1, !tbaa !11
  %26 = load ptr, ptr %7, align 8
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #10
  %29 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 6
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = zext i32 %30 to i64
  %32 = icmp ne i64 %28, %31
  br i1 %32, label %33, label %47

33:                                               ; preds = %5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #10
  %36 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 6
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = zext i32 %37 to i64
  %39 = icmp ne i64 %35, %38
  br i1 %39, label %40, label %47

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

42:                                               ; preds = %40
  call void @__cxa_throw(ptr %41, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #11
  unreachable

43:                                               ; preds = %40
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %12, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %13, align 4
  call void @__cxa_free_exception(ptr %41) #10
  br label %247

47:                                               ; preds = %33, %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  call void @_ZNSt8__detail14_Node_iteratorISt4pairIKjjELb0ELb0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %48 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 14
  %49 = call ptr @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %50 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %15, i32 0, i32 0
  %51 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %50, i32 0, i32 0
  store ptr %49, ptr %51, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %15, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %52 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 14
  %53 = call ptr @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %52) #10
  %54 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %16, i32 0, i32 0
  %55 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %54, i32 0, i32 0
  store ptr %53, ptr %55, align 8
  %56 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKjjELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br i1 %56, label %57, label %64

57:                                               ; preds = %47
  %58 = call ptr @__cxa_allocate_exception(i64 16) #10
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %58, ptr noundef @.str.12)
          to label %59 unwind label %60

59:                                               ; preds = %57
  call void @__cxa_throw(ptr %58, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #11
  unreachable

60:                                               ; preds = %57
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %12, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %13, align 4
  call void @__cxa_free_exception(ptr %58) #10
  br label %246

64:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %65 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKjjELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #10
  %66 = getelementptr inbounds %"struct.std::pair.14", ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !36
  store i32 %67, ptr %17, align 4, !tbaa !9
  %68 = load i32, ptr %17, align 4, !tbaa !9
  %69 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 4
  %70 = load i32, ptr %69, align 4, !tbaa !38
  %71 = icmp ult i32 %68, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %64
  br label %75

73:                                               ; preds = %64
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 549, ptr noundef @__PRETTY_FUNCTION__._ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b) #12
  unreachable

74:                                               ; No predecessors!
  br label %75

75:                                               ; preds = %74, %72
  %76 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 2
  %77 = load i32, ptr %17, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #10
  %80 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %79)
  br i1 %80, label %81, label %82

81:                                               ; preds = %75
  br label %84

82:                                               ; preds = %75
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 550, ptr noundef @__PRETTY_FUNCTION__._ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b) #12
  unreachable

83:                                               ; No predecessors!
  br label %84

84:                                               ; preds = %83, %81
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #10
  %85 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 6
  %86 = load i32, ptr %85, align 4, !tbaa !13
  %87 = zext i32 %86 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #10
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %87, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %88 unwind label %95

88:                                               ; preds = %84
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %137, %88
  %90 = load i32, ptr %20, align 4, !tbaa !9
  %91 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 6
  %92 = load i32, ptr %91, align 4, !tbaa !13
  %93 = icmp ult i32 %90, %92
  br i1 %93, label %99, label %94

94:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  br label %141

95:                                               ; preds = %84
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %12, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #10
  br label %245

99:                                               ; preds = %89
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = load i32, ptr %20, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %102) #10
  %104 = load double, ptr %103, align 8, !tbaa !39
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load i32, ptr %20, align 4, !tbaa !9
  %107 = zext i32 %106 to i64
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %107) #10
  %109 = load double, ptr %108, align 8, !tbaa !39
  %110 = fcmp ogt double %104, %109
  br i1 %110, label %111, label %122

111:                                              ; preds = %99
  %112 = call ptr @__cxa_allocate_exception(i64 16) #10
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %112, ptr noundef @.str.3)
          to label %113 unwind label %114

113:                                              ; preds = %111
  invoke void @__cxa_throw(ptr %112, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #11
          to label %252 unwind label %118

114:                                              ; preds = %111
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %12, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %13, align 4
  call void @__cxa_free_exception(ptr %112) #10
  br label %140

118:                                              ; preds = %113
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %12, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %13, align 4
  br label %140

122:                                              ; preds = %99
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = load i32, ptr %20, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %125) #10
  %127 = load double, ptr %126, align 8, !tbaa !39
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = load i32, ptr %20, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %130) #10
  %132 = load double, ptr %131, align 8, !tbaa !39
  %133 = fsub double %127, %132
  %134 = load i32, ptr %20, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %135) #10
  store double %133, ptr %136, align 8, !tbaa !39
  br label %137

137:                                              ; preds = %122
  %138 = load i32, ptr %20, align 4, !tbaa !9
  %139 = add i32 %138, 1
  store i32 %139, ptr %20, align 4, !tbaa !9
  br label %89, !llvm.loop !40

140:                                              ; preds = %118, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  br label %244

141:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 80, ptr %21) #10
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN4aabb4AABBC1ERKSt6vectorIdSaIdEES5_(ptr noundef nonnull align 8 dereferenceable(80) %21, ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef nonnull align 8 dereferenceable(24) %143)
          to label %144 unwind label %155

144:                                              ; preds = %141
  %145 = load i8, ptr %11, align 1, !tbaa !11, !range !42, !noundef !43
  %146 = trunc i8 %145 to i1
  br i1 %146, label %159, label %147

147:                                              ; preds = %144
  %148 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 2
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %148, i64 noundef %150) #10
  %152 = getelementptr inbounds %"struct.aabb::Node", ptr %151, i32 0, i32 0
  %153 = call noundef zeroext i1 @_ZNK4aabb4AABB8containsERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %152, ptr noundef nonnull align 8 dereferenceable(80) %21)
  br i1 %153, label %154, label %159

154:                                              ; preds = %147
  store i1 false, ptr %6, align 1
  store i32 1, ptr %22, align 4
  br label %240

155:                                              ; preds = %141
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %12, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %13, align 4
  br label %243

159:                                              ; preds = %147, %144
  %160 = load i32, ptr %17, align 4, !tbaa !9
  invoke void @_ZN4aabb4Tree10removeLeafEj(ptr noundef nonnull align 8 dereferenceable(233) %26, i32 noundef %160)
          to label %161 unwind label %168

161:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %198, %161
  %163 = load i32, ptr %23, align 4, !tbaa !9
  %164 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 6
  %165 = load i32, ptr %164, align 4, !tbaa !13
  %166 = icmp ult i32 %163, %165
  br i1 %166, label %172, label %167

167:                                              ; preds = %162
  store i32 5, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  br label %201

168:                                              ; preds = %226, %201, %159
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %12, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %13, align 4
  br label %242

172:                                              ; preds = %162
  %173 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 9
  %174 = load double, ptr %173, align 8, !tbaa !44
  %175 = load i32, ptr %23, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %176) #10
  %178 = load double, ptr %177, align 8, !tbaa !39
  %179 = getelementptr inbounds %"class.aabb::AABB", ptr %21, i32 0, i32 0
  %180 = load i32, ptr %23, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %179, i64 noundef %181) #10
  %183 = load double, ptr %182, align 8, !tbaa !39
  %184 = fneg double %174
  %185 = call double @llvm.fmuladd.f64(double %184, double %178, double %183)
  store double %185, ptr %182, align 8, !tbaa !39
  %186 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 9
  %187 = load double, ptr %186, align 8, !tbaa !44
  %188 = load i32, ptr %23, align 4, !tbaa !9
  %189 = zext i32 %188 to i64
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %189) #10
  %191 = load double, ptr %190, align 8, !tbaa !39
  %192 = getelementptr inbounds %"class.aabb::AABB", ptr %21, i32 0, i32 1
  %193 = load i32, ptr %23, align 4, !tbaa !9
  %194 = zext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %192, i64 noundef %194) #10
  %196 = load double, ptr %195, align 8, !tbaa !39
  %197 = call double @llvm.fmuladd.f64(double %187, double %191, double %196)
  store double %197, ptr %195, align 8, !tbaa !39
  br label %198

198:                                              ; preds = %172
  %199 = load i32, ptr %23, align 4, !tbaa !9
  %200 = add i32 %199, 1
  store i32 %200, ptr %23, align 4, !tbaa !9
  br label %162, !llvm.loop !45

201:                                              ; preds = %167
  %202 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 2
  %203 = load i32, ptr %17, align 4, !tbaa !9
  %204 = zext i32 %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef %204) #10
  %206 = getelementptr inbounds %"struct.aabb::Node", ptr %205, i32 0, i32 0
  %207 = invoke noundef nonnull align 8 dereferenceable(80) ptr @_ZN4aabb4AABBaSERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %206, ptr noundef nonnull align 8 dereferenceable(80) %21)
          to label %208 unwind label %168

208:                                              ; preds = %201
  %209 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 2
  %210 = load i32, ptr %17, align 4, !tbaa !9
  %211 = zext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef %211) #10
  %213 = getelementptr inbounds %"struct.aabb::Node", ptr %212, i32 0, i32 0
  %214 = call noundef double @_ZNK4aabb4AABB18computeSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %213)
  %215 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 2
  %216 = load i32, ptr %17, align 4, !tbaa !9
  %217 = zext i32 %216 to i64
  %218 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %215, i64 noundef %217) #10
  %219 = getelementptr inbounds %"struct.aabb::Node", ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds %"class.aabb::AABB", ptr %219, i32 0, i32 3
  store double %214, ptr %220, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #10
  %221 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 2
  %222 = load i32, ptr %17, align 4, !tbaa !9
  %223 = zext i32 %222 to i64
  %224 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef %223) #10
  %225 = getelementptr inbounds %"struct.aabb::Node", ptr %224, i32 0, i32 0
  invoke void @_ZN4aabb4AABB13computeCentreEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %24, ptr noundef nonnull align 8 dereferenceable(80) %225)
          to label %226 unwind label %236

226:                                              ; preds = %208
  %227 = getelementptr inbounds %"class.aabb::Tree", ptr %26, i32 0, i32 2
  %228 = load i32, ptr %17, align 4, !tbaa !9
  %229 = zext i32 %228 to i64
  %230 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %227, i64 noundef %229) #10
  %231 = getelementptr inbounds %"struct.aabb::Node", ptr %230, i32 0, i32 0
  %232 = getelementptr inbounds %"class.aabb::AABB", ptr %231, i32 0, i32 2
  %233 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %232, ptr noundef nonnull align 8 dereferenceable(24) %24) #10
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #10
  %234 = load i32, ptr %17, align 4, !tbaa !9
  invoke void @_ZN4aabb4Tree10insertLeafEj(ptr noundef nonnull align 8 dereferenceable(233) %26, i32 noundef %234)
          to label %235 unwind label %168

235:                                              ; preds = %226
  store i1 true, ptr %6, align 1
  store i32 1, ptr %22, align 4
  br label %240

236:                                              ; preds = %208
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %12, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #10
  br label %242

240:                                              ; preds = %235, %154
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %21) #10
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #10
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  %241 = load i1, ptr %6, align 1
  ret i1 %241

242:                                              ; preds = %236, %168
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %21) #10
  br label %243

243:                                              ; preds = %242, %155
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #10
  br label %244

244:                                              ; preds = %243, %140
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  br label %245

245:                                              ; preds = %244, %95
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  br label %246

246:                                              ; preds = %245, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %247

247:                                              ; preds = %246, %43
  %248 = load ptr, ptr %12, align 8
  %249 = load i32, ptr %13, align 4
  %250 = insertvalue { ptr, i32 } poison, ptr %248, 0
  %251 = insertvalue { ptr, i32 } %250, i32 %249, 1
  resume { ptr, i32 } %251

252:                                              ; preds = %113
  unreachable
}

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = 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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.std::allocator" = type { i8 }
%"class.aabb::AABB" = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", double }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.3 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b = external hidden unnamed_addr constant [98 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(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 #1 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 #1 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 noundef double @_ZNK4aabb4AABB18computeSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4aabb4AABB13computeCentreEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4aabb4AABB8containsERKS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104)) 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 #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKjjELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext %4) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.aabb::AABB", align 8
  %12 = alloca %"class.std::vector", align 8
  store i32 %1, ptr %6, align 4, !tbaa !5
  %13 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  %14 = getelementptr inbounds i8, ptr %0, i64 44
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = zext i32 %15 to i64
  %.not = icmp eq i64 %13, %16
  br i1 %.not, label %26, label %17

17:                                               ; preds = %5
  %18 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  %19 = load i32, ptr %14, align 4, !tbaa !9
  %20 = zext i32 %19 to i64
  %.not46 = icmp eq i64 %18, %20
  br i1 %.not46, label %26, label %21

21:                                               ; preds = %17
  %22 = tail call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull @.str.2)
          to label %23 unwind label %24

23:                                               ; preds = %21
  tail call void @__cxa_throw(ptr nonnull %22, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #10
  unreachable

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %22) #9
  br label %128

26:                                               ; preds = %17, %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  call void @_ZNSt8__detail14_Node_iteratorISt4pairIKjjELb0ELb0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %27 = getelementptr inbounds i8, ptr %0, i64 176
  %28 = call ptr @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store ptr %28, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %29 = call ptr @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %27) #9
  store ptr %29, ptr %8, align 8
  %30 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKjjELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br i1 %30, label %31, label %36

31:                                               ; preds = %26
  %32 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull @.str.12)
          to label %33 unwind label %34

33:                                               ; preds = %31
  call void @__cxa_throw(ptr nonnull %32, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #10
  unreachable

34:                                               ; preds = %31
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %32) #9
  br label %127

36:                                               ; preds = %26
  %37 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKjjELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %38 = getelementptr inbounds i8, ptr %37, i64 4
  %39 = load i32, ptr %38, align 4, !tbaa !34
  %40 = getelementptr inbounds i8, ptr %0, i64 36
  %41 = load i32, ptr %40, align 4, !tbaa !36
  %42 = icmp ult i32 %39, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %36
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 549, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b) #11
  unreachable

44:                                               ; preds = %36
  %45 = getelementptr inbounds i8, ptr %0, i64 8
  %46 = zext i32 %39 to i64
  %47 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #9
  %48 = call noundef zeroext i1 @_ZNK4aabb4Node6isLeafEv(ptr noundef nonnull align 8 dereferenceable(104) %47)
  br i1 %48, label %50, label %49

49:                                               ; preds = %44
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 550, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4aabb4Tree14updateParticleEjRSt6vectorIdSaIdEES4_b) #11
  unreachable

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #9
  %51 = load i32, ptr %14, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %52, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %53 unwind label %55

53:                                               ; preds = %50
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %.not61 = icmp eq i32 %54, 0
  br i1 %.not61, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %69, %53
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #9
  invoke void @_ZN4aabb4AABBC1ERKSt6vectorIdSaIdEES5_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %79 unwind label %83

55:                                               ; preds = %50
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  br label %126

.lr.ph:                                           ; preds = %53, %69
  %indvars.iv = phi i64 [ %indvars.iv.next, %69 ], [ 0, %53 ]
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #9
  %58 = load double, ptr %57, align 8, !tbaa !37
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #9
  %60 = load double, ptr %59, align 8, !tbaa !37
  %61 = fcmp ogt double %58, %60
  br i1 %61, label %62, label %69

62:                                               ; preds = %.lr.ph
  %63 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull @.str.3)
          to label %64 unwind label %65

64:                                               ; preds = %62
  invoke void @__cxa_throw(ptr nonnull %63, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #10
          to label %129 unwind label %67

65:                                               ; preds = %62
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %63) #9
  br label %125

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

69:                                               ; preds = %.lr.ph
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #9
  %71 = load double, ptr %70, align 8, !tbaa !37
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #9
  %73 = load double, ptr %72, align 8, !tbaa !37
  %74 = fsub double %71, %73
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv) #9
  store double %74, ptr %75, align 8, !tbaa !37
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = icmp ult i64 %indvars.iv.next, %77
  br i1 %78, label %.lr.ph, label %._crit_edge, !llvm.loop !38

79:                                               ; preds = %._crit_edge
  br i1 %4, label %85, label %80

80:                                               ; preds = %79
  %81 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #9
  %82 = call noundef zeroext i1 @_ZNK4aabb4AABB8containsERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %81, ptr noundef nonnull align 8 dereferenceable(80) %11)
  br i1 %82, label %122, label %85

83:                                               ; preds = %._crit_edge
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %124

85:                                               ; preds = %80, %79
  invoke void @_ZN4aabb4Tree10removeLeafEj(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %39)
          to label %.preheader unwind label %91

.preheader:                                       ; preds = %85
  %86 = load i32, ptr %14, align 4, !tbaa !9
  %.not62 = icmp eq i32 %86, 0
  br i1 %.not62, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %.preheader
  %87 = getelementptr inbounds i8, ptr %0, i64 56
  %88 = getelementptr inbounds i8, ptr %11, i64 24
  br label %93

._crit_edge60:                                    ; preds = %93, %.preheader
  %89 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #9
  %90 = invoke noundef nonnull align 8 dereferenceable(80) ptr @_ZN4aabb4AABBaSERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %89, ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %110 unwind label %91

91:                                               ; preds = %116, %._crit_edge60, %85
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %123

93:                                               ; preds = %.lr.ph59, %93
  %indvars.iv64 = phi i64 [ 0, %.lr.ph59 ], [ %indvars.iv.next65, %93 ]
  %94 = load double, ptr %87, align 8, !tbaa !40
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv64) #9
  %96 = load double, ptr %95, align 8, !tbaa !37
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv64) #9
  %98 = load double, ptr %97, align 8, !tbaa !37
  %99 = fneg double %94
  %100 = call double @llvm.fmuladd.f64(double %99, double %96, double %98)
  store double %100, ptr %97, align 8, !tbaa !37
  %101 = load double, ptr %87, align 8, !tbaa !40
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv64) #9
  %103 = load double, ptr %102, align 8, !tbaa !37
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %indvars.iv64) #9
  %105 = load double, ptr %104, align 8, !tbaa !37
  %106 = call double @llvm.fmuladd.f64(double %101, double %103, double %105)
  store double %106, ptr %104, align 8, !tbaa !37
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %107 = load i32, ptr %14, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = icmp ult i64 %indvars.iv.next65, %108
  br i1 %109, label %93, label %._crit_edge60, !llvm.loop !41

110:                                              ; preds = %._crit_edge60
  %111 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #9
  %112 = call noundef double @_ZNK4aabb4AABB18computeSurfaceAreaEv(ptr noundef nonnull align 8 dereferenceable(80) %111)
  %113 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #9
  %114 = getelementptr inbounds i8, ptr %113, i64 72
  store double %112, ptr %114, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #9
  %115 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #9
  invoke void @_ZN4aabb4AABB13computeCentreEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(80) %115)
          to label %116 unwind label %120

116:                                              ; preds = %110
  %117 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #9
  %118 = getelementptr inbounds i8, ptr %117, i64 48
  %119 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %118, ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #9
  invoke void @_ZN4aabb4Tree10insertLeafEj(ptr noundef nonnull align 8 dereferenceable(233) %0, i32 noundef %39)
          to label %122 unwind label %91

120:                                              ; preds = %110
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #9
  br label %123

122:                                              ; preds = %116, %80
  %.036 = phi i1 [ false, %80 ], [ true, %116 ]
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #9
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  ret i1 %.036

123:                                              ; preds = %120, %91
  %.pn = phi { ptr, i32 } [ %92, %91 ], [ %121, %120 ]
  call void @_ZN4aabb4AABBD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #9
  br label %124

124:                                              ; preds = %123, %83
  %.pn.pn = phi { ptr, i32 } [ %.pn, %123 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #9
  br label %125

125:                                              ; preds = %65, %67, %124
  %.pn49.pn = phi { ptr, i32 } [ %.pn.pn, %124 ], [ %68, %67 ], [ %66, %65 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  br label %126

126:                                              ; preds = %125, %55
  %.pn49.pn.pn = phi { ptr, i32 } [ %.pn49.pn, %125 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  br label %127

127:                                              ; preds = %126, %34
  %.pn53 = phi { ptr, i32 } [ %35, %34 ], [ %.pn49.pn.pn, %126 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %128

128:                                              ; preds = %127, %24
  %.pn55 = phi { ptr, i32 } [ %25, %24 ], [ %.pn53, %127 ]
  resume { ptr, i32 } %.pn55

129:                                              ; preds = %64
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZN4aabb4AABBaSERKS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #7 align 2

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

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

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


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