; LLVM IR from zig-gamedev/zphysics :: libs/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.anon = type { ptr }
%class.anon.17 = type { ptr }
%"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::BodyID" = type { i32 }
%"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 }

@_ZN3JPHL23cBroadPhaseLayerInvalidE = external hidden constant %"class.JPH::BroadPhaseLayer", align 1
@.str.1 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 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: 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN3JPH18BroadPhaseQuadTree16AddBodiesPrepareEPNS_6BodyIDEi(ptr noundef nonnull align 64 dereferenceable(512) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.JPH::AssertLastParam", align 1
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.JPH::AssertLastParam", align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %class.anon, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca %"class.JPH::BroadPhaseLayer", align 1
  %19 = alloca %"struct.JPH::AssertLastParam", align 1
  %20 = alloca ptr, align 8
  %21 = alloca %class.anon.17, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %"struct.JPH::AssertLastParam", align 1
  %26 = alloca %"struct.JPH::AssertLastParam", align 1
  %27 = alloca ptr, align 8
  %28 = alloca %"struct.JPH::AssertLastParam", align 1
  %29 = alloca %"struct.JPH::AssertLastParam", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %30 = load ptr, ptr %4, align 8
  br label %31

31:                                               ; preds = %3
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %37, label %34

34:                                               ; preds = %31
  %35 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 158)
  br i1 %35, label %36, label %37

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

37:                                               ; preds = %36, %34, %31
  br label %38

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %39 = getelementptr inbounds %"class.JPH::BroadPhase", ptr %30, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !12
  %41 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %40)
  store ptr %41, ptr %8, align 8, !tbaa !5
  br label %42

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

50:                                               ; preds = %42
  %51 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 161)
  br i1 %51, label %52, label %53

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

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

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %56 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 8
  %57 = load i32, ptr %56, align 16, !tbaa !32
  %58 = zext i32 %57 to i64
  %59 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %58, i64 64)
  %60 = extractvalue { i64, i1 } %59, 1
  %61 = extractvalue { i64, i1 } %59, 0
  %62 = select i1 %60, i64 -1, i64 %61
  %63 = call noundef ptr @_ZN3JPH18BroadPhaseQuadTree10LayerStatenaEm(i64 noundef %62)
  %64 = icmp eq i64 %58, 0
  br i1 %64, label %72, label %65

65:                                               ; preds = %55
  %66 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %63, i64 %58
  br label %67

67:                                               ; preds = %69, %65
  %68 = phi ptr [ %63, %65 ], [ %70, %69 ]
  invoke void @_ZN3JPH18BroadPhaseQuadTree10LayerStateC2Ev(ptr noundef nonnull align 16 dereferenceable(64) %68)
          to label %69 unwind label %112

69:                                               ; preds = %67
  %70 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %68, i64 1
  %71 = icmp eq ptr %70, %66
  br i1 %71, label %72, label %67

72:                                               ; preds = %69, %55
  store ptr %63, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = call noundef ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %73)
  store ptr %74, ptr %13, align 8, !tbaa !5
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %"class.JPH::BodyID", ptr %76, i64 %78
  %80 = getelementptr inbounds %class.anon, ptr %14, i32 0, i32 0
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %81, ptr %80, align 8, !tbaa !33
  %82 = getelementptr inbounds %class.anon, ptr %14, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8
  call void @"_ZN3JPH9QuickSortIPNS_6BodyIDEZNS_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_0EEvT_S5_T0_"(ptr noundef %75, ptr noundef %79, ptr %83)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %84, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %"class.JPH::BodyID", ptr %85, i64 %87
  store ptr %88, ptr %16, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %236, %72
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = icmp ult ptr %90, %91
  br i1 %92, label %93, label %238

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %95)
  %97 = zext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %97)
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = call i8 @_ZNK3JPH4Body18GetBroadPhaseLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %99)
  %101 = getelementptr inbounds %"class.JPH::BroadPhaseLayer", ptr %18, i32 0, i32 0
  store i8 %100, ptr %101, align 1
  %102 = call noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1) %18)
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  store i8 %102, ptr %17, align 1, !tbaa !35
  br label %103

103:                                              ; preds = %93
  %104 = load i8, ptr %17, align 1, !tbaa !35
  %105 = zext i8 %104 to i32
  %106 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 8
  %107 = load i32, ptr %106, align 16, !tbaa !32
  %108 = icmp ult i32 %105, %107
  br i1 %108, label %116, label %109

109:                                              ; preds = %103
  %110 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 174)
  br i1 %110, label %111, label %116

111:                                              ; preds = %109
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !36
  br label %116

112:                                              ; preds = %67
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  call void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef %63) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %240

116:                                              ; preds = %111, %109, %103
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = getelementptr inbounds %class.anon.17, ptr %21, i32 0, i32 0
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %122, ptr %121, align 8, !tbaa !37
  %123 = getelementptr inbounds %class.anon.17, ptr %21, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8
  %125 = call noundef ptr @"_ZSt11upper_boundIPN3JPH6BodyIDEhZNS0_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_1ET_S5_S5_RKT0_T1_"(ptr noundef %119, ptr noundef %120, ptr noundef nonnull align 1 dereferenceable(1) %17, ptr %124)
  store ptr %125, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = load i8, ptr %17, align 1, !tbaa !35
  %128 = zext i8 %127 to i64
  %129 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %126, i64 %128
  store ptr %129, ptr %22, align 8, !tbaa !5
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = load ptr, ptr %22, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %131, i32 0, i32 0
  store ptr %130, ptr %132, align 16, !tbaa !39
  %133 = load ptr, ptr %20, align 8, !tbaa !5
  %134 = load ptr, ptr %22, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %134, i32 0, i32 1
  store ptr %133, ptr %135, align 8, !tbaa !45
  %136 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 7
  %137 = load ptr, ptr %136, align 8, !tbaa !46
  %138 = load i8, ptr %17, align 1, !tbaa !35
  %139 = zext i8 %138 to i64
  %140 = getelementptr inbounds %"class.JPH::QuadTree", ptr %137, i64 %139
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 3
  %143 = load ptr, ptr %15, align 8, !tbaa !5
  %144 = load ptr, ptr %20, align 8, !tbaa !5
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = ptrtoint ptr %144 to i64
  %147 = ptrtoint ptr %145 to i64
  %148 = sub i64 %146, %147
  %149 = sdiv exact i64 %148, 4
  %150 = trunc i64 %149 to i32
  %151 = load ptr, ptr %22, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %151, i32 0, i32 2
  call void @_ZN3JPH8QuadTree16AddBodiesPrepareERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERNS1_INS0_8TrackingENS4_IS9_EEEEPNS_6BodyIDEiRNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81) %140, ptr noundef nonnull align 8 dereferenceable(24) %141, ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef %143, i32 noundef %150, ptr noundef nonnull align 16 dereferenceable(48) %152)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %153 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %153, ptr %23, align 8, !tbaa !5
  br label %154

154:                                              ; preds = %233, %118
  %155 = load ptr, ptr %23, align 8, !tbaa !5
  %156 = load ptr, ptr %20, align 8, !tbaa !5
  %157 = icmp ult ptr %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %236

159:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %160 = load ptr, ptr %23, align 8, !tbaa !5
  %161 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %160)
  store i32 %161, ptr %24, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %159
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = load i32, ptr %24, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %165)
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %167)
  %169 = load ptr, ptr %23, align 8, !tbaa !5
  %170 = call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %168, ptr noundef nonnull align 4 dereferenceable(4) %169)
  br i1 %170, label %174, label %171

171:                                              ; preds = %162
  %172 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 191, ptr noundef @.str.7)
  br i1 %172, label %173, label %174

173:                                              ; preds = %171
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !47
  br label %174

174:                                              ; preds = %173, %171, %162
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  %179 = load i32, ptr %24, align 4, !tbaa !9
  %180 = zext i32 %179 to i64
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %180)
  %182 = load ptr, ptr %181, align 8, !tbaa !5
  %183 = call noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122) %182)
  br i1 %183, label %184, label %187

184:                                              ; preds = %177
  %185 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 192)
  br i1 %185, label %186, label %187

186:                                              ; preds = %184
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !48
  br label %187

187:                                              ; preds = %186, %184, %177
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %190 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 3
  %191 = load i32, ptr %24, align 4, !tbaa !9
  %192 = zext i32 %191 to i64
  %193 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_8QuadTree8TrackingENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef %192)
  store ptr %193, ptr %27, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %189
  %195 = load ptr, ptr %27, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %195, i32 0, i32 0
  %197 = call noundef zeroext i8 @_ZNKSt13__atomic_baseIhEcvhEv(ptr noundef nonnull align 1 dereferenceable(1) %196) #9
  %198 = zext i8 %197 to i32
  %199 = call noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3JPHL23cBroadPhaseLayerInvalidE)
  %200 = zext i8 %199 to i32
  %201 = icmp eq i32 %198, %200
  br i1 %201, label %205, label %202

202:                                              ; preds = %194
  %203 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 194)
  br i1 %203, label %204, label %205

204:                                              ; preds = %202
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !49
  br label %205

205:                                              ; preds = %204, %202, %194
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  %208 = load i8, ptr %17, align 1, !tbaa !35
  %209 = load ptr, ptr %27, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %209, i32 0, i32 0
  %211 = call noundef zeroext i8 @_ZNSt13__atomic_baseIhEaSEh(ptr noundef nonnull align 1 dereferenceable(1) %210, i8 noundef zeroext %208) #9
  br label %212

212:                                              ; preds = %207
  %213 = load ptr, ptr %27, align 8, !tbaa !5
  %214 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %213, i32 0, i32 1
  %215 = call noundef zeroext i16 @_ZNKSt13__atomic_baseItEcvtEv(ptr noundef nonnull align 2 dereferenceable(2) %214) #9
  %216 = zext i16 %215 to i32
  %217 = icmp eq i32 %216, 65535
  br i1 %217, label %221, label %218

218:                                              ; preds = %212
  %219 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 196)
  br i1 %219, label %220, label %221

220:                                              ; preds = %218
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !50
  br label %221

221:                                              ; preds = %220, %218, %212
  br label %222

222:                                              ; preds = %221
  br label %223

223:                                              ; preds = %222
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  %225 = load i32, ptr %24, align 4, !tbaa !9
  %226 = zext i32 %225 to i64
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %224, i64 noundef %226)
  %228 = load ptr, ptr %227, align 8, !tbaa !5
  %229 = call noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %228)
  %230 = load ptr, ptr %27, align 8, !tbaa !5
  %231 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %230, i32 0, i32 1
  %232 = call noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2) %231, i16 noundef zeroext %229) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %233

233:                                              ; preds = %223
  %234 = load ptr, ptr %23, align 8, !tbaa !5
  %235 = getelementptr inbounds %"class.JPH::BodyID", ptr %234, i32 1
  store ptr %235, ptr %23, align 8, !tbaa !5
  br label %154, !llvm.loop !51

236:                                              ; preds = %158
  %237 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %237, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #9
  br label %89, !llvm.loop !53

238:                                              ; preds = %89
  %239 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  ret ptr %239

240:                                              ; preds = %112
  %241 = load ptr, ptr %11, align 8
  %242 = load i32, ptr %12, align 4
  %243 = insertvalue { ptr, i32 } poison, ptr %241, 0
  %244 = insertvalue { ptr, i32 } %243, i32 %242, 1
  resume { ptr, i32 } %244
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH18BroadPhaseQuadTree10LayerStatenaEm(i64 noundef) #6 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZN3JPH9QuickSortIPNS_6BodyIDEZNS_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_0EEvT_S5_T0_"(ptr noundef, ptr noundef, ptr) #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)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i8 @_ZNK3JPH4Body18GetBroadPhaseLayerEv(ptr noundef nonnull align 16 dereferenceable(122)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZSt11upper_boundIPN3JPH6BodyIDEhZNS0_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_1ET_S5_S5_RKT0_T1_"(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr) #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122)) #7 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) #5 align 2

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { "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 #9 = { 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 2158429507}
!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 2158429915}
!32 = !{!16, !10, i64 272}
!33 = !{!34, !6, i64 0}
!34 = !{!"_ZTSZN3JPH18BroadPhaseQuadTree16AddBodiesPrepareEPNS_6BodyIDEiE3$_0", !6, i64 0}
!35 = !{!7, !7, i64 0}
!36 = !{i64 2158430297}
!37 = !{!38, !6, i64 0}
!38 = !{!"_ZTSZN3JPH18BroadPhaseQuadTree16AddBodiesPrepareEPNS_6BodyIDEiE3$_1", !6, i64 0}
!39 = !{!40, !6, i64 0}
!40 = !{!"_ZTSN3JPH18BroadPhaseQuadTree10LayerStateE", !6, i64 0, !6, i64 8, !41, i64 16}
!41 = !{!"_ZTSN3JPH8QuadTree8AddStateE", !42, i64 0, !43, i64 16}
!42 = !{!"_ZTSN3JPH8QuadTree6NodeIDE", !10, i64 0}
!43 = !{!"_ZTSN3JPH5AABoxE", !44, i64 0, !44, i64 16}
!44 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!45 = !{!40, !6, i64 8}
!46 = !{!16, !6, i64 264}
!47 = !{i64 2158430732}
!48 = !{i64 2158431120}
!49 = !{i64 2158431580}
!50 = !{i64 2158431978}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.mustprogress"}
!53 = distinct !{!53, !52}


; 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::BodyID" = type { i32 }
%"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 [116 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1)) 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 noundef i32 @_ZNK3JPH11BodyManager12GetMaxBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) local_unnamed_addr #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)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN3JPH18BroadPhaseQuadTree16AddBodiesPrepareEPNS_6BodyIDEi(ptr noundef nonnull align 64 dereferenceable(512) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i8, align 1
  %5 = alloca %"class.JPH::BroadPhaseLayer", align 1
  %6 = icmp sgt i32 %2, 0
  br i1 %6, label %10, label %7

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

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

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

20:                                               ; preds = %10
  %21 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 161)
  br i1 %21, label %22, label %23

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

23:                                               ; preds = %22, %20, %10
  %24 = getelementptr inbounds i8, ptr %0, i64 272
  %25 = load i32, ptr %24, align 16, !tbaa !30
  %26 = zext i32 %25 to i64
  %27 = shl nuw nsw i64 %26, 6
  %28 = tail call noundef ptr @_ZN3JPH18BroadPhaseQuadTree10LayerStatenaEm(i64 noundef %27)
  %29 = icmp eq i32 %25, 0
  br i1 %29, label %.loopexit, label %30

30:                                               ; preds = %23
  %31 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %28, i64 %26
  br label %32

32:                                               ; preds = %34, %30
  %33 = phi ptr [ %28, %30 ], [ %35, %34 ]
  invoke void @_ZN3JPH18BroadPhaseQuadTree10LayerStateC2Ev(ptr noundef nonnull align 16 dereferenceable(64) %33)
          to label %34 unwind label %55

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %33, i64 64
  %36 = icmp eq ptr %35, %31
  br i1 %36, label %.loopexit, label %32

.loopexit:                                        ; preds = %34, %23
  %37 = tail call noundef ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %38 = sext i32 %2 to i64
  %39 = getelementptr inbounds %"class.JPH::BodyID", ptr %1, i64 %38
  tail call void @"_ZN3JPH9QuickSortIPNS_6BodyIDEZNS_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_0EEvT_S5_T0_"(ptr noundef %1, ptr noundef %39, ptr %37)
  br i1 %6, label %.lr.ph56, label %._crit_edge57

.lr.ph56:                                         ; preds = %.loopexit
  %40 = getelementptr inbounds i8, ptr %0, i64 264
  %41 = getelementptr inbounds i8, ptr %0, i64 32
  br label %42

42:                                               ; preds = %.lr.ph56, %._crit_edge
  %.054 = phi ptr [ %1, %.lr.ph56 ], [ %58, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  %43 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %.054)
  %44 = zext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %44)
  %46 = load ptr, ptr %45, align 8, !tbaa !31
  %47 = call i8 @_ZNK3JPH4Body18GetBroadPhaseLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %46)
  store i8 %47, ptr %5, align 1
  %48 = call noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  store i8 %48, ptr %4, align 1, !tbaa !32
  %49 = zext i8 %48 to i32
  %50 = load i32, ptr %24, align 16, !tbaa !30
  %51 = icmp ugt i32 %50, %49
  br i1 %51, label %57, label %52

52:                                               ; preds = %42
  %53 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 174)
  br i1 %53, label %54, label %57

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

55:                                               ; preds = %32
  %56 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef %28) #8
  resume { ptr, i32 } %56

57:                                               ; preds = %54, %52, %42
  %58 = call noundef ptr @"_ZSt11upper_boundIPN3JPH6BodyIDEhZNS0_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_1ET_S5_S5_RKT0_T1_"(ptr noundef nonnull %.054, ptr noundef nonnull %39, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr %37)
  %59 = load i8, ptr %4, align 1, !tbaa !32
  %60 = zext i8 %59 to i64
  %61 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %28, i64 %60
  store ptr %.054, ptr %61, align 16, !tbaa !34
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  store ptr %58, ptr %62, align 8, !tbaa !40
  %63 = load ptr, ptr %40, align 8, !tbaa !41
  %64 = getelementptr inbounds %"class.JPH::QuadTree", ptr %63, i64 %60
  %65 = ptrtoint ptr %58 to i64
  %66 = ptrtoint ptr %.054 to i64
  %67 = sub i64 %65, %66
  %68 = lshr exact i64 %67, 2
  %69 = trunc i64 %68 to i32
  %70 = getelementptr inbounds i8, ptr %61, i64 16
  call void @_ZN3JPH8QuadTree16AddBodiesPrepareERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERNS1_INS0_8TrackingENS4_IS9_EEEEPNS_6BodyIDEiRNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81) %64, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull %.054, i32 noundef %69, ptr noundef nonnull align 16 dereferenceable(48) %70)
  %71 = icmp ult ptr %.054, %58
  br i1 %71, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %106, %57
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  %72 = icmp ult ptr %58, %39
  br i1 %72, label %42, label %._crit_edge57, !llvm.loop !42

.lr.ph:                                           ; preds = %57, %106
  %.04853 = phi ptr [ %111, %106 ], [ %.054, %57 ]
  %73 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %.04853)
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %74)
  %76 = load ptr, ptr %75, align 8, !tbaa !31
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %76)
  %78 = call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %77, ptr noundef nonnull align 4 dereferenceable(4) %.04853)
  br i1 %78, label %82, label %79

79:                                               ; preds = %.lr.ph
  %80 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 191, ptr noundef nonnull @.str.7)
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !44
  br label %82

82:                                               ; preds = %.lr.ph, %79, %81
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %74)
  %84 = load ptr, ptr %83, align 8, !tbaa !31
  %85 = call noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122) %84)
  br i1 %85, label %86, label %89

86:                                               ; preds = %82
  %87 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 192)
  br i1 %87, label %88, label %89

88:                                               ; preds = %86
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !45
  br label %89

89:                                               ; preds = %88, %86, %82
  %90 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_8QuadTree8TrackingENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %74)
  %91 = call noundef zeroext i8 @_ZNKSt13__atomic_baseIhEcvhEv(ptr noundef nonnull align 1 dereferenceable(1) %90) #8
  %92 = call noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3JPHL23cBroadPhaseLayerInvalidE)
  %93 = icmp eq i8 %91, %92
  br i1 %93, label %97, label %94

94:                                               ; preds = %89
  %95 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 194)
  br i1 %95, label %96, label %97

96:                                               ; preds = %94
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !46
  br label %97

97:                                               ; preds = %96, %94, %89
  %98 = load i8, ptr %4, align 1, !tbaa !32
  %99 = call noundef zeroext i8 @_ZNSt13__atomic_baseIhEaSEh(ptr noundef nonnull align 1 dereferenceable(1) %90, i8 noundef zeroext %98) #8
  %100 = getelementptr inbounds i8, ptr %90, i64 2
  %101 = call noundef zeroext i16 @_ZNKSt13__atomic_baseItEcvtEv(ptr noundef nonnull align 2 dereferenceable(2) %100) #8
  %102 = icmp eq i16 %101, -1
  br i1 %102, label %106, label %103

103:                                              ; preds = %97
  %104 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 196)
  br i1 %104, label %105, label %106

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

106:                                              ; preds = %105, %103, %97
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %74)
  %108 = load ptr, ptr %107, align 8, !tbaa !31
  %109 = call noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %108)
  %110 = call noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2) %100, i16 noundef zeroext %109) #8
  %111 = getelementptr inbounds i8, ptr %.04853, i64 4
  %112 = icmp ult ptr %111, %58
  br i1 %112, label %.lr.ph, label %._crit_edge, !llvm.loop !48

._crit_edge57:                                    ; preds = %._crit_edge, %.loopexit
  ret ptr %28
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH18BroadPhaseQuadTree10LayerStatenaEm(i64 noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZN3JPH9QuickSortIPNS_6BodyIDEZNS_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_0EEvT_S5_T0_"(ptr noundef, ptr noundef, ptr) local_unnamed_addr #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 i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZSt11upper_boundIPN3JPH6BodyIDEhZNS0_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_1ET_S5_S5_RKT0_T1_"(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr) local_unnamed_addr #2

declare void @_ZN3JPH8QuadTree16AddBodiesPrepareERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERNS1_INS0_8TrackingENS4_IS9_EEEEPNS_6BodyIDEiRNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, ptr noundef nonnull align 16 dereferenceable(48)) local_unnamed_addr #7

; 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 #6 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 #6 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 #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #6 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 #2 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 #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) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #6 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 #4 align 2

attributes #0 = { mustprogress 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

!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 2158429507}
!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 2158429915}
!30 = !{!13, !17, i64 272}
!31 = !{!9, !9, i64 0}
!32 = !{!10, !10, i64 0}
!33 = !{i64 2158430297}
!34 = !{!35, !9, i64 0}
!35 = !{!"_ZTSN3JPH18BroadPhaseQuadTree10LayerStateE", !9, i64 0, !9, i64 8, !36, i64 16}
!36 = !{!"_ZTSN3JPH8QuadTree8AddStateE", !37, i64 0, !38, i64 16}
!37 = !{!"_ZTSN3JPH8QuadTree6NodeIDE", !17, i64 0}
!38 = !{!"_ZTSN3JPH5AABoxE", !39, i64 0, !39, i64 16}
!39 = !{!"_ZTSN3JPH4Vec3E", !10, i64 0}
!40 = !{!35, !9, i64 8}
!41 = !{!13, !9, i64 264}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{i64 2158430732}
!45 = !{i64 2158431120}
!46 = !{i64 2158431580}
!47 = !{i64 2158431978}
!48 = distinct !{!48, !43}


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