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

; 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::AssertLastParam" = type { i8 }
%"class.JPH::Array.30" = type { %"class.JPH::STLLocalAllocator.31", i64, i64, ptr }
%"class.JPH::STLLocalAllocator.31" = type { [1024 x i8], i64 }
%struct.StackEntry.34 = type { i32, i32 }
%"class.JPH::QuadTree::NodeID" = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.1 }
%union.anon.1 = type { <4 x float> }
%"class.JPH::BodyID" = type { i32 }
%"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::FixedSizeFreeList<JPH::QuadTree::Node>::Batch" = type { i32, i32, i32 }
%"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.37 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZN3JPH8QuadTree17cInvalidNodeIndexE = external dso_local constant i32, align 4
@.str.38 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [126 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [34 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH8QuadTree4Node14GetChildBoundsEiRNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124), i32 noundef, ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH8QuadTree4Node13GetNodeBoundsERNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124), ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH8QuadTree15GetBodyLocationERKNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEENS_6BodyIDERjS9_(ptr noundef nonnull align 64 dereferenceable(81), ptr noundef nonnull align 8 dereferenceable(24), i32, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #5 align 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) #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH8QuadTree12ValidateTreeERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS1_INS0_8TrackingENS4_IS9_EEEEjj(ptr noundef nonnull align 64 dereferenceable(81) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3, i32 noundef %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.JPH::AssertLastParam", align 1
  %12 = alloca %"class.JPH::Array.30", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.StackEntry.34, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.JPH::AssertLastParam", align 1
  %19 = alloca %"struct.JPH::AssertLastParam", align 1
  %20 = alloca i32, align 4
  %21 = alloca %"class.JPH::QuadTree::NodeID", align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.JPH::AABox", align 16
  %24 = alloca %"class.JPH::AABox", align 16
  %25 = alloca %"struct.JPH::AssertLastParam", align 1
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"class.JPH::BodyID", align 4
  %29 = alloca %"struct.JPH::AssertLastParam", align 1
  %30 = alloca %"struct.JPH::AssertLastParam", align 1
  %31 = alloca ptr, align 8
  %32 = alloca %"class.JPH::BodyID", align 4
  %33 = alloca %"class.JPH::AABox", align 16
  %34 = alloca %"struct.JPH::AssertLastParam", align 1
  %35 = alloca %"struct.JPH::AssertLastParam", align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  %36 = load ptr, ptr %6, align 8
  br label %37

37:                                               ; preds = %5
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = icmp ne i32 %38, -1
  br i1 %39, label %43, label %40

40:                                               ; preds = %37
  %41 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.37, ptr noundef @.str.1, i32 noundef 1501)
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !11
  br label %43

43:                                               ; preds = %42, %40, %37
  br label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1056, ptr %12) #6
  call void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %12) #6
  invoke void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(1056) %12, i64 noundef 128)
          to label %45 unwind label %69

45:                                               ; preds = %44
  %46 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjRKjEEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056) %12, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) @_ZN3JPH8QuadTree17cInvalidNodeIndexE)
          to label %47 unwind label %69

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %265, %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %49 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(1056) %12)
          to label %50 unwind label %73

50:                                               ; preds = %48
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %49, i64 8, i1 false), !tbaa.struct !12
  invoke void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(1056) %12)
          to label %51 unwind label %73

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %52 = getelementptr inbounds %"class.JPH::QuadTree", ptr %36, i32 0, i32 0
  %53 = load ptr, ptr %52, align 64, !tbaa !13
  %54 = getelementptr inbounds %struct.StackEntry.34, ptr %16, i32 0, i32 0
  %55 = load i32, ptr %54, align 4, !tbaa !21
  %56 = invoke noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %53, i32 noundef %55)
          to label %57 unwind label %77

57:                                               ; preds = %51
  store ptr %56, ptr %17, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %17, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.JPH::QuadTree::Node", ptr %59, i32 0, i32 7
  %61 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %60) #6
  %62 = getelementptr inbounds %struct.StackEntry.34, ptr %16, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !23
  %64 = icmp eq i32 %61, %63
  br i1 %64, label %81, label %65

65:                                               ; preds = %58
  %66 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.38, ptr noundef @.str.1, i32 noundef 1529)
          to label %67 unwind label %77

67:                                               ; preds = %65
  br i1 %66, label %68, label %81

68:                                               ; preds = %67
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !24
  br label %81

69:                                               ; preds = %45, %44
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %13, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %14, align 4
  br label %286

73:                                               ; preds = %50, %48
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %13, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %14, align 4
  br label %277

77:                                               ; preds = %103, %88, %65, %51
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %13, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %14, align 4
  br label %276

81:                                               ; preds = %68, %67, %58
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  %85 = getelementptr inbounds %struct.StackEntry.34, ptr %16, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !23
  %87 = icmp eq i32 %86, -1
  br i1 %87, label %107, label %88

88:                                               ; preds = %84
  %89 = getelementptr inbounds %"class.JPH::QuadTree", ptr %36, i32 0, i32 0
  %90 = load ptr, ptr %89, align 64, !tbaa !13
  %91 = getelementptr inbounds %struct.StackEntry.34, ptr %16, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !23
  %93 = invoke noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %90, i32 noundef %92)
          to label %94 unwind label %77

94:                                               ; preds = %88
  %95 = getelementptr inbounds %"class.JPH::QuadTree::Node", ptr %93, i32 0, i32 8
  %96 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %95) #6
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %107, label %98

98:                                               ; preds = %94
  %99 = load ptr, ptr %17, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.JPH::QuadTree::Node", ptr %99, i32 0, i32 8
  %101 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %100) #6
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %107

103:                                              ; preds = %98
  %104 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.39, ptr noundef @.str.1, i32 noundef 1532)
          to label %105 unwind label %77

105:                                              ; preds = %103
  br i1 %104, label %106, label %107

106:                                              ; preds = %105
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !25
  br label %107

107:                                              ; preds = %106, %105, %98, %94, %84
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %258, %109
  %111 = load i32, ptr %20, align 4, !tbaa !9
  %112 = icmp ult i32 %111, 4
  br i1 %112, label %114, label %113

113:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %262

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  %116 = getelementptr inbounds %"class.JPH::QuadTree::Node", ptr %115, i32 0, i32 6
  %117 = load i32, ptr %20, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [4 x %"class.JPH::QuadTree::AtomicNodeID"], ptr %116, i64 0, i64 %118
  %120 = invoke i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4) %119)
          to label %121 unwind label %155

121:                                              ; preds = %114
  %122 = getelementptr inbounds %"class.JPH::QuadTree::NodeID", ptr %21, i32 0, i32 0
  store i32 %120, ptr %122, align 4
  %123 = invoke noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %124 unwind label %155

124:                                              ; preds = %121
  br i1 %123, label %125, label %257

125:                                              ; preds = %124
  %126 = invoke noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %127 unwind label %155

127:                                              ; preds = %125
  br i1 %126, label %128, label %176

128:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %129 = invoke noundef i32 @_ZNK3JPH8QuadTree6NodeID12GetNodeIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %130 unwind label %159

130:                                              ; preds = %128
  store i32 %129, ptr %22, align 4, !tbaa !9
  %131 = getelementptr inbounds %struct.StackEntry.34, ptr %16, i32 0, i32 0
  %132 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjSJ_EEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056) %12, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %131)
          to label %133 unwind label %159

133:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #6
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %23)
          to label %134 unwind label %163

134:                                              ; preds = %133
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = load i32, ptr %20, align 4, !tbaa !9
  invoke void @_ZNK3JPH8QuadTree4Node14GetChildBoundsEiRNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124) %135, i32 noundef %136, ptr noundef nonnull align 16 dereferenceable(32) %23)
          to label %137 unwind label %163

137:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #6
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %24)
          to label %138 unwind label %167

138:                                              ; preds = %137
  %139 = getelementptr inbounds %"class.JPH::QuadTree", ptr %36, i32 0, i32 0
  %140 = load ptr, ptr %139, align 64, !tbaa !13
  %141 = load i32, ptr %22, align 4, !tbaa !9
  %142 = invoke noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %140, i32 noundef %141)
          to label %143 unwind label %167

143:                                              ; preds = %138
  invoke void @_ZNK3JPH8QuadTree4Node13GetNodeBoundsERNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124) %142, ptr noundef nonnull align 16 dereferenceable(32) %24)
          to label %144 unwind label %167

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %146 = invoke noundef zeroext i1 @_ZNK3JPH5AABox8ContainsERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %23, ptr noundef nonnull align 16 dereferenceable(32) %24)
          to label %147 unwind label %167

147:                                              ; preds = %145
  br i1 %146, label %171, label %148

148:                                              ; preds = %147
  %149 = invoke noundef zeroext i1 @_ZNK3JPH5AABox7IsValidEv(ptr noundef nonnull align 16 dereferenceable(32) %24)
          to label %150 unwind label %167

150:                                              ; preds = %148
  br i1 %149, label %151, label %171

151:                                              ; preds = %150
  %152 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.40, ptr noundef @.str.1, i32 noundef 1552)
          to label %153 unwind label %167

153:                                              ; preds = %151
  br i1 %152, label %154, label %171

154:                                              ; preds = %153
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !26
  br label %171

155:                                              ; preds = %125, %121, %114
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %13, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %14, align 4
  br label %261

159:                                              ; preds = %130, %128
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %13, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %14, align 4
  br label %175

163:                                              ; preds = %134, %133
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %13, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %14, align 4
  br label %174

167:                                              ; preds = %151, %148, %145, %143, %138, %137
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %13, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  br label %174

171:                                              ; preds = %154, %153, %150, %147
  br label %172

172:                                              ; preds = %171
  br label %173

173:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %256

174:                                              ; preds = %167, %163
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  br label %175

175:                                              ; preds = %174, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %261

176:                                              ; preds = %127
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = add i32 %177, 1
  store i32 %178, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = invoke i32 @_ZNK3JPH8QuadTree6NodeID9GetBodyIDEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %181 unwind label %195

181:                                              ; preds = %176
  %182 = getelementptr inbounds %"class.JPH::BodyID", ptr %28, i32 0, i32 0
  store i32 %180, ptr %182, align 4
  %183 = getelementptr inbounds %"class.JPH::BodyID", ptr %28, i32 0, i32 0
  %184 = load i32, ptr %183, align 4
  invoke void @_ZNK3JPH8QuadTree15GetBodyLocationERKNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEENS_6BodyIDERjS9_(ptr noundef nonnull align 64 dereferenceable(81) %36, ptr noundef nonnull align 8 dereferenceable(24) %179, i32 %184, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %185 unwind label %195

185:                                              ; preds = %181
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %26, align 4, !tbaa !9
  %188 = getelementptr inbounds %struct.StackEntry.34, ptr %16, i32 0, i32 0
  %189 = load i32, ptr %188, align 4, !tbaa !21
  %190 = icmp eq i32 %187, %189
  br i1 %190, label %199, label %191

191:                                              ; preds = %186
  %192 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.41, ptr noundef @.str.1, i32 noundef 1562)
          to label %193 unwind label %195

193:                                              ; preds = %191
  br i1 %192, label %194, label %199

194:                                              ; preds = %193
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !27
  br label %199

195:                                              ; preds = %206, %191, %181, %176
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %13, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %14, align 4
  br label %255

199:                                              ; preds = %194, %193, %186
  br label %200

200:                                              ; preds = %199
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %27, align 4, !tbaa !9
  %204 = load i32, ptr %20, align 4, !tbaa !9
  %205 = icmp eq i32 %203, %204
  br i1 %205, label %210, label %206

206:                                              ; preds = %202
  %207 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.42, ptr noundef @.str.1, i32 noundef 1563)
          to label %208 unwind label %195

208:                                              ; preds = %206
  br i1 %207, label %209, label %210

209:                                              ; preds = %208
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !28
  br label %210

210:                                              ; preds = %209, %208, %202
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %214 = invoke i32 @_ZNK3JPH8QuadTree6NodeID9GetBodyIDEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %215 unwind label %239

215:                                              ; preds = %212
  %216 = getelementptr inbounds %"class.JPH::BodyID", ptr %32, i32 0, i32 0
  store i32 %214, ptr %216, align 4
  %217 = invoke noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %218 unwind label %239

218:                                              ; preds = %215
  %219 = zext i32 %217 to i64
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %213, i64 noundef %219)
          to label %221 unwind label %239

221:                                              ; preds = %218
  %222 = load ptr, ptr %220, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  store ptr %222, ptr %31, align 8, !tbaa !5
  %223 = load ptr, ptr %31, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body20ValidateCachedBoundsEv(ptr noundef nonnull align 16 dereferenceable(122) %223)
          to label %224 unwind label %243

224:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #6
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %33)
          to label %225 unwind label %247

225:                                              ; preds = %224
  %226 = load ptr, ptr %17, align 8, !tbaa !5
  %227 = load i32, ptr %20, align 4, !tbaa !9
  invoke void @_ZNK3JPH8QuadTree4Node14GetChildBoundsEiRNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124) %226, i32 noundef %227, ptr noundef nonnull align 16 dereferenceable(32) %33)
          to label %228 unwind label %247

228:                                              ; preds = %225
  br label %229

229:                                              ; preds = %228
  %230 = load ptr, ptr %31, align 8, !tbaa !5
  %231 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH4Body19GetWorldSpaceBoundsEv(ptr noundef nonnull align 16 dereferenceable(122) %230)
          to label %232 unwind label %247

232:                                              ; preds = %229
  %233 = invoke noundef zeroext i1 @_ZNK3JPH5AABox8ContainsERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %33, ptr noundef nonnull align 16 dereferenceable(32) %231)
          to label %234 unwind label %247

234:                                              ; preds = %232
  br i1 %233, label %251, label %235

235:                                              ; preds = %234
  %236 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.43, ptr noundef @.str.1, i32 noundef 1572)
          to label %237 unwind label %247

237:                                              ; preds = %235
  br i1 %236, label %238, label %251

238:                                              ; preds = %237
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !29
  br label %251

239:                                              ; preds = %218, %215, %212
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %13, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %254

243:                                              ; preds = %221
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %13, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %14, align 4
  br label %254

247:                                              ; preds = %235, %232, %229, %225, %224
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %13, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #6
  br label %254

251:                                              ; preds = %238, %237, %234
  br label %252

252:                                              ; preds = %251
  br label %253

253:                                              ; preds = %252
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %256

254:                                              ; preds = %247, %243, %239
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %255

255:                                              ; preds = %254, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %261

256:                                              ; preds = %253, %173
  br label %257

257:                                              ; preds = %256, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %20, align 4, !tbaa !9
  %260 = add i32 %259, 1
  store i32 %260, ptr %20, align 4, !tbaa !9
  br label %110, !llvm.loop !30

261:                                              ; preds = %255, %175, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %276

262:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %263

263:                                              ; preds = %262
  %264 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(1056) %12)
          to label %265 unwind label %278

265:                                              ; preds = %263
  %266 = xor i1 %264, true
  br i1 %266, label %48, label %267, !llvm.loop !32

267:                                              ; preds = %265
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %15, align 4, !tbaa !9
  %270 = load i32, ptr %10, align 4, !tbaa !9
  %271 = icmp eq i32 %269, %270
  br i1 %271, label %282, label %272

272:                                              ; preds = %268
  %273 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.44, ptr noundef @.str.1, i32 noundef 1580)
          to label %274 unwind label %278

274:                                              ; preds = %272
  br i1 %273, label %275, label %282

275:                                              ; preds = %274
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !33
  br label %282

276:                                              ; preds = %261, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %277

277:                                              ; preds = %276, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %285

278:                                              ; preds = %272, %263
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %13, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %14, align 4
  br label %285

282:                                              ; preds = %275, %274, %268
  br label %283

283:                                              ; preds = %282
  br label %284

284:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %12) #6
  call void @llvm.lifetime.end.p0(i64 1056, ptr %12) #6
  ret void

285:                                              ; preds = %278, %277
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %286

286:                                              ; preds = %285, %69
  call void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %12) #6
  call void @llvm.lifetime.end.p0(i64 1056, ptr %12) #6
  br label %287

287:                                              ; preds = %286
  %288 = load ptr, ptr %13, align 8
  %289 = load i32, ptr %14, align 4
  %290 = insertvalue { ptr, i32 } poison, ptr %288, 0
  %291 = insertvalue { ptr, i32 } %290, i32 %289, 1
  resume { ptr, i32 } %291
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH4Body19GetWorldSpaceBoundsEv(ptr noundef nonnull align 16 dereferenceable(122)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(1056)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(1056), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjRKjEEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(1056)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(1056)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjSJ_EEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5AABox8ContainsERKS0_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5AABox7IsValidEv(ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body20ValidateCachedBoundsEv(ptr noundef nonnull align 16 dereferenceable(122)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNK3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(1056)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(1056)) unnamed_addr #4 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 2158757079}
!12 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN3JPH8QuadTreeE", !6, i64 0, !15, i64 8, !16, i64 64, !7, i64 68, !16, i64 76, !18, i64 80}
!15 = !{!"_ZTSN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchE", !10, i64 0, !10, i64 4, !10, i64 8}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!18 = !{!"_ZTSSt6atomicIbE", !19, i64 0}
!19 = !{!"_ZTSSt13__atomic_baseIbE", !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!22, !10, i64 0}
!22 = !{!"_ZTSZNK3JPH8QuadTree12ValidateTreeERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS1_INS0_8TrackingENS4_IS9_EEEEjjE10StackEntry", !10, i64 0, !10, i64 4}
!23 = !{!22, !10, i64 4}
!24 = !{i64 2158757965}
!25 = !{i64 2158758523}
!26 = !{i64 2158758975}
!27 = !{i64 2158759347}
!28 = !{i64 2158759683}
!29 = !{i64 2158760089}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{i64 2158760463}


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

%"class.JPH::Array.30" = type { %"class.JPH::STLLocalAllocator.31", i64, i64, ptr }
%"class.JPH::STLLocalAllocator.31" = type { [1024 x i8], i64 }
%struct.StackEntry.34 = type { i32, i32 }
%"class.JPH::QuadTree::NodeID" = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.1 }
%union.anon.1 = type { <4 x float> }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::QuadTree::AtomicNodeID" = type { %"struct.std::atomic.0" }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }

@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZN3JPH8QuadTree17cInvalidNodeIndexE = external dso_local constant i32, align 4
@.str.38 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [126 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [34 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH8QuadTree4Node14GetChildBoundsEiRNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124), i32 noundef, ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH8QuadTree4Node13GetNodeBoundsERNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH8QuadTree15GetBodyLocationERKNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEENS_6BodyIDERjS9_(ptr noundef nonnull align 64 dereferenceable(81), ptr noundef nonnull align 8 dereferenceable(24), i32, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 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) local_unnamed_addr #3 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 #3 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 #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH8QuadTree12ValidateTreeERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS1_INS0_8TrackingENS4_IS9_EEEEjj(ptr noundef nonnull align 64 dereferenceable(81) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca %"class.JPH::Array.30", align 8
  %8 = alloca %struct.StackEntry.34, align 8
  %9 = alloca %"class.JPH::QuadTree::NodeID", align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.JPH::AABox", align 16
  %12 = alloca %"class.JPH::AABox", align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.JPH::BodyID", align 4
  %16 = alloca %"class.JPH::AABox", align 16
  store i32 %3, ptr %6, align 4, !tbaa !5
  %.not = icmp eq i32 %3, -1
  br i1 %.not, label %17, label %20

17:                                               ; preds = %5
  %18 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.1, i32 noundef 1501)
  br i1 %18, label %19, label %20

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

20:                                               ; preds = %5, %17, %19
  call void @llvm.lifetime.start.p0(i64 1056, ptr nonnull %7) #5
  call void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %7) #5
  invoke void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(1056) %7, i64 noundef 128)
          to label %21 unwind label %40

21:                                               ; preds = %20
  %22 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjRKjEEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056) %7, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) @_ZN3JPH8QuadTree17cInvalidNodeIndexE)
          to label %.preheader unwind label %40

.preheader:                                       ; preds = %21
  %23 = getelementptr inbounds i8, ptr %8, i64 4
  br label %24

24:                                               ; preds = %.preheader, %63
  %.030 = phi i32 [ %.232, %63 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %25 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(1056) %7)
          to label %26 unwind label %42

26:                                               ; preds = %24
  %27 = load i64, ptr %25, align 4
  store i64 %27, ptr %8, align 8
  invoke void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(1056) %7)
          to label %28 unwind label %42

28:                                               ; preds = %26
  %29 = load ptr, ptr %0, align 64, !tbaa !10
  %30 = load i32, ptr %8, align 8, !tbaa !19
  %31 = call noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %29, i32 noundef %30)
  %32 = getelementptr inbounds i8, ptr %31, i64 112
  %33 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %32) #5
  %34 = load i32, ptr %23, align 4, !tbaa !21
  %35 = icmp eq i32 %33, %34
  br i1 %35, label %46, label %36

36:                                               ; preds = %28
  %37 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.1, i32 noundef 1529)
          to label %38 unwind label %44

38:                                               ; preds = %36
  br i1 %37, label %39, label %thread-pre-split

39:                                               ; preds = %38
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !22
  br label %thread-pre-split

40:                                               ; preds = %21, %20
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %166

42:                                               ; preds = %26, %24
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %162

44:                                               ; preds = %57, %36
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %162

thread-pre-split:                                 ; preds = %39, %38
  %.pr = load i32, ptr %23, align 4, !tbaa !21
  br label %46

46:                                               ; preds = %thread-pre-split, %28
  %47 = phi i32 [ %.pr, %thread-pre-split ], [ %33, %28 ]
  %48 = icmp eq i32 %47, -1
  br i1 %48, label %61, label %49

49:                                               ; preds = %46
  %50 = load ptr, ptr %0, align 64, !tbaa !10
  %51 = call noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %50, i32 noundef %47)
  %52 = getelementptr inbounds i8, ptr %51, i64 116
  %53 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %52) #5
  %.not34 = icmp eq i32 %53, 0
  br i1 %.not34, label %54, label %61

54:                                               ; preds = %49
  %55 = getelementptr inbounds i8, ptr %31, i64 116
  %56 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %55) #5
  %.not35 = icmp eq i32 %56, 0
  br i1 %.not35, label %61, label %57

57:                                               ; preds = %54
  %58 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.1, i32 noundef 1532)
          to label %59 unwind label %44

59:                                               ; preds = %57
  br i1 %58, label %60, label %61

60:                                               ; preds = %59
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !23
  br label %61

61:                                               ; preds = %60, %59, %54, %49, %46
  %62 = getelementptr inbounds i8, ptr %31, i64 96
  br label %65

63:                                               ; preds = %154
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %64 = call noundef zeroext i1 @_ZNK3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(1056) %7)
  br i1 %64, label %156, label %24, !llvm.loop !24

65:                                               ; preds = %61, %154
  %indvars.iv = phi i64 [ 0, %61 ], [ %indvars.iv.next, %154 ]
  %.13154 = phi i32 [ %.030, %61 ], [ %.232, %154 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %66 = getelementptr inbounds [4 x %"class.JPH::QuadTree::AtomicNodeID"], ptr %62, i64 0, i64 %indvars.iv
  %67 = invoke i32 @_ZNK3JPH8QuadTree12AtomicNodeIDcvNS0_6NodeIDEEv(ptr noundef nonnull align 4 dereferenceable(4) %66)
          to label %68 unwind label %94

68:                                               ; preds = %65
  store i32 %67, ptr %9, align 4
  %69 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID7IsValidEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
  br i1 %69, label %70, label %154

70:                                               ; preds = %68
  %71 = call noundef zeroext i1 @_ZNK3JPH8QuadTree6NodeID6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
  br i1 %71, label %72, label %105

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %73 = invoke noundef i32 @_ZNK3JPH8QuadTree6NodeID12GetNodeIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %74 unwind label %96

74:                                               ; preds = %72
  store i32 %73, ptr %10, align 4, !tbaa !5
  %75 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjSJ_EEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056) %7, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %76 unwind label %96

76:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #5
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %11)
          to label %77 unwind label %98

77:                                               ; preds = %76
  %78 = trunc nuw nsw i64 %indvars.iv to i32
  invoke void @_ZNK3JPH8QuadTree4Node14GetChildBoundsEiRNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124) %31, i32 noundef %78, ptr noundef nonnull align 16 dereferenceable(32) %11)
          to label %79 unwind label %98

79:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %12)
          to label %80 unwind label %100

80:                                               ; preds = %79
  %81 = load ptr, ptr %0, align 64, !tbaa !10
  %82 = load i32, ptr %10, align 4, !tbaa !5
  %83 = call noundef nonnull align 4 dereferenceable(124) ptr @_ZN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE3GetEj(ptr noundef nonnull align 64 dereferenceable(132) %81, i32 noundef %82)
  invoke void @_ZNK3JPH8QuadTree4Node13GetNodeBoundsERNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124) %83, ptr noundef nonnull align 16 dereferenceable(32) %12)
          to label %84 unwind label %100

84:                                               ; preds = %80
  %85 = invoke noundef zeroext i1 @_ZNK3JPH5AABox8ContainsERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %11, ptr noundef nonnull align 16 dereferenceable(32) %12)
          to label %86 unwind label %100

86:                                               ; preds = %84
  br i1 %85, label %102, label %87

87:                                               ; preds = %86
  %88 = invoke noundef zeroext i1 @_ZNK3JPH5AABox7IsValidEv(ptr noundef nonnull align 16 dereferenceable(32) %12)
          to label %89 unwind label %100

89:                                               ; preds = %87
  br i1 %88, label %90, label %102

90:                                               ; preds = %89
  %91 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.1, i32 noundef 1552)
          to label %92 unwind label %100

92:                                               ; preds = %90
  br i1 %91, label %93, label %102

93:                                               ; preds = %92
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !26
  br label %102

94:                                               ; preds = %65
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %155

96:                                               ; preds = %74, %72
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %104

98:                                               ; preds = %77, %76
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %103

100:                                              ; preds = %90, %87, %84, %80, %79
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %103

102:                                              ; preds = %93, %92, %89, %86
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %154

103:                                              ; preds = %100, %98
  %.pn38 = phi { ptr, i32 } [ %101, %100 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  br label %104

104:                                              ; preds = %103, %96
  %.pn38.pn = phi { ptr, i32 } [ %.pn38, %103 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %155

105:                                              ; preds = %70
  %106 = add i32 %.13154, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  %107 = invoke i32 @_ZNK3JPH8QuadTree6NodeID9GetBodyIDEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %108 unwind label %117

108:                                              ; preds = %105
  invoke void @_ZNK3JPH8QuadTree15GetBodyLocationERKNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEENS_6BodyIDERjS9_(ptr noundef nonnull align 64 dereferenceable(81) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 %107, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %109 unwind label %117

109:                                              ; preds = %108
  %110 = load i32, ptr %13, align 4, !tbaa !5
  %111 = load i32, ptr %8, align 8, !tbaa !19
  %112 = icmp eq i32 %110, %111
  br i1 %112, label %119, label %113

113:                                              ; preds = %109
  %114 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.1, i32 noundef 1562)
          to label %115 unwind label %117

115:                                              ; preds = %113
  br i1 %114, label %116, label %119

116:                                              ; preds = %115
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !27
  br label %119

117:                                              ; preds = %123, %113, %108, %105
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %153

119:                                              ; preds = %109, %115, %116
  %120 = load i32, ptr %14, align 4, !tbaa !5
  %121 = zext i32 %120 to i64
  %122 = icmp eq i64 %indvars.iv, %121
  br i1 %122, label %127, label %123

123:                                              ; preds = %119
  %124 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.1, i32 noundef 1563)
          to label %125 unwind label %117

125:                                              ; preds = %123
  br i1 %124, label %126, label %127

126:                                              ; preds = %125
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !28
  br label %127

127:                                              ; preds = %126, %125, %119
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  %128 = invoke i32 @_ZNK3JPH8QuadTree6NodeID9GetBodyIDEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %129 unwind label %146

129:                                              ; preds = %127
  store i32 %128, ptr %15, align 4
  %130 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %15)
  %131 = zext i32 %130 to i64
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %131)
          to label %133 unwind label %146

133:                                              ; preds = %129
  %134 = load ptr, ptr %132, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  invoke void @_ZNK3JPH4Body20ValidateCachedBoundsEv(ptr noundef nonnull align 16 dereferenceable(122) %134)
          to label %135 unwind label %148

135:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #5
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %16)
          to label %136 unwind label %150

136:                                              ; preds = %135
  %137 = trunc nuw nsw i64 %indvars.iv to i32
  invoke void @_ZNK3JPH8QuadTree4Node14GetChildBoundsEiRNS_5AABoxE(ptr noundef nonnull align 4 dereferenceable(124) %31, i32 noundef %137, ptr noundef nonnull align 16 dereferenceable(32) %16)
          to label %138 unwind label %150

138:                                              ; preds = %136
  %139 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH4Body19GetWorldSpaceBoundsEv(ptr noundef nonnull align 16 dereferenceable(122) %134)
  %140 = invoke noundef zeroext i1 @_ZNK3JPH5AABox8ContainsERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %16, ptr noundef nonnull align 16 dereferenceable(32) %139)
          to label %141 unwind label %150

141:                                              ; preds = %138
  br i1 %140, label %152, label %142

142:                                              ; preds = %141
  %143 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.43, ptr noundef nonnull @.str.1, i32 noundef 1572)
          to label %144 unwind label %150

144:                                              ; preds = %142
  br i1 %143, label %145, label %152

145:                                              ; preds = %144
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !30
  br label %152

146:                                              ; preds = %129, %127
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  br label %153

148:                                              ; preds = %133
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %153

150:                                              ; preds = %142, %138, %136, %135
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #5
  br label %153

152:                                              ; preds = %145, %144, %141
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %154

153:                                              ; preds = %146, %148, %150, %117
  %.pn.pn = phi { ptr, i32 } [ %118, %117 ], [ %151, %150 ], [ %149, %148 ], [ %147, %146 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %155

154:                                              ; preds = %102, %152, %68
  %.232 = phi i32 [ %.13154, %102 ], [ %106, %152 ], [ %.13154, %68 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 4
  br i1 %exitcond.not, label %63, label %65, !llvm.loop !31

155:                                              ; preds = %153, %104, %94
  %.pn38.pn.pn = phi { ptr, i32 } [ %.pn38.pn, %104 ], [ %.pn.pn, %153 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %162

156:                                              ; preds = %63
  %157 = icmp eq i32 %.232, %4
  br i1 %157, label %165, label %158

158:                                              ; preds = %156
  %159 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 1580)
          to label %160 unwind label %163

160:                                              ; preds = %158
  br i1 %159, label %161, label %165

161:                                              ; preds = %160
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !32
  br label %165

162:                                              ; preds = %44, %155, %42
  %.pn38.pn.pn.pn.pn = phi { ptr, i32 } [ %43, %42 ], [ %.pn38.pn.pn, %155 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %166

163:                                              ; preds = %158
  %164 = landingpad { ptr, i32 }
          cleanup
  br label %166

165:                                              ; preds = %161, %160, %156
  call void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %7) #5
  call void @llvm.lifetime.end.p0(i64 1056, ptr nonnull %7) #5
  ret void

166:                                              ; preds = %162, %163, %40
  %.pn38.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %41, %40 ], [ %.pn38.pn.pn.pn.pn, %162 ], [ %164, %163 ]
  call void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %7) #5
  call void @llvm.lifetime.end.p0(i64 1056, ptr nonnull %7) #5
  resume { ptr, i32 } %.pn38.pn.pn.pn.pn.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH4Body19GetWorldSpaceBoundsEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(1056)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(1056), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjRKjEEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE4backEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE12emplace_backIJRjSJ_EEERSE_DpOT_(ptr noundef nonnull align 8 dereferenceable(1056), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5AABox8ContainsERKS0_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5AABox7IsValidEv(ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body20ValidateCachedBoundsEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNK3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayIZNKS_8QuadTree12ValidateTreeERKNS0_IPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS0_INS1_8TrackingENS4_IS9_EEEEjjE10StackEntryNS_17STLLocalAllocatorISE_Lm128EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(1056)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 2158757079}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTSN3JPH8QuadTreeE", !12, i64 0, !13, i64 8, !14, i64 64, !7, i64 68, !14, i64 76, !16, i64 80}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEE5BatchE", !6, i64 0, !6, i64 4, !6, i64 8}
!14 = !{!"_ZTSSt6atomicIjE", !15, i64 0}
!15 = !{!"_ZTSSt13__atomic_baseIjE", !6, i64 0}
!16 = !{!"_ZTSSt6atomicIbE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIbE", !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSZNK3JPH8QuadTree12ValidateTreeERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERKNS1_INS0_8TrackingENS4_IS9_EEEEjjE10StackEntry", !6, i64 0, !6, i64 4}
!21 = !{!20, !6, i64 4}
!22 = !{i64 2158757965}
!23 = !{i64 2158758523}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{i64 2158758975}
!27 = !{i64 2158759347}
!28 = !{i64 2158759683}
!29 = !{!12, !12, i64 0}
!30 = !{i64 2158760089}
!31 = distinct !{!31, !25}
!32 = !{i64 2158760463}


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