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

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

%"class.JPH::BroadPhaseLayer" = type { i8 }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::BroadPhase" = type { %"class.JPH::BroadPhaseQuery", ptr }
%"class.JPH::BroadPhaseQuery" = type { ptr }
%"class.JPH::BroadPhaseQuadTree" = type { %"class.JPH::BroadPhase", ptr, i64, %"class.JPH::Array", [8 x i8], %"class.JPH::FixedSizeFreeList", ptr, ptr, i32, %"class.JPH::SharedMutex", [2 x %"class.JPH::SharedMutex"], %"struct.std::atomic", i32, [32 x i8] }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::FixedSizeFreeList" = type <{ i32, i32, i32, i32, i32, [4 x i8], ptr, [32 x i8], %"class.JPH::Mutex", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic.0", %"struct.std::atomic", [60 x i8] }>
%"class.JPH::Mutex" = type { %"class.std::mutex", %"class.std::thread::id" }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::thread::id" = type { i64 }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i64 }
%"class.JPH::SharedMutex" = type { %"class.std::shared_mutex", %"class.std::thread::id" }
%"class.std::shared_mutex" = type { %"class.std::__shared_mutex_pthread" }
%"class.std::__shared_mutex_pthread" = type { %union.pthread_rwlock_t }
%union.pthread_rwlock_t = type { %struct.__pthread_rwlock_arch_t }
%struct.__pthread_rwlock_arch_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], i64, i32 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.JPH::BroadPhaseQuadTree::LayerState" = type { ptr, ptr, %"struct.JPH::QuadTree::AddState" }
%"struct.JPH::QuadTree::AddState" = type { %"class.JPH::QuadTree::NodeID", %"class.JPH::AABox" }
%"class.JPH::QuadTree::NodeID" = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::QuadTree" = type <{ ptr, %"struct.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch", [44 x i8], %"struct.std::atomic", [2 x %"struct.JPH::QuadTree::RootNode"], %"struct.std::atomic", %"struct.std::atomic.2", [47 x i8] }>
%"struct.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch" = type { i32, i32, i32 }
%"struct.JPH::QuadTree::RootNode" = type { %"struct.std::atomic" }
%"struct.std::atomic.2" = type { %"struct.std::__atomic_base.3" }
%"struct.std::__atomic_base.3" = type { i8 }
%"struct.JPH::QuadTree::Tracking" = type { %"struct.std::atomic.15", %"struct.std::atomic.18", %"struct.std::atomic" }
%"struct.std::atomic.15" = type { %"struct.std::__atomic_base.16" }
%"struct.std::__atomic_base.16" = type { i8 }
%"struct.std::atomic.18" = type { %"struct.std::__atomic_base.19" }
%"struct.std::__atomic_base.19" = type { i16 }
%"class.JPH::BodyID" = type { i32 }

@_ZN3JPHL23cBroadPhaseLayerInvalidE = external hidden constant %"class.JPH::BroadPhaseLayer", align 1
@.str.1 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [39 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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH11BodyManager12GetMaxBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef) #1 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) #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNKSt13__atomic_baseIhEcvhEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNSt13__atomic_baseIhEaSEh(ptr noundef nonnull align 1 dereferenceable(1), i8 noundef zeroext) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2), i16 noundef zeroext) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH18BroadPhaseQuadTree14AddBodiesAbortEPNS_6BodyIDEiPv(ptr noundef nonnull align 64 dereferenceable(512) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) unnamed_addr #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.JPH::AssertLastParam", align 1
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.JPH::AssertLastParam", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.JPH::AssertLastParam", align 1
  %19 = alloca %"struct.JPH::AssertLastParam", align 1
  %20 = alloca ptr, align 8
  %21 = alloca %"struct.JPH::AssertLastParam", align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = icmp sle i32 %23, 0
  br i1 %24, label %25, label %34

25:                                               ; preds = %4
  br label %26

26:                                               ; preds = %25
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %32, label %29

29:                                               ; preds = %26
  %30 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 256)
  br i1 %30, label %31, label %32

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

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

33:                                               ; preds = %32
  br label %157

34:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %35 = getelementptr inbounds %"class.JPH::BroadPhase", ptr %22, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %36)
  store ptr %37, ptr %10, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %34
  %39 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %22, i32 0, i32 2
  %40 = load i64, ptr %39, align 8, !tbaa !15
  %41 = getelementptr inbounds %"class.JPH::BroadPhase", ptr %22, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !12
  %43 = call noundef i32 @_ZNK3JPH11BodyManager12GetMaxBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %42)
  %44 = zext i32 %43 to i64
  %45 = icmp eq i64 %40, %44
  br i1 %45, label %49, label %46

46:                                               ; preds = %38
  %47 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 261)
  br i1 %47, label %48, label %49

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

49:                                               ; preds = %48, %46, %38
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %52, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  store i8 0, ptr %13, align 1, !tbaa !32
  br label %53

53:                                               ; preds = %149, %51
  %54 = load i8, ptr %13, align 1, !tbaa !32
  %55 = zext i8 %54 to i32
  %56 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %22, i32 0, i32 8
  %57 = load i32, ptr %56, align 16, !tbaa !33
  %58 = icmp ult i32 %55, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %53
  store i32 6, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %152

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load i8, ptr %13, align 1, !tbaa !32
  %63 = zext i8 %62 to i64
  %64 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %61, i64 %63
  store ptr %64, ptr %15, align 8, !tbaa !5
  %65 = load ptr, ptr %15, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 16, !tbaa !34
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %148

69:                                               ; preds = %60
  %70 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %22, i32 0, i32 7
  %71 = load ptr, ptr %70, align 8, !tbaa !40
  %72 = load i8, ptr %13, align 1, !tbaa !32
  %73 = zext i8 %72 to i64
  %74 = getelementptr inbounds %"class.JPH::QuadTree", ptr %71, i64 %73
  %75 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %22, i32 0, i32 3
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %76, i32 0, i32 2
  call void @_ZN3JPH8QuadTree14AddBodiesAbortERNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEERKNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81) %74, ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 16 dereferenceable(48) %77)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 16, !tbaa !34
  store ptr %80, ptr %16, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %144, %69
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !41
  %86 = icmp ult ptr %82, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %81
  store i32 9, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %147

88:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %89)
  store i32 %90, ptr %17, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %88
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %94)
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %96)
  %98 = load ptr, ptr %16, align 8, !tbaa !5
  %99 = call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %97, ptr noundef nonnull align 4 dereferenceable(4) %98)
  br i1 %99, label %103, label %100

100:                                              ; preds = %91
  %101 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 277, ptr noundef @.str.6)
  br i1 %101, label %102, label %103

102:                                              ; preds = %100
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !42
  br label %103

103:                                              ; preds = %102, %100, %91
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = load i32, ptr %17, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %109)
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = call noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122) %111)
  br i1 %112, label %113, label %116

113:                                              ; preds = %106
  %114 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 278)
  br i1 %114, label %115, label %116

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

116:                                              ; preds = %115, %113, %106
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %119 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %22, i32 0, i32 3
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_8QuadTree8TrackingENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %121)
  store ptr %122, ptr %20, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %118
  %124 = load ptr, ptr %20, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %124, i32 0, i32 0
  %126 = call noundef zeroext i8 @_ZNKSt13__atomic_baseIhEcvhEv(ptr noundef nonnull align 1 dereferenceable(1) %125) #7
  %127 = zext i8 %126 to i32
  %128 = load i8, ptr %13, align 1, !tbaa !32
  %129 = zext i8 %128 to i32
  %130 = icmp eq i32 %127, %129
  br i1 %130, label %134, label %131

131:                                              ; preds = %123
  %132 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 280)
  br i1 %132, label %133, label %134

133:                                              ; preds = %131
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !44
  br label %134

134:                                              ; preds = %133, %131, %123
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  %137 = call noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3JPHL23cBroadPhaseLayerInvalidE)
  %138 = load ptr, ptr %20, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %138, i32 0, i32 0
  %140 = call noundef zeroext i8 @_ZNSt13__atomic_baseIhEaSEh(ptr noundef nonnull align 1 dereferenceable(1) %139, i8 noundef zeroext %137) #7
  %141 = load ptr, ptr %20, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %141, i32 0, i32 1
  %143 = call noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2) %142, i16 noundef zeroext -1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %144

144:                                              ; preds = %136
  %145 = load ptr, ptr %16, align 8, !tbaa !5
  %146 = getelementptr inbounds %"class.JPH::BodyID", ptr %145, i32 1
  store ptr %146, ptr %16, align 8, !tbaa !5
  br label %81, !llvm.loop !45

147:                                              ; preds = %87
  br label %148

148:                                              ; preds = %147, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %149

149:                                              ; preds = %148
  %150 = load i8, ptr %13, align 1, !tbaa !32
  %151 = add i8 %150, 1
  store i8 %151, ptr %13, align 1, !tbaa !32
  br label %53, !llvm.loop !47

152:                                              ; preds = %59
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = icmp eq ptr %153, null
  br i1 %154, label %156, label %155

155:                                              ; preds = %152
  call void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef %153) #7
  br label %156

156:                                              ; preds = %155, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %157

157:                                              ; preds = %156, %33
  ret void
}

declare void @_ZN3JPH8QuadTree14AddBodiesAbortERNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEERKNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(48)) #6

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

!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 2158618927}
!12 = !{!13, !6, i64 8}
!13 = !{!"_ZTSN3JPH10BroadPhaseE", !14, i64 0, !6, i64 8}
!14 = !{!"_ZTSN3JPH15BroadPhaseQueryE"}
!15 = !{!16, !17, i64 24}
!16 = !{!"_ZTSN3JPH18BroadPhaseQuadTreeE", !13, i64 0, !6, i64 16, !17, i64 24, !18, i64 32, !19, i64 64, !6, i64 256, !6, i64 264, !10, i64 272, !28, i64 280, !7, i64 344, !24, i64 472, !10, i64 476}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN3JPH5ArrayINS_8QuadTree8TrackingENS_12STLAllocatorIS2_EEEE", !17, i64 0, !17, i64 8, !6, i64 16}
!19 = !{!"_ZTSN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEEE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !20, i64 64, !24, i64 112, !24, i64 116, !26, i64 120, !24, i64 128}
!20 = !{!"_ZTSN3JPH5MutexE", !21, i64 0, !23, i64 40}
!21 = !{!"_ZTSSt5mutex", !22, i64 0}
!22 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!23 = !{!"_ZTSNSt6thread2idE", !17, i64 0}
!24 = !{!"_ZTSSt6atomicIjE", !25, i64 0}
!25 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!26 = !{!"_ZTSSt6atomicImE", !27, i64 0}
!27 = !{!"_ZTSSt13__atomic_baseImE", !17, i64 0}
!28 = !{!"_ZTSN3JPH11SharedMutexE", !29, i64 0, !23, i64 56}
!29 = !{!"_ZTSSt12shared_mutex", !30, i64 0}
!30 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!31 = !{i64 2158619394}
!32 = !{!7, !7, i64 0}
!33 = !{!16, !10, i64 272}
!34 = !{!35, !6, i64 0}
!35 = !{!"_ZTSN3JPH18BroadPhaseQuadTree10LayerStateE", !6, i64 0, !6, i64 8, !36, i64 16}
!36 = !{!"_ZTSN3JPH8QuadTree8AddStateE", !37, i64 0, !38, i64 16}
!37 = !{!"_ZTSN3JPH8QuadTree6NodeIDE", !10, i64 0}
!38 = !{!"_ZTSN3JPH5AABoxE", !39, i64 0, !39, i64 16}
!39 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!40 = !{!16, !6, i64 264}
!41 = !{!35, !6, i64 8}
!42 = !{i64 2158619822}
!43 = !{i64 2158620203}
!44 = !{i64 2158620596}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}
!47 = distinct !{!47, !46}


; 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::BroadPhaseLayer" = type { i8 }
%"struct.JPH::BroadPhaseQuadTree::LayerState" = type { ptr, ptr, %"struct.JPH::QuadTree::AddState" }
%"struct.JPH::QuadTree::AddState" = type { %"class.JPH::QuadTree::NodeID", %"class.JPH::AABox" }
%"class.JPH::QuadTree::NodeID" = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::QuadTree" = type <{ ptr, %"struct.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch", [44 x i8], %"struct.std::atomic", [2 x %"struct.JPH::QuadTree::RootNode"], %"struct.std::atomic", %"struct.std::atomic.2", [47 x i8] }>
%"struct.JPH::FixedSizeFreeList<JPH::QuadTree::Node>::Batch" = type { i32, i32, i32 }
%"struct.JPH::QuadTree::RootNode" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.std::atomic.2" = type { %"struct.std::__atomic_base.3" }
%"struct.std::__atomic_base.3" = type { i8 }

@_ZN3JPHL23cBroadPhaseLayerInvalidE = external hidden constant %"class.JPH::BroadPhaseLayer", align 1
@.str.1 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 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 #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH11BodyManager12GetMaxBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef) local_unnamed_addr #0 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 #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 #4 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNKSt13__atomic_baseIhEcvhEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNSt13__atomic_baseIhEaSEh(ptr noundef nonnull align 1 dereferenceable(1), i8 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2), i16 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH18BroadPhaseQuadTree14AddBodiesAbortEPNS_6BodyIDEiPv(ptr noundef nonnull align 64 dereferenceable(512) %0, ptr nocapture noundef readnone %1, i32 noundef %2, ptr noundef %3) unnamed_addr #2 align 2 {
  %5 = icmp slt i32 %2, 1
  br i1 %5, label %6, label %11

6:                                                ; preds = %4
  %7 = icmp eq ptr %3, null
  br i1 %7, label %77, label %8

8:                                                ; preds = %6
  %9 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 256)
  br i1 %9, label %10, label %77

10:                                               ; preds = %8
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !5
  br label %77

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !6
  %14 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %13)
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load i64, ptr %15, align 8, !tbaa !12
  %17 = load ptr, ptr %12, align 8, !tbaa !6
  %18 = tail call noundef i32 @_ZNK3JPH11BodyManager12GetMaxBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %17)
  %19 = zext i32 %18 to i64
  %20 = icmp eq i64 %16, %19
  br i1 %20, label %24, label %21

21:                                               ; preds = %11
  %22 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 261)
  br i1 %22, label %23, label %24

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

24:                                               ; preds = %23, %21, %11
  %25 = getelementptr inbounds i8, ptr %0, i64 272
  %26 = load i32, ptr %25, align 16, !tbaa !30
  %.not33 = icmp eq i32 %26, 0
  br i1 %.not33, label %._crit_edge, label %.lr.ph32

.lr.ph32:                                         ; preds = %24
  %27 = getelementptr inbounds i8, ptr %0, i64 264
  %28 = getelementptr inbounds i8, ptr %0, i64 32
  br label %30

._crit_edge:                                      ; preds = %24
  %29 = icmp eq ptr %3, null
  br i1 %29, label %77, label %._crit_edge.thread

30:                                               ; preds = %.lr.ph32, %.loopexit
  %.030 = phi i8 [ 0, %.lr.ph32 ], [ %73, %.loopexit ]
  %31 = zext i8 %.030 to i64
  %32 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %3, i64 %31
  %33 = load ptr, ptr %32, align 16, !tbaa !31
  %.not = icmp eq ptr %33, null
  br i1 %.not, label %.loopexit, label %34

34:                                               ; preds = %30
  %35 = load ptr, ptr %27, align 8, !tbaa !37
  %36 = getelementptr inbounds %"class.JPH::QuadTree", ptr %35, i64 %31
  %37 = getelementptr inbounds i8, ptr %32, i64 16
  tail call void @_ZN3JPH8QuadTree14AddBodiesAbortERNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEERKNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81) %36, ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 16 dereferenceable(48) %37)
  %38 = load ptr, ptr %32, align 16, !tbaa !31
  %39 = getelementptr inbounds i8, ptr %32, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !38
  %41 = icmp ult ptr %38, %40
  br i1 %41, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %34, %65
  %.02629 = phi ptr [ %70, %65 ], [ %38, %34 ]
  %42 = tail call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %.02629)
  %43 = zext i32 %42 to i64
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %43)
  %45 = load ptr, ptr %44, align 8, !tbaa !39
  %46 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %45)
  %47 = tail call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %.02629)
  br i1 %47, label %51, label %48

48:                                               ; preds = %.lr.ph
  %49 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 277, ptr noundef nonnull @.str.6)
  br i1 %49, label %50, label %51

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

51:                                               ; preds = %.lr.ph, %48, %50
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %43)
  %53 = load ptr, ptr %52, align 8, !tbaa !39
  %54 = tail call noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122) %53)
  br i1 %54, label %55, label %58

55:                                               ; preds = %51
  %56 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 278)
  br i1 %56, label %57, label %58

57:                                               ; preds = %55
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !41
  br label %58

58:                                               ; preds = %57, %55, %51
  %59 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_8QuadTree8TrackingENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %43)
  %60 = tail call noundef zeroext i8 @_ZNKSt13__atomic_baseIhEcvhEv(ptr noundef nonnull align 1 dereferenceable(1) %59) #6
  %61 = icmp eq i8 %60, %.030
  br i1 %61, label %65, label %62

62:                                               ; preds = %58
  %63 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 280)
  br i1 %63, label %64, label %65

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

65:                                               ; preds = %64, %62, %58
  %66 = tail call noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3JPHL23cBroadPhaseLayerInvalidE)
  %67 = tail call noundef zeroext i8 @_ZNSt13__atomic_baseIhEaSEh(ptr noundef nonnull align 1 dereferenceable(1) %59, i8 noundef zeroext %66) #6
  %68 = getelementptr inbounds i8, ptr %59, i64 2
  %69 = tail call noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2) %68, i16 noundef zeroext -1) #6
  %70 = getelementptr inbounds i8, ptr %.02629, i64 4
  %71 = load ptr, ptr %39, align 8, !tbaa !38
  %72 = icmp ult ptr %70, %71
  br i1 %72, label %.lr.ph, label %.loopexit, !llvm.loop !43

.loopexit:                                        ; preds = %65, %34, %30
  %73 = add i8 %.030, 1
  %74 = zext i8 %73 to i32
  %75 = load i32, ptr %25, align 16, !tbaa !30
  %76 = icmp ugt i32 %75, %74
  br i1 %76, label %30, label %._crit_edge.thread, !llvm.loop !45

._crit_edge.thread:                               ; preds = %.loopexit, %._crit_edge
  tail call void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef nonnull %3) #6
  br label %77

77:                                               ; preds = %._crit_edge, %._crit_edge.thread, %10, %8, %6
  ret void
}

declare void @_ZN3JPH8QuadTree14AddBodiesAbortERNS_5ArrayINS0_8TrackingENS_12STLAllocatorIS2_EEEERKNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(48)) local_unnamed_addr #5

attributes #0 = { 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 #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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 = !{i64 2158618927}
!6 = !{!7, !9, i64 8}
!7 = !{!"_ZTSN3JPH10BroadPhaseE", !8, i64 0, !9, i64 8}
!8 = !{!"_ZTSN3JPH15BroadPhaseQueryE"}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!13, !14, i64 24}
!13 = !{!"_ZTSN3JPH18BroadPhaseQuadTreeE", !7, i64 0, !9, i64 16, !14, i64 24, !15, i64 32, !16, i64 64, !9, i64 256, !9, i64 264, !17, i64 272, !26, i64 280, !10, i64 344, !22, i64 472, !17, i64 476}
!14 = !{!"long", !10, i64 0}
!15 = !{!"_ZTSN3JPH5ArrayINS_8QuadTree8TrackingENS_12STLAllocatorIS2_EEEE", !14, i64 0, !14, i64 8, !9, i64 16}
!16 = !{!"_ZTSN3JPH17FixedSizeFreeListINS_8QuadTree4NodeEEE", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12, !17, i64 16, !9, i64 24, !18, i64 64, !22, i64 112, !22, i64 116, !24, i64 120, !22, i64 128}
!17 = !{!"int", !10, i64 0}
!18 = !{!"_ZTSN3JPH5MutexE", !19, i64 0, !21, i64 40}
!19 = !{!"_ZTSSt5mutex", !20, i64 0}
!20 = !{!"_ZTSSt12__mutex_base", !10, i64 0}
!21 = !{!"_ZTSNSt6thread2idE", !14, i64 0}
!22 = !{!"_ZTSSt6atomicIjE", !23, i64 0}
!23 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!24 = !{!"_ZTSSt6atomicImE", !25, i64 0}
!25 = !{!"_ZTSSt13__atomic_baseImE", !14, i64 0}
!26 = !{!"_ZTSN3JPH11SharedMutexE", !27, i64 0, !21, i64 56}
!27 = !{!"_ZTSSt12shared_mutex", !28, i64 0}
!28 = !{!"_ZTSSt22__shared_mutex_pthread", !10, i64 0}
!29 = !{i64 2158619394}
!30 = !{!13, !17, i64 272}
!31 = !{!32, !9, i64 0}
!32 = !{!"_ZTSN3JPH18BroadPhaseQuadTree10LayerStateE", !9, i64 0, !9, i64 8, !33, i64 16}
!33 = !{!"_ZTSN3JPH8QuadTree8AddStateE", !34, i64 0, !35, i64 16}
!34 = !{!"_ZTSN3JPH8QuadTree6NodeIDE", !17, i64 0}
!35 = !{!"_ZTSN3JPH5AABoxE", !36, i64 0, !36, i64 16}
!36 = !{!"_ZTSN3JPH4Vec3E", !10, i64 0}
!37 = !{!13, !9, i64 264}
!38 = !{!32, !9, i64 8}
!39 = !{!9, !9, i64 0}
!40 = !{i64 2158619822}
!41 = !{i64 2158620203}
!42 = !{i64 2158620596}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = distinct !{!45, !44}


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