; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/Shapes (MutableCompoundShapeTest)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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::BodyID" = type { i32 }
%"class.JPH::BodyLockWrite" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.JPH::Array.38" = type { i64, i64, ptr }
%struct.PositionRotation = type { %"class.JPH::Vec3", %"class.JPH::Quat" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<unsigned int>::param_type" }
%"struct.std::uniform_int_distribution<unsigned int>::param_type" = type { i32, i32 }
%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.MutableCompoundShapeTest = type <{ %class.Test, %"class.JPH::Array", %"class.JPH::RefConst", i32, [4 x i8] }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::RefConst" = type { ptr }
%"class.Test::PreUpdateParams" = type { float, [12 x i8], %struct.CameraState }
%struct.CameraState = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, [12 x i8] }>

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double, double, float noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsE(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef nonnull align 16 dereferenceable(80) %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::uniform_real_distribution", align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.JPH::BodyID", align 4
  %12 = alloca %"class.JPH::BodyLockWrite", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.std::linear_congruential_engine", align 8
  %19 = alloca %"class.JPH::Array.38", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %struct.PositionRotation, align 16
  %24 = alloca %"class.JPH::Quat", align 16
  %25 = alloca %"class.JPH::Quat", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Quat", align 16
  %28 = alloca %"class.std::mersenne_twister_engine", align 8
  %29 = alloca float, align 4
  %30 = alloca %"class.std::uniform_int_distribution", align 4
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Quat", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %34 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %35 = getelementptr inbounds %class.Test, ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172) %36)
  store ptr %37, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %38 = getelementptr inbounds %class.MutableCompoundShapeTest, ptr %34, i32 0, i32 1
  store ptr %38, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %39)
  store ptr %40, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %41)
  store ptr %42, ptr %9, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %293, %2
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = icmp ne ptr %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %297

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %49, i64 4, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #10
  %50 = getelementptr inbounds %class.Test, ptr %34, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %51)
  call void @_ZN3JPH13BodyLockWriteCI2NS_12BodyLockBaseILb1ENS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %53 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %54 unwind label %79

54:                                               ; preds = %48
  br i1 %53, label %55, label %292

55:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %56 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %57 unwind label %83

57:                                               ; preds = %55
  store ptr %56, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  %59 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %58)
          to label %60 unwind label %87

60:                                               ; preds = %57
  store ptr %59, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #10
  %61 = load ptr, ptr %16, align 8, !tbaa !5
  %62 = invoke { double, double } @_ZNK3JPH13CompoundShape15GetCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(108) %61)
          to label %63 unwind label %91

63:                                               ; preds = %60
  %64 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %65 = getelementptr inbounds %union.anon, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 0
  %67 = extractvalue { double, double } %62, 0
  store double %67, ptr %66, align 16
  %68 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 1
  %69 = extractvalue { double, double } %62, 1
  store double %69, ptr %68, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  invoke void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %70 unwind label %95

70:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #10
  call void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = invoke noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108) %71)
          to label %73 unwind label %99

73:                                               ; preds = %70
  store i32 %72, ptr %20, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  store i32 0, ptr %21, align 4, !tbaa !19
  br label %74

74:                                               ; preds = %178, %73
  %75 = load i32, ptr %21, align 4, !tbaa !19
  %76 = load i32, ptr %20, align 4, !tbaa !19
  %77 = icmp ult i32 %75, %76
  br i1 %77, label %103, label %78

78:                                               ; preds = %74
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %195

79:                                               ; preds = %48
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %13, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %14, align 4
  br label %296

83:                                               ; preds = %55
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %13, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %14, align 4
  br label %291

87:                                               ; preds = %57
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  br label %290

91:                                               ; preds = %60
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %13, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %14, align 4
  br label %289

95:                                               ; preds = %63
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %13, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %14, align 4
  br label %288

99:                                               ; preds = %202, %199, %195, %70
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %13, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %14, align 4
  br label %287

103:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = load i32, ptr %21, align 4, !tbaa !19
  %106 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZNK3JPH13CompoundShape11GetSubShapeEj(ptr noundef nonnull align 16 dereferenceable(108) %104, i32 noundef %105)
          to label %107 unwind label %181

107:                                              ; preds = %103
  store ptr %106, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #10
  %108 = getelementptr inbounds %struct.PositionRotation, ptr %23, i32 0, i32 0
  %109 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %110 unwind label %185

110:                                              ; preds = %107
  %111 = getelementptr inbounds %"class.JPH::Vec3", ptr %108, i32 0, i32 0
  %112 = getelementptr inbounds %union.anon, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds { double, double }, ptr %112, i32 0, i32 0
  %114 = extractvalue { double, double } %109, 0
  store double %114, ptr %113, align 16
  %115 = getelementptr inbounds { double, double }, ptr %112, i32 0, i32 1
  %116 = extractvalue { double, double } %109, 1
  store double %116, ptr %115, align 8
  %117 = getelementptr inbounds %struct.PositionRotation, ptr %23, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #10
  %118 = invoke { double, double } @_ZN3JPH4Vec37sRandomISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %119 unwind label %189

119:                                              ; preds = %110
  %120 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %121 = getelementptr inbounds %union.anon, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 0
  %123 = extractvalue { double, double } %118, 0
  store double %123, ptr %122, align 16
  %124 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 1
  %125 = extractvalue { double, double } %118, 1
  store double %125, ptr %124, align 8
  %126 = invoke noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef 1.000000e+01)
          to label %127 unwind label %189

127:                                              ; preds = %119
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.Test::PreUpdateParams", ptr %128, i32 0, i32 0
  %130 = load float, ptr %129, align 16, !tbaa !21
  %131 = fmul float %126, %130
  %132 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %133 = load double, ptr %132, align 16
  %134 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %135 = load double, ptr %134, align 8
  %136 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %133, double %135, float noundef %131)
          to label %137 unwind label %189

137:                                              ; preds = %127
  %138 = getelementptr inbounds %"class.JPH::Quat", ptr %25, i32 0, i32 0
  %139 = getelementptr inbounds %"class.JPH::Vec4", ptr %138, i32 0, i32 0
  %140 = getelementptr inbounds %union.anon.4, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds { double, double }, ptr %140, i32 0, i32 0
  %142 = extractvalue { double, double } %136, 0
  store double %142, ptr %141, align 16
  %143 = getelementptr inbounds { double, double }, ptr %140, i32 0, i32 1
  %144 = extractvalue { double, double } %136, 1
  store double %144, ptr %143, align 8
  %145 = load ptr, ptr %22, align 8, !tbaa !5
  %146 = invoke { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %145)
          to label %147 unwind label %189

147:                                              ; preds = %137
  %148 = getelementptr inbounds %"class.JPH::Quat", ptr %27, i32 0, i32 0
  %149 = getelementptr inbounds %"class.JPH::Vec4", ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds %union.anon.4, ptr %149, i32 0, i32 0
  %151 = getelementptr inbounds { double, double }, ptr %150, i32 0, i32 0
  %152 = extractvalue { double, double } %146, 0
  store double %152, ptr %151, align 16
  %153 = getelementptr inbounds { double, double }, ptr %150, i32 0, i32 1
  %154 = extractvalue { double, double } %146, 1
  store double %154, ptr %153, align 8
  %155 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %156 = load double, ptr %155, align 16
  %157 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %158 = load double, ptr %157, align 8
  %159 = invoke { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %25, double %156, double %158)
          to label %160 unwind label %189

160:                                              ; preds = %147
  %161 = getelementptr inbounds %"class.JPH::Quat", ptr %24, i32 0, i32 0
  %162 = getelementptr inbounds %"class.JPH::Vec4", ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds %union.anon.4, ptr %162, i32 0, i32 0
  %164 = getelementptr inbounds { double, double }, ptr %163, i32 0, i32 0
  %165 = extractvalue { double, double } %159, 0
  store double %165, ptr %164, align 16
  %166 = getelementptr inbounds { double, double }, ptr %163, i32 0, i32 1
  %167 = extractvalue { double, double } %159, 1
  store double %167, ptr %166, align 8
  %168 = invoke { double, double } @_ZNK3JPH4Quat10NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %24)
          to label %169 unwind label %189

169:                                              ; preds = %160
  %170 = getelementptr inbounds %"class.JPH::Quat", ptr %117, i32 0, i32 0
  %171 = getelementptr inbounds %"class.JPH::Vec4", ptr %170, i32 0, i32 0
  %172 = getelementptr inbounds %union.anon.4, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds { double, double }, ptr %172, i32 0, i32 0
  %174 = extractvalue { double, double } %168, 0
  store double %174, ptr %173, align 16
  %175 = getelementptr inbounds { double, double }, ptr %172, i32 0, i32 1
  %176 = extractvalue { double, double } %168, 1
  store double %176, ptr %175, align 8
  invoke void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE9push_backEOS6_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 16 dereferenceable(32) %23)
          to label %177 unwind label %189

177:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %21, align 4, !tbaa !19
  %180 = add i32 %179, 1
  store i32 %180, ptr %21, align 4, !tbaa !19
  br label %74, !llvm.loop !25

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

185:                                              ; preds = %107
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %13, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %14, align 4
  br label %193

189:                                              ; preds = %169, %160, %147, %137, %127, %119, %110
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %13, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #10
  br label %193

193:                                              ; preds = %189, %185
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #10
  br label %194

194:                                              ; preds = %193, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %287

195:                                              ; preds = %78
  %196 = load ptr, ptr %16, align 8, !tbaa !5
  %197 = load i32, ptr %20, align 4, !tbaa !19
  %198 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %199 unwind label %99

199:                                              ; preds = %195
  %200 = getelementptr inbounds %struct.PositionRotation, ptr %198, i32 0, i32 0
  %201 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %202 unwind label %99

202:                                              ; preds = %199
  %203 = getelementptr inbounds %struct.PositionRotation, ptr %201, i32 0, i32 1
  invoke void @_ZN3JPH20MutableCompoundShape12ModifyShapesEjjPKNS_4Vec3EPKNS_4QuatEjj(ptr noundef nonnull align 16 dereferenceable(144) %196, i32 noundef 0, i32 noundef %197, ptr noundef %200, ptr noundef %203, i32 noundef 32, i32 noundef 32)
          to label %204 unwind label %99

204:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 5000, ptr %28) #10
  %205 = getelementptr inbounds %class.MutableCompoundShapeTest, ptr %34, i32 0, i32 3
  %206 = load i32, ptr %205, align 8, !tbaa !27
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %205, align 8, !tbaa !27
  %208 = sext i32 %206 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %28, i64 noundef %208)
          to label %209 unwind label %225

209:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %210 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(5000) %28)
          to label %211 unwind label %229

211:                                              ; preds = %209
  store float %210, ptr %29, align 4, !tbaa !31
  %212 = load float, ptr %29, align 4, !tbaa !31
  %213 = fcmp olt float %212, 0x3F50624DE0000000
  br i1 %213, label %214, label %237

214:                                              ; preds = %211
  %215 = load i32, ptr %20, align 4, !tbaa !19
  %216 = icmp ugt i32 %215, 1
  br i1 %216, label %217, label %237

217:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %218 = load i32, ptr %20, align 4, !tbaa !19
  %219 = sub i32 %218, 1
  invoke void @_ZNSt24uniform_int_distributionIjEC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %30, i32 noundef 0, i32 noundef %219)
          to label %220 unwind label %233

220:                                              ; preds = %217
  %221 = load ptr, ptr %16, align 8, !tbaa !5
  %222 = invoke noundef i32 @_ZNSt24uniform_int_distributionIjEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEjRT_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(5000) %28)
          to label %223 unwind label %233

223:                                              ; preds = %220
  invoke void @_ZN3JPH20MutableCompoundShape11RemoveShapeEj(ptr noundef nonnull align 16 dereferenceable(144) %221, i32 noundef %222)
          to label %224 unwind label %233

224:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %276

225:                                              ; preds = %204
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %13, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %14, align 4
  br label %286

229:                                              ; preds = %278, %276, %264, %254, %246, %243, %209
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %13, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %14, align 4
  br label %285

233:                                              ; preds = %223, %220, %217
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %13, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %285

237:                                              ; preds = %214, %211
  %238 = load float, ptr %29, align 4, !tbaa !31
  %239 = fcmp olt float %238, 0x3F60624DE0000000
  br i1 %239, label %240, label %275

240:                                              ; preds = %237
  %241 = load i32, ptr %20, align 4, !tbaa !19
  %242 = icmp ult i32 %241, 10
  br i1 %242, label %243, label %275

243:                                              ; preds = %240
  %244 = load ptr, ptr %16, align 8, !tbaa !5
  %245 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %246 unwind label %229

246:                                              ; preds = %243
  %247 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %248 = getelementptr inbounds %union.anon, ptr %247, i32 0, i32 0
  %249 = getelementptr inbounds { double, double }, ptr %248, i32 0, i32 0
  %250 = extractvalue { double, double } %245, 0
  store double %250, ptr %249, align 16
  %251 = getelementptr inbounds { double, double }, ptr %248, i32 0, i32 1
  %252 = extractvalue { double, double } %245, 1
  store double %252, ptr %251, align 8
  %253 = invoke { double, double } @_ZN3JPH4Quat7sRandomISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(5000) %28)
          to label %254 unwind label %229

254:                                              ; preds = %246
  %255 = getelementptr inbounds %"class.JPH::Quat", ptr %32, i32 0, i32 0
  %256 = getelementptr inbounds %"class.JPH::Vec4", ptr %255, i32 0, i32 0
  %257 = getelementptr inbounds %union.anon.4, ptr %256, i32 0, i32 0
  %258 = getelementptr inbounds { double, double }, ptr %257, i32 0, i32 0
  %259 = extractvalue { double, double } %253, 0
  store double %259, ptr %258, align 16
  %260 = getelementptr inbounds { double, double }, ptr %257, i32 0, i32 1
  %261 = extractvalue { double, double } %253, 1
  store double %261, ptr %260, align 8
  %262 = getelementptr inbounds %class.MutableCompoundShapeTest, ptr %34, i32 0, i32 2
  %263 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %262)
          to label %264 unwind label %229

264:                                              ; preds = %254
  %265 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %266 = load double, ptr %265, align 16
  %267 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %268 = load double, ptr %267, align 8
  %269 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %270 = load double, ptr %269, align 16
  %271 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %272 = load double, ptr %271, align 8
  %273 = invoke noundef i32 @_ZN3JPH20MutableCompoundShape8AddShapeENS_4Vec3ENS_4QuatEPKNS_5ShapeEjj(ptr noundef nonnull align 16 dereferenceable(144) %244, double %266, double %268, double %270, double %272, ptr noundef %263, i32 noundef 0, i32 noundef -1)
          to label %274 unwind label %229

274:                                              ; preds = %264
  br label %275

275:                                              ; preds = %274, %240, %237
  br label %276

276:                                              ; preds = %275, %224
  %277 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN3JPH20MutableCompoundShape18AdjustCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(144) %277)
          to label %278 unwind label %229

278:                                              ; preds = %276
  %279 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !32
  %280 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %281 = load double, ptr %280, align 16
  %282 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %283 = load double, ptr %282, align 8
  invoke void @_ZNK3JPH13BodyInterface18NotifyShapeChangedERKNS_6BodyIDENS_4Vec3EbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %279, ptr noundef nonnull align 4 dereferenceable(4) %11, double %281, double %283, i1 noundef zeroext true, i32 noundef 0)
          to label %284 unwind label %229

284:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 5000, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %292

285:                                              ; preds = %233, %229
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  br label %286

286:                                              ; preds = %285, %225
  call void @llvm.lifetime.end.p0(i64 5000, ptr %28) #10
  br label %287

287:                                              ; preds = %286, %194, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #10
  br label %288

288:                                              ; preds = %287, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  br label %289

289:                                              ; preds = %288, %91
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #10
  br label %290

290:                                              ; preds = %289, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %291

291:                                              ; preds = %290, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %296

292:                                              ; preds = %284, %54
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %293

293:                                              ; preds = %292
  %294 = load ptr, ptr %8, align 8, !tbaa !5
  %295 = getelementptr inbounds %"class.JPH::BodyID", ptr %294, i32 1
  store ptr %295, ptr %8, align 8, !tbaa !5
  br label %43

296:                                              ; preds = %291, %79
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  br label %298

297:                                              ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  ret void

298:                                              ; preds = %296
  %299 = load ptr, ptr %13, align 8
  %300 = load i32, ptr %14, align 4
  %301 = insertvalue { ptr, i32 } poison, ptr %299, 0
  %302 = insertvalue { ptr, i32 } %301, i32 %300, 1
  resume { ptr, i32 } %302
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 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) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH13BodyLockWriteCI2NS_12BodyLockBaseILb1ENS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #7 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK3JPH13CompoundShape15GetCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(108)) unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(37) ptr @_ZNK3JPH13CompoundShape11GetSubShapeEj(ptr noundef nonnull align 16 dereferenceable(108), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE9push_backEOS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(32)) #7 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef) #8

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37)) #1 align 2

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

declare void @_ZN3JPH20MutableCompoundShape12ModifyShapesEjjPKNS_4Vec3EPKNS_4QuatEjj(ptr noundef nonnull align 16 dereferenceable(144), i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #9

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #4 align 2

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

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

declare void @_ZN3JPH20MutableCompoundShape11RemoveShapeEj(ptr noundef nonnull align 16 dereferenceable(144), i32 noundef) #9

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

declare noundef i32 @_ZN3JPH20MutableCompoundShape8AddShapeENS_4Vec3ENS_4QuatEPKNS_5ShapeEjj(ptr noundef nonnull align 16 dereferenceable(144), double, double, double, double, ptr noundef, i32 noundef, i32 noundef) #9

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

declare void @_ZN3JPH20MutableCompoundShape18AdjustCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(144)) #9

declare void @_ZNK3JPH13BodyInterface18NotifyShapeChangedERKNS_6BodyIDENS_4Vec3EbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), double, double, i1 noundef zeroext, i32 noundef) #9

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { "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 #10 = { 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, !6, i64 16}
!10 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !12, i64 56}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !13, i64 0}
!13 = !{!"_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, !14, i64 8, !15, i64 16, !14, i64 24, !16, i64 32, !6, i64 48}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!16 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !17, i64 0, !14, i64 8}
!17 = !{!"float", !7, i64 0}
!18 = !{i64 0, i64 4, !19}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !17, i64 0}
!22 = !{!"_ZTSN4Test15PreUpdateParamsE", !17, i64 0, !23, i64 16}
!23 = !{!"_ZTS11CameraState", !24, i64 0, !24, i64 16, !24, i64 32, !17, i64 48}
!24 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !20, i64 144}
!28 = !{!"_ZTS24MutableCompoundShapeTest", !10, i64 0, !29, i64 112, !30, i64 136, !20, i64 144}
!29 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !14, i64 0, !14, i64 8, !6, i64 16}
!30 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!31 = !{!17, !17, i64 0}
!32 = !{i64 0, i64 16, !33}
!33 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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::BodyID" = type { i32 }
%"class.JPH::BodyLockWrite" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.JPH::Array.38" = type { i64, i64, ptr }
%struct.PositionRotation = type { %"class.JPH::Vec3", %"class.JPH::Quat" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<unsigned int>::param_type" }
%"struct.std::uniform_int_distribution<unsigned int>::param_type" = type { i32, i32 }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double, double, float noundef) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsE(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr nocapture noundef nonnull readonly align 16 dereferenceable(80) %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::uniform_real_distribution", align 4
  %4 = alloca %"class.JPH::BodyID", align 4
  %5 = alloca %"class.JPH::BodyLockWrite", align 8
  %6 = alloca %"class.std::linear_congruential_engine", align 8
  %7 = alloca %"class.JPH::Array.38", align 8
  %8 = alloca %struct.PositionRotation, align 16
  %9 = alloca %"class.JPH::Quat", align 16
  %10 = alloca %"class.JPH::Quat", align 16
  %11 = alloca %"class.std::mersenne_twister_engine", align 8
  %12 = alloca %"class.std::uniform_int_distribution", align 4
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172) %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %16 = getelementptr inbounds i8, ptr %0, i64 112
  %17 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %.not62 = icmp eq ptr %17, %18
  br i1 %.not62, label %._crit_edge66, label %.lr.ph65

.lr.ph65:                                         ; preds = %2
  %19 = getelementptr inbounds i8, ptr %8, i64 8
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  %21 = getelementptr inbounds i8, ptr %10, i64 8
  %22 = getelementptr inbounds i8, ptr %9, i64 8
  %23 = getelementptr inbounds i8, ptr %8, i64 24
  %24 = getelementptr inbounds i8, ptr %0, i64 144
  %25 = getelementptr inbounds i8, ptr %0, i64 136
  br label %26

._crit_edge66:                                    ; preds = %134, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  ret void

26:                                               ; preds = %.lr.ph65, %134
  %.063 = phi ptr [ %17, %.lr.ph65 ], [ %135, %134 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %27 = load i32, ptr %.063, align 4, !tbaa !17
  store i32 %27, ptr %4, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %28)
  call void @_ZN3JPH13BodyLockWriteCI2NS_12BodyLockBaseILb1ENS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %30 = call noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  br i1 %30, label %31, label %134

31:                                               ; preds = %26
  %32 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %33 unwind label %42

33:                                               ; preds = %31
  %34 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
          to label %35 unwind label %44

35:                                               ; preds = %33
  %36 = call { double, double } @_ZNK3JPH13CompoundShape15GetCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(108) %34)
  %37 = extractvalue { double, double } %36, 0
  %38 = extractvalue { double, double } %36, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  invoke void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %39 unwind label %46

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #9
  call void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %40 = invoke noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108) %34)
          to label %.preheader unwind label %48

.preheader:                                       ; preds = %39
  %.not67 = icmp eq i32 %40, 0
  br i1 %.not67, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %79, %.preheader
  %41 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %88 unwind label %48

42:                                               ; preds = %31
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %133

44:                                               ; preds = %33
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %133

46:                                               ; preds = %35
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %132

48:                                               ; preds = %90, %88, %._crit_edge, %39
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %131

.lr.ph:                                           ; preds = %.preheader, %79
  %.05061 = phi i32 [ %80, %79 ], [ 0, %.preheader ]
  %50 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZNK3JPH13CompoundShape11GetSubShapeEj(ptr noundef nonnull align 16 dereferenceable(108) %34, i32 noundef %.05061)
          to label %51 unwind label %81

51:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #9
  %52 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %53 unwind label %83

53:                                               ; preds = %51
  %54 = extractvalue { double, double } %52, 0
  store double %54, ptr %8, align 16
  %55 = extractvalue { double, double } %52, 1
  store double %55, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #9
  %56 = invoke { double, double } @_ZN3JPH4Vec37sRandomISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %57 unwind label %85

57:                                               ; preds = %53
  %58 = extractvalue { double, double } %56, 0
  %59 = extractvalue { double, double } %56, 1
  %60 = call noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef 1.000000e+01)
  %61 = load float, ptr %1, align 16, !tbaa !19
  %62 = fmul float %60, %61
  %63 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %58, double %59, float noundef %62)
          to label %64 unwind label %85

64:                                               ; preds = %57
  %65 = extractvalue { double, double } %63, 0
  store double %65, ptr %10, align 16
  %66 = extractvalue { double, double } %63, 1
  store double %66, ptr %21, align 8
  %67 = invoke { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %50)
          to label %68 unwind label %85

68:                                               ; preds = %64
  %69 = extractvalue { double, double } %67, 0
  %70 = extractvalue { double, double } %67, 1
  %71 = invoke { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %69, double %70)
          to label %72 unwind label %85

72:                                               ; preds = %68
  %73 = extractvalue { double, double } %71, 0
  store double %73, ptr %9, align 16
  %74 = extractvalue { double, double } %71, 1
  store double %74, ptr %22, align 8
  %75 = invoke { double, double } @_ZNK3JPH4Quat10NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %9)
          to label %76 unwind label %85

76:                                               ; preds = %72
  %77 = extractvalue { double, double } %75, 0
  store double %77, ptr %20, align 16
  %78 = extractvalue { double, double } %75, 1
  store double %78, ptr %23, align 8
  invoke void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE9push_backEOS6_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 16 dereferenceable(32) %8)
          to label %79 unwind label %85

79:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #9
  %80 = add nuw i32 %.05061, 1
  %exitcond.not = icmp eq i32 %80, %40
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

81:                                               ; preds = %.lr.ph
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %131

83:                                               ; preds = %51
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %87

85:                                               ; preds = %76, %72, %68, %64, %57, %53
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  br label %87

87:                                               ; preds = %85, %83
  %.pn54 = phi { ptr, i32 } [ %86, %85 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #9
  br label %131

88:                                               ; preds = %._crit_edge
  %89 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %90 unwind label %48

90:                                               ; preds = %88
  %91 = getelementptr inbounds i8, ptr %89, i64 16
  invoke void @_ZN3JPH20MutableCompoundShape12ModifyShapesEjjPKNS_4Vec3EPKNS_4QuatEjj(ptr noundef nonnull align 16 dereferenceable(144) %34, i32 noundef 0, i32 noundef %40, ptr noundef nonnull %41, ptr noundef nonnull %91, i32 noundef 32, i32 noundef 32)
          to label %92 unwind label %48

92:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %11) #9
  %93 = load i32, ptr %24, align 8, !tbaa !25
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %24, align 8, !tbaa !25
  %95 = sext i32 %93 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %11, i64 noundef %95)
          to label %96 unwind label %107

96:                                               ; preds = %92
  %97 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %98 unwind label %109

98:                                               ; preds = %96
  %99 = fcmp olt float %97, 0x3F50624DE0000000
  %100 = icmp ugt i32 %40, 1
  %or.cond = and i1 %100, %99
  br i1 %or.cond, label %101, label %113

101:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %102 = add i32 %40, -1
  invoke void @_ZNSt24uniform_int_distributionIjEC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %12, i32 noundef 0, i32 noundef %102)
          to label %103 unwind label %111

103:                                              ; preds = %101
  %104 = invoke noundef i32 @_ZNSt24uniform_int_distributionIjEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEjRT_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %105 unwind label %111

105:                                              ; preds = %103
  invoke void @_ZN3JPH20MutableCompoundShape11RemoveShapeEj(ptr noundef nonnull align 16 dereferenceable(144) %34, i32 noundef %104)
          to label %106 unwind label %111

106:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  br label %127

107:                                              ; preds = %92
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %130

109:                                              ; preds = %128, %127, %120, %118, %116, %96
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %130

111:                                              ; preds = %105, %103, %101
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  br label %130

113:                                              ; preds = %98
  %114 = fcmp olt float %97, 0x3F60624DE0000000
  %115 = icmp ult i32 %40, 10
  %or.cond3 = and i1 %115, %114
  br i1 %or.cond3, label %116, label %127

116:                                              ; preds = %113
  %117 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %118 unwind label %109

118:                                              ; preds = %116
  %119 = invoke { double, double } @_ZN3JPH4Quat7sRandomISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEES0_RT_(ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %120 unwind label %109

120:                                              ; preds = %118
  %121 = extractvalue { double, double } %117, 1
  %122 = extractvalue { double, double } %117, 0
  %123 = extractvalue { double, double } %119, 0
  %124 = extractvalue { double, double } %119, 1
  %125 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %126 = invoke noundef i32 @_ZN3JPH20MutableCompoundShape8AddShapeENS_4Vec3ENS_4QuatEPKNS_5ShapeEjj(ptr noundef nonnull align 16 dereferenceable(144) %34, double %122, double %121, double %123, double %124, ptr noundef %125, i32 noundef 0, i32 noundef -1)
          to label %127 unwind label %109

127:                                              ; preds = %113, %120, %106
  invoke void @_ZN3JPH20MutableCompoundShape18AdjustCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(144) %34)
          to label %128 unwind label %109

128:                                              ; preds = %127
  invoke void @_ZNK3JPH13BodyInterface18NotifyShapeChangedERKNS_6BodyIDENS_4Vec3EbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 4 dereferenceable(4) %4, double %37, double %38, i1 noundef zeroext true, i32 noundef 0)
          to label %129 unwind label %109

129:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %11) #9
  call void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %134

130:                                              ; preds = %109, %111, %107
  %.pn.pn = phi { ptr, i32 } [ %108, %107 ], [ %110, %109 ], [ %112, %111 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %11) #9
  br label %131

131:                                              ; preds = %81, %87, %130, %48
  %.pn54.pn.pn = phi { ptr, i32 } [ %.pn.pn, %130 ], [ %49, %48 ], [ %.pn54, %87 ], [ %82, %81 ]
  call void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  br label %132

132:                                              ; preds = %131, %46
  %.pn54.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn, %131 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %133

133:                                              ; preds = %44, %132, %42
  %.pn54.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %43, %42 ], [ %.pn54.pn.pn.pn, %132 ], [ %45, %44 ]
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn54.pn.pn.pn.pn.pn

134:                                              ; preds = %129, %26
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  %135 = getelementptr inbounds i8, ptr %.063, i64 4
  %.not = icmp eq ptr %135, %18
  br i1 %.not, label %._crit_edge66, label %26
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172)) local_unnamed_addr #5 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 #4 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK3JPH13CompoundShape15GetCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(108)) unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(37) ptr @_ZNK3JPH13CompoundShape11GetSubShapeEj(ptr noundef nonnull align 16 dereferenceable(108), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE9push_backEOS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #6 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef) local_unnamed_addr #7

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

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

declare void @_ZN3JPH20MutableCompoundShape12ModifyShapesEjjPKNS_4Vec3EPKNS_4QuatEjj(ptr noundef nonnull align 16 dereferenceable(144), i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #8

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 16 dereferenceable(32) ptr @_ZN3JPH5ArrayIZN24MutableCompoundShapeTest16PrePhysicsUpdateERKN4Test15PreUpdateParamsEE16PositionRotationNS_12STLAllocatorIS6_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #4 align 2

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

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

declare void @_ZN3JPH20MutableCompoundShape11RemoveShapeEj(ptr noundef nonnull align 16 dereferenceable(144), i32 noundef) local_unnamed_addr #8

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

declare noundef i32 @_ZN3JPH20MutableCompoundShape8AddShapeENS_4Vec3ENS_4QuatEPKNS_5ShapeEjj(ptr noundef nonnull align 16 dereferenceable(144), double, double, double, double, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #8

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

declare void @_ZN3JPH20MutableCompoundShape18AdjustCenterOfMassEv(ptr noundef nonnull align 16 dereferenceable(144)) local_unnamed_addr #8

declare void @_ZNK3JPH13BodyInterface18NotifyShapeChangedERKNS_6BodyIDENS_4Vec3EbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), double, double, i1 noundef zeroext, i32 noundef) local_unnamed_addr #8

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 = !{!18, !18, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!20, !16, i64 0}
!20 = !{!"_ZTSN4Test15PreUpdateParamsE", !16, i64 0, !21, i64 16}
!21 = !{!"_ZTS11CameraState", !22, i64 0, !22, i64 16, !22, i64 32, !16, i64 48}
!22 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !18, i64 144}
!26 = !{!"_ZTS24MutableCompoundShapeTest", !6, i64 0, !27, i64 112, !28, i64 136, !18, i64 144}
!27 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !13, i64 0, !13, i64 8, !7, i64 16}
!28 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !7, i64 0}


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