; LLVM IR from SOHNE/Dura2D :: src/collision/d2AABBTree.ll (ZN10d2AABBTree10InsertNodeEP6d2NodePS1_)

; 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.d2AABB = type { %struct.d2Vec2, %struct.d2Vec2, ptr, ptr }
%struct.d2Vec2 = type { float, float }
%struct.d2Node = type { ptr, [2 x ptr], i8, %struct.d2AABB, ptr }
%class.d2AABBTree = type { %class.d2Broadphase, ptr, %"class.std::__cxx11::list", float, %"class.std::vector" }
%class.d2Broadphase = type { ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::pair<d2Body *, d2Body *>, std::allocator<std::pair<d2Body *, d2Body *>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::pair<d2Body *, d2Body *>, std::allocator<std::pair<d2Body *, d2Body *>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10d2AABBTree10InsertNodeEP6d2NodePS1_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca %struct.d2AABB, align 8
  %15 = alloca float, align 4
  %16 = alloca %struct.d2AABB, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %19, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  br i1 %21, label %22, label %39

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %23 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #9
  invoke void @_ZN6d2NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %23)
          to label %24 unwind label %35

24:                                               ; preds = %22
  store ptr %23, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.d2Node, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.d2Node, ptr %28, i32 0, i32 0
  store ptr %27, ptr %29, align 8, !tbaa !9
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN6d2Node9SetBranchEPS_S0_(ptr noundef nonnull align 8 dereferenceable(72) %30, ptr noundef %31, ptr noundef %32)
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %33, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %74

35:                                               ; preds = %22
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %9, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %23, i64 noundef 72) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %79

39:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.d2Node, ptr %40, i32 0, i32 1
  %42 = getelementptr inbounds [2 x ptr], ptr %41, i64 0, i64 0
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.d2Node, ptr %43, i32 0, i32 3
  store ptr %44, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.d2Node, ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds [2 x ptr], ptr %46, i64 0, i64 1
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.d2Node, ptr %48, i32 0, i32 3
  store ptr %49, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #8
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.d2Node, ptr %51, i32 0, i32 3
  call void @_Z5UnionRK6d2AABBS1_(ptr dead_on_unwind writable sret(%struct.d2AABB) align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull align 8 dereferenceable(32) %52)
  %53 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %54)
  %56 = fsub float %53, %55
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  store float %56, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #8
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.d2Node, ptr %58, i32 0, i32 3
  call void @_Z5UnionRK6d2AABBS1_(ptr dead_on_unwind writable sret(%struct.d2AABB) align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %57, ptr noundef nonnull align 8 dereferenceable(32) %59)
  %60 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %61)
  %63 = fsub float %60, %62
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  store float %63, ptr %15, align 4, !tbaa !15
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.d2Node, ptr %65, i32 0, i32 1
  %67 = load float, ptr %13, align 4, !tbaa !15
  %68 = load float, ptr %15, align 4, !tbaa !15
  %69 = fcmp olt float %67, %68
  %70 = zext i1 %69 to i64
  %71 = select i1 %69, i32 0, i32 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [2 x ptr], ptr %66, i64 0, i64 %72
  call void @_ZN10d2AABBTree10InsertNodeEP6d2NodePS1_(ptr noundef nonnull align 8 dereferenceable(72) %17, ptr noundef %64, ptr noundef %73)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %74

74:                                               ; preds = %39, %24
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = getelementptr inbounds %class.d2AABBTree, ptr %17, i32 0, i32 3
  %78 = load float, ptr %77, align 8, !tbaa !16
  call void @_ZN6d2Node10UpdateAABBEf(ptr noundef nonnull align 8 dereferenceable(72) %76, float noundef %78)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  ret void

79:                                               ; preds = %35
  %80 = load ptr, ptr %9, align 8
  %81 = load i32, ptr %10, align 4
  %82 = insertvalue { ptr, i32 } poison, ptr %80, 0
  %83 = insertvalue { ptr, i32 } %82, i32 %81, 1
  resume { ptr, i32 } %83
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6d2Node9SetBranchEPS_S0_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5UnionRK6d2AABBS1_(ptr dead_on_unwind noalias writable sret(%struct.d2AABB) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin 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 #3 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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, !6, i64 0}
!10 = !{!"_ZTS6d2Node", !6, i64 0, !7, i64 8, !11, i64 24, !12, i64 32, !6, i64 64}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTS6d2AABB", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"_ZTS6d2Vec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !14, i64 40}
!17 = !{!"_ZTS10d2AABBTree", !18, i64 0, !6, i64 8, !19, i64 16, !14, i64 40, !25, i64 48}
!18 = !{!"_ZTS12d2Broadphase"}
!19 = !{!"_ZTSNSt7__cxx114listISt4pairIP6d2BodyS3_ESaIS4_EEE", !20, i64 0}
!20 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EEE", !21, i64 0}
!21 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EE10_List_implE", !22, i64 0}
!22 = !{!"_ZTSNSt8__detail17_List_node_headerE", !23, i64 0, !24, i64 16}
!23 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIP6d2NodeSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIP6d2NodeSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


; 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.d2AABB = type { %struct.d2Vec2, %struct.d2Vec2, ptr, ptr }
%struct.d2Vec2 = type { float, float }

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

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

; 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 uwtable
define dso_local void @_ZN10d2AABBTree10InsertNodeEP6d2NodePS1_(ptr nocapture noundef nonnull readonly align 8 dereferenceable(72) %0, ptr noundef %1, ptr nocapture noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.d2AABB, align 8
  %5 = alloca %struct.d2AABB, align 8
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = tail call noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72) %6)
  br i1 %7, label %8, label %14

8:                                                ; preds = %3
  %9 = tail call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #8
  invoke void @_ZN6d2NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9)
          to label %10 unwind label %12

10:                                               ; preds = %8
  %11 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %11, ptr %9, align 8, !tbaa !9
  tail call void @_ZN6d2Node9SetBranchEPS_S0_(ptr noundef nonnull align 8 dereferenceable(72) %9, ptr noundef %1, ptr noundef nonnull %6)
  store ptr %9, ptr %2, align 8, !tbaa !5
  br label %31

12:                                               ; preds = %8
  %13 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %9, i64 noundef 72) #9
  resume { ptr, i32 } %13

14:                                               ; preds = %3
  %15 = getelementptr inbounds i8, ptr %6, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 32
  %18 = getelementptr inbounds i8, ptr %6, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #10
  %21 = getelementptr inbounds i8, ptr %1, i64 32
  call void @_Z5UnionRK6d2AABBS1_(ptr dead_on_unwind nonnull writable sret(%struct.d2AABB) align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %21)
  %22 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %23 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  %24 = fsub float %22, %23
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  call void @_Z5UnionRK6d2AABBS1_(ptr dead_on_unwind nonnull writable sret(%struct.d2AABB) align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %21)
  %25 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %26 = call noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
  %27 = fsub float %25, %26
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  %28 = fcmp uge float %24, %27
  %29 = zext i1 %28 to i64
  %30 = getelementptr inbounds [2 x ptr], ptr %15, i64 0, i64 %29
  call void @_ZN10d2AABBTree10InsertNodeEP6d2NodePS1_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1, ptr noundef nonnull %30)
  %.pre = load ptr, ptr %2, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %14, %10
  %32 = phi ptr [ %.pre, %14 ], [ %9, %10 ]
  %33 = getelementptr inbounds i8, ptr %0, i64 40
  %34 = load float, ptr %33, align 8, !tbaa !15
  call void @_ZN6d2Node10UpdateAABBEf(ptr noundef nonnull align 8 dereferenceable(72) %32, float noundef %34)
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6d2Node9SetBranchEPS_S0_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5UnionRK6d2AABBS1_(ptr dead_on_unwind noalias writable sret(%struct.d2AABB) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6d2AABB12GetPerimeterEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #7 align 2

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin 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 #3 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { 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, !6, i64 0}
!10 = !{!"_ZTS6d2Node", !6, i64 0, !7, i64 8, !11, i64 24, !12, i64 32, !6, i64 64}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTS6d2AABB", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"_ZTS6d2Vec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !14, i64 40}
!16 = !{!"_ZTS10d2AABBTree", !17, i64 0, !6, i64 8, !18, i64 16, !14, i64 40, !24, i64 48}
!17 = !{!"_ZTS12d2Broadphase"}
!18 = !{!"_ZTSNSt7__cxx114listISt4pairIP6d2BodyS3_ESaIS4_EEE", !19, i64 0}
!19 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EEE", !20, i64 0}
!20 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EE10_List_implE", !21, i64 0}
!21 = !{!"_ZTSNSt8__detail17_List_node_headerE", !22, i64 0, !23, i64 16}
!22 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSSt6vectorIP6d2NodeSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIP6d2NodeSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass