; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/Physics (PhysicsSystem)

; 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::BodyAccess::Grant" = type { i8 }
%"class.JPH::DummyCalculateSolverSteps" = type { i8 }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::CalculateSolverSteps" = type <{ ptr, i32, i32, i8, i8, [6 x i8] }>
%"class.JPH::PhysicsUpdateContext" = type <{ ptr, ptr, ptr, ptr, float, float, %"struct.std::atomic", [4 x i8], ptr, ptr, ptr, %"class.JPH::Array.19", i32, [4 x i8], ptr, %"struct.std::atomic", [4 x i8] }>
%"class.JPH::Array.19" = type { %"class.JPH::STLTempAllocator", i64, i64, ptr }
%"class.JPH::STLTempAllocator" = type { ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.JPH::PhysicsUpdateContext::Step" = type { ptr, i8, i8, %"struct.JPH::BroadPhase::UpdateState", i32, %"struct.std::atomic", [60 x i8], %"struct.std::atomic", [60 x i8], %"struct.std::atomic", [60 x i8], %"struct.std::atomic", [60 x i8], %"struct.std::atomic", [60 x i8], %"struct.std::atomic", [60 x i8], %"class.JPH::StaticArray", i32, %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", ptr, i32, %"struct.std::atomic", %"struct.std::atomic", ptr, i32, %"class.JPH::JobSystem::JobHandle", %"class.JPH::StaticArray.20", %"class.JPH::StaticArray.20", %"class.JPH::StaticArray.20", %"class.JPH::StaticArray.20", %"class.JPH::JobSystem::JobHandle", %"class.JPH::StaticArray.20", %"class.JPH::JobSystem::JobHandle", %"class.JPH::JobSystem::JobHandle", %"class.JPH::JobSystem::JobHandle", %"class.JPH::StaticArray.20", %"class.JPH::JobSystem::JobHandle", %"class.JPH::StaticArray.20", %"class.JPH::JobSystem::JobHandle", %"class.JPH::JobSystem::JobHandle", %"class.JPH::StaticArray.20", %"class.JPH::JobSystem::JobHandle", %"class.JPH::JobSystem::JobHandle", %"class.JPH::StaticArray.20", %"class.JPH::StaticArray.20", %"class.JPH::JobSystem::JobHandle", %"class.JPH::JobSystem::JobHandle" }
%"struct.JPH::BroadPhase::UpdateState" = type { [4 x ptr] }
%"class.JPH::StaticArray" = type { i32, [32 x %"struct.JPH::StaticArray<JPH::PhysicsUpdateContext::BodyPairQueue, 32>::Storage"] }
%"struct.JPH::StaticArray<JPH::PhysicsUpdateContext::BodyPairQueue, 32>::Storage" = type { [128 x i8] }
%"class.JPH::StaticArray.20" = type { i32, [4 x i8], [32 x %"struct.JPH::StaticArray<JPH::JobSystem::JobHandle, 32>::Storage"] }
%"struct.JPH::StaticArray<JPH::JobSystem::JobHandle, 32>::Storage" = type { [8 x i8] }
%"class.JPH::JobSystem::JobHandle" = type { %"class.JPH::Ref" }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::PhysicsSystem" = type <{ ptr, ptr, %"class.JPH::BodyManager", %"class.JPH::BodyLockInterfaceNoLock", %"class.JPH::BodyLockInterfaceLocking", %"class.JPH::BodyInterface", %"class.JPH::BodyInterface", %"class.JPH::NarrowPhaseQuery", %"class.JPH::NarrowPhaseQuery", ptr, ptr, %"struct.JPH::PhysicsSettings", [4 x i8], %"class.JPH::ContactConstraintManager", %"class.JPH::ConstraintManager", %"class.JPH::IslandBuilder", %"class.JPH::LargeIslandSplitter", %"class.JPH::Mutex", %"class.JPH::Array.10", [8 x i8], %"class.JPH::Vec3", float, [12 x i8] }>
%"class.JPH::BodyManager" = type <{ %"class.JPH::Array", i32, [4 x i8], i64, %"class.JPH::Mutex", %"class.JPH::MutexArray", %"class.JPH::Array.0", %"class.JPH::Mutex", [2 x ptr], [2 x %"struct.std::atomic"], i32, [4 x i8], %"class.JPH::Mutex", %"class.JPH::Array.3", ptr, ptr, i8, [7 x i8] }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::MutexArray" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::Array.0" = type { i64, i64, ptr }
%"class.JPH::Array.3" = type { i64, i64, ptr }
%"class.JPH::BodyLockInterfaceNoLock" = type { %"class.JPH::BodyLockInterface" }
%"class.JPH::BodyLockInterface" = type { ptr, ptr }
%"class.JPH::BodyLockInterfaceLocking" = type { %"class.JPH::BodyLockInterface" }
%"class.JPH::BodyInterface" = type { ptr, ptr, ptr }
%"class.JPH::NarrowPhaseQuery" = type { ptr, ptr }
%"struct.JPH::PhysicsSettings" = type <{ i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, i8, i8, i8, i8, i8, i8, i8, i8 }>
%"class.JPH::ContactConstraintManager" = type { [8 x i8], [2 x %"class.JPH::ContactConstraintManager::ManifoldCache"], i32, ptr, ptr, ptr, ptr, ptr, i32, %"struct.std::atomic", ptr }
%"class.JPH::ContactConstraintManager::ManifoldCache" = type <{ %"class.JPH::LFHMAllocator", %"class.JPH::LockFreeHashMap", %"class.JPH::LockFreeHashMap.6", i8, [7 x i8] }>
%"class.JPH::LFHMAllocator" = type { ptr, i32, %"struct.std::atomic" }
%"class.JPH::LockFreeHashMap" = type { ptr, %"struct.std::atomic", ptr, i32, i32 }
%"class.JPH::LockFreeHashMap.6" = type { ptr, %"struct.std::atomic", ptr, i32, i32 }
%"class.JPH::ConstraintManager" = type { ptr, %"class.JPH::Array.7", %"class.JPH::Mutex" }
%"class.JPH::Array.7" = type { i64, i64, ptr }
%"class.JPH::IslandBuilder" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%"class.JPH::LargeIslandSplitter" = type <{ i32, [4 x i8], ptr, ptr, ptr, i32, %"struct.std::atomic", i32, [4 x i8], ptr, %"struct.std::atomic", [4 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 }
%"class.JPH::Array.10" = type { i64, i64, ptr }
%"class.JPH::Vec3" = type { %union.anon.13 }
%union.anon.13 = type { <4 x float> }

@.str.24 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [78 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH10BodyAccess5GrantC2ENS0_7EAccessES2_(ptr noundef nonnull align 1 dereferenceable(1), i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10BodyAccess5GrantD2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13PhysicsSystem27JobSolveVelocityConstraintsEPNS_20PhysicsUpdateContextEPNS1_4StepE(ptr noundef nonnull align 16 dereferenceable(1140) %0, ptr noundef %1, ptr noundef %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.JPH::BodyAccess::Grant", align 1
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca float, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.JPH::DummyCalculateSolverSteps", align 1
  %22 = alloca i8, align 1
  %23 = alloca i8, align 1
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i8, align 1
  %31 = alloca i8, align 1
  %32 = alloca %"struct.JPH::AssertLastParam", align 1
  %33 = alloca %"struct.JPH::AssertLastParam", align 1
  %34 = alloca %"class.JPH::CalculateSolverSteps", align 8
  %35 = alloca i32, align 4
  %36 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  call void @_ZN3JPH10BodyAccess5GrantC2ENS0_7EAccessES2_(ptr noundef nonnull align 1 dereferenceable(1) %7, i8 noundef zeroext 3, i8 noundef zeroext 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.JPH::PhysicsUpdateContext", ptr %38, i32 0, i32 4
  %40 = load float, ptr %39, align 8, !tbaa !9
  store float %40, ptr %8, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.JPH::PhysicsUpdateContext", ptr %41, i32 0, i32 8
  %43 = load ptr, ptr %42, align 8, !tbaa !19
  store ptr %43, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.JPH::PhysicsUpdateContext::Step", ptr %44, i32 0, i32 1
  %46 = load i8, ptr %45, align 8, !tbaa !20, !range !28, !noundef !29
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %52

48:                                               ; preds = %3
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.JPH::PhysicsUpdateContext", ptr %49, i32 0, i32 5
  %51 = load float, ptr %50, align 4, !tbaa !30
  br label %53

52:                                               ; preds = %3
  br label %53

53:                                               ; preds = %52, %48
  %54 = phi float [ %51, %48 ], [ 1.000000e+00, %52 ]
  store float %54, ptr %10, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #8
  store i8 1, ptr %11, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #8
  %55 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 11
  %56 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %55, i32 0, i32 23
  %57 = load i8, ptr %56, align 16, !tbaa !32, !range !28, !noundef !29
  %58 = trunc i8 %57 to i1
  %59 = zext i1 %58 to i8
  store i8 %59, ptr %12, align 1, !tbaa !31
  br label %60

60:                                               ; preds = %321, %53
  %61 = load i8, ptr %12, align 1, !tbaa !31, !range !28, !noundef !29
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %127

63:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %64 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 16
  %65 = invoke noundef i32 @_ZN3JPH19LargeIslandSplitter14FetchNextBatchERjRPjS3_S3_S3_Rb(ptr noundef nonnull align 8 dereferenceable(60) %64, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %66 unwind label %67

66:                                               ; preds = %63
  switch i32 %65, label %122 [
    i32 1, label %71
    i32 0, label %122
    i32 2, label %121
  ]

67:                                               ; preds = %95, %89, %63
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %19, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %20, align 4
  br label %126

71:                                               ; preds = %66
  %72 = load i8, ptr %13, align 1, !tbaa !31, !range !28, !noundef !29
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %89

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #8
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = load ptr, ptr %16, align 8, !tbaa !5
  %78 = load float, ptr %10, align 4, !tbaa !18
  invoke void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef %75, ptr noundef %76, ptr noundef %77, float noundef %78, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %79 unwind label %85

79:                                               ; preds = %74
  %80 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  %83 = load float, ptr %10, align 4, !tbaa !18
  invoke void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248) %80, ptr noundef %81, ptr noundef %82, float noundef %83, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %84 unwind label %85

84:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #8
  br label %101

85:                                               ; preds = %79, %74
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %19, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #8
  br label %126

89:                                               ; preds = %71
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = load ptr, ptr %16, align 8, !tbaa !5
  %93 = load float, ptr %8, align 4, !tbaa !18
  %94 = invoke noundef zeroext i1 @_ZN3JPH17ConstraintManager25sSolveVelocityConstraintsEPPNS_10ConstraintEPKjS5_f(ptr noundef %90, ptr noundef %91, ptr noundef %92, float noundef %93)
          to label %95 unwind label %67

95:                                               ; preds = %89
  %96 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager24SolveVelocityConstraintsEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %96, ptr noundef %97, ptr noundef %98)
          to label %100 unwind label %67

100:                                              ; preds = %95
  br label %101

101:                                              ; preds = %100, %84
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #8
  %102 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 16
  %103 = load i32, ptr %14, align 4, !tbaa !56
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = load ptr, ptr %17, align 8, !tbaa !5
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZN3JPH19LargeIslandSplitter18MarkBatchProcessedEjPKjS2_S2_S2_RbS3_(ptr noundef nonnull align 8 dereferenceable(60) %102, i32 noundef %103, ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %107, ptr noundef nonnull align 1 dereferenceable(1) %22, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %108 unwind label %116

108:                                              ; preds = %101
  %109 = load i8, ptr %22, align 1, !tbaa !31, !range !28, !noundef !29
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %120

111:                                              ; preds = %108
  %112 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %113 = load ptr, ptr %17, align 8, !tbaa !5
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZNK3JPH24ContactConstraintManager20StoreAppliedImpulsesEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %112, ptr noundef %113, ptr noundef %114)
          to label %115 unwind label %116

115:                                              ; preds = %111
  br label %120

116:                                              ; preds = %111, %101
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %19, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  br label %126

120:                                              ; preds = %115, %108
  store i32 3, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  br label %123

121:                                              ; preds = %66
  store i8 0, ptr %12, align 1, !tbaa !31
  br label %122

122:                                              ; preds = %121, %66, %66
  store i32 0, ptr %24, align 4
  br label %123

123:                                              ; preds = %122, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #8
  %124 = load i32, ptr %24, align 4
  switch i32 %124, label %330 [
    i32 0, label %125
    i32 3, label %315
  ]

125:                                              ; preds = %123
  br label %127

126:                                              ; preds = %116, %85, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #8
  br label %324

127:                                              ; preds = %125, %60
  %128 = load i8, ptr %11, align 1, !tbaa !31, !range !28, !noundef !29
  %129 = trunc i8 %128 to i1
  br i1 %129, label %130, label %314

130:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.JPH::PhysicsUpdateContext::Step", ptr %131, i32 0, i32 22
  %133 = call noundef i32 @_ZNSt13__atomic_baseIjEppEi(ptr noundef nonnull align 4 dereferenceable(4) %132, i32 noundef 0) #8
  store i32 %133, ptr %25, align 4, !tbaa !56
  %134 = load i32, ptr %25, align 4, !tbaa !56
  %135 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %136 = invoke noundef i32 @_ZNK3JPH13IslandBuilder13GetNumIslandsEv(ptr noundef nonnull align 8 dereferenceable(112) %135)
          to label %137 unwind label %140

137:                                              ; preds = %130
  %138 = icmp uge i32 %134, %136
  br i1 %138, label %139, label %144

139:                                              ; preds = %137
  store i8 0, ptr %11, align 1, !tbaa !31
  store i32 3, ptr %24, align 4
  br label %312

140:                                              ; preds = %130
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %19, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %20, align 4
  br label %313

144:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #8
  %145 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %146 = load i32, ptr %25, align 4, !tbaa !56
  %147 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %145, i32 noundef %146, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %148 unwind label %177

148:                                              ; preds = %144
  %149 = zext i1 %147 to i8
  store i8 %149, ptr %30, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #8
  %150 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %151 = load i32, ptr %25, align 4, !tbaa !56
  %152 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %150, i32 noundef %151, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %153 unwind label %181

153:                                              ; preds = %148
  %154 = zext i1 %152 to i8
  store i8 %154, ptr %31, align 1, !tbaa !31
  %155 = load i8, ptr %31, align 1, !tbaa !31, !range !28, !noundef !29
  %156 = trunc i8 %155 to i1
  br i1 %156, label %204, label %157

157:                                              ; preds = %153
  %158 = load i8, ptr %30, align 1, !tbaa !31, !range !28, !noundef !29
  %159 = trunc i8 %158 to i1
  br i1 %159, label %204, label %160

160:                                              ; preds = %157
  br label %161

161:                                              ; preds = %200, %160
  %162 = load i32, ptr %25, align 4, !tbaa !56
  %163 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %164 = invoke noundef i32 @_ZNK3JPH13IslandBuilder13GetNumIslandsEv(ptr noundef nonnull align 8 dereferenceable(112) %163)
          to label %165 unwind label %181

165:                                              ; preds = %161
  %166 = icmp ult i32 %162, %164
  br i1 %166, label %167, label %203

167:                                              ; preds = %165
  br label %168

168:                                              ; preds = %167
  %169 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %170 = load i32, ptr %25, align 4, !tbaa !56
  %171 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %169, i32 noundef %170, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %172 unwind label %181

172:                                              ; preds = %168
  br i1 %171, label %173, label %185

173:                                              ; preds = %172
  %174 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.54, ptr noundef @.str.24, i32 noundef 1381)
          to label %175 unwind label %181

175:                                              ; preds = %173
  br i1 %174, label %176, label %185

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

177:                                              ; preds = %144
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %19, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %20, align 4
  br label %311

181:                                              ; preds = %213, %209, %193, %188, %173, %168, %161, %148
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %19, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %20, align 4
  br label %310

185:                                              ; preds = %176, %175, %172
  br label %186

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  %189 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %190 = load i32, ptr %25, align 4, !tbaa !56
  %191 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %189, i32 noundef %190, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %192 unwind label %181

192:                                              ; preds = %188
  br i1 %191, label %193, label %197

193:                                              ; preds = %192
  %194 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.55, ptr noundef @.str.24, i32 noundef 1382)
          to label %195 unwind label %181

195:                                              ; preds = %193
  br i1 %194, label %196, label %197

196:                                              ; preds = %195
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !58
  br label %197

197:                                              ; preds = %196, %195, %192
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %25, align 4, !tbaa !56
  %202 = add i32 %201, 1
  store i32 %202, ptr %25, align 4, !tbaa !56
  br label %161, !llvm.loop !59

203:                                              ; preds = %165
  store i8 0, ptr %11, align 1, !tbaa !31
  store i32 3, ptr %24, align 4
  br label %309

204:                                              ; preds = %157, %153
  %205 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 11
  %206 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %205, i32 0, i32 19
  %207 = load i8, ptr %206, align 4, !tbaa !61, !range !28, !noundef !29
  %208 = trunc i8 %207 to i1
  br i1 %208, label %209, label %218

209:                                              ; preds = %204
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  %211 = load ptr, ptr %26, align 8, !tbaa !5
  %212 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZN3JPH17ConstraintManager16sSortConstraintsEPPNS_10ConstraintEPjS4_(ptr noundef %210, ptr noundef %211, ptr noundef %212)
          to label %213 unwind label %181

213:                                              ; preds = %209
  %214 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %215 = load ptr, ptr %28, align 8, !tbaa !5
  %216 = load ptr, ptr %29, align 8, !tbaa !5
  invoke void @_ZNK3JPH24ContactConstraintManager12SortContactsEPjS1_(ptr noundef nonnull align 8 dereferenceable(248) %214, ptr noundef %215, ptr noundef %216)
          to label %217 unwind label %181

217:                                              ; preds = %213
  br label %218

218:                                              ; preds = %217, %204
  call void @llvm.lifetime.start.p0(i64 24, ptr %34) #8
  %219 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 11
  invoke void @_ZN3JPH20CalculateSolverStepsC2ERKNS_15PhysicsSettingsE(ptr noundef nonnull align 8 dereferenceable(18) %34, ptr noundef nonnull align 4 dereferenceable(83) %219)
          to label %220 unwind label %235

220:                                              ; preds = %218
  %221 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 11
  %222 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %221, i32 0, i32 23
  %223 = load i8, ptr %222, align 16, !tbaa !32, !range !28, !noundef !29
  %224 = trunc i8 %223 to i1
  br i1 %224, label %225, label %239

225:                                              ; preds = %220
  %226 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 16
  %227 = load i32, ptr %25, align 4, !tbaa !56
  %228 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %229 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 2
  %230 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = invoke noundef zeroext i1 @_ZN3JPH19LargeIslandSplitter11SplitIslandEjRKNS_13IslandBuilderERKNS_11BodyManagerERKNS_24ContactConstraintManagerEPPNS_10ConstraintERNS_20CalculateSolverStepsE(ptr noundef nonnull align 8 dereferenceable(60) %226, i32 noundef %227, ptr noundef nonnull align 8 dereferenceable(112) %228, ptr noundef nonnull align 8 dereferenceable(297) %229, ptr noundef nonnull align 8 dereferenceable(248) %230, ptr noundef %231, ptr noundef nonnull align 8 dereferenceable(18) %34)
          to label %233 unwind label %235

233:                                              ; preds = %225
  br i1 %232, label %234, label %239

234:                                              ; preds = %233
  store i32 3, ptr %24, align 4
  br label %307

235:                                              ; preds = %302, %254, %250, %249, %244, %239, %225, %218
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %19, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %20, align 4
  br label %308

239:                                              ; preds = %233, %220
  %240 = load ptr, ptr %9, align 8, !tbaa !5
  %241 = load ptr, ptr %26, align 8, !tbaa !5
  %242 = load ptr, ptr %27, align 8, !tbaa !5
  %243 = load float, ptr %10, align 4, !tbaa !18
  invoke void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef %240, ptr noundef %241, ptr noundef %242, float noundef %243, ptr noundef nonnull align 8 dereferenceable(18) %34)
          to label %244 unwind label %235

244:                                              ; preds = %239
  %245 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %246 = load ptr, ptr %28, align 8, !tbaa !5
  %247 = load ptr, ptr %29, align 8, !tbaa !5
  %248 = load float, ptr %10, align 4, !tbaa !18
  invoke void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248) %245, ptr noundef %246, ptr noundef %247, float noundef %248, ptr noundef nonnull align 8 dereferenceable(18) %34)
          to label %249 unwind label %235

249:                                              ; preds = %244
  invoke void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18) %34)
          to label %250 unwind label %235

250:                                              ; preds = %249
  %251 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 15
  %252 = load i32, ptr %25, align 4, !tbaa !56
  %253 = invoke noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %34)
          to label %254 unwind label %235

254:                                              ; preds = %250
  invoke void @_ZN3JPH13IslandBuilder19SetNumPositionStepsEjj(ptr noundef nonnull align 8 dereferenceable(112) %251, i32 noundef %252, i32 noundef %253)
          to label %255 unwind label %235

255:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  store i32 0, ptr %35, align 4, !tbaa !56
  br label %256

256:                                              ; preds = %297, %255
  %257 = load i32, ptr %35, align 4, !tbaa !56
  %258 = invoke noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %34)
          to label %259 unwind label %262

259:                                              ; preds = %256
  %260 = icmp ult i32 %257, %258
  br i1 %260, label %266, label %261

261:                                              ; preds = %259
  store i32 12, ptr %24, align 4
  br label %300

262:                                              ; preds = %256
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %19, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %20, align 4
  br label %301

266:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #8
  %267 = load ptr, ptr %9, align 8, !tbaa !5
  %268 = load ptr, ptr %26, align 8, !tbaa !5
  %269 = load ptr, ptr %27, align 8, !tbaa !5
  %270 = load float, ptr %8, align 4, !tbaa !18
  %271 = invoke noundef zeroext i1 @_ZN3JPH17ConstraintManager25sSolveVelocityConstraintsEPPNS_10ConstraintEPKjS5_f(ptr noundef %267, ptr noundef %268, ptr noundef %269, float noundef %270)
          to label %272 unwind label %289

272:                                              ; preds = %266
  %273 = zext i1 %271 to i8
  store i8 %273, ptr %36, align 1, !tbaa !31
  %274 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %275 = load ptr, ptr %28, align 8, !tbaa !5
  %276 = load ptr, ptr %29, align 8, !tbaa !5
  %277 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager24SolveVelocityConstraintsEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %274, ptr noundef %275, ptr noundef %276)
          to label %278 unwind label %289

278:                                              ; preds = %272
  %279 = zext i1 %277 to i32
  %280 = load i8, ptr %36, align 1, !tbaa !31, !range !28, !noundef !29
  %281 = trunc i8 %280 to i1
  %282 = zext i1 %281 to i32
  %283 = or i32 %282, %279
  %284 = icmp ne i32 %283, 0
  %285 = zext i1 %284 to i8
  store i8 %285, ptr %36, align 1, !tbaa !31
  %286 = load i8, ptr %36, align 1, !tbaa !31, !range !28, !noundef !29
  %287 = trunc i8 %286 to i1
  br i1 %287, label %293, label %288

288:                                              ; preds = %278
  store i32 12, ptr %24, align 4
  br label %294

289:                                              ; preds = %272, %266
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %19, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #8
  br label %301

293:                                              ; preds = %278
  store i32 0, ptr %24, align 4
  br label %294

294:                                              ; preds = %293, %288
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #8
  %295 = load i32, ptr %24, align 4
  switch i32 %295, label %300 [
    i32 0, label %296
  ]

296:                                              ; preds = %294
  br label %297

297:                                              ; preds = %296
  %298 = load i32, ptr %35, align 4, !tbaa !56
  %299 = add i32 %298, 1
  store i32 %299, ptr %35, align 4, !tbaa !56
  br label %256, !llvm.loop !62

300:                                              ; preds = %294, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %302

301:                                              ; preds = %289, %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %308

302:                                              ; preds = %300
  %303 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %37, i32 0, i32 13
  %304 = load ptr, ptr %28, align 8, !tbaa !5
  %305 = load ptr, ptr %29, align 8, !tbaa !5
  invoke void @_ZNK3JPH24ContactConstraintManager20StoreAppliedImpulsesEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %303, ptr noundef %304, ptr noundef %305)
          to label %306 unwind label %235

306:                                              ; preds = %302
  store i32 3, ptr %24, align 4
  br label %307

307:                                              ; preds = %306, %234
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #8
  br label %309

308:                                              ; preds = %301, %235
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #8
  br label %310

309:                                              ; preds = %307, %203
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %312

310:                                              ; preds = %308, %181
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  br label %311

311:                                              ; preds = %310, %177
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %313

312:                                              ; preds = %309, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %315

313:                                              ; preds = %311, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %324

314:                                              ; preds = %127
  call void @_ZNSt11this_thread5yieldEv() #8
  br label %315

315:                                              ; preds = %314, %312, %123
  %316 = load i8, ptr %11, align 1, !tbaa !31, !range !28, !noundef !29
  %317 = trunc i8 %316 to i1
  br i1 %317, label %321, label %318

318:                                              ; preds = %315
  %319 = load i8, ptr %12, align 1, !tbaa !31, !range !28, !noundef !29
  %320 = trunc i8 %319 to i1
  br label %321

321:                                              ; preds = %318, %315
  %322 = phi i1 [ true, %315 ], [ %320, %318 ]
  br i1 %322, label %60, label %323, !llvm.loop !63

323:                                              ; preds = %321
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @_ZN3JPH10BodyAccess5GrantD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  ret void

324:                                              ; preds = %313, %126
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @_ZN3JPH10BodyAccess5GrantD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  br label %325

325:                                              ; preds = %324
  %326 = load ptr, ptr %19, align 8
  %327 = load i32, ptr %20, align 4
  %328 = insertvalue { ptr, i32 } poison, ptr %326, 0
  %329 = insertvalue { ptr, i32 } %328, i32 %327, 1
  resume { ptr, i32 } %329

330:                                              ; preds = %123
  unreachable
}

declare noundef i32 @_ZN3JPH19LargeIslandSplitter14FetchNextBatchERjRPjS3_S3_S3_Rb(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) #5

declare void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

declare void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

declare noundef zeroext i1 @_ZN3JPH17ConstraintManager25sSolveVelocityConstraintsEPPNS_10ConstraintEPKjS5_f(ptr noundef, ptr noundef, ptr noundef, float noundef) #5

declare noundef zeroext i1 @_ZN3JPH24ContactConstraintManager24SolveVelocityConstraintsEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef) #5

declare void @_ZN3JPH19LargeIslandSplitter18MarkBatchProcessedEjPKjS2_S2_S2_RbS3_(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #5

declare void @_ZNK3JPH24ContactConstraintManager20StoreAppliedImpulsesEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef) #5

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

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

declare void @_ZN3JPH17ConstraintManager16sSortConstraintsEPPNS_10ConstraintEPjS4_(ptr noundef, ptr noundef, ptr noundef) #5

declare void @_ZNK3JPH24ContactConstraintManager12SortContactsEPjS1_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef) #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20CalculateSolverStepsC2ERKNS_15PhysicsSettingsE(ptr noundef nonnull align 8 dereferenceable(18), ptr noundef nonnull align 4 dereferenceable(83)) unnamed_addr #6 align 2

declare noundef zeroext i1 @_ZN3JPH19LargeIslandSplitter11SplitIslandEjRKNS_13IslandBuilderERKNS_11BodyManagerERKNS_24ContactConstraintManagerEPPNS_10ConstraintERNS_20CalculateSolverStepsE(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef nonnull align 8 dereferenceable(18)) #5

declare void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(18)) #5

declare void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(18)) #5

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18)) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13IslandBuilder19SetNumPositionStepsEjj(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i32 noundef) #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt11this_thread5yieldEv() #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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 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"="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 = { 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, !11, i64 32}
!10 = !{!"_ZTSN3JPH20PhysicsUpdateContextE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !12, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !15, i64 72, !14, i64 104, !6, i64 112, !12, i64 120}
!11 = !{!"float", !7, i64 0}
!12 = !{!"_ZTSSt6atomicIjE", !13, i64 0}
!13 = !{!"_ZTSSt13__atomic_baseIjE", !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN3JPH5ArrayINS_20PhysicsUpdateContext4StepENS_16STLTempAllocatorIS2_EEEE", !16, i64 0, !17, i64 8, !17, i64 16, !6, i64 24}
!16 = !{!"_ZTSN3JPH16STLTempAllocatorINS_20PhysicsUpdateContext4StepEEE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!11, !11, i64 0}
!19 = !{!10, !6, i64 48}
!20 = !{!21, !22, i64 8}
!21 = !{!"_ZTSN3JPH20PhysicsUpdateContext4StepE", !6, i64 0, !22, i64 8, !22, i64 9, !23, i64 16, !14, i64 48, !12, i64 52, !7, i64 56, !12, i64 116, !7, i64 120, !12, i64 180, !7, i64 184, !12, i64 244, !7, i64 248, !12, i64 308, !7, i64 312, !12, i64 372, !7, i64 376, !24, i64 436, !14, i64 4536, !12, i64 4540, !12, i64 4544, !12, i64 4548, !12, i64 4552, !12, i64 4556, !12, i64 4560, !6, i64 4568, !14, i64 4576, !12, i64 4580, !12, i64 4584, !6, i64 4592, !14, i64 4600, !25, i64 4608, !27, i64 4616, !27, i64 4880, !27, i64 5144, !27, i64 5408, !25, i64 5672, !27, i64 5680, !25, i64 5944, !25, i64 5952, !25, i64 5960, !27, i64 5968, !25, i64 6232, !27, i64 6240, !25, i64 6504, !25, i64 6512, !27, i64 6520, !25, i64 6784, !25, i64 6792, !27, i64 6800, !27, i64 7064, !25, i64 7328, !25, i64 7336}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSN3JPH10BroadPhase11UpdateStateE", !7, i64 0}
!24 = !{!"_ZTSN3JPH11StaticArrayINS_20PhysicsUpdateContext13BodyPairQueueELj32EEE", !14, i64 0, !7, i64 4}
!25 = !{!"_ZTSN3JPH9JobSystem9JobHandleE", !26, i64 0}
!26 = !{!"_ZTSN3JPH3RefINS_9JobSystem3JobEEE", !6, i64 0}
!27 = !{!"_ZTSN3JPH11StaticArrayINS_9JobSystem9JobHandleELj32EEE", !14, i64 0, !7, i64 8}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!10, !11, i64 36}
!31 = !{!22, !22, i64 0}
!32 = !{!33, !22, i64 528}
!33 = !{!"_ZTSN3JPH13PhysicsSystemE", !6, i64 0, !6, i64 8, !34, i64 16, !43, i64 320, !45, i64 336, !46, i64 352, !46, i64 376, !47, i64 400, !47, i64 416, !6, i64 432, !6, i64 440, !48, i64 448, !49, i64 536, !50, i64 784, !52, i64 864, !53, i64 976, !36, i64 1040, !54, i64 1088, !55, i64 1120, !11, i64 1136}
!34 = !{!"_ZTSN3JPH11BodyManagerE", !35, i64 0, !14, i64 24, !17, i64 32, !36, i64 40, !40, i64 88, !41, i64 104, !36, i64 128, !7, i64 176, !7, i64 192, !14, i64 200, !36, i64 208, !42, i64 256, !6, i64 280, !6, i64 288, !22, i64 296}
!35 = !{!"_ZTSN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEE", !17, i64 0, !17, i64 8, !6, i64 16}
!36 = !{!"_ZTSN3JPH5MutexE", !37, i64 0, !39, i64 40}
!37 = !{!"_ZTSSt5mutex", !38, i64 0}
!38 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!39 = !{!"_ZTSNSt6thread2idE", !17, i64 0}
!40 = !{!"_ZTSN3JPH10MutexArrayINS_11SharedMutexEEE", !6, i64 0, !14, i64 8}
!41 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !17, i64 0, !17, i64 8, !6, i64 16}
!42 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !17, i64 0, !17, i64 8, !6, i64 16}
!43 = !{!"_ZTSN3JPH23BodyLockInterfaceNoLockE", !44, i64 0}
!44 = !{!"_ZTSN3JPH17BodyLockInterfaceE", !6, i64 8}
!45 = !{!"_ZTSN3JPH24BodyLockInterfaceLockingE", !44, i64 0}
!46 = !{!"_ZTSN3JPH13BodyInterfaceE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!"_ZTSN3JPH16NarrowPhaseQueryE", !6, i64 0, !6, i64 8}
!48 = !{!"_ZTSN3JPH15PhysicsSettingsE", !14, i64 0, !14, i64 4, !14, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !14, i64 56, !14, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !22, i64 76, !22, i64 77, !22, i64 78, !22, i64 79, !22, i64 80, !22, i64 81, !22, i64 82}
!49 = !{!"_ZTSN3JPH24ContactConstraintManagerE", !7, i64 8, !14, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !14, i64 232, !12, i64 236, !6, i64 240}
!50 = !{!"_ZTSN3JPH17ConstraintManagerE", !6, i64 0, !51, i64 8, !36, i64 32}
!51 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !17, i64 0, !17, i64 8, !6, i64 16}
!52 = !{!"_ZTSN3JPH13IslandBuilderE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108}
!53 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !14, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !12, i64 36, !14, i64 40, !6, i64 48, !12, i64 56}
!54 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !17, i64 0, !17, i64 8, !6, i64 16}
!55 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!56 = !{!14, !14, i64 0}
!57 = !{i64 2159700978}
!58 = !{i64 2159701431}
!59 = distinct !{!59, !60}
!60 = !{!"llvm.loop.mustprogress"}
!61 = !{!33, !22, i64 524}
!62 = distinct !{!62, !60}
!63 = distinct !{!63, !60}


; 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::BodyAccess::Grant" = type { i8 }
%"class.JPH::DummyCalculateSolverSteps" = type { i8 }
%"class.JPH::CalculateSolverSteps" = type <{ ptr, i32, i32, i8, i8, [6 x i8] }>

@.str.24 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [78 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH10BodyAccess5GrantC2ENS0_7EAccessES2_(ptr noundef nonnull align 1 dereferenceable(1), i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10BodyAccess5GrantD2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH13IslandBuilder13GetNumIslandsEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13PhysicsSystem27JobSolveVelocityConstraintsEPNS_20PhysicsUpdateContextEPNS1_4StepE(ptr noundef nonnull align 16 dereferenceable(1140) %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.JPH::BodyAccess::Grant", align 1
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.JPH::DummyCalculateSolverSteps", align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.JPH::CalculateSolverSteps", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZN3JPH10BodyAccess5GrantC2ENS0_7EAccessES2_(ptr noundef nonnull align 1 dereferenceable(1) %4, i8 noundef zeroext 3, i8 noundef zeroext 1)
  %19 = getelementptr inbounds i8, ptr %1, i64 32
  %20 = load float, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %1, i64 48
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %2, i64 8
  %24 = load i8, ptr %23, align 8, !tbaa !18, !range !26, !noundef !27
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %29

26:                                               ; preds = %3
  %27 = getelementptr inbounds i8, ptr %1, i64 36
  %28 = load float, ptr %27, align 4, !tbaa !28
  br label %29

29:                                               ; preds = %3, %26
  %30 = phi float [ %28, %26 ], [ 1.000000e+00, %3 ]
  %31 = getelementptr inbounds i8, ptr %0, i64 448
  %32 = getelementptr inbounds i8, ptr %0, i64 528
  %33 = load i8, ptr %32, align 16, !tbaa !29, !range !26, !noundef !27
  %34 = getelementptr inbounds i8, ptr %0, i64 976
  %35 = getelementptr inbounds i8, ptr %0, i64 536
  %36 = getelementptr inbounds i8, ptr %2, i64 4552
  %37 = getelementptr inbounds i8, ptr %0, i64 864
  %38 = getelementptr inbounds i8, ptr %0, i64 524
  %39 = getelementptr inbounds i8, ptr %0, i64 16
  br label %40

40:                                               ; preds = %163, %29
  %.041 = phi i8 [ %33, %29 ], [ %.4, %163 ]
  %.040 = phi i8 [ 1, %29 ], [ %.3, %163 ]
  %41 = trunc nuw i8 %.041 to i1
  br i1 %41, label %42, label %84

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %43 = invoke noundef i32 @_ZN3JPH19LargeIslandSplitter14FetchNextBatchERjRPjS3_S3_S3_Rb(ptr noundef nonnull align 8 dereferenceable(60) %34, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %44 unwind label %45

44:                                               ; preds = %42
  switch i32 %43, label %.thread [
    i32 1, label %47
    i32 2, label %81
  ]

45:                                               ; preds = %63, %59, %42
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %83

47:                                               ; preds = %44
  %48 = load i8, ptr %5, align 1, !tbaa !53, !range !26, !noundef !27
  %49 = trunc nuw i8 %48 to i1
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #8
  %51 = load ptr, ptr %7, align 8, !tbaa !54
  %52 = load ptr, ptr %8, align 8, !tbaa !54
  invoke void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef %22, ptr noundef %51, ptr noundef %52, float noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %53 unwind label %57

53:                                               ; preds = %50
  %54 = load ptr, ptr %9, align 8, !tbaa !54
  %55 = load ptr, ptr %10, align 8, !tbaa !54
  invoke void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %54, ptr noundef %55, float noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %56 unwind label %57

56:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  br label %67

57:                                               ; preds = %53, %50
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  br label %83

59:                                               ; preds = %47
  %60 = load ptr, ptr %7, align 8, !tbaa !54
  %61 = load ptr, ptr %8, align 8, !tbaa !54
  %62 = invoke noundef zeroext i1 @_ZN3JPH17ConstraintManager25sSolveVelocityConstraintsEPPNS_10ConstraintEPKjS5_f(ptr noundef %22, ptr noundef %60, ptr noundef %61, float noundef %20)
          to label %63 unwind label %45

63:                                               ; preds = %59
  %64 = load ptr, ptr %9, align 8, !tbaa !54
  %65 = load ptr, ptr %10, align 8, !tbaa !54
  %66 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager24SolveVelocityConstraintsEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %64, ptr noundef %65)
          to label %67 unwind label %45

67:                                               ; preds = %63, %56
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #8
  %68 = load i32, ptr %6, align 4, !tbaa !55
  %69 = load ptr, ptr %7, align 8, !tbaa !54
  %70 = load ptr, ptr %8, align 8, !tbaa !54
  %71 = load ptr, ptr %9, align 8, !tbaa !54
  %72 = load ptr, ptr %10, align 8, !tbaa !54
  invoke void @_ZN3JPH19LargeIslandSplitter18MarkBatchProcessedEjPKjS2_S2_S2_RbS3_(ptr noundef nonnull align 8 dereferenceable(60) %34, i32 noundef %68, ptr noundef %69, ptr noundef %70, ptr noundef %71, ptr noundef %72, ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %73 unwind label %79

73:                                               ; preds = %67
  %74 = load i8, ptr %12, align 1, !tbaa !53, !range !26, !noundef !27
  %75 = trunc nuw i8 %74 to i1
  br i1 %75, label %76, label %82

76:                                               ; preds = %73
  %77 = load ptr, ptr %9, align 8, !tbaa !54
  %78 = load ptr, ptr %10, align 8, !tbaa !54
  invoke void @_ZNK3JPH24ContactConstraintManager20StoreAppliedImpulsesEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %77, ptr noundef %78)
          to label %82 unwind label %79

79:                                               ; preds = %76, %67
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  br label %83

81:                                               ; preds = %44
  br label %.thread

.thread:                                          ; preds = %81, %44
  %.243.ph = phi i8 [ 0, %81 ], [ %.041, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  br label %84

82:                                               ; preds = %73, %76
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  br label %163

83:                                               ; preds = %79, %57, %45
  %.pn = phi { ptr, i32 } [ %80, %79 ], [ %58, %57 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  br label %168

84:                                               ; preds = %.thread, %40
  %.344 = phi i8 [ %.041, %40 ], [ %.243.ph, %.thread ]
  %85 = trunc nuw i8 %.040 to i1
  br i1 %85, label %86, label %162

86:                                               ; preds = %84
  %87 = call noundef i32 @_ZNSt13__atomic_baseIjEppEi(ptr noundef nonnull align 4 dereferenceable(4) %36, i32 noundef 0) #8
  %88 = call noundef i32 @_ZNK3JPH13IslandBuilder13GetNumIslandsEv(ptr noundef nonnull align 8 dereferenceable(112) %37)
  %.not = icmp ult i32 %87, %88
  br i1 %.not, label %89, label %163

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %90 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %37, i32 noundef %87, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %91 unwind label %102

91:                                               ; preds = %89
  %92 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %37, i32 noundef %87, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %93 unwind label %.loopexit.split-lp

93:                                               ; preds = %91
  %brmerge = or i1 %90, %92
  br i1 %brmerge, label %115, label %.preheader68

.preheader68:                                     ; preds = %93
  %94 = call noundef i32 @_ZNK3JPH13IslandBuilder13GetNumIslandsEv(ptr noundef nonnull align 8 dereferenceable(112) %37)
  %95 = icmp ult i32 %87, %94
  br i1 %95, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader68, %111
  %.04570 = phi i32 [ %112, %111 ], [ %87, %.preheader68 ]
  %96 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %37, i32 noundef %.04570, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %97 unwind label %.loopexit69

97:                                               ; preds = %.lr.ph
  br i1 %96, label %98, label %104

98:                                               ; preds = %97
  %99 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.54, ptr noundef nonnull @.str.24, i32 noundef 1381)
          to label %100 unwind label %.loopexit69

100:                                              ; preds = %98
  br i1 %99, label %101, label %104

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

102:                                              ; preds = %89
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %161

.loopexit69:                                      ; preds = %.lr.ph, %98, %104, %107
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %161

.loopexit.split-lp:                               ; preds = %91, %118, %121
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %161

104:                                              ; preds = %97, %100, %101
  %105 = invoke noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %37, i32 noundef %.04570, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %106 unwind label %.loopexit69

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

107:                                              ; preds = %106
  %108 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.55, ptr noundef nonnull @.str.24, i32 noundef 1382)
          to label %109 unwind label %.loopexit69

109:                                              ; preds = %107
  br i1 %108, label %110, label %111

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

111:                                              ; preds = %106, %109, %110
  %112 = add nuw i32 %.04570, 1
  %113 = call noundef i32 @_ZNK3JPH13IslandBuilder13GetNumIslandsEv(ptr noundef nonnull align 8 dereferenceable(112) %37)
  %114 = icmp ult i32 %112, %113
  br i1 %114, label %.lr.ph, label %.loopexit, !llvm.loop !58

115:                                              ; preds = %93
  %116 = load i8, ptr %38, align 4, !tbaa !60, !range !26, !noundef !27
  %117 = trunc nuw i8 %116 to i1
  br i1 %117, label %118, label %124

118:                                              ; preds = %115
  %119 = load ptr, ptr %14, align 8, !tbaa !54
  %120 = load ptr, ptr %15, align 8, !tbaa !54
  invoke void @_ZN3JPH17ConstraintManager16sSortConstraintsEPPNS_10ConstraintEPjS4_(ptr noundef %22, ptr noundef %119, ptr noundef %120)
          to label %121 unwind label %.loopexit.split-lp

121:                                              ; preds = %118
  %122 = load ptr, ptr %16, align 8, !tbaa !54
  %123 = load ptr, ptr %17, align 8, !tbaa !54
  invoke void @_ZNK3JPH24ContactConstraintManager12SortContactsEPjS1_(ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %122, ptr noundef %123)
          to label %124 unwind label %.loopexit.split-lp

124:                                              ; preds = %121, %115
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #8
  call void @_ZN3JPH20CalculateSolverStepsC2ERKNS_15PhysicsSettingsE(ptr noundef nonnull align 8 dereferenceable(18) %18, ptr noundef nonnull align 4 dereferenceable(83) %31)
  %125 = load i8, ptr %32, align 16, !tbaa !29, !range !26, !noundef !27
  %126 = trunc nuw i8 %125 to i1
  br i1 %126, label %127, label %132

127:                                              ; preds = %124
  %128 = invoke noundef zeroext i1 @_ZN3JPH19LargeIslandSplitter11SplitIslandEjRKNS_13IslandBuilderERKNS_11BodyManagerERKNS_24ContactConstraintManagerEPPNS_10ConstraintERNS_20CalculateSolverStepsE(ptr noundef nonnull align 8 dereferenceable(60) %34, i32 noundef %87, ptr noundef nonnull align 8 dereferenceable(112) %37, ptr noundef nonnull align 8 dereferenceable(297) %39, ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %22, ptr noundef nonnull align 8 dereferenceable(18) %18)
          to label %129 unwind label %130

129:                                              ; preds = %127
  br i1 %128, label %159, label %132

130:                                              ; preds = %._crit_edge, %139, %138, %135, %132, %127
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %160

132:                                              ; preds = %129, %124
  %133 = load ptr, ptr %14, align 8, !tbaa !54
  %134 = load ptr, ptr %15, align 8, !tbaa !54
  invoke void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef %22, ptr noundef %133, ptr noundef %134, float noundef %30, ptr noundef nonnull align 8 dereferenceable(18) %18)
          to label %135 unwind label %130

135:                                              ; preds = %132
  %136 = load ptr, ptr %16, align 8, !tbaa !54
  %137 = load ptr, ptr %17, align 8, !tbaa !54
  invoke void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %136, ptr noundef %137, float noundef %30, ptr noundef nonnull align 8 dereferenceable(18) %18)
          to label %138 unwind label %130

138:                                              ; preds = %135
  invoke void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18) %18)
          to label %139 unwind label %130

139:                                              ; preds = %138
  %140 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %18)
  invoke void @_ZN3JPH13IslandBuilder19SetNumPositionStepsEjj(ptr noundef nonnull align 8 dereferenceable(112) %37, i32 noundef %87, i32 noundef %140)
          to label %.preheader unwind label %130

.preheader:                                       ; preds = %139
  %141 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %18)
  %.not74 = icmp eq i32 %141, 0
  br i1 %.not74, label %._crit_edge, label %.lr.ph72

142:                                              ; preds = %153
  %143 = add nuw i32 %.071, 1
  %144 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %18)
  %145 = icmp ult i32 %143, %144
  br i1 %145, label %.lr.ph72, label %._crit_edge, !llvm.loop !61

.lr.ph72:                                         ; preds = %.preheader, %142
  %.071 = phi i32 [ %143, %142 ], [ 0, %.preheader ]
  %146 = load ptr, ptr %14, align 8, !tbaa !54
  %147 = load ptr, ptr %15, align 8, !tbaa !54
  %148 = invoke noundef zeroext i1 @_ZN3JPH17ConstraintManager25sSolveVelocityConstraintsEPPNS_10ConstraintEPKjS5_f(ptr noundef %22, ptr noundef %146, ptr noundef %147, float noundef %20)
          to label %149 unwind label %155

149:                                              ; preds = %.lr.ph72
  %150 = load ptr, ptr %16, align 8, !tbaa !54
  %151 = load ptr, ptr %17, align 8, !tbaa !54
  %152 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager24SolveVelocityConstraintsEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %150, ptr noundef %151)
          to label %153 unwind label %155

153:                                              ; preds = %149
  %154 = or i1 %148, %152
  br i1 %154, label %142, label %._crit_edge

155:                                              ; preds = %149, %.lr.ph72
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %160

._crit_edge:                                      ; preds = %153, %142, %.preheader
  %157 = load ptr, ptr %16, align 8, !tbaa !54
  %158 = load ptr, ptr %17, align 8, !tbaa !54
  invoke void @_ZNK3JPH24ContactConstraintManager20StoreAppliedImpulsesEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248) %35, ptr noundef %157, ptr noundef %158)
          to label %159 unwind label %130

159:                                              ; preds = %._crit_edge, %129
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  br label %.loopexit

160:                                              ; preds = %155, %130
  %.pn60 = phi { ptr, i32 } [ %131, %130 ], [ %156, %155 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  br label %161

.loopexit:                                        ; preds = %111, %.preheader68, %159
  %.1 = phi i8 [ %.040, %159 ], [ 0, %.preheader68 ], [ 0, %111 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %163

161:                                              ; preds = %.loopexit69, %.loopexit.split-lp, %160, %102
  %.pn60.pn.pn = phi { ptr, i32 } [ %103, %102 ], [ %.pn60, %160 ], [ %lpad.loopexit, %.loopexit69 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %168

162:                                              ; preds = %84
  call void @_ZNSt11this_thread5yieldEv() #8
  br label %163

163:                                              ; preds = %82, %.loopexit, %86, %162
  %.4 = phi i8 [ %.041, %82 ], [ %.344, %162 ], [ %.344, %86 ], [ %.344, %.loopexit ]
  %.3 = phi i8 [ %.040, %82 ], [ %.040, %162 ], [ 0, %86 ], [ %.1, %.loopexit ]
  %164 = trunc nuw i8 %.3 to i1
  %165 = trunc nuw i8 %.4 to i1
  %166 = select i1 %164, i1 true, i1 %165
  br i1 %166, label %40, label %167, !llvm.loop !62

167:                                              ; preds = %163
  call void @_ZN3JPH10BodyAccess5GrantD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  ret void

168:                                              ; preds = %161, %83
  %.pn60.pn.pn.pn = phi { ptr, i32 } [ %.pn60.pn.pn, %161 ], [ %.pn, %83 ]
  call void @_ZN3JPH10BodyAccess5GrantD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn60.pn.pn.pn
}

declare noundef i32 @_ZN3JPH19LargeIslandSplitter14FetchNextBatchERjRPjS3_S3_S3_Rb(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

declare void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

declare void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_25DummyCalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

declare noundef zeroext i1 @_ZN3JPH17ConstraintManager25sSolveVelocityConstraintsEPPNS_10ConstraintEPKjS5_f(ptr noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #5

declare noundef zeroext i1 @_ZN3JPH24ContactConstraintManager24SolveVelocityConstraintsEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @_ZN3JPH19LargeIslandSplitter18MarkBatchProcessedEjPKjS2_S2_S2_RbS3_(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

declare void @_ZNK3JPH24ContactConstraintManager20StoreAppliedImpulsesEPKjS2_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef) local_unnamed_addr #5

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

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

declare void @_ZN3JPH17ConstraintManager16sSortConstraintsEPPNS_10ConstraintEPjS4_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @_ZNK3JPH24ContactConstraintManager12SortContactsEPjS1_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20CalculateSolverStepsC2ERKNS_15PhysicsSettingsE(ptr noundef nonnull align 8 dereferenceable(18), ptr noundef nonnull align 4 dereferenceable(83)) unnamed_addr #6 align 2

declare noundef zeroext i1 @_ZN3JPH19LargeIslandSplitter11SplitIslandEjRKNS_13IslandBuilderERKNS_11BodyManagerERKNS_24ContactConstraintManagerEPPNS_10ConstraintERNS_20CalculateSolverStepsE(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #5

declare void @_ZN3JPH17ConstraintManager29sWarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPPNS_10ConstraintEPKjS7_fRT_(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #5

declare void @_ZN3JPH24ContactConstraintManager28WarmStartVelocityConstraintsINS_20CalculateSolverStepsEEEvPKjS4_fRT_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #5

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13IslandBuilder19SetNumPositionStepsEjj(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt11this_thread5yieldEv() local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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 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"="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 = { 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, !10, i64 32}
!6 = !{!"_ZTSN3JPH20PhysicsUpdateContextE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !11, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !14, i64 72, !13, i64 104, !7, i64 112, !11, i64 120}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"_ZTSSt6atomicIjE", !12, i64 0}
!12 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN3JPH5ArrayINS_20PhysicsUpdateContext4StepENS_16STLTempAllocatorIS2_EEEE", !15, i64 0, !16, i64 8, !16, i64 16, !7, i64 24}
!15 = !{!"_ZTSN3JPH16STLTempAllocatorINS_20PhysicsUpdateContext4StepEEE", !7, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!6, !7, i64 48}
!18 = !{!19, !20, i64 8}
!19 = !{!"_ZTSN3JPH20PhysicsUpdateContext4StepE", !7, i64 0, !20, i64 8, !20, i64 9, !21, i64 16, !13, i64 48, !11, i64 52, !8, i64 56, !11, i64 116, !8, i64 120, !11, i64 180, !8, i64 184, !11, i64 244, !8, i64 248, !11, i64 308, !8, i64 312, !11, i64 372, !8, i64 376, !22, i64 436, !13, i64 4536, !11, i64 4540, !11, i64 4544, !11, i64 4548, !11, i64 4552, !11, i64 4556, !11, i64 4560, !7, i64 4568, !13, i64 4576, !11, i64 4580, !11, i64 4584, !7, i64 4592, !13, i64 4600, !23, i64 4608, !25, i64 4616, !25, i64 4880, !25, i64 5144, !25, i64 5408, !23, i64 5672, !25, i64 5680, !23, i64 5944, !23, i64 5952, !23, i64 5960, !25, i64 5968, !23, i64 6232, !25, i64 6240, !23, i64 6504, !23, i64 6512, !25, i64 6520, !23, i64 6784, !23, i64 6792, !25, i64 6800, !25, i64 7064, !23, i64 7328, !23, i64 7336}
!20 = !{!"bool", !8, i64 0}
!21 = !{!"_ZTSN3JPH10BroadPhase11UpdateStateE", !8, i64 0}
!22 = !{!"_ZTSN3JPH11StaticArrayINS_20PhysicsUpdateContext13BodyPairQueueELj32EEE", !13, i64 0, !8, i64 4}
!23 = !{!"_ZTSN3JPH9JobSystem9JobHandleE", !24, i64 0}
!24 = !{!"_ZTSN3JPH3RefINS_9JobSystem3JobEEE", !7, i64 0}
!25 = !{!"_ZTSN3JPH11StaticArrayINS_9JobSystem9JobHandleELj32EEE", !13, i64 0, !8, i64 8}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!6, !10, i64 36}
!29 = !{!30, !20, i64 528}
!30 = !{!"_ZTSN3JPH13PhysicsSystemE", !7, i64 0, !7, i64 8, !31, i64 16, !40, i64 320, !42, i64 336, !43, i64 352, !43, i64 376, !44, i64 400, !44, i64 416, !7, i64 432, !7, i64 440, !45, i64 448, !46, i64 536, !47, i64 784, !49, i64 864, !50, i64 976, !33, i64 1040, !51, i64 1088, !52, i64 1120, !10, i64 1136}
!31 = !{!"_ZTSN3JPH11BodyManagerE", !32, i64 0, !13, i64 24, !16, i64 32, !33, i64 40, !37, i64 88, !38, i64 104, !33, i64 128, !8, i64 176, !8, i64 192, !13, i64 200, !33, i64 208, !39, i64 256, !7, i64 280, !7, i64 288, !20, i64 296}
!32 = !{!"_ZTSN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !7, i64 16}
!33 = !{!"_ZTSN3JPH5MutexE", !34, i64 0, !36, i64 40}
!34 = !{!"_ZTSSt5mutex", !35, i64 0}
!35 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!36 = !{!"_ZTSNSt6thread2idE", !16, i64 0}
!37 = !{!"_ZTSN3JPH10MutexArrayINS_11SharedMutexEEE", !7, i64 0, !13, i64 8}
!38 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !16, i64 0, !16, i64 8, !7, i64 16}
!39 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !16, i64 0, !16, i64 8, !7, i64 16}
!40 = !{!"_ZTSN3JPH23BodyLockInterfaceNoLockE", !41, i64 0}
!41 = !{!"_ZTSN3JPH17BodyLockInterfaceE", !7, i64 8}
!42 = !{!"_ZTSN3JPH24BodyLockInterfaceLockingE", !41, i64 0}
!43 = !{!"_ZTSN3JPH13BodyInterfaceE", !7, i64 0, !7, i64 8, !7, i64 16}
!44 = !{!"_ZTSN3JPH16NarrowPhaseQueryE", !7, i64 0, !7, i64 8}
!45 = !{!"_ZTSN3JPH15PhysicsSettingsE", !13, i64 0, !13, i64 4, !13, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !13, i64 56, !13, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !20, i64 76, !20, i64 77, !20, i64 78, !20, i64 79, !20, i64 80, !20, i64 81, !20, i64 82}
!46 = !{!"_ZTSN3JPH24ContactConstraintManagerE", !8, i64 8, !13, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !13, i64 232, !11, i64 236, !7, i64 240}
!47 = !{!"_ZTSN3JPH17ConstraintManagerE", !7, i64 0, !48, i64 8, !33, i64 32}
!48 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !16, i64 0, !16, i64 8, !7, i64 16}
!49 = !{!"_ZTSN3JPH13IslandBuilderE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108}
!50 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !13, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !13, i64 32, !11, i64 36, !13, i64 40, !7, i64 48, !11, i64 56}
!51 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !7, i64 16}
!52 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!53 = !{!20, !20, i64 0}
!54 = !{!7, !7, i64 0}
!55 = !{!13, !13, i64 0}
!56 = !{i64 2159700978}
!57 = !{i64 2159701431}
!58 = distinct !{!58, !59}
!59 = !{!"llvm.loop.mustprogress"}
!60 = !{!30, !20, i64 524}
!61 = distinct !{!61, !59}
!62 = distinct !{!62, !59}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass