; 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.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 [109 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [30 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.8 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.9 = 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 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 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 %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %30 = load ptr, ptr %5, align 8
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = icmp sle i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %3
  store ptr null, ptr %4, align 8
  br label %236

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

38:                                               ; preds = %34
  %39 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 2
  %40 = load i64, ptr %39, align 8, !tbaa !14
  %41 = getelementptr inbounds %"class.JPH::BroadPhase", ptr %30, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %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 162)
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !30
  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 %10) #9
  %52 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 8
  %53 = load i32, ptr %52, align 16, !tbaa !31
  %54 = zext i32 %53 to i64
  %55 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %54, i64 64)
  %56 = extractvalue { i64, i1 } %55, 1
  %57 = extractvalue { i64, i1 } %55, 0
  %58 = select i1 %56, i64 -1, i64 %57
  %59 = call noundef ptr @_ZN3JPH18BroadPhaseQuadTree10LayerStatenaEm(i64 noundef %58)
  %60 = icmp eq i64 %54, 0
  br i1 %60, label %68, label %61

61:                                               ; preds = %51
  %62 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %59, i64 %54
  br label %63

63:                                               ; preds = %65, %61
  %64 = phi ptr [ %59, %61 ], [ %66, %65 ]
  invoke void @_ZN3JPH18BroadPhaseQuadTree10LayerStateC2Ev(ptr noundef nonnull align 16 dereferenceable(64) %64)
          to label %65 unwind label %108

65:                                               ; preds = %63
  %66 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %64, i64 1
  %67 = icmp eq ptr %66, %62
  br i1 %67, label %68, label %63

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

85:                                               ; preds = %232, %68
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = icmp ult ptr %86, %87
  br i1 %88, label %89, label %234

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %91)
  %93 = zext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %93)
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = call i8 @_ZNK3JPH4Body18GetBroadPhaseLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %95)
  %97 = getelementptr inbounds %"class.JPH::BroadPhaseLayer", ptr %18, i32 0, i32 0
  store i8 %96, ptr %97, align 1
  %98 = 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 %98, ptr %17, align 1, !tbaa !34
  br label %99

99:                                               ; preds = %89
  %100 = load i8, ptr %17, align 1, !tbaa !34
  %101 = zext i8 %100 to i32
  %102 = getelementptr inbounds %"class.JPH::BroadPhaseQuadTree", ptr %30, i32 0, i32 8
  %103 = load i32, ptr %102, align 16, !tbaa !31
  %104 = icmp ult i32 %101, %103
  br i1 %104, label %112, label %105

105:                                              ; preds = %99
  %106 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 175)
  br i1 %106, label %107, label %112

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

108:                                              ; preds = %63
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %11, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %12, align 4
  call void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef %59) #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 %238

112:                                              ; preds = %107, %105, %99
  br label %113

113:                                              ; preds = %112
  br label %114

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

150:                                              ; preds = %229, %114
  %151 = load ptr, ptr %23, align 8, !tbaa !5
  %152 = load ptr, ptr %20, align 8, !tbaa !5
  %153 = icmp ult ptr %151, %152
  br i1 %153, label %155, label %154

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

155:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %156 = load ptr, ptr %23, align 8, !tbaa !5
  %157 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %156)
  store i32 %157, ptr %24, align 4, !tbaa !9
  br label %158

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

167:                                              ; preds = %158
  %168 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 192, ptr noundef @.str.6)
  br i1 %168, label %169, label %170

169:                                              ; preds = %167
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !46
  br label %170

170:                                              ; preds = %169, %167, %158
  br label %171

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171
  br label %173

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

180:                                              ; preds = %173
  %181 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 193)
  br i1 %181, label %182, label %183

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

183:                                              ; preds = %182, %180, %173
  br label %184

184:                                              ; preds = %183
  br label %185

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

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

198:                                              ; preds = %190
  %199 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 195)
  br i1 %199, label %200, label %201

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

201:                                              ; preds = %200, %198, %190
  br label %202

202:                                              ; preds = %201
  br label %203

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

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

214:                                              ; preds = %208
  %215 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 197)
  br i1 %215, label %216, label %217

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

217:                                              ; preds = %216, %214, %208
  br label %218

218:                                              ; preds = %217
  br label %219

219:                                              ; preds = %218
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = load i32, ptr %24, align 4, !tbaa !9
  %222 = zext i32 %221 to i64
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %220, i64 noundef %222)
  %224 = load ptr, ptr %223, align 8, !tbaa !5
  %225 = call noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %224)
  %226 = load ptr, ptr %27, align 8, !tbaa !5
  %227 = getelementptr inbounds %"struct.JPH::QuadTree::Tracking", ptr %226, i32 0, i32 1
  %228 = call noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2) %227, i16 noundef zeroext %225) #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 %229

229:                                              ; preds = %219
  %230 = load ptr, ptr %23, align 8, !tbaa !5
  %231 = getelementptr inbounds %"class.JPH::BodyID", ptr %230, i32 1
  store ptr %231, ptr %23, align 8, !tbaa !5
  br label %150, !llvm.loop !50

232:                                              ; preds = %154
  %233 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %233, 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 %85, !llvm.loop !52

234:                                              ; preds = %85
  %235 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %235, ptr %4, align 8
  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
  br label %236

236:                                              ; preds = %234, %33
  %237 = load ptr, ptr %4, align 8
  ret ptr %237

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

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


; 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 [109 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [30 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.8 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.9 = 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 slt i32 %2, 1
  br i1 %6, label %.loopexit, label %7

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

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

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

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

27:                                               ; preds = %20
  %28 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %25, i64 %23
  br label %29

29:                                               ; preds = %31, %27
  %30 = phi ptr [ %25, %27 ], [ %32, %31 ]
  invoke void @_ZN3JPH18BroadPhaseQuadTree10LayerStateC2Ev(ptr noundef nonnull align 16 dereferenceable(64) %30)
          to label %31 unwind label %52

31:                                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %30, i64 64
  %33 = icmp eq ptr %32, %28
  br i1 %33, label %.lr.ph60, label %29

.lr.ph60:                                         ; preds = %31, %20
  %34 = tail call noundef ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %35 = zext nneg i32 %2 to i64
  %36 = getelementptr inbounds %"class.JPH::BodyID", ptr %1, i64 %35
  tail call void @"_ZN3JPH9QuickSortIPNS_6BodyIDEZNS_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_0EEvT_S5_T0_"(ptr noundef %1, ptr noundef nonnull %36, ptr %34)
  %37 = getelementptr inbounds i8, ptr %0, i64 264
  %38 = getelementptr inbounds i8, ptr %0, i64 32
  br label %39

39:                                               ; preds = %.lr.ph60, %._crit_edge
  %.04958 = phi ptr [ %1, %.lr.ph60 ], [ %55, %._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
  %40 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %.04958)
  %41 = zext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %41)
  %43 = load ptr, ptr %42, align 8, !tbaa !30
  %44 = call i8 @_ZNK3JPH4Body18GetBroadPhaseLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %43)
  store i8 %44, ptr %5, align 1
  %45 = 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 %45, ptr %4, align 1, !tbaa !31
  %46 = zext i8 %45 to i32
  %47 = load i32, ptr %21, align 16, !tbaa !29
  %48 = icmp ugt i32 %47, %46
  br i1 %48, label %54, label %49

49:                                               ; preds = %39
  %50 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 175)
  br i1 %50, label %51, label %54

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

52:                                               ; preds = %29
  %53 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH18BroadPhaseQuadTree10LayerStatedaEPv(ptr noundef %25) #8
  resume { ptr, i32 } %53

54:                                               ; preds = %51, %49, %39
  %55 = call noundef ptr @"_ZSt11upper_boundIPN3JPH6BodyIDEhZNS0_18BroadPhaseQuadTree16AddBodiesPrepareES2_iE3$_1ET_S5_S5_RKT0_T1_"(ptr noundef nonnull %.04958, ptr noundef nonnull %36, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr %34)
  %56 = load i8, ptr %4, align 1, !tbaa !31
  %57 = zext i8 %56 to i64
  %58 = getelementptr inbounds %"struct.JPH::BroadPhaseQuadTree::LayerState", ptr %25, i64 %57
  store ptr %.04958, ptr %58, align 16, !tbaa !33
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  store ptr %55, ptr %59, align 8, !tbaa !39
  %60 = load ptr, ptr %37, align 8, !tbaa !40
  %61 = getelementptr inbounds %"class.JPH::QuadTree", ptr %60, i64 %57
  %62 = ptrtoint ptr %55 to i64
  %63 = ptrtoint ptr %.04958 to i64
  %64 = sub i64 %62, %63
  %65 = lshr exact i64 %64, 2
  %66 = trunc i64 %65 to i32
  %67 = getelementptr inbounds i8, ptr %58, i64 16
  call void @_ZN3JPH8QuadTree16AddBodiesPrepareERKNS_5ArrayIPNS_4BodyENS_12STLAllocatorIS3_EEEERNS1_INS0_8TrackingENS4_IS9_EEEEPNS_6BodyIDEiRNS0_8AddStateE(ptr noundef nonnull align 64 dereferenceable(81) %61, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull %.04958, i32 noundef %66, ptr noundef nonnull align 16 dereferenceable(48) %67)
  %68 = icmp ult ptr %.04958, %55
  br i1 %68, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %103, %54
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  %69 = icmp ult ptr %55, %36
  br i1 %69, label %39, label %.loopexit, !llvm.loop !41

.lr.ph:                                           ; preds = %54, %103
  %.05057 = phi ptr [ %108, %103 ], [ %.04958, %54 ]
  %70 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %.05057)
  %71 = zext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %71)
  %73 = load ptr, ptr %72, align 8, !tbaa !30
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %73)
  %75 = call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %74, ptr noundef nonnull align 4 dereferenceable(4) %.05057)
  br i1 %75, label %79, label %76

76:                                               ; preds = %.lr.ph
  %77 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 192, ptr noundef nonnull @.str.6)
  br i1 %77, label %78, label %79

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

79:                                               ; preds = %.lr.ph, %76, %78
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %71)
  %81 = load ptr, ptr %80, align 8, !tbaa !30
  %82 = call noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122) %81)
  br i1 %82, label %83, label %86

83:                                               ; preds = %79
  %84 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 193)
  br i1 %84, label %85, label %86

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

86:                                               ; preds = %85, %83, %79
  %87 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_8QuadTree8TrackingENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %71)
  %88 = call noundef zeroext i8 @_ZNKSt13__atomic_baseIhEcvhEv(ptr noundef nonnull align 1 dereferenceable(1) %87) #8
  %89 = call noundef zeroext i8 @_ZNK3JPH15BroadPhaseLayercvhEv(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3JPHL23cBroadPhaseLayerInvalidE)
  %90 = icmp eq i8 %88, %89
  br i1 %90, label %94, label %91

91:                                               ; preds = %86
  %92 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 195)
  br i1 %92, label %93, label %94

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

94:                                               ; preds = %93, %91, %86
  %95 = load i8, ptr %4, align 1, !tbaa !31
  %96 = call noundef zeroext i8 @_ZNSt13__atomic_baseIhEaSEh(ptr noundef nonnull align 1 dereferenceable(1) %87, i8 noundef zeroext %95) #8
  %97 = getelementptr inbounds i8, ptr %87, i64 2
  %98 = call noundef zeroext i16 @_ZNKSt13__atomic_baseItEcvtEv(ptr noundef nonnull align 2 dereferenceable(2) %97) #8
  %99 = icmp eq i16 %98, -1
  br i1 %99, label %103, label %100

100:                                              ; preds = %94
  %101 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 197)
  br i1 %101, label %102, label %103

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

103:                                              ; preds = %102, %100, %94
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %71)
  %105 = load ptr, ptr %104, align 8, !tbaa !30
  %106 = call noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %105)
  %107 = call noundef zeroext i16 @_ZNSt13__atomic_baseItEaSEt(ptr noundef nonnull align 2 dereferenceable(2) %97, i16 noundef zeroext %106) #8
  %108 = getelementptr inbounds i8, ptr %.05057, i64 4
  %109 = icmp ult ptr %108, %55
  br i1 %109, label %.lr.ph, label %._crit_edge, !llvm.loop !47

.loopexit:                                        ; preds = %._crit_edge, %3
  %.0 = phi ptr [ null, %3 ], [ %25, %._crit_edge ]
  ret ptr %.0
}

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


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