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

; 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.std::shared_lock" = type <{ ptr, i8, [7 x i8] }>
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::RayInvDirection" = type { %"class.JPH::Vec3", %"class.JPH::UVec4" }
%"class.JPH::UVec4" = type { %union.anon.10 }
%union.anon.10 = type { <2 x i64> }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::BroadPhaseCastResult" = type { %"class.JPH::BodyID", float }
%"class.JPH::BroadPhaseBruteForce" = type { %"class.JPH::BroadPhase", %"class.JPH::Array", %"class.JPH::SharedMutex" }
%"class.JPH::BroadPhase" = type { %"class.JPH::BroadPhaseQuery", ptr }
%"class.JPH::BroadPhaseQuery" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"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 }
%"class.std::thread::id" = type { i64 }
%"struct.JPH::AABoxCast" = type { %"class.JPH::AABox", %"class.JPH::Vec3" }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11shared_lockIN3JPH11SharedMutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH15RayInvDirectionC2ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH8RayAABoxENS_4Vec3ERKNS_15RayInvDirectionES0_S0_(double, double, ptr noundef nonnull align 16 dereferenceable(32), double, double, double, double) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt11shared_lockIN3JPH11SharedMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH20BroadPhaseBruteForce15CastAABoxNoLockERKNS_9AABoxCastERNS_18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::shared_lock", align 8
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::RayInvDirection", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca float, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.JPH::BodyID", align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca float, align 4
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::BroadPhaseCastResult", align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %34 = getelementptr inbounds %"class.JPH::BroadPhaseBruteForce", ptr %33, i32 0, i32 2
  call void @_ZNSt11shared_lockIN3JPH11SharedMutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(9) %11, ptr noundef nonnull align 8 dereferenceable(64) %34)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.JPH::AABoxCast", ptr %35, i32 0, i32 0
  %37 = invoke { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32) %36)
          to label %38 unwind label %77

38:                                               ; preds = %5
  %39 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %40 = getelementptr inbounds %union.anon, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %42 = extractvalue { double, double } %37, 0
  store double %42, ptr %41, align 16
  %43 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %44 = extractvalue { double, double } %37, 1
  store double %44, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.JPH::AABoxCast", ptr %45, i32 0, i32 0
  %47 = invoke { double, double } @_ZNK3JPH5AABox9GetExtentEv(ptr noundef nonnull align 16 dereferenceable(32) %46)
          to label %48 unwind label %81

48:                                               ; preds = %38
  %49 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %50 = getelementptr inbounds %union.anon, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %52 = extractvalue { double, double } %47, 0
  store double %52, ptr %51, align 16
  %53 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %54 = extractvalue { double, double } %47, 1
  store double %54, ptr %53, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #8
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.JPH::AABoxCast", ptr %55, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %56, i64 16, i1 false), !tbaa.struct !9
  %57 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %58 = load double, ptr %57, align 16
  %59 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %60 = load double, ptr %59, align 8
  invoke void @_ZN3JPH15RayInvDirectionC2ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %16, double %58, double %60)
          to label %61 unwind label %85

61:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = invoke noundef float @_ZNK3JPH18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEE27GetPositiveEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %62)
          to label %64 unwind label %89

64:                                               ; preds = %61
  store float %63, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %65 = getelementptr inbounds %"class.JPH::BroadPhaseBruteForce", ptr %33, i32 0, i32 1
  store ptr %65, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %66 = load ptr, ptr %19, align 8, !tbaa !5
  %67 = invoke noundef ptr @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %66)
          to label %68 unwind label %93

68:                                               ; preds = %64
  store ptr %67, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %69 = load ptr, ptr %19, align 8, !tbaa !5
  %70 = invoke noundef ptr @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %69)
          to label %71 unwind label %97

71:                                               ; preds = %68
  store ptr %70, ptr %21, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %214, %71
  %73 = load ptr, ptr %20, align 8, !tbaa !5
  %74 = load ptr, ptr %21, align 8, !tbaa !5
  %75 = icmp ne ptr %73, %74
  br i1 %75, label %101, label %76

76:                                               ; preds = %72
  store i32 2, ptr %22, align 4
  br label %218

77:                                               ; preds = %5
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %13, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %14, align 4
  br label %225

81:                                               ; preds = %38
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %13, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %14, align 4
  br label %224

85:                                               ; preds = %48
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %13, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %14, align 4
  br label %223

89:                                               ; preds = %61
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %13, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %14, align 4
  br label %222

93:                                               ; preds = %64
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %13, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %14, align 4
  br label %220

97:                                               ; preds = %68
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %13, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %14, align 4
  br label %219

101:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %102 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %102, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %103 = getelementptr inbounds %"class.JPH::BroadPhase", ptr %33, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !16
  %105 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %104, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %106 unwind label %178

106:                                              ; preds = %101
  store ptr %105, ptr %24, align 8, !tbaa !5
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = load ptr, ptr %24, align 8, !tbaa !5
  %109 = invoke noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %108)
          to label %110 unwind label %178

110:                                              ; preds = %106
  %111 = load ptr, ptr %107, align 8, !tbaa !19
  %112 = getelementptr inbounds ptr, ptr %111, i64 2
  %113 = load ptr, ptr %112, align 8
  %114 = invoke noundef zeroext i1 %113(ptr noundef nonnull align 8 dereferenceable(8) %107, i16 noundef zeroext %109)
          to label %115 unwind label %178

115:                                              ; preds = %110
  br i1 %114, label %116, label %207

116:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %117 = load ptr, ptr %24, align 8, !tbaa !5
  %118 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH4Body19GetWorldSpaceBoundsEv(ptr noundef nonnull align 16 dereferenceable(122) %117)
          to label %119 unwind label %182

119:                                              ; preds = %116
  store ptr %118, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !9
  %120 = load ptr, ptr %25, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.JPH::AABox", ptr %120, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !9
  %122 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %123 = load double, ptr %122, align 16
  %124 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %125 = load double, ptr %124, align 8
  %126 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %121, double %123, double %125)
          to label %127 unwind label %186

127:                                              ; preds = %119
  %128 = getelementptr inbounds %"class.JPH::Vec3", ptr %28, i32 0, i32 0
  %129 = getelementptr inbounds %union.anon, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds { double, double }, ptr %129, i32 0, i32 0
  %131 = extractvalue { double, double } %126, 0
  store double %131, ptr %130, align 16
  %132 = getelementptr inbounds { double, double }, ptr %129, i32 0, i32 1
  %133 = extractvalue { double, double } %126, 1
  store double %133, ptr %132, align 8
  %134 = load ptr, ptr %25, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.JPH::AABox", ptr %134, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !9
  %136 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %137 = load double, ptr %136, align 16
  %138 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %139 = load double, ptr %138, align 8
  %140 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %135, double %137, double %139)
          to label %141 unwind label %186

141:                                              ; preds = %127
  %142 = getelementptr inbounds %"class.JPH::Vec3", ptr %30, i32 0, i32 0
  %143 = getelementptr inbounds %union.anon, ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds { double, double }, ptr %143, i32 0, i32 0
  %145 = extractvalue { double, double } %140, 0
  store double %145, ptr %144, align 16
  %146 = getelementptr inbounds { double, double }, ptr %143, i32 0, i32 1
  %147 = extractvalue { double, double } %140, 1
  store double %147, ptr %146, align 8
  %148 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %149 = load double, ptr %148, align 16
  %150 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %151 = load double, ptr %150, align 8
  %152 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %153 = load double, ptr %152, align 16
  %154 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %155 = load double, ptr %154, align 8
  %156 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %157 = load double, ptr %156, align 16
  %158 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %159 = load double, ptr %158, align 8
  %160 = invoke noundef float @_ZN3JPH8RayAABoxENS_4Vec3ERKNS_15RayInvDirectionES0_S0_(double %149, double %151, ptr noundef nonnull align 16 dereferenceable(32) %16, double %153, double %155, double %157, double %159)
          to label %161 unwind label %186

161:                                              ; preds = %141
  store float %160, ptr %26, align 4, !tbaa !11
  %162 = load float, ptr %26, align 4, !tbaa !11
  %163 = load float, ptr %18, align 4, !tbaa !11
  %164 = fcmp olt float %162, %163
  br i1 %164, label %165, label %201

165:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %166 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %32, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %166, ptr align 4 %23, i64 4, i1 false), !tbaa.struct !13
  %167 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %32, i32 0, i32 1
  %168 = load float, ptr %26, align 4, !tbaa !11
  store float %168, ptr %167, align 4, !tbaa !21
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = load ptr, ptr %169, align 8, !tbaa !19
  %171 = getelementptr inbounds ptr, ptr %170, i64 6
  %172 = load ptr, ptr %171, align 8
  invoke void %172(ptr noundef nonnull align 8 dereferenceable(24) %169, ptr noundef nonnull align 4 dereferenceable(8) %32)
          to label %173 unwind label %190

173:                                              ; preds = %165
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = invoke noundef zeroext i1 @_ZNK3JPH18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEE14ShouldEarlyOutEv(ptr noundef nonnull align 8 dereferenceable(24) %174)
          to label %176 unwind label %190

176:                                              ; preds = %173
  br i1 %175, label %177, label %194

177:                                              ; preds = %176
  store i32 2, ptr %22, align 4
  br label %198

178:                                              ; preds = %110, %106, %101
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %13, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %14, align 4
  br label %217

182:                                              ; preds = %116
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %13, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %14, align 4
  br label %206

186:                                              ; preds = %141, %127, %119
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %13, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %14, align 4
  br label %205

190:                                              ; preds = %194, %173, %165
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %13, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %205

194:                                              ; preds = %176
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = invoke noundef float @_ZNK3JPH18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEE27GetPositiveEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %195)
          to label %197 unwind label %190

197:                                              ; preds = %194
  store float %196, ptr %18, align 4, !tbaa !11
  store i32 0, ptr %22, align 4
  br label %198

198:                                              ; preds = %197, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  %199 = load i32, ptr %22, align 4
  switch i32 %199, label %202 [
    i32 0, label %200
  ]

200:                                              ; preds = %198
  br label %201

201:                                              ; preds = %200, %161
  store i32 0, ptr %22, align 4
  br label %202

202:                                              ; preds = %201, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  %203 = load i32, ptr %22, align 4
  switch i32 %203, label %208 [
    i32 0, label %204
  ]

204:                                              ; preds = %202
  br label %207

205:                                              ; preds = %190, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %206

206:                                              ; preds = %205, %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %217

207:                                              ; preds = %204, %115
  store i32 0, ptr %22, align 4
  br label %208

208:                                              ; preds = %207, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  %209 = load i32, ptr %22, align 4
  switch i32 %209, label %211 [
    i32 0, label %210
  ]

210:                                              ; preds = %208
  store i32 0, ptr %22, align 4
  br label %211

211:                                              ; preds = %210, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  %212 = load i32, ptr %22, align 4
  switch i32 %212, label %218 [
    i32 0, label %213
  ]

213:                                              ; preds = %211
  br label %214

214:                                              ; preds = %213
  %215 = load ptr, ptr %20, align 8, !tbaa !5
  %216 = getelementptr inbounds %"class.JPH::BodyID", ptr %215, i32 1
  store ptr %216, ptr %20, align 8, !tbaa !5
  br label %72

217:                                              ; preds = %206, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %219

218:                                              ; preds = %211, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %221

219:                                              ; preds = %217, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %220

220:                                              ; preds = %219, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %222

221:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @_ZNSt11shared_lockIN3JPH11SharedMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  ret void

222:                                              ; preds = %220, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %223

223:                                              ; preds = %222, %85
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  br label %224

224:                                              ; preds = %223, %81
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  br label %225

225:                                              ; preds = %224, %77
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @_ZNSt11shared_lockIN3JPH11SharedMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %226

226:                                              ; preds = %225
  %227 = load ptr, ptr %13, align 8
  %228 = load i32, ptr %14, align 4
  %229 = insertvalue { ptr, i32 } poison, ptr %227, 0
  %230 = insertvalue { ptr, i32 } %229, i32 %228, 1
  resume { ptr, i32 } %230
}

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5AABox9GetExtentEv(ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #7 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 16, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{i64 0, i64 4, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTSN3JPH10BroadPhaseE", !18, i64 0, !6, i64 8}
!18 = !{!"_ZTSN3JPH15BroadPhaseQueryE"}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = !{!22, !12, i64 4}
!22 = !{!"_ZTSN3JPH20BroadPhaseCastResultE", !23, i64 0, !12, i64 4}
!23 = !{!"_ZTSN3JPH6BodyIDE", !15, i64 0}


; 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.std::shared_lock" = type <{ ptr, i8, [7 x i8] }>
%"class.JPH::RayInvDirection" = type { %"class.JPH::Vec3", %"class.JPH::UVec4" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::UVec4" = type { %union.anon.10 }
%union.anon.10 = type { <2 x i64> }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::BroadPhaseCastResult" = type { %"class.JPH::BodyID", float }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11shared_lockIN3JPH11SharedMutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 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 #3 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH8RayAABoxENS_4Vec3ERKNS_15RayInvDirectionES0_S0_(double, double, ptr noundef nonnull align 16 dereferenceable(32), double, double, double, double) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt11shared_lockIN3JPH11SharedMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH20BroadPhaseBruteForce15CastAABoxNoLockERKNS_9AABoxCastERNS_18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::shared_lock", align 8
  %7 = alloca %"class.JPH::RayInvDirection", align 16
  %8 = alloca %"class.JPH::BodyID", align 4
  %9 = alloca %"class.JPH::BroadPhaseCastResult", align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZNSt11shared_lockIN3JPH11SharedMutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(9) %6, ptr noundef nonnull align 8 dereferenceable(64) %10)
  %11 = invoke { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32) %1)
          to label %12 unwind label %28

12:                                               ; preds = %5
  %13 = extractvalue { double, double } %11, 0
  %14 = extractvalue { double, double } %11, 1
  %15 = invoke { double, double } @_ZNK3JPH5AABox9GetExtentEv(ptr noundef nonnull align 16 dereferenceable(32) %1)
          to label %16 unwind label %30

16:                                               ; preds = %12
  %17 = extractvalue { double, double } %15, 0
  %18 = extractvalue { double, double } %15, 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  %19 = getelementptr inbounds i8, ptr %1, i64 32
  %.sroa.027.0.copyload = load double, ptr %19, align 16
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 40
  %.sroa.228.0.copyload = load double, ptr %.sroa.228.0..sroa_idx, align 8, !tbaa !5
  invoke void @_ZN3JPH15RayInvDirectionC2ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %7, double %.sroa.027.0.copyload, double %.sroa.228.0.copyload)
          to label %20 unwind label %32

20:                                               ; preds = %16
  %21 = invoke noundef float @_ZNK3JPH18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEE27GetPositiveEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %22 unwind label %34

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = call noundef ptr @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %25 = call noundef ptr @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %.not82 = icmp eq ptr %24, %25
  br i1 %.not82, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  %27 = getelementptr inbounds i8, ptr %9, i64 4
  br label %36

28:                                               ; preds = %5
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %81

30:                                               ; preds = %12
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %81

32:                                               ; preds = %16
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %80

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %80

36:                                               ; preds = %.lr.ph, %77
  %.04884 = phi float [ %21, %.lr.ph ], [ %.55368, %77 ]
  %.05483 = phi ptr [ %24, %.lr.ph ], [ %78, %77 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %37 = load i32, ptr %.05483, align 4, !tbaa !8
  store i32 %37, ptr %8, align 4, !tbaa !8
  %38 = load ptr, ptr %26, align 8, !tbaa !10
  %39 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %38, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %40 unwind label %68

40:                                               ; preds = %36
  %41 = call noundef zeroext i16 @_ZNK3JPH4Body14GetObjectLayerEv(ptr noundef nonnull align 16 dereferenceable(122) %39)
  %42 = load ptr, ptr %4, align 8, !tbaa !14
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %44 = load ptr, ptr %43, align 8
  %45 = invoke noundef zeroext i1 %44(ptr noundef nonnull align 8 dereferenceable(8) %4, i16 noundef zeroext %41)
          to label %46 unwind label %68

46:                                               ; preds = %40
  br i1 %45, label %47, label %.thread

.thread:                                          ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %77

47:                                               ; preds = %46
  %48 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH4Body19GetWorldSpaceBoundsEv(ptr noundef nonnull align 16 dereferenceable(122) %39)
  %49 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %48, double %17, double %18)
          to label %50 unwind label %70

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %48, i64 16
  %52 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %51, double %17, double %18)
          to label %53 unwind label %70

53:                                               ; preds = %50
  %54 = extractvalue { double, double } %49, 1
  %55 = extractvalue { double, double } %49, 0
  %56 = extractvalue { double, double } %52, 0
  %57 = extractvalue { double, double } %52, 1
  %58 = invoke noundef float @_ZN3JPH8RayAABoxENS_4Vec3ERKNS_15RayInvDirectionES0_S0_(double %13, double %14, ptr noundef nonnull align 16 dereferenceable(32) %7, double %55, double %54, double %56, double %57)
          to label %59 unwind label %70

59:                                               ; preds = %53
  %60 = fcmp olt float %58, %.04884
  br i1 %60, label %61, label %.thread69

61:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %62 = load i32, ptr %8, align 4, !tbaa !8
  store i32 %62, ptr %9, align 4, !tbaa !8
  store float %58, ptr %27, align 4, !tbaa !16
  %63 = load ptr, ptr %2, align 8, !tbaa !14
  %64 = getelementptr inbounds i8, ptr %63, i64 48
  %65 = load ptr, ptr %64, align 8
  invoke void %65(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %66 unwind label %72

66:                                               ; preds = %61
  %67 = call noundef zeroext i1 @_ZNK3JPH18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEE14ShouldEarlyOutEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  br i1 %67, label %.thread78, label %74

68:                                               ; preds = %40, %36
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %79

70:                                               ; preds = %53, %50, %47
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %79

72:                                               ; preds = %74, %61
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %79

74:                                               ; preds = %66
  %75 = invoke noundef float @_ZNK3JPH18CollisionCollectorINS_20BroadPhaseCastResultENS_33CollisionCollectorTraitsCastShapeEE27GetPositiveEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %76 unwind label %72

76:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %.thread69

.thread78:                                        ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %.loopexit

.thread69:                                        ; preds = %59, %76
  %.351.ph = phi float [ %75, %76 ], [ %.04884, %59 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %77

77:                                               ; preds = %.thread69, %.thread
  %.55368 = phi float [ %.04884, %.thread ], [ %.351.ph, %.thread69 ]
  %78 = getelementptr inbounds i8, ptr %.05483, i64 4
  %.not = icmp eq ptr %78, %25
  br i1 %.not, label %.loopexit, label %36

79:                                               ; preds = %70, %72, %68
  %.pn.pn = phi { ptr, i32 } [ %69, %68 ], [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %80

.loopexit:                                        ; preds = %77, %22, %.thread78
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt11shared_lockIN3JPH11SharedMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  ret void

80:                                               ; preds = %34, %79, %32
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %33, %32 ], [ %.pn.pn, %79 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %81

81:                                               ; preds = %30, %80, %28
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %29, %28 ], [ %.pn.pn.pn.pn, %80 ], [ %31, %30 ]
  call void @_ZNSt11shared_lockIN3JPH11SharedMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5AABox9GetExtentEv(ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #6 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !13, i64 8}
!11 = !{!"_ZTSN3JPH10BroadPhaseE", !12, i64 0, !13, i64 8}
!12 = !{!"_ZTSN3JPH15BroadPhaseQueryE"}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !7, i64 0}
!16 = !{!17, !19, i64 4}
!17 = !{!"_ZTSN3JPH20BroadPhaseCastResultE", !18, i64 0, !19, i64 4}
!18 = !{!"_ZTSN3JPH6BodyIDE", !9, i64 0}
!19 = !{!"float", !6, i64 0}


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