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

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

%"class.aabb::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.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__._ZN4aabb4Tree12allocateNodeEv = external hidden unnamed_addr constant [40 x i8], align 1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4aabb4Tree12allocateNodeEv(ptr noundef nonnull align 8 dereferenceable(233) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  %6 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 5
  %7 = load i32, ptr %6, align 8, !tbaa !9
  %8 = icmp eq i32 %7, -1
  br i1 %8, label %9, label %69

9:                                                ; preds = %1
  %10 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 3
  %11 = load i32, ptr %10, align 8, !tbaa !34
  %12 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 4
  %13 = load i32, ptr %12, align 4, !tbaa !35
  %14 = icmp eq i32 %11, %13
  br i1 %14, label %15, label %16

15:                                               ; preds = %9
  br label %18

16:                                               ; preds = %9
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 296, ptr noundef @__PRETTY_FUNCTION__._ZN4aabb4Tree12allocateNodeEv) #4
  unreachable

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %15
  %19 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 4
  %20 = load i32, ptr %19, align 4, !tbaa !35
  %21 = mul i32 %20, 2
  store i32 %21, ptr %19, align 4, !tbaa !35
  %22 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %23 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 4
  %24 = load i32, ptr %23, align 4, !tbaa !35
  %25 = zext i32 %24 to i64
  call void @_ZNSt6vectorIN4aabb4NodeESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %26 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 3
  %27 = load i32, ptr %26, align 8, !tbaa !34
  store i32 %27, ptr %3, align 4, !tbaa !36
  br label %28

28:                                               ; preds = %48, %18
  %29 = load i32, ptr %3, align 4, !tbaa !36
  %30 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 4
  %31 = load i32, ptr %30, align 4, !tbaa !35
  %32 = sub i32 %31, 1
  %33 = icmp ult i32 %29, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %51

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

48:                                               ; preds = %35
  %49 = load i32, ptr %3, align 4, !tbaa !36
  %50 = add i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !36
  br label %28, !llvm.loop !41

51:                                               ; preds = %34
  %52 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %53 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 4
  %54 = load i32, ptr %53, align 4, !tbaa !35
  %55 = sub i32 %54, 1
  %56 = zext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %56) #5
  %58 = getelementptr inbounds %"struct.aabb::Node", ptr %57, i32 0, i32 2
  store i32 -1, ptr %58, align 4, !tbaa !37
  %59 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %60 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 4
  %61 = load i32, ptr %60, align 4, !tbaa !35
  %62 = sub i32 %61, 1
  %63 = zext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %63) #5
  %65 = getelementptr inbounds %"struct.aabb::Node", ptr %64, i32 0, i32 5
  store i32 -1, ptr %65, align 8, !tbaa !40
  %66 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 3
  %67 = load i32, ptr %66, align 8, !tbaa !34
  %68 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 5
  store i32 %67, ptr %68, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %51, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %70 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 5
  %71 = load i32, ptr %70, align 8, !tbaa !9
  store i32 %71, ptr %4, align 4, !tbaa !36
  %72 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %73 = load i32, ptr %4, align 4, !tbaa !36
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #5
  %76 = getelementptr inbounds %"struct.aabb::Node", ptr %75, i32 0, i32 2
  %77 = load i32, ptr %76, align 4, !tbaa !37
  %78 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 5
  store i32 %77, ptr %78, align 8, !tbaa !9
  %79 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %80 = load i32, ptr %4, align 4, !tbaa !36
  %81 = zext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %81) #5
  %83 = getelementptr inbounds %"struct.aabb::Node", ptr %82, i32 0, i32 1
  store i32 -1, ptr %83, align 8, !tbaa !43
  %84 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %85 = load i32, ptr %4, align 4, !tbaa !36
  %86 = zext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #5
  %88 = getelementptr inbounds %"struct.aabb::Node", ptr %87, i32 0, i32 3
  store i32 -1, ptr %88, align 8, !tbaa !44
  %89 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %90 = load i32, ptr %4, align 4, !tbaa !36
  %91 = zext i32 %90 to i64
  %92 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %91) #5
  %93 = getelementptr inbounds %"struct.aabb::Node", ptr %92, i32 0, i32 4
  store i32 -1, ptr %93, align 4, !tbaa !45
  %94 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %95 = load i32, ptr %4, align 4, !tbaa !36
  %96 = zext i32 %95 to i64
  %97 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96) #5
  %98 = getelementptr inbounds %"struct.aabb::Node", ptr %97, i32 0, i32 5
  store i32 0, ptr %98, align 8, !tbaa !40
  %99 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 2
  %100 = load i32, ptr %4, align 4, !tbaa !36
  %101 = zext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #5
  %103 = getelementptr inbounds %"struct.aabb::Node", ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 6
  %105 = load i32, ptr %104, align 4, !tbaa !46
  call void @_ZN4aabb4AABB12setDimensionEj(ptr noundef nonnull align 8 dereferenceable(80) %103, i32 noundef %105)
  %106 = getelementptr inbounds %"class.aabb::Tree", ptr %5, i32 0, i32 3
  %107 = load i32, ptr %106, align 8, !tbaa !34
  %108 = add i32 %107, 1
  store i32 %108, ptr %106, align 8, !tbaa !34
  %109 = load i32, ptr %4, align 4, !tbaa !36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  ret i32 %109
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 40}
!10 = !{!"_ZTSN4aabb4TreeE", !11, i64 0, !12, i64 8, !11, i64 32, !11, i64 36, !11, i64 40, !11, 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 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIN4aabb4NodeESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN4aabb4NodeESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN4aabb4NodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!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, !6, i64 32}
!22 = !{!"_ZTSSt13_Bit_iterator", !23, i64 0}
!23 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !11, 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", !6, i64 0, !6, i64 8, !6, 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", !6, i64 0, !30, i64 8, !31, i64 16, !30, i64 24, !32, i64 32, !6, i64 48}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!32 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !33, i64 0, !30, i64 8}
!33 = !{!"float", !7, i64 0}
!34 = !{!10, !11, i64 32}
!35 = !{!10, !11, i64 36}
!36 = !{!11, !11, i64 0}
!37 = !{!38, !11, i64 84}
!38 = !{!"_ZTSN4aabb4NodeE", !39, i64 0, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100}
!39 = !{!"_ZTSN4aabb4AABBE", !24, i64 0, !24, i64 24, !24, i64 48, !17, i64 72}
!40 = !{!38, !11, i64 96}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!38, !11, i64 80}
!44 = !{!38, !11, i64 88}
!45 = !{!38, !11, i64 92}
!46 = !{!10, !11, i64 44}


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

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__._ZN4aabb4Tree12allocateNodeEv = external hidden unnamed_addr constant [40 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4aabb4Tree12allocateNodeEv(ptr noundef nonnull align 8 dereferenceable(233) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 40
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %4 = icmp eq i32 %3, -1
  br i1 %4, label %5, label %38

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = load i32, ptr %6, align 8, !tbaa !33
  %8 = getelementptr inbounds i8, ptr %0, i64 36
  %9 = load i32, ptr %8, align 4, !tbaa !34
  %10 = icmp eq i32 %7, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 296, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4aabb4Tree12allocateNodeEv) #3
  unreachable

12:                                               ; preds = %5
  %13 = shl i32 %7, 1
  store i32 %13, ptr %8, align 4, !tbaa !34
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = zext i32 %13 to i64
  tail call void @_ZNSt6vectorIN4aabb4NodeESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %15)
  %16 = load i32, ptr %6, align 8, !tbaa !33
  %17 = load i32, ptr %8, align 4, !tbaa !34
  %18 = add i32 %17, -1
  %19 = icmp ult i32 %16, %18
  br i1 %19, label %.lr.ph.preheader, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %12
  %.pre = zext i32 %18 to i64
  br label %._crit_edge

.lr.ph.preheader:                                 ; preds = %12
  %20 = zext i32 %16 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %36, %.lr.ph ]
  %21 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %.pre-phi) #4
  %22 = getelementptr inbounds i8, ptr %21, i64 84
  store i32 -1, ptr %22, align 4, !tbaa !35
  %23 = load i32, ptr %8, align 4, !tbaa !34
  %24 = add i32 %23, -1
  %25 = zext i32 %24 to i64
  %26 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %25) #4
  %27 = getelementptr inbounds i8, ptr %26, i64 96
  store i32 -1, ptr %27, align 8, !tbaa !38
  %28 = load i32, ptr %6, align 8, !tbaa !33
  store i32 %28, ptr %2, align 8, !tbaa !5
  br label %38

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %20, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv) #4
  %30 = getelementptr inbounds i8, ptr %29, i64 84
  %31 = trunc nuw i64 %indvars.iv.next to i32
  store i32 %31, ptr %30, align 4, !tbaa !35
  %32 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv) #4
  %33 = getelementptr inbounds i8, ptr %32, i64 96
  store i32 -1, ptr %33, align 8, !tbaa !38
  %34 = load i32, ptr %8, align 4, !tbaa !34
  %35 = add i32 %34, -1
  %36 = zext i32 %35 to i64
  %37 = icmp ult i64 %indvars.iv.next, %36
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !39

38:                                               ; preds = %._crit_edge, %1
  %39 = phi i32 [ %28, %._crit_edge ], [ %3, %1 ]
  %40 = getelementptr inbounds i8, ptr %0, i64 8
  %41 = zext i32 %39 to i64
  %42 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %43 = getelementptr inbounds i8, ptr %42, i64 84
  %44 = load i32, ptr %43, align 4, !tbaa !35
  store i32 %44, ptr %2, align 8, !tbaa !5
  %45 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %46 = getelementptr inbounds i8, ptr %45, i64 80
  store i32 -1, ptr %46, align 8, !tbaa !41
  %47 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %48 = getelementptr inbounds i8, ptr %47, i64 88
  store i32 -1, ptr %48, align 8, !tbaa !42
  %49 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %50 = getelementptr inbounds i8, ptr %49, i64 92
  store i32 -1, ptr %50, align 4, !tbaa !43
  %51 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %52 = getelementptr inbounds i8, ptr %51, i64 96
  store i32 0, ptr %52, align 8, !tbaa !38
  %53 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN4aabb4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %54 = getelementptr inbounds i8, ptr %0, i64 44
  %55 = load i32, ptr %54, align 4, !tbaa !44
  tail call void @_ZN4aabb4AABB12setDimensionEj(ptr noundef nonnull align 8 dereferenceable(80) %53, i32 noundef %55)
  %56 = getelementptr inbounds i8, ptr %0, i64 32
  %57 = load i32, ptr %56, align 8, !tbaa !33
  %58 = add i32 %57, 1
  store i32 %58, ptr %56, align 8, !tbaa !33
  ret i32 %39
}

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 40}
!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, !7, i64 32}
!34 = !{!6, !7, i64 36}
!35 = !{!36, !7, i64 84}
!36 = !{!"_ZTSN4aabb4NodeE", !37, i64 0, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100}
!37 = !{!"_ZTSN4aabb4AABBE", !23, i64 0, !23, i64 24, !23, i64 48, !16, i64 72}
!38 = !{!36, !7, i64 96}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!36, !7, i64 80}
!42 = !{!36, !7, i64 88}
!43 = !{!36, !7, i64 92}
!44 = !{!6, !7, i64 44}


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