; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision/BroadPhase/QuadTree.ll (ZN3JPH8QuadTreeD2Ev)

; 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.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch" = type { i32, i32, i32 }
%"class.JPH::Array.10" = type { %"class.JPH::STLLocalAllocator", i64, i64, ptr }
%"class.JPH::STLLocalAllocator" = type { [512 x i8], i64 }
%"class.JPH::QuadTree::NodeID" = type { i32 }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::QuadTree" = type <{ ptr, %"struct.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch", [44 x i8], %"struct.std::atomic.0", [2 x %"struct.JPH::QuadTree::RootNode"], %"struct.std::atomic.0", %"struct.std::atomic.6", [47 x i8] }>
%"struct.JPH::QuadTree::RootNode" = type { %"struct.std::atomic.0" }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.std::atomic.6" = type { %"struct.std::__atomic_base.7" }
%"struct.std::__atomic_base.7" = type { i8 }
%"class.JPH::QuadTree::Node" = type { [4 x %"struct.std::atomic"], [4 x %"struct.std::atomic"], [4 x %"struct.std::atomic"], [4 x %"struct.std::atomic"], [4 x %"struct.std::atomic"], [4 x %"struct.std::atomic"], [4 x %"class.JPH::QuadTree::AtomicNodeID"], %"struct.std::atomic.0", %"struct.std::atomic.0", i32 }
%"struct.std::atomic" = type { float }
%"class.JPH::QuadTree::AtomicNodeID" = type { %"struct.std::atomic.0" }

@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132), i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3JPH8QuadTreeD2Ev(ptr noundef nonnull align 64 dereferenceable(81) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"struct.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch", align 4
  %5 = alloca %"class.JPH::Array.10", align 8
  %6 = alloca %"class.JPH::QuadTree::NodeID", align 4
  %7 = alloca %"struct.JPH::AssertLastParam", align 1
  %8 = alloca %"class.JPH::QuadTree::NodeID", align 4
  %9 = alloca %"struct.JPH::AssertLastParam", align 1
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.JPH::QuadTree::NodeID", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  invoke void @_ZN3JPH8QuadTree14DiscardOldTreeEv(ptr noundef nonnull align 64 dereferenceable(81) %16)
          to label %17 unwind label %106

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %18 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH8QuadTree14GetCurrentRootEv(ptr noundef nonnull align 64 dereferenceable(81) %16)
          to label %19 unwind label %106

19:                                               ; preds = %17
  store ptr %18, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %4) #8
  call void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #8
  call void @llvm.lifetime.start.p0(i64 544, ptr %5) #8
  call void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(544) %5) #8
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(544) %5, i64 noundef 128)
          to label %20 unwind label %106

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = invoke i32 @_ZNK3JPH8QuadTree8RootNode9GetNodeIDEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %23 unwind label %106

23:                                               ; preds = %20
  %24 = getelementptr inbounds %"class.JPH::QuadTree::NodeID", ptr %6, i32 0, i32 0
  store i32 %22, ptr %24, align 4
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(544) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %25 unwind label %106

25:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %26

26:                                               ; preds = %25
  %27 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(544) %5)
          to label %28 unwind label %106

28:                                               ; preds = %26
  %29 = invoke noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %30 unwind label %106

30:                                               ; preds = %28
  br i1 %29, label %35, label %31

31:                                               ; preds = %30
  %32 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 167)
          to label %33 unwind label %106

33:                                               ; preds = %31
  br i1 %32, label %34, label %35

34:                                               ; preds = %33
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !9
  br label %35

35:                                               ; preds = %34, %33, %30
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  %38 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(544) %5)
          to label %39 unwind label %106

39:                                               ; preds = %37
  %40 = invoke noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %38)
          to label %41 unwind label %106

41:                                               ; preds = %39
  br i1 %40, label %42, label %102

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %99, %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %44 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(544) %5)
          to label %45 unwind label %106

45:                                               ; preds = %43
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %44, i64 4, i1 false), !tbaa.struct !10
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(544) %5)
          to label %46 unwind label %106

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  %48 = invoke noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsBodyEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %49 unwind label %106

49:                                               ; preds = %47
  br i1 %48, label %50, label %54

50:                                               ; preds = %49
  %51 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 175)
          to label %52 unwind label %106

52:                                               ; preds = %50
  br i1 %51, label %53, label %54

53:                                               ; preds = %52
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !13
  br label %54

54:                                               ; preds = %53, %52, %49
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %57 = invoke noundef i32 @_ZNK3JPH8QuadTree6NodeID12GetNodeIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %58 unwind label %106

58:                                               ; preds = %56
  store i32 %57, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %59 = getelementptr inbounds %"class.JPH::QuadTree", ptr %16, i32 0, i32 0
  %60 = load ptr, ptr %59, align 64, !tbaa !14
  %61 = load i32, ptr %10, align 4, !tbaa !11
  %62 = invoke noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %60, i32 noundef %61)
          to label %63 unwind label %106

63:                                               ; preds = %58
  store ptr %62, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.JPH::QuadTree::Node", ptr %64, i32 0, i32 6
  store ptr %65, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds [4 x %"class.JPH::QuadTree::AtomicNodeID"], ptr %66, i64 0, i64 0
  store ptr %67, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds [4 x %"class.JPH::QuadTree::AtomicNodeID"], ptr %68, i64 0, i64 0
  %70 = getelementptr inbounds %"class.JPH::QuadTree::AtomicNodeID", ptr %69, i64 4
  store ptr %70, ptr %14, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %89, %63
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = icmp ne ptr %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %92

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = invoke i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %79 unwind label %106

79:                                               ; preds = %76
  %80 = getelementptr inbounds %"class.JPH::QuadTree::NodeID", ptr %15, i32 0, i32 0
  store i32 %78, ptr %80, align 4
  %81 = invoke noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %82 unwind label %106

82:                                               ; preds = %79
  br i1 %81, label %83, label %88

83:                                               ; preds = %82
  %84 = invoke noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %85 unwind label %106

85:                                               ; preds = %83
  br i1 %84, label %86, label %88

86:                                               ; preds = %85
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(544) %5, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %87 unwind label %106

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87, %85, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = getelementptr inbounds %"class.JPH::QuadTree::AtomicNodeID", ptr %90, i32 1
  store ptr %91, ptr %13, align 8, !tbaa !5
  br label %71

92:                                               ; preds = %75
  %93 = getelementptr inbounds %"class.JPH::QuadTree", ptr %16, i32 0, i32 0
  %94 = load ptr, ptr %93, align 64, !tbaa !14
  %95 = load i32, ptr %10, align 4, !tbaa !11
  invoke void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE16AddObjectToBatchERNS3_5BatchEj(ptr noundef nonnull align 64 dereferenceable(132) %94, ptr noundef nonnull align 4 dereferenceable(12) %4, i32 noundef %95)
          to label %96 unwind label %106

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %97

97:                                               ; preds = %96
  %98 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(544) %5)
          to label %99 unwind label %106

99:                                               ; preds = %97
  %100 = xor i1 %98, true
  br i1 %100, label %43, label %101, !llvm.loop !22

101:                                              ; preds = %99
  br label %102

102:                                              ; preds = %101, %41
  %103 = getelementptr inbounds %"class.JPH::QuadTree", ptr %16, i32 0, i32 0
  %104 = load ptr, ptr %103, align 64, !tbaa !14
  invoke void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE19DestructObjectBatchERNS3_5BatchE(ptr noundef nonnull align 64 dereferenceable(132) %104, ptr noundef nonnull align 4 dereferenceable(12) %4)
          to label %105 unwind label %106

105:                                              ; preds = %102
  call void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(544) %5) #8
  call void @llvm.lifetime.end.p0(i64 544, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void

106:                                              ; preds = %102, %97, %92, %86, %83, %79, %76, %58, %56, %50, %47, %45, %43, %39, %37, %31, %28, %26, %23, %20, %19, %17, %1
  %107 = landingpad { ptr, i32 }
          catch ptr null
  %108 = extractvalue { ptr, i32 } %107, 0
  call void @__clang_call_terminate(ptr %108) #9
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8QuadTree14DiscardOldTreeEv(ptr noundef nonnull align 64 dereferenceable(81)) #5 align 2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #6

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH8QuadTree14GetCurrentRootEv(ptr noundef nonnull align 64 dereferenceable(81)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(544)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(544), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(544)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(544)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsBodyEv(ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(544), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE16AddObjectToBatchERNS3_5BatchEj(ptr noundef nonnull align 64 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(544)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE19DestructObjectBatchERNS3_5BatchE(ptr noundef nonnull align 64 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { 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 #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 = { noinline noreturn nounwind uwtable "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 = { alwaysinline 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 = { 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 = !{i64 2158738535}
!10 = !{i64 0, i64 4, !11}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 2158738876}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN3JPH8QuadTreeE", !6, i64 0, !16, i64 8, !17, i64 64, !7, i64 68, !17, i64 76, !19, i64 80}
!16 = !{!"_ZTSN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchE", !12, i64 0, !12, i64 4, !12, i64 8}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !12, i64 0}
!19 = !{!"_ZTSSt6atomicIbE", !20, i64 0}
!20 = !{!"_ZTSSt13__atomic_baseIbE", !21, i64 0}
!21 = !{!"bool", !7, 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.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch" = type { i32, i32, i32 }
%"class.JPH::Array.10" = type { %"class.JPH::STLLocalAllocator", i64, i64, ptr }
%"class.JPH::STLLocalAllocator" = type { [512 x i8], i64 }
%"class.JPH::QuadTree::NodeID" = type { i32 }

@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3JPH8QuadTreeD2Ev(ptr noundef nonnull align 64 dereferenceable(81) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch", align 4
  %3 = alloca %"class.JPH::Array.10", align 8
  %4 = alloca %"class.JPH::QuadTree::NodeID", align 4
  %5 = alloca %"class.JPH::QuadTree::NodeID", align 4
  %6 = alloca %"class.JPH::QuadTree::NodeID", align 4
  invoke void @_ZN3JPH8QuadTree14DiscardOldTreeEv(ptr noundef nonnull align 64 dereferenceable(81) %0)
          to label %7 unwind label %.loopexit.split-lp.loopexit.split-lp

7:                                                ; preds = %1
  %8 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH8QuadTree14GetCurrentRootEv(ptr noundef nonnull align 64 dereferenceable(81) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #7
  call void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %2) #7
  call void @llvm.lifetime.start.p0(i64 544, ptr nonnull %3) #7
  call void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(544) %3) #7
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(544) %3, i64 noundef 128)
          to label %9 unwind label %.loopexit.split-lp.loopexit.split-lp

9:                                                ; preds = %7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %10 = invoke i32 @_ZNK3JPH8QuadTree8RootNode9GetNodeIDEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %11 unwind label %.loopexit.split-lp.loopexit.split-lp

11:                                               ; preds = %9
  store i32 %10, ptr %4, align 4
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(544) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %12 unwind label %.loopexit.split-lp.loopexit.split-lp

12:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %13 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(544) %3)
          to label %14 unwind label %.loopexit.split-lp.loopexit.split-lp

14:                                               ; preds = %12
  %15 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %13)
  br i1 %15, label %20, label %16

16:                                               ; preds = %14
  %17 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 167)
          to label %18 unwind label %.loopexit.split-lp.loopexit.split-lp

18:                                               ; preds = %16
  br i1 %17, label %19, label %20

19:                                               ; preds = %18
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !5
  br label %20

20:                                               ; preds = %19, %18, %14
  %21 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(544) %3)
          to label %22 unwind label %.loopexit.split-lp.loopexit.split-lp

22:                                               ; preds = %20
  %23 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
  br i1 %23, label %.preheader, label %.loopexit14

.preheader:                                       ; preds = %22, %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %24 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(544) %3)
          to label %25 unwind label %.loopexit.split-lp.loopexit

25:                                               ; preds = %.preheader
  %26 = load i32, ptr %24, align 4, !tbaa !6
  store i32 %26, ptr %5, align 4, !tbaa !6
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(544) %3)
          to label %27 unwind label %.loopexit.split-lp.loopexit

27:                                               ; preds = %25
  %28 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsBodyEv(ptr noundef nonnull align 4 dereferenceable(4) %5)
  br i1 %28, label %29, label %33

29:                                               ; preds = %27
  %30 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 175)
          to label %31 unwind label %.loopexit.split-lp.loopexit

31:                                               ; preds = %29
  br i1 %30, label %32, label %33

32:                                               ; preds = %31
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !10
  br label %33

33:                                               ; preds = %32, %31, %27
  %34 = invoke noundef i32 @_ZNK3JPH8QuadTree6NodeID12GetNodeIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %35 unwind label %.loopexit.split-lp.loopexit

35:                                               ; preds = %33
  %36 = load ptr, ptr %0, align 64, !tbaa !11
  %37 = call noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %36, i32 noundef %34)
  %.0.ptr = getelementptr inbounds i8, ptr %37, i64 96
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %38 = invoke i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4) %.0.ptr)
          to label %39 unwind label %.loopexit

39:                                               ; preds = %35
  store i32 %38, ptr %6, align 4
  %40 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %40, label %41, label %44

41:                                               ; preds = %39
  %42 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %42, label %43, label %44

43:                                               ; preds = %41
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(544) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %44 unwind label %.loopexit

44:                                               ; preds = %43, %41, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %.0.ptr.1 = getelementptr inbounds i8, ptr %37, i64 100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %45 = invoke i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4) %.0.ptr.1)
          to label %46 unwind label %.loopexit

46:                                               ; preds = %44
  store i32 %45, ptr %6, align 4
  %47 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %47, label %48, label %51

48:                                               ; preds = %46
  %49 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %49, label %50, label %51

50:                                               ; preds = %48
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(544) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %51 unwind label %.loopexit

51:                                               ; preds = %50, %48, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %.0.ptr.2 = getelementptr inbounds i8, ptr %37, i64 104
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %52 = invoke i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4) %.0.ptr.2)
          to label %53 unwind label %.loopexit

53:                                               ; preds = %51
  store i32 %52, ptr %6, align 4
  %54 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %54, label %55, label %58

55:                                               ; preds = %53
  %56 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %56, label %57, label %58

57:                                               ; preds = %55
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(544) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %58 unwind label %.loopexit

58:                                               ; preds = %57, %55, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %.0.ptr.3 = getelementptr inbounds i8, ptr %37, i64 108
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %59 = invoke i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4) %.0.ptr.3)
          to label %60 unwind label %.loopexit

60:                                               ; preds = %58
  store i32 %59, ptr %6, align 4
  %61 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %61, label %62, label %65

62:                                               ; preds = %60
  %63 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %63, label %64, label %65

64:                                               ; preds = %62
  invoke void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(544) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %65 unwind label %.loopexit

65:                                               ; preds = %64, %62, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %66 = load ptr, ptr %0, align 64, !tbaa !11
  invoke void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE16AddObjectToBatchERNS3_5BatchEj(ptr noundef nonnull align 64 dereferenceable(132) %66, ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef %34)
          to label %67 unwind label %.loopexit.split-lp.loopexit

67:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %68 = call noundef zeroext i1 @_ZNK3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(544) %3)
  br i1 %68, label %.loopexit14, label %.preheader, !llvm.loop !20

.loopexit14:                                      ; preds = %67, %22
  %69 = load ptr, ptr %0, align 64, !tbaa !11
  call void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE19DestructObjectBatchERNS3_5BatchE(ptr noundef nonnull align 64 dereferenceable(132) %69, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(544) %3) #7
  call void @llvm.lifetime.end.p0(i64 544, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  ret void

.loopexit:                                        ; preds = %64, %58, %57, %51, %50, %44, %35, %43
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %65, %33, %29, %25, %.preheader
  %lpad.loopexit11 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %20, %16, %12, %11, %9, %7, %1
  %lpad.loopexit.split-lp12 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit11, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp12, %.loopexit.split-lp.loopexit.split-lp ]
  %70 = extractvalue { ptr, i32 } %lpad.phi, 0
  call void @__clang_call_terminate(ptr %70) #8
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8QuadTree14DiscardOldTreeEv(ptr noundef nonnull align 64 dereferenceable(81)) local_unnamed_addr #4 align 2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH8QuadTree14GetCurrentRootEv(ptr noundef nonnull align 64 dereferenceable(81)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(544)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(544), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK3JPH8QuadTree8RootNode9GetNodeIDEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsBodyEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH8QuadTree6NodeID12GetNodeIndexEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8QuadTree6NodeIDENS_17STLLocalAllocatorIS2_Lm128EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(544), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE16AddObjectToBatchERNS3_5BatchEj(ptr noundef nonnull align 64 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE19DestructObjectBatchERNS3_5BatchE(ptr noundef nonnull align 64 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 #5 = { noinline noreturn nounwind uwtable "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 = { alwaysinline 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 #7 = { nounwind }
attributes #8 = { 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 = !{i64 2158738535}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{i64 2158738876}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN3JPH8QuadTreeE", !13, i64 0, !14, i64 8, !15, i64 64, !8, i64 68, !15, i64 76, !17, i64 80}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchE", !7, i64 0, !7, i64 4, !7, i64 8}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !7, i64 0}
!17 = !{!"_ZTSSt6atomicIbE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIbE", !19, i64 0}
!19 = !{!"bool", !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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