; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/General/MultithreadedTest.ll (ZN17MultithreadedTest14RagdollSpawnerEv)

; 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::Ref.17" = type { ptr }
%"class.JPH::SkeletonPose" = type { %"class.JPH::RefConst.18", %"class.JPH::Vec3", %"class.JPH::Array.19", %"class.JPH::Array.22" }
%"class.JPH::RefConst.18" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Array.19" = type { i64, i64, ptr }
%"class.JPH::Array.22" = type { i64, i64, ptr }
%"class.JPH::Ref.40" = type { ptr }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }
%"class.JPH::Array.46" = type { i64, i64, ptr }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.49 = type { %"class.JPH::Ref.40" }
%class.anon.50 = type { %"class.JPH::Ref.40" }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<unsigned long>::param_type" }
%"struct.std::uniform_int_distribution<unsigned long>::param_type" = type { i64, i64 }
%class.anon.51 = type { %"class.JPH::Ref.40" }
%"class.std::chrono::duration" = type { i64 }
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%class.MultithreadedTest = type <{ %class.Test, %"class.std::thread", %"class.std::thread", %"class.std::thread", %"struct.std::atomic", [7 x i8] }>
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.JPH::SkeletalAnimation::JointState" = type { %"class.JPH::Quat", %"class.JPH::Vec3" }

@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 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: mustprogress uwtable
declare dso_local void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137), ptr noundef nonnull align 1, ptr noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt8literals15chrono_literalsli2msIJLc49EEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEv() #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt24uniform_int_distributionImEC2Emm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt24uniform_int_distributionImEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEmRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17MultithreadedTest14RagdollSpawnerEv(ptr noundef nonnull align 8 dereferenceable(137) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.JPH::Ref.17", align 8
  %5 = alloca %"class.JPH::SkeletonPose", align 16
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.JPH::Ref.40", align 8
  %9 = alloca %"class.std::linear_congruential_engine", align 8
  %10 = alloca %"class.std::uniform_real_distribution", align 4
  %11 = alloca %"class.std::uniform_real_distribution", align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.JPH::Array.46", align 8
  %14 = alloca %"class.JPH::Ref.40", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.JPH::Quat", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.std::function", align 8
  %19 = alloca %class.anon.49, align 8
  %20 = alloca %"class.std::function", align 8
  %21 = alloca %class.anon.50, align 8
  %22 = alloca %"class.std::uniform_real_distribution", align 4
  %23 = alloca %"class.std::uniform_int_distribution", align 8
  %24 = alloca i64, align 8
  %25 = alloca %"class.JPH::Ref.40", align 8
  %26 = alloca %"class.std::function", align 8
  %27 = alloca %class.anon.51, align 8
  %28 = alloca %"class.std::chrono::duration", align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %33 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 10, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %34 = call noundef ptr @_ZN13RagdollLoader7sCreateEv()
  call void @_ZN3JPH3RefINS_15RagdollSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %34)
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #8
  invoke void @_ZN3JPH12SkeletonPoseC2Ev(ptr noundef nonnull align 16 dereferenceable(80) %5)
          to label %35 unwind label %115

35:                                               ; preds = %1
  %36 = invoke noundef ptr @_ZNK3JPH3RefINS_15RagdollSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %37 unwind label %119

37:                                               ; preds = %35
  %38 = invoke noundef ptr @_ZN3JPH15RagdollSettings11GetSkeletonEv(ptr noundef nonnull align 8 dereferenceable(112) %36)
          to label %39 unwind label %119

39:                                               ; preds = %37
  invoke void @_ZN3JPH12SkeletonPose11SetSkeletonEPKNS_8SkeletonE(ptr noundef nonnull align 16 dereferenceable(80) %5, ptr noundef %38)
          to label %40 unwind label %119

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %41 = invoke noundef ptr @_ZNK3JPH3RefINS_15RagdollSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %42 unwind label %123

42:                                               ; preds = %40
  %43 = getelementptr inbounds %class.Test, ptr %33, i32 0, i32 2
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = invoke noundef ptr @_ZNK3JPH15RagdollSettings13CreateRagdollEjmPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(112) %41, i32 noundef 0, i64 noundef 0, ptr noundef %44)
          to label %46 unwind label %123

46:                                               ; preds = %42
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %45)
          to label %47 unwind label %123

47:                                               ; preds = %46
  %48 = invoke noundef ptr @_ZNK3JPH3RefINS_7RagdollEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %49 unwind label %127

49:                                               ; preds = %47
  invoke void @_ZN3JPH7Ragdoll7GetPoseERNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72) %48, ptr noundef nonnull align 16 dereferenceable(80) %5, i1 noundef zeroext true)
          to label %50 unwind label %127

50:                                               ; preds = %49
  invoke void @_ZN3JPH12SkeletonPose20CalculateJointStatesEv(ptr noundef nonnull align 16 dereferenceable(80) %5)
          to label %51 unwind label %127

51:                                               ; preds = %50
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  invoke void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %52 unwind label %132

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef 1.000000e+01)
          to label %53 unwind label %136

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef -5.000000e+00, float noundef 5.000000e+00)
          to label %54 unwind label %140

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  br label %55

55:                                               ; preds = %262, %54
  %56 = getelementptr inbounds %class.MultithreadedTest, ptr %33, i32 0, i32 4
  %57 = call noundef zeroext i1 @_ZNKSt6atomicIbEcvbEv(ptr noundef nonnull align 1 dereferenceable(1) %56) #8
  %58 = xor i1 %57, true
  br i1 %58, label %59, label %268

59:                                               ; preds = %55
  %60 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %61 unwind label %144

61:                                               ; preds = %59
  %62 = icmp ult i64 %60, 10
  br i1 %62, label %63, label %190

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %64 = invoke noundef ptr @_ZNK3JPH3RefINS_15RagdollSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %65 unwind label %148

65:                                               ; preds = %63
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = add i32 %66, 1
  store i32 %67, ptr %12, align 4, !tbaa !9
  %68 = getelementptr inbounds %class.Test, ptr %33, i32 0, i32 2
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = invoke noundef ptr @_ZNK3JPH15RagdollSettings13CreateRagdollEjmPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(112) %64, i32 noundef %66, i64 noundef 0, ptr noundef %69)
          to label %71 unwind label %148

71:                                               ; preds = %65
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %70)
          to label %72 unwind label %148

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %73 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH12SkeletonPose8GetJointEi(ptr noundef nonnull align 16 dereferenceable(80) %5, i32 noundef 0)
          to label %74 unwind label %152

74:                                               ; preds = %72
  store ptr %73, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #8
  %75 = invoke { double, double } @_ZN3JPH4Quat7sRandomISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %76 unwind label %156

76:                                               ; preds = %74
  %77 = getelementptr inbounds %"class.JPH::Quat", ptr %16, i32 0, i32 0
  %78 = getelementptr inbounds %"class.JPH::Vec4", ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %union.anon.4, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 0
  %81 = extractvalue { double, double } %75, 0
  store double %81, ptr %80, align 16
  %82 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 1
  %83 = extractvalue { double, double } %75, 1
  store double %83, ptr %82, align 8
  %84 = load ptr, ptr %15, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.JPH::SkeletalAnimation::JointState", ptr %84, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %85, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  %86 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %87 unwind label %152

87:                                               ; preds = %76
  %88 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %89 unwind label %152

89:                                               ; preds = %87
  %90 = fadd float 1.000000e+00, %88
  %91 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %92 unwind label %152

92:                                               ; preds = %89
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %17, float noundef %86, float noundef %90, float noundef %91)
          to label %93 unwind label %152

93:                                               ; preds = %92
  %94 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %95 = load double, ptr %94, align 16
  %96 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %97 = load double, ptr %96, align 8
  invoke void @_ZN3JPH12SkeletonPose13SetRootOffsetENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(80) %5, double %95, double %97)
          to label %98 unwind label %152

98:                                               ; preds = %93
  invoke void @_ZN3JPH12SkeletonPose22CalculateJointMatricesEv(ptr noundef nonnull align 16 dereferenceable(80) %5)
          to label %99 unwind label %152

99:                                               ; preds = %98
  %100 = invoke noundef ptr @_ZNK3JPH3RefINS_7RagdollEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %101 unwind label %152

101:                                              ; preds = %99
  invoke void @_ZN3JPH7Ragdoll7SetPoseERKNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72) %100, ptr noundef nonnull align 16 dereferenceable(80) %5, i1 noundef zeroext true)
          to label %102 unwind label %152

102:                                              ; preds = %101
  %103 = invoke noundef ptr @_ZNK3JPH3RefINS_7RagdollEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %104 unwind label %152

104:                                              ; preds = %102
  invoke void @_ZN3JPH7Ragdoll22DriveToPoseUsingMotorsERKNS_12SkeletonPoseE(ptr noundef nonnull align 8 dereferenceable(72) %103, ptr noundef nonnull align 16 dereferenceable(80) %5)
          to label %105 unwind label %152

105:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %106 = getelementptr inbounds %class.anon.49, ptr %19, i32 0, i32 0
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %107 unwind label %160

107:                                              ; preds = %105
  invoke void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %108 unwind label %164

108:                                              ; preds = %107
  invoke void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137) %33, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.4, ptr noundef %18)
          to label %109 unwind label %168

109:                                              ; preds = %108
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_0D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %110 = getelementptr inbounds %class.anon.50, ptr %21, i32 0, i32 0
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %111 unwind label %174

111:                                              ; preds = %109
  invoke void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %112 unwind label %178

112:                                              ; preds = %111
  invoke void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137) %33, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.5, ptr noundef %20)
          to label %113 unwind label %182

113:                                              ; preds = %112
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_1D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  invoke void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %114 unwind label %152

114:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %190

115:                                              ; preds = %1
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %6, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %7, align 4
  br label %309

119:                                              ; preds = %39, %37, %35
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %6, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %7, align 4
  br label %308

123:                                              ; preds = %46, %42, %40
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %6, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %7, align 4
  br label %131

127:                                              ; preds = %50, %49, %47
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %6, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %7, align 4
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br label %131

131:                                              ; preds = %127, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %308

132:                                              ; preds = %51
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %6, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %7, align 4
  br label %307

136:                                              ; preds = %52
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %6, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %7, align 4
  br label %306

140:                                              ; preds = %53
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %6, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %7, align 4
  br label %305

144:                                              ; preds = %59
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %6, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %7, align 4
  br label %304

148:                                              ; preds = %71, %65, %63
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %6, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %7, align 4
  br label %189

152:                                              ; preds = %113, %104, %102, %101, %99, %98, %93, %92, %89, %87, %76, %72
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %6, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %7, align 4
  br label %188

156:                                              ; preds = %74
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %6, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  br label %188

160:                                              ; preds = %105
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %6, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %7, align 4
  br label %173

164:                                              ; preds = %107
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %6, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %7, align 4
  br label %172

168:                                              ; preds = %108
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %6, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %7, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  br label %172

172:                                              ; preds = %168, %164
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_0D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br label %173

173:                                              ; preds = %172, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %188

174:                                              ; preds = %109
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %6, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %7, align 4
  br label %187

178:                                              ; preds = %111
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %6, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %7, align 4
  br label %186

182:                                              ; preds = %112
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %6, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %7, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  br label %186

186:                                              ; preds = %182, %178
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_1D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  br label %187

187:                                              ; preds = %186, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %188

188:                                              ; preds = %187, %173, %156, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br label %189

189:                                              ; preds = %188, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %304

190:                                              ; preds = %114, %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %22, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %191 unwind label %220

191:                                              ; preds = %190
  %192 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %193 unwind label %220

193:                                              ; preds = %191
  %194 = icmp ugt i64 %192, 0
  br i1 %194, label %195, label %258

195:                                              ; preds = %193
  %196 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %197 unwind label %220

197:                                              ; preds = %195
  %198 = fcmp olt float %196, 0x3FB99999A0000000
  br i1 %198, label %199, label %258

199:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  %200 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %201 unwind label %224

201:                                              ; preds = %199
  %202 = sub i64 %200, 1
  invoke void @_ZNSt24uniform_int_distributionImEC2Emm(ptr noundef nonnull align 8 dereferenceable(16) %23, i64 noundef 0, i64 noundef %202)
          to label %203 unwind label %224

203:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %204 = invoke noundef i64 @_ZNSt24uniform_int_distributionImEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEmRT_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %205 unwind label %228

205:                                              ; preds = %203
  store i64 %204, ptr %24, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %206 = load i64, ptr %24, align 8, !tbaa !22
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %206)
          to label %208 unwind label %232

208:                                              ; preds = %205
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %207)
          to label %209 unwind label %232

209:                                              ; preds = %208
  %210 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %211 unwind label %236

211:                                              ; preds = %209
  %212 = load i64, ptr %24, align 8, !tbaa !22
  %213 = getelementptr inbounds %"class.JPH::Ref.40", ptr %210, i64 %212
  %214 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE5eraseEPKS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef %213)
          to label %215 unwind label %236

215:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %216 = getelementptr inbounds %class.anon.51, ptr %27, i32 0, i32 0
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %216, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %217 unwind label %240

217:                                              ; preds = %215
  invoke void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %218 unwind label %244

218:                                              ; preds = %217
  invoke void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137) %33, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.6, ptr noundef %26)
          to label %219 unwind label %248

219:                                              ; preds = %218
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_2D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  br label %258

220:                                              ; preds = %195, %191, %190
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %6, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %7, align 4
  br label %267

224:                                              ; preds = %201, %199
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %6, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %7, align 4
  br label %257

228:                                              ; preds = %203
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %6, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %7, align 4
  br label %256

232:                                              ; preds = %208, %205
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %6, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %7, align 4
  br label %255

236:                                              ; preds = %211, %209
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %6, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %7, align 4
  br label %254

240:                                              ; preds = %215
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %6, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %7, align 4
  br label %253

244:                                              ; preds = %217
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %6, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %7, align 4
  br label %252

248:                                              ; preds = %218
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %6, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %7, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  br label %252

252:                                              ; preds = %248, %244
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_2D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  br label %253

253:                                              ; preds = %252, %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %254

254:                                              ; preds = %253, %236
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  br label %255

255:                                              ; preds = %254, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %256

256:                                              ; preds = %255, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %257

257:                                              ; preds = %256, %224
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  br label %267

258:                                              ; preds = %219, %197, %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %259 = invoke i64 @_ZNSt8literals15chrono_literalsli2msIJLc49EEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEv()
          to label %260 unwind label %263

260:                                              ; preds = %258
  %261 = getelementptr inbounds %"class.std::chrono::duration", ptr %28, i32 0, i32 0
  store i64 %259, ptr %261, align 8
  invoke void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %262 unwind label %263

262:                                              ; preds = %260
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %55, !llvm.loop !23

263:                                              ; preds = %260, %258
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %6, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %267

267:                                              ; preds = %263, %257, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %304

268:                                              ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  store ptr %13, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %269 = load ptr, ptr %29, align 8, !tbaa !5
  %270 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %269)
          to label %271 unwind label %280

271:                                              ; preds = %268
  store ptr %270, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %272 = load ptr, ptr %29, align 8, !tbaa !5
  %273 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %272)
          to label %274 unwind label %284

274:                                              ; preds = %271
  store ptr %273, ptr %31, align 8, !tbaa !5
  br label %275

275:                                              ; preds = %294, %274
  %276 = load ptr, ptr %30, align 8, !tbaa !5
  %277 = load ptr, ptr %31, align 8, !tbaa !5
  %278 = icmp ne ptr %276, %277
  br i1 %278, label %288, label %279

279:                                              ; preds = %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %303

280:                                              ; preds = %268
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %6, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %7, align 4
  br label %302

284:                                              ; preds = %271
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %6, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %7, align 4
  br label %301

288:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %289 = load ptr, ptr %30, align 8, !tbaa !5
  %290 = invoke noundef ptr @_ZNK3JPH3RefINS_7RagdollEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %289)
          to label %291 unwind label %297

291:                                              ; preds = %288
  store ptr %290, ptr %32, align 8, !tbaa !5
  %292 = load ptr, ptr %32, align 8, !tbaa !5
  invoke void @_ZN3JPH7Ragdoll23RemoveFromPhysicsSystemEb(ptr noundef nonnull align 8 dereferenceable(72) %292, i1 noundef zeroext true)
          to label %293 unwind label %297

293:                                              ; preds = %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %294

294:                                              ; preds = %293
  %295 = load ptr, ptr %30, align 8, !tbaa !5
  %296 = getelementptr inbounds %"class.JPH::Ref.40", ptr %295, i32 1
  store ptr %296, ptr %30, align 8, !tbaa !5
  br label %275

297:                                              ; preds = %291, %288
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %6, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %301

301:                                              ; preds = %297, %284
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %302

302:                                              ; preds = %301, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %304

303:                                              ; preds = %279
  call void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @_ZN3JPH12SkeletonPoseD2Ev(ptr noundef nonnull align 16 dereferenceable(80) %5) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #8
  call void @_ZN3JPH3RefINS_15RagdollSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret void

304:                                              ; preds = %302, %267, %189, %144
  call void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %305

305:                                              ; preds = %304, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %306

306:                                              ; preds = %305, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %307

307:                                              ; preds = %306, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %308

308:                                              ; preds = %307, %131, %119
  call void @_ZN3JPH12SkeletonPoseD2Ev(ptr noundef nonnull align 16 dereferenceable(80) %5) #8
  br label %309

309:                                              ; preds = %308, %115
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #8
  call void @_ZN3JPH3RefINS_15RagdollSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %310

310:                                              ; preds = %309
  %311 = load ptr, ptr %6, align 8
  %312 = load i32, ptr %7, align 4
  %313 = insertvalue { ptr, i32 } poison, ptr %311, 0
  %314 = insertvalue { ptr, i32 } %313, i32 %312, 1
  resume { ptr, i32 } %314
}

declare noundef ptr @_ZN13RagdollLoader7sCreateEv() #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_15RagdollSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 align 2

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

declare void @_ZN3JPH12SkeletonPose11SetSkeletonEPKNS_8SkeletonE(ptr noundef nonnull align 16 dereferenceable(80), ptr noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH15RagdollSettings11GetSkeletonEv(ptr noundef nonnull align 8 dereferenceable(112)) #1 align 2

declare noundef ptr @_ZNK3JPH15RagdollSettings13CreateRagdollEjmPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i64 noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_7RagdollEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 align 2

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

declare void @_ZN3JPH7Ragdoll7GetPoseERNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(80), i1 noundef zeroext) #5

declare void @_ZN3JPH12SkeletonPose20CalculateJointStatesEv(ptr noundef nonnull align 16 dereferenceable(80)) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH12SkeletonPose8GetJointEi(ptr noundef nonnull align 16 dereferenceable(80), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat7sRandomISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12SkeletonPose13SetRootOffsetENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(80), double, double) #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #7 align 2

declare void @_ZN3JPH12SkeletonPose22CalculateJointMatricesEv(ptr noundef nonnull align 16 dereferenceable(80)) #5

declare void @_ZN3JPH7Ragdoll7SetPoseERKNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(80), i1 noundef zeroext) #5

declare void @_ZN3JPH7Ragdoll22DriveToPoseUsingMotorsERKNS_12SkeletonPoseE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(80)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_0D2Ev"(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_1D2Ev"(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE5eraseEPKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_2D2Ev"(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

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

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

declare void @_ZN3JPH7Ragdoll23RemoveFromPhysicsSystemEb(ptr noundef nonnull align 8 dereferenceable(72), i1 noundef zeroext) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12SkeletonPoseD2Ev(ptr noundef nonnull align 16 dereferenceable(80)) unnamed_addr #6 align 2

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

attributes #0 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !14, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !15, i64 0}
!15 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !16, i64 8, !17, i64 16, !16, i64 24, !18, i64 32, !6, i64 48}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!18 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !19, i64 0, !16, i64 8}
!19 = !{!"float", !7, i64 0}
!20 = !{i64 0, i64 16, !21}
!21 = !{!7, !7, i64 0}
!22 = !{!16, !16, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; 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::Ref.17" = type { ptr }
%"class.JPH::SkeletonPose" = type { %"class.JPH::RefConst.18", %"class.JPH::Vec3", %"class.JPH::Array.19", %"class.JPH::Array.22" }
%"class.JPH::RefConst.18" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Array.19" = type { i64, i64, ptr }
%"class.JPH::Array.22" = type { i64, i64, ptr }
%"class.JPH::Ref.40" = type { ptr }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }
%"class.JPH::Array.46" = type { i64, i64, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.49 = type { %"class.JPH::Ref.40" }
%class.anon.50 = type { %"class.JPH::Ref.40" }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<unsigned long>::param_type" }
%"struct.std::uniform_int_distribution<unsigned long>::param_type" = type { i64, i64 }
%class.anon.51 = type { %"class.JPH::Ref.40" }
%"class.std::chrono::duration" = type { i64 }

@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 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: mustprogress uwtable
declare dso_local void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137), ptr noundef nonnull align 1, ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt8literals15chrono_literalsli2msIJLc49EEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEv() local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt24uniform_int_distributionImEC2Emm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt24uniform_int_distributionImEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEmRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17MultithreadedTest14RagdollSpawnerEv(ptr noundef nonnull align 8 dereferenceable(137) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::Ref.17", align 8
  %3 = alloca %"class.JPH::SkeletonPose", align 16
  %4 = alloca %"class.JPH::Ref.40", align 8
  %5 = alloca %"class.std::linear_congruential_engine", align 8
  %6 = alloca %"class.std::uniform_real_distribution", align 4
  %7 = alloca %"class.std::uniform_real_distribution", align 4
  %8 = alloca %"class.JPH::Array.46", align 8
  %9 = alloca %"class.JPH::Ref.40", align 8
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.std::function", align 8
  %12 = alloca %class.anon.49, align 8
  %13 = alloca %"class.std::function", align 8
  %14 = alloca %class.anon.50, align 8
  %15 = alloca %"class.std::uniform_real_distribution", align 4
  %16 = alloca %"class.std::uniform_int_distribution", align 8
  %17 = alloca %"class.JPH::Ref.40", align 8
  %18 = alloca %"class.std::function", align 8
  %19 = alloca %class.anon.51, align 8
  %20 = alloca %"class.std::chrono::duration", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %21 = tail call noundef ptr @_ZN13RagdollLoader7sCreateEv()
  call void @_ZN3JPH3RefINS_15RagdollSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #7
  invoke void @_ZN3JPH12SkeletonPoseC2Ev(ptr noundef nonnull align 16 dereferenceable(80) %3)
          to label %22 unwind label %80

22:                                               ; preds = %1
  %23 = call noundef ptr @_ZNK3JPH3RefINS_15RagdollSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %24 = invoke noundef ptr @_ZN3JPH15RagdollSettings11GetSkeletonEv(ptr noundef nonnull align 8 dereferenceable(112) %23)
          to label %25 unwind label %82

25:                                               ; preds = %22
  invoke void @_ZN3JPH12SkeletonPose11SetSkeletonEPKNS_8SkeletonE(ptr noundef nonnull align 16 dereferenceable(80) %3, ptr noundef %24)
          to label %26 unwind label %82

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %27 = call noundef ptr @_ZNK3JPH3RefINS_15RagdollSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  %30 = invoke noundef ptr @_ZNK3JPH15RagdollSettings13CreateRagdollEjmPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(112) %27, i32 noundef 0, i64 noundef 0, ptr noundef %29)
          to label %31 unwind label %84

31:                                               ; preds = %26
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %30)
          to label %32 unwind label %84

32:                                               ; preds = %31
  %33 = call noundef ptr @_ZNK3JPH3RefINS_7RagdollEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @_ZN3JPH7Ragdoll7GetPoseERNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72) %33, ptr noundef nonnull align 16 dereferenceable(80) %3, i1 noundef zeroext true)
          to label %34 unwind label %86

34:                                               ; preds = %32
  invoke void @_ZN3JPH12SkeletonPose20CalculateJointStatesEv(ptr noundef nonnull align 16 dereferenceable(80) %3)
          to label %35 unwind label %86

35:                                               ; preds = %34
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  invoke void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %36 unwind label %89

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 1.000000e+01)
          to label %37 unwind label %91

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef -5.000000e+00, float noundef 5.000000e+00)
          to label %38 unwind label %93

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %39 = getelementptr inbounds i8, ptr %0, i64 136
  %40 = call noundef zeroext i1 @_ZNKSt6atomicIbEcvbEv(ptr noundef nonnull align 1 dereferenceable(1) %39) #7
  br i1 %40, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %38
  %41 = getelementptr inbounds i8, ptr %10, i64 8
  br label %42

42:                                               ; preds = %.lr.ph, %166
  %.03462 = phi i32 [ 1, %.lr.ph ], [ %.135, %166 ]
  %43 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %44 = icmp ult i64 %43, 10
  br i1 %44, label %45, label %119

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %46 = call noundef ptr @_ZNK3JPH3RefINS_15RagdollSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %47 = add i32 %.03462, 1
  %48 = load ptr, ptr %28, align 8, !tbaa !5
  %49 = invoke noundef ptr @_ZNK3JPH15RagdollSettings13CreateRagdollEjmPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(112) %46, i32 noundef %.03462, i64 noundef 0, ptr noundef %48)
          to label %50 unwind label %95

50:                                               ; preds = %45
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %49)
          to label %51 unwind label %95

51:                                               ; preds = %50
  %52 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH12SkeletonPose8GetJointEi(ptr noundef nonnull align 16 dereferenceable(80) %3, i32 noundef 0)
          to label %53 unwind label %97

53:                                               ; preds = %51
  %54 = invoke { double, double } @_ZN3JPH4Quat7sRandomISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %55 unwind label %99

55:                                               ; preds = %53
  %56 = extractvalue { double, double } %54, 0
  %57 = extractvalue { double, double } %54, 1
  store double %56, ptr %52, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 8
  store double %57, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !17
  %58 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %59 unwind label %97

59:                                               ; preds = %55
  %60 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %61 unwind label %97

61:                                               ; preds = %59
  %62 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %63 unwind label %97

63:                                               ; preds = %61
  %64 = fadd float %60, 1.000000e+00
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef %58, float noundef %64, float noundef %62)
          to label %65 unwind label %97

65:                                               ; preds = %63
  %66 = load double, ptr %10, align 16
  %67 = load double, ptr %41, align 8
  call void @_ZN3JPH12SkeletonPose13SetRootOffsetENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(80) %3, double %66, double %67)
  invoke void @_ZN3JPH12SkeletonPose22CalculateJointMatricesEv(ptr noundef nonnull align 16 dereferenceable(80) %3)
          to label %68 unwind label %97

68:                                               ; preds = %65
  %69 = call noundef ptr @_ZNK3JPH3RefINS_7RagdollEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  invoke void @_ZN3JPH7Ragdoll7SetPoseERKNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72) %69, ptr noundef nonnull align 16 dereferenceable(80) %3, i1 noundef zeroext true)
          to label %70 unwind label %97

70:                                               ; preds = %68
  %71 = call noundef ptr @_ZNK3JPH3RefINS_7RagdollEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  invoke void @_ZN3JPH7Ragdoll22DriveToPoseUsingMotorsERKNS_12SkeletonPoseE(ptr noundef nonnull align 8 dereferenceable(72) %71, ptr noundef nonnull align 16 dereferenceable(80) %3)
          to label %72 unwind label %97

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %73 unwind label %101

73:                                               ; preds = %72
  invoke void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %74 unwind label %103

74:                                               ; preds = %73
  invoke void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137) %0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.4, ptr noundef nonnull %11)
          to label %75 unwind label %105

75:                                               ; preds = %74
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_0D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %76 unwind label %109

76:                                               ; preds = %75
  invoke void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %77 unwind label %111

77:                                               ; preds = %76
  invoke void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137) %0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.5, ptr noundef nonnull %13)
          to label %78 unwind label %113

78:                                               ; preds = %77
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_1D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  invoke void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %79 unwind label %97

79:                                               ; preds = %78
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %119

80:                                               ; preds = %1
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %183

82:                                               ; preds = %25, %22
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %182

84:                                               ; preds = %31, %26
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %88

86:                                               ; preds = %34, %32
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br label %88

88:                                               ; preds = %86, %84
  %.pn = phi { ptr, i32 } [ %87, %86 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %182

89:                                               ; preds = %35
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %181

91:                                               ; preds = %36
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %180

93:                                               ; preds = %37
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %179

95:                                               ; preds = %50, %45
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %118

97:                                               ; preds = %78, %70, %68, %65, %63, %61, %59, %55, %51
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %117

99:                                               ; preds = %53
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %117

101:                                              ; preds = %72
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %108

103:                                              ; preds = %73
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %107

105:                                              ; preds = %74
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %107

107:                                              ; preds = %105, %103
  %.pn37 = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_0D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %108

108:                                              ; preds = %107, %101
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %107 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %117

109:                                              ; preds = %75
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %116

111:                                              ; preds = %76
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %115

113:                                              ; preds = %77
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %115

115:                                              ; preds = %113, %111
  %.pn40 = phi { ptr, i32 } [ %114, %113 ], [ %112, %111 ]
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_1D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %116

116:                                              ; preds = %115, %109
  %.pn40.pn = phi { ptr, i32 } [ %.pn40, %115 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %117

117:                                              ; preds = %116, %108, %99, %97
  %.pn43 = phi { ptr, i32 } [ %98, %97 ], [ %.pn40.pn, %116 ], [ %.pn37.pn, %108 ], [ %100, %99 ]
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %118

118:                                              ; preds = %117, %95
  %.pn43.pn = phi { ptr, i32 } [ %.pn43, %117 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %178

119:                                              ; preds = %79, %42
  %.135 = phi i32 [ %47, %79 ], [ %.03462, %42 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %120 unwind label %142

120:                                              ; preds = %119
  %121 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %.not46 = icmp eq i64 %121, 0
  br i1 %.not46, label %163, label %122

122:                                              ; preds = %120
  %123 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %124 unwind label %142

124:                                              ; preds = %122
  %125 = fcmp olt float %123, 0x3FB99999A0000000
  br i1 %125, label %126, label %163

126:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %127 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %128 = add i64 %127, -1
  invoke void @_ZNSt24uniform_int_distributionImEC2Emm(ptr noundef nonnull align 8 dereferenceable(16) %16, i64 noundef 0, i64 noundef %128)
          to label %129 unwind label %144

129:                                              ; preds = %126
  %130 = invoke noundef i64 @_ZNSt24uniform_int_distributionImEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEmRT_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %131 unwind label %146

131:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %130)
          to label %133 unwind label %148

133:                                              ; preds = %131
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %132)
          to label %134 unwind label %148

134:                                              ; preds = %133
  %135 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %136 = getelementptr inbounds %"class.JPH::Ref.40", ptr %135, i64 %130
  %137 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE5eraseEPKS3_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %136)
          to label %138 unwind label %150

138:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  invoke void @_ZN3JPH3RefINS_7RagdollEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %139 unwind label %152

139:                                              ; preds = %138
  invoke void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %140 unwind label %154

140:                                              ; preds = %139
  invoke void @_ZN17MultithreadedTest7ExecuteERSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEPKcSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(137) %0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.6, ptr noundef nonnull %18)
          to label %141 unwind label %156

141:                                              ; preds = %140
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_2D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  br label %163

142:                                              ; preds = %122, %119
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %170

144:                                              ; preds = %126
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %162

146:                                              ; preds = %129
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %162

148:                                              ; preds = %133, %131
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %161

150:                                              ; preds = %134
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %160

152:                                              ; preds = %138
  %153 = landingpad { ptr, i32 }
          cleanup
  br label %159

154:                                              ; preds = %139
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %158

156:                                              ; preds = %140
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %158

158:                                              ; preds = %156, %154
  %.pn47 = phi { ptr, i32 } [ %157, %156 ], [ %155, %154 ]
  call void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_2D2Ev"(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %159

159:                                              ; preds = %158, %152
  %.pn47.pn = phi { ptr, i32 } [ %.pn47, %158 ], [ %153, %152 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br label %160

160:                                              ; preds = %159, %150
  %.pn47.pn.pn = phi { ptr, i32 } [ %.pn47.pn, %159 ], [ %151, %150 ]
  call void @_ZN3JPH3RefINS_7RagdollEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %161

161:                                              ; preds = %160, %148
  %.pn47.pn.pn.pn = phi { ptr, i32 } [ %.pn47.pn.pn, %160 ], [ %149, %148 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br label %162

162:                                              ; preds = %146, %161, %144
  %.pn47.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %145, %144 ], [ %.pn47.pn.pn.pn, %161 ], [ %147, %146 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  br label %170

163:                                              ; preds = %141, %124, %120
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %164 = invoke i64 @_ZNSt8literals15chrono_literalsli2msIJLc49EEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEv()
          to label %165 unwind label %168

165:                                              ; preds = %163
  store i64 %164, ptr %20, align 8
  invoke void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %166 unwind label %168

166:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %167 = call noundef zeroext i1 @_ZNKSt6atomicIbEcvbEv(ptr noundef nonnull align 1 dereferenceable(1) %39) #7
  br i1 %167, label %._crit_edge, label %42, !llvm.loop !18

168:                                              ; preds = %165, %163
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br label %170

170:                                              ; preds = %168, %162, %142
  %.pn54 = phi { ptr, i32 } [ %169, %168 ], [ %.pn47.pn.pn.pn.pn.pn, %162 ], [ %143, %142 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %178

._crit_edge:                                      ; preds = %166, %38
  %171 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %172 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %.not63 = icmp eq ptr %171, %172
  br i1 %.not63, label %._crit_edge67, label %.lr.ph66

._crit_edge67:                                    ; preds = %174, %._crit_edge
  call void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZN3JPH12SkeletonPoseD2Ev(ptr noundef nonnull align 16 dereferenceable(80) %3) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #7
  call void @_ZN3JPH3RefINS_15RagdollSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret void

.lr.ph66:                                         ; preds = %._crit_edge, %174
  %.03364 = phi ptr [ %175, %174 ], [ %171, %._crit_edge ]
  %173 = call noundef ptr @_ZNK3JPH3RefINS_7RagdollEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %.03364)
  invoke void @_ZN3JPH7Ragdoll23RemoveFromPhysicsSystemEb(ptr noundef nonnull align 8 dereferenceable(72) %173, i1 noundef zeroext true)
          to label %174 unwind label %176

174:                                              ; preds = %.lr.ph66
  %175 = getelementptr inbounds i8, ptr %.03364, i64 8
  %.not = icmp eq ptr %175, %172
  br i1 %.not, label %._crit_edge67, label %.lr.ph66

176:                                              ; preds = %.lr.ph66
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %178

178:                                              ; preds = %176, %170, %118
  %.pn54.pn = phi { ptr, i32 } [ %.pn54, %170 ], [ %.pn43.pn, %118 ], [ %177, %176 ]
  call void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %179

179:                                              ; preds = %178, %93
  %.pn54.pn.pn = phi { ptr, i32 } [ %.pn54.pn, %178 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %180

180:                                              ; preds = %179, %91
  %.pn54.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn, %179 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %181

181:                                              ; preds = %180, %89
  %.pn54.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn, %180 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %182

182:                                              ; preds = %181, %88, %82
  %.pn54.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn.pn, %181 ], [ %.pn, %88 ], [ %83, %82 ]
  call void @_ZN3JPH12SkeletonPoseD2Ev(ptr noundef nonnull align 16 dereferenceable(80) %3) #7
  br label %183

183:                                              ; preds = %182, %80
  %.pn54.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn.pn.pn, %182 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #7
  call void @_ZN3JPH3RefINS_15RagdollSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn54.pn.pn.pn.pn.pn.pn
}

declare noundef ptr @_ZN13RagdollLoader7sCreateEv() local_unnamed_addr #4

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

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

declare void @_ZN3JPH12SkeletonPose11SetSkeletonEPKNS_8SkeletonE(ptr noundef nonnull align 16 dereferenceable(80), ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH15RagdollSettings11GetSkeletonEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #1 align 2

declare noundef ptr @_ZNK3JPH15RagdollSettings13CreateRagdollEjmPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i64 noundef, ptr noundef) local_unnamed_addr #4

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

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

declare void @_ZN3JPH7Ragdoll7GetPoseERNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(80), i1 noundef zeroext) local_unnamed_addr #4

declare void @_ZN3JPH12SkeletonPose20CalculateJointStatesEv(ptr noundef nonnull align 16 dereferenceable(80)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_3RefINS_7RagdollEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH12SkeletonPose8GetJointEi(ptr noundef nonnull align 16 dereferenceable(80), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat7sRandomISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12SkeletonPose13SetRootOffsetENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(80), double, double) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #6 align 2

declare void @_ZN3JPH12SkeletonPose22CalculateJointMatricesEv(ptr noundef nonnull align 16 dereferenceable(80)) local_unnamed_addr #4

declare void @_ZN3JPH7Ragdoll7SetPoseERKNS_12SkeletonPoseEb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(80), i1 noundef zeroext) local_unnamed_addr #4

declare void @_ZN3JPH7Ragdoll22DriveToPoseUsingMotorsERKNS_12SkeletonPoseE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(80)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_0D2Ev"(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_1D2Ev"(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN17MultithreadedTest14RagdollSpawnerEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZZN17MultithreadedTest14RagdollSpawnerEvEN3$_2D2Ev"(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

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

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

declare void @_ZN3JPH7Ragdoll23RemoveFromPhysicsSystemEb(ptr noundef nonnull align 8 dereferenceable(72), i1 noundef zeroext) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12SkeletonPoseD2Ev(ptr noundef nonnull align 16 dereferenceable(80)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH3RefINS_15RagdollSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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, !7, i64 16}
!6 = !{!"_ZTS4Test", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !12, i64 0}
!12 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !7, i64 0, !13, i64 8, !14, i64 16, !13, i64 24, !15, i64 32, !7, i64 48}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !7, i64 0}
!15 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !16, i64 0, !13, i64 8}
!16 = !{!"float", !8, i64 0}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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