; LLVM IR from Slingshot-Physics/slingshot-community :: common/geometry/src (aabb_tree)

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

%"struct.geometry::types::aabb_t" = type { %class.Vector3, %class.Vector3 }
%class.Vector3 = type { [3 x float] }
%"struct.geometry::GrowPriorityExplorer" = type { i32, float, float, %"struct.geometry::types::aabb_t" }
%"struct.geometry::aabb_meta_t" = type { i64, %"struct.geometry::types::aabb_t" }
%"struct.graph::types::dl_node_t" = type { i32, [4 x i32], %"struct.geometry::aabb_meta_t" }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7combineENS_5types6aabb_tES1_(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::aabb_t") align 4, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry8growTreeENS_11aabb_meta_tERN5graph8NAryTreeIS0_Li4EEE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.geometry::GrowPriorityExplorer", align 4
  %6 = alloca %"struct.geometry::types::aabb_t", align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.geometry::aabb_meta_t", align 8
  %11 = alloca %"struct.geometry::types::aabb_t", align 4
  %12 = alloca %"struct.geometry::types::aabb_t", align 4
  %13 = alloca %"struct.geometry::types::aabb_t", align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.geometry::types::aabb_t", align 4
  %17 = alloca %"struct.geometry::types::aabb_t", align 4
  %18 = alloca %"struct.geometry::types::aabb_t", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %5) #4
  %19 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %0, i32 0, i32 1
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(24) %19)
  call void @_ZN8geometry20GrowPriorityExplorerC2ENS_5types6aabb_tE(ptr noundef nonnull align 4 dereferenceable(36) %5, ptr noundef %6)
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE16priorityTraverseINS1_20GrowPriorityExplorerEEEvRT_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(36) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.geometry::GrowPriorityExplorer", ptr %5, i32 0, i32 0
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef %23)
  store ptr %24, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call noundef i32 @_ZN8geometry11numChildrenERKN5graph5types9dl_node_tINS_11aabb_meta_tELj4EEE(ptr noundef nonnull align 8 dereferenceable(56) %25)
  store i32 %26, ptr %8, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 -1, ptr %9, align 4, !tbaa !15
  %27 = load i32, ptr %8, align 4, !tbaa !15
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %55

29:                                               ; preds = %2
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.graph::types::dl_node_t", ptr %30, i32 0, i32 2
  %32 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %31, i32 0, i32 0
  %33 = load i64, ptr %32, align 8, !tbaa !16
  %34 = icmp sge i64 %33, 0
  br i1 %34, label %35, label %55

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  call void @_ZN8geometry11aabb_meta_tC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  %36 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %0, i32 0, i32 1
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(24) %36)
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.graph::types::dl_node_t", ptr %37, i32 0, i32 2
  %39 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %38, i32 0, i32 1
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(24) %39)
  call void @_ZN8geometry7combineENS_5types6aabb_tES1_(ptr dead_on_unwind writable sret(%"struct.geometry::types::aabb_t") align 4 %11, ptr noundef %12, ptr noundef %13)
  %40 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %10, i32 0, i32 1
  %41 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry5types6aabb_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(24) %11)
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  %42 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %10, i32 0, i32 0
  store i64 -1, ptr %42, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.geometry::GrowPriorityExplorer", ptr %5, i32 0, i32 0
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = call noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7emplaceEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %43, i32 noundef %45, ptr noundef nonnull align 8 dereferenceable(32) %10)
  store i32 %46, ptr %14, align 4, !tbaa !15
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load i32, ptr %14, align 4, !tbaa !15
  %49 = call noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE8addChildEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %47, i32 noundef %48, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load i32, ptr %14, align 4, !tbaa !15
  %52 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24) %50, i32 noundef %51)
  %53 = getelementptr inbounds %"struct.graph::types::dl_node_t", ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !21
  store i32 %54, ptr %9, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %62

55:                                               ; preds = %29, %2
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.geometry::GrowPriorityExplorer", ptr %5, i32 0, i32 0
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = call noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE8addChildEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %56, i32 noundef %58, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %60 = getelementptr inbounds %"struct.geometry::GrowPriorityExplorer", ptr %5, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !9
  store i32 %61, ptr %9, align 4, !tbaa !15
  br label %62

62:                                               ; preds = %55, %35
  br label %63

63:                                               ; preds = %66, %62
  %64 = load i32, ptr %9, align 4, !tbaa !15
  %65 = icmp sge i32 %64, 0
  br i1 %65, label %66, label %81

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = load i32, ptr %9, align 4, !tbaa !15
  %69 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EEixEj(ptr noundef nonnull align 8 dereferenceable(24) %67, i32 noundef %68)
  store ptr %69, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %70, i32 0, i32 1
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(24) %71)
  %72 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %0, i32 0, i32 1
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(24) %72)
  call void @_ZN8geometry7combineENS_5types6aabb_tES1_(ptr dead_on_unwind writable sret(%"struct.geometry::types::aabb_t") align 4 %16, ptr noundef %17, ptr noundef %18)
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.geometry::aabb_meta_t", ptr %73, i32 0, i32 1
  %75 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry5types6aabb_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(24) %74, ptr noundef nonnull align 4 dereferenceable(24) %16)
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = load i32, ptr %9, align 4, !tbaa !15
  %78 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24) %76, i32 noundef %77)
  %79 = getelementptr inbounds %"struct.graph::types::dl_node_t", ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !21
  store i32 %80, ptr %9, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %63, !llvm.loop !22

81:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 36, ptr %5) #4
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry20GrowPriorityExplorerC2ENS_5types6aabb_tE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8geometry11numChildrenERKN5graph5types9dl_node_tINS_11aabb_meta_tELj4EEE(ptr noundef nonnull align 8 dereferenceable(56)) #3

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

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

; 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 noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7emplaceEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE8addChildEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EEixEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #0 align 2

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


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

%"struct.geometry::types::aabb_t" = type { %class.Vector3, %class.Vector3 }
%class.Vector3 = type { [3 x float] }
%"struct.geometry::GrowPriorityExplorer" = type { i32, float, float, %"struct.geometry::types::aabb_t" }
%"struct.geometry::aabb_meta_t" = type { i64, %"struct.geometry::types::aabb_t" }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7combineENS_5types6aabb_tES1_(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::aabb_t") align 4, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry8growTreeENS_11aabb_meta_tERN5graph8NAryTreeIS0_Li4EEE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 {
  %3 = alloca %"struct.geometry::GrowPriorityExplorer", align 4
  %4 = alloca %"struct.geometry::types::aabb_t", align 4
  %5 = alloca %"struct.geometry::aabb_meta_t", align 8
  %6 = alloca %"struct.geometry::types::aabb_t", align 4
  %7 = alloca %"struct.geometry::types::aabb_t", align 4
  %8 = alloca %"struct.geometry::types::aabb_t", align 4
  %9 = alloca %"struct.geometry::types::aabb_t", align 4
  %10 = alloca %"struct.geometry::types::aabb_t", align 4
  %11 = alloca %"struct.geometry::types::aabb_t", align 4
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %3) #4
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(24) %12)
  call void @_ZN8geometry20GrowPriorityExplorerC2ENS_5types6aabb_tE(ptr noundef nonnull align 4 dereferenceable(36) %3, ptr noundef nonnull %4)
  call void @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE16priorityTraverseINS1_20GrowPriorityExplorerEEEvRT_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(36) %3)
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %13)
  %15 = call noundef i32 @_ZN8geometry11numChildrenERKN5graph5types9dl_node_tINS_11aabb_meta_tELj4EEE(ptr noundef nonnull align 8 dereferenceable(56) %14)
  %16 = icmp eq i32 %15, 0
  %17 = getelementptr inbounds i8, ptr %14, i64 24
  %18 = load i64, ptr %17, align 8
  %19 = icmp sgt i64 %18, -1
  %or.cond = select i1 %16, i1 %19, i1 false
  br i1 %or.cond, label %20, label %29

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN8geometry11aabb_meta_tC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(24) %12)
  %21 = getelementptr inbounds i8, ptr %14, i64 32
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(24) %21)
  call void @_ZN8geometry7combineENS_5types6aabb_tES1_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::aabb_t") align 4 %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %22 = getelementptr inbounds i8, ptr %5, i64 8
  %23 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry5types6aabb_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(24) %22, ptr noundef nonnull align 4 dereferenceable(24) %6)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  store i64 -1, ptr %5, align 8, !tbaa !13
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = call noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7emplaceEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %24, ptr noundef nonnull align 8 dereferenceable(32) %5)
  %26 = call noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE8addChildEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %25, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %27 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %25)
  %28 = load i32, ptr %27, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %33

29:                                               ; preds = %2
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = call noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE8addChildEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %30, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %32 = load i32, ptr %3, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %29, %20
  %.0 = phi i32 [ %28, %20 ], [ %32, %29 ]
  %34 = icmp sgt i32 %.0, -1
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %33, %.lr.ph
  %.120 = phi i32 [ %39, %.lr.ph ], [ %.0, %33 ]
  %35 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EEixEj(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.120)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(24) %36)
  call void @_ZN8geometry5types6aabb_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(24) %12)
  call void @_ZN8geometry7combineENS_5types6aabb_tES1_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::aabb_t") align 4 %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %37 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry5types6aabb_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(24) %9)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  %38 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.120)
  %39 = load i32, ptr %38, align 8, !tbaa !16
  %40 = icmp sgt i32 %39, -1
  br i1 %40, label %.lr.ph, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %33
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %3) #4
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry20GrowPriorityExplorerC2ENS_5types6aabb_tE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7getNodeEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8geometry11numChildrenERKN5graph5types9dl_node_tINS_11aabb_meta_tELj4EEE(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE7emplaceEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EE8addChildEiRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN5graph8NAryTreeIN8geometry11aabb_meta_tELi4EEixEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #0 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN8geometry20GrowPriorityExplorerE", !7, i64 0, !10, i64 4, !10, i64 8, !11, i64 12}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"_ZTSN8geometry5types6aabb_tE", !12, i64 0, !12, i64 12}
!12 = !{!"_ZTS7Vector3", !8, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN8geometry11aabb_meta_tE", !15, i64 0, !11, i64 8}
!15 = !{!"long", !8, i64 0}
!16 = !{!17, !7, i64 0}
!17 = !{!"_ZTSN5graph5types9dl_node_tIN8geometry11aabb_meta_tELj4EEE", !7, i64 0, !8, i64 4, !14, i64 24}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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