; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/Constraints (ConstraintPriorityTest)

; 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::RefConst" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.7", %"class.JPH::RefConst" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.5 }
%union.anon.5 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.6", i32, i32 }
%"class.JPH::RefConst.6" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.7" = type { ptr }
%"class.JPH::FixedConstraintSettings" = type { %"class.JPH::TwoBodyConstraintSettings", i32, i8, %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::TwoBodyConstraintSettings" = type { %"class.JPH::ConstraintSettings" }
%"class.JPH::ConstraintSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget.10", i8, i32, i32, i32, float, i64 }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget.10" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Ref.28" = type { ptr }
%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.ConstraintPriorityTest = type { %class.Test, %"class.JPH::Array" }
%"class.JPH::Array" = type { i64, i64, ptr }

; 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
define dso_local void @_ZN22ConstraintPriorityTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(136) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca %"class.JPH::RefConst", align 8
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca ptr, align 8
  %13 = alloca %"class.JPH::BodyCreationSettings", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Quat", align 16
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca ptr, align 8
  %20 = alloca %"class.JPH::BodyCreationSettings", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Quat", align 16
  %23 = alloca %"class.JPH::FixedConstraintSettings", align 16
  %24 = alloca %"class.JPH::Ref", align 8
  %25 = alloca %"class.JPH::Ref.28", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %26 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store float 1.000000e+00, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %27 = call noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
  %28 = load float, ptr %3, align 4, !tbaa !9
  %29 = fmul float 5.000000e-01, %28
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef %29, float noundef 0x3FC99999A0000000, float noundef 0x3FC99999A0000000)
          to label %30 unwind label %40

30:                                               ; preds = %1
  %31 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 0
  %32 = load double, ptr %31, align 16
  %33 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 1
  %34 = load double, ptr %33, align 8
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %27, double %32, double %34, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %35 unwind label %40

35:                                               ; preds = %30
  call void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 20, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %215, %35
  %37 = load i32, ptr %9, align 4, !tbaa !11
  %38 = icmp slt i32 %37, 2
  br i1 %38, label %44, label %39

39:                                               ; preds = %36
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %220

40:                                               ; preds = %30, %1
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %6, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %7, align 4
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %27) #9
  br label %221

44:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #9
  %45 = load i32, ptr %9, align 4, !tbaa !11
  %46 = sitofp i32 %45 to float
  %47 = fmul float 0x3FC99999A0000000, %46
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef 0.000000e+00, float noundef 1.000000e+01, float noundef %47)
          to label %48 unwind label %84

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %49 = getelementptr inbounds %class.Test, ptr %26, i32 0, i32 3
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 256, ptr %13) #9
  %51 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %52 unwind label %88

52:                                               ; preds = %48
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !21
  %53 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %54 unwind label %88

54:                                               ; preds = %52
  %55 = getelementptr inbounds %"class.JPH::Quat", ptr %15, i32 0, i32 0
  %56 = getelementptr inbounds %"class.JPH::Vec4", ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %union.anon.5, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %59 = extractvalue { double, double } %53, 0
  store double %59, ptr %58, align 16
  %60 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %61 = extractvalue { double, double } %53, 1
  store double %61, ptr %60, align 8
  %62 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %63 = load double, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %65 = load double, ptr %64, align 8
  %66 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %67 = load double, ptr %66, align 16
  %68 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %69 = load double, ptr %68, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %13, ptr noundef %51, double %63, double %65, double %67, double %69, i8 noundef zeroext 0, i16 noundef zeroext 0)
          to label %70 unwind label %88

70:                                               ; preds = %54
  %71 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 16 dereferenceable(256) %13)
          to label %72 unwind label %92

72:                                               ; preds = %70
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %13) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr %13) #9
  store ptr %71, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.Test, ptr %26, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !13
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %75)
          to label %77 unwind label %97

77:                                               ; preds = %72
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef nonnull align 4 dereferenceable(4) %76, i32 noundef 1)
          to label %78 unwind label %97

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %79, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 1, ptr %17, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %168, %78
  %81 = load i32, ptr %17, align 4, !tbaa !11
  %82 = icmp slt i32 %81, 20
  br i1 %82, label %101, label %83

83:                                               ; preds = %80
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %214

84:                                               ; preds = %44
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %6, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %7, align 4
  br label %219

88:                                               ; preds = %54, %52, %48
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %6, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %7, align 4
  br label %96

92:                                               ; preds = %70
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %6, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %7, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %13) #9
  br label %96

96:                                               ; preds = %92, %88
  call void @llvm.lifetime.end.p0(i64 256, ptr %13) #9
  br label %218

97:                                               ; preds = %77, %72
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %6, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %7, align 4
  br label %218

101:                                              ; preds = %80
  %102 = load float, ptr %3, align 4, !tbaa !9
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %18, float noundef %102, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %103 unwind label %171

103:                                              ; preds = %101
  %104 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %105 = load double, ptr %104, align 16
  %106 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %107 = load double, ptr %106, align 8
  %108 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %105, double %107)
          to label %109 unwind label %171

109:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %110 = getelementptr inbounds %class.Test, ptr %26, i32 0, i32 3
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 256, ptr %20) #9
  %112 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %113 unwind label %175

113:                                              ; preds = %109
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !21
  %114 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %115 unwind label %175

115:                                              ; preds = %113
  %116 = getelementptr inbounds %"class.JPH::Quat", ptr %22, i32 0, i32 0
  %117 = getelementptr inbounds %"class.JPH::Vec4", ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %union.anon.5, ptr %117, i32 0, i32 0
  %119 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 0
  %120 = extractvalue { double, double } %114, 0
  store double %120, ptr %119, align 16
  %121 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 1
  %122 = extractvalue { double, double } %114, 1
  store double %122, ptr %121, align 8
  %123 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %124 = load double, ptr %123, align 16
  %125 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %126 = load double, ptr %125, align 8
  %127 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %128 = load double, ptr %127, align 16
  %129 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %130 = load double, ptr %129, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %20, ptr noundef %112, double %124, double %126, double %128, double %130, i8 noundef zeroext 2, i16 noundef zeroext 0)
          to label %131 unwind label %175

131:                                              ; preds = %115
  %132 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %111, ptr noundef nonnull align 16 dereferenceable(256) %20)
          to label %133 unwind label %179

133:                                              ; preds = %131
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %20) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr %20) #9
  store ptr %132, ptr %19, align 8, !tbaa !5
  %134 = getelementptr inbounds %class.Test, ptr %26, i32 0, i32 3
  %135 = load ptr, ptr %134, align 8, !tbaa !13
  %136 = load ptr, ptr %19, align 8, !tbaa !5
  %137 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %136)
          to label %138 unwind label %184

138:                                              ; preds = %133
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %135, ptr noundef nonnull align 4 dereferenceable(4) %137, i32 noundef 0)
          to label %139 unwind label %184

139:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 144, ptr %23) #9
  invoke void @_ZN3JPH23FixedConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(144) %23)
          to label %140 unwind label %188

140:                                              ; preds = %139
  %141 = getelementptr inbounds %"class.JPH::FixedConstraintSettings", ptr %23, i32 0, i32 2
  store i8 1, ptr %141, align 4, !tbaa !23
  %142 = load i32, ptr %9, align 4, !tbaa !11
  %143 = icmp eq i32 %142, 0
  br i1 %143, label %144, label %146

144:                                              ; preds = %140
  %145 = load i32, ptr %17, align 4, !tbaa !11
  br label %149

146:                                              ; preds = %140
  %147 = load i32, ptr %17, align 4, !tbaa !11
  %148 = sub nsw i32 20, %147
  br label %149

149:                                              ; preds = %146, %144
  %150 = phi i32 [ %145, %144 ], [ %148, %146 ]
  %151 = getelementptr inbounds %"class.JPH::ConstraintSettings", ptr %23, i32 0, i32 3
  store i32 %150, ptr %151, align 16, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = load ptr, ptr %19, align 8, !tbaa !5
  %154 = invoke noundef ptr @_ZNK3JPH23FixedConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(144) %23, ptr noundef nonnull align 16 dereferenceable(122) %152, ptr noundef nonnull align 16 dereferenceable(122) %153)
          to label %155 unwind label %192

155:                                              ; preds = %149
  invoke void @_ZN3JPH3RefINS_10ConstraintEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef %154)
          to label %156 unwind label %192

156:                                              ; preds = %155
  %157 = getelementptr inbounds %class.Test, ptr %26, i32 0, i32 2
  %158 = load ptr, ptr %157, align 8, !tbaa !34
  %159 = invoke noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %160 unwind label %196

160:                                              ; preds = %156
  invoke void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172) %158, ptr noundef %159)
          to label %161 unwind label %196

161:                                              ; preds = %160
  %162 = getelementptr inbounds %class.ConstraintPriorityTest, ptr %26, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %163 = invoke noundef ptr @_ZN3JPH10StaticCastINS_15FixedConstraintENS_10ConstraintETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %164 unwind label %200

164:                                              ; preds = %161
  invoke void @_ZN3JPH3RefINS_15FixedConstraintEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef %163)
          to label %165 unwind label %200

165:                                              ; preds = %164
  invoke void @_ZN3JPH5ArrayINS_3RefINS_15FixedConstraintEEENS_12STLAllocatorIS3_EEE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %162, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %166 unwind label %204

166:                                              ; preds = %165
  call void @_ZN3JPH3RefINS_15FixedConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %167, ptr %16, align 8, !tbaa !5
  call void @_ZN3JPH3RefINS_10ConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %23) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %168

168:                                              ; preds = %166
  %169 = load i32, ptr %17, align 4, !tbaa !11
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %17, align 4, !tbaa !11
  br label %80, !llvm.loop !35

171:                                              ; preds = %103, %101
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %6, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %7, align 4
  br label %213

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

179:                                              ; preds = %131
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %6, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %7, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %20) #9
  br label %183

183:                                              ; preds = %179, %175
  call void @llvm.lifetime.end.p0(i64 256, ptr %20) #9
  br label %212

184:                                              ; preds = %138, %133
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %6, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %7, align 4
  br label %212

188:                                              ; preds = %139
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %6, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %7, align 4
  br label %211

192:                                              ; preds = %155, %149
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %6, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %7, align 4
  br label %210

196:                                              ; preds = %160, %156
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %6, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %7, align 4
  br label %209

200:                                              ; preds = %164, %161
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %6, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %7, align 4
  br label %208

204:                                              ; preds = %165
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %6, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %7, align 4
  call void @_ZN3JPH3RefINS_15FixedConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  br label %208

208:                                              ; preds = %204, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %209

209:                                              ; preds = %208, %196
  call void @_ZN3JPH3RefINS_10ConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  br label %210

210:                                              ; preds = %209, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %23) #9
  br label %211

211:                                              ; preds = %210, %188
  call void @llvm.lifetime.end.p0(i64 144, ptr %23) #9
  br label %212

212:                                              ; preds = %211, %184, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %213

213:                                              ; preds = %212, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %218

214:                                              ; preds = %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #9
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %9, align 4, !tbaa !11
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %9, align 4, !tbaa !11
  br label %36, !llvm.loop !37

218:                                              ; preds = %213, %97, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %219

219:                                              ; preds = %218, %84
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  br label %221

220:                                              ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  ret void

221:                                              ; preds = %219, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %222

222:                                              ; preds = %221
  %223 = load ptr, ptr %6, align 8
  %224 = load i32, ptr %7, align 4
  %225 = insertvalue { ptr, i32 } poison, ptr %223, 0
  %226 = insertvalue { ptr, i32 } %225, i32 %224, 1
  resume { ptr, i32 } %226
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) #2 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef, ptr noundef) unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8BoxShapedlEPv(ptr noundef) #4 align 2

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

declare noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256)) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #7 align 2

declare void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #6

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #3 align 2

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

declare noundef ptr @_ZNK3JPH23FixedConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122)) unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172), ptr noundef) #1 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 24}
!14 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !16, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !17, i64 0}
!17 = !{!"_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, !18, i64 8, !19, i64 16, !18, i64 24, !20, i64 32, !6, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!20 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !10, i64 0, !18, i64 8}
!21 = !{i64 0, i64 16, !22}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !15, i64 44}
!24 = !{!"_ZTSN3JPH23FixedConstraintSettingsE", !25, i64 0, !31, i64 40, !15, i64 44, !32, i64 48, !32, i64 64, !32, i64 80, !32, i64 96, !32, i64 112, !32, i64 128}
!25 = !{!"_ZTSN3JPH25TwoBodyConstraintSettingsE", !26, i64 0}
!26 = !{!"_ZTSN3JPH18ConstraintSettingsE", !27, i64 0, !28, i64 8, !15, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !10, i64 28, !18, i64 32}
!27 = !{!"_ZTSN3JPH18SerializableObjectE"}
!28 = !{!"_ZTSN3JPH9RefTargetINS_18ConstraintSettingsEEE", !29, i64 0}
!29 = !{!"_ZTSSt6atomicIjE", !30, i64 0}
!30 = !{!"_ZTSSt13__atomic_baseIjE", !12, i64 0}
!31 = !{!"_ZTSN3JPH16EConstraintSpaceE", !7, i64 0}
!32 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!33 = !{!26, !12, i64 16}
!34 = !{!14, !6, i64 16}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}


; 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::RefConst" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.7", %"class.JPH::RefConst" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.5 }
%union.anon.5 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.6", i32, i32 }
%"class.JPH::RefConst.6" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.7" = type { ptr }
%"class.JPH::FixedConstraintSettings" = type { %"class.JPH::TwoBodyConstraintSettings", i32, i8, %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::TwoBodyConstraintSettings" = type { %"class.JPH::ConstraintSettings" }
%"class.JPH::ConstraintSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget.10", i8, i32, i32, i32, float, i64 }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget.10" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Ref.28" = type { ptr }

; 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
define dso_local void @_ZN22ConstraintPriorityTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(136) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::RefConst", align 8
  %3 = alloca %"class.JPH::Vec3", align 16
  %4 = alloca %"class.JPH::Vec3", align 16
  %5 = alloca %"class.JPH::BodyCreationSettings", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::BodyCreationSettings", align 16
  %8 = alloca %"class.JPH::FixedConstraintSettings", align 16
  %9 = alloca %"class.JPH::Ref", align 8
  %10 = alloca %"class.JPH::Ref.28", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %11 = tail call noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %3, float noundef 5.000000e-01, float noundef 0x3FC99999A0000000, float noundef 0x3FC99999A0000000)
          to label %12 unwind label %23

12:                                               ; preds = %1
  %13 = load double, ptr %3, align 16
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %15 = load double, ptr %14, align 8
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %11, double %13, double %15, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %16 unwind label %23

16:                                               ; preds = %12
  call void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %11)
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %.sroa.212.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %18 = getelementptr inbounds i8, ptr %6, i64 8
  %19 = getelementptr inbounds i8, ptr %8, i64 44
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  %22 = getelementptr inbounds i8, ptr %0, i64 112
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %4, float noundef 0.000000e+00, float noundef 1.000000e+01, float noundef 0.000000e+00)
          to label %25 unwind label %81

23:                                               ; preds = %12, %1
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %11) #8
  br label %127

25:                                               ; preds = %16
  %26 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #8
  %27 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.sroa.011.0.copyload = load double, ptr %4, align 16
  %.sroa.212.0.copyload = load double, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !17
  %28 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %29 unwind label %83

29:                                               ; preds = %25
  %30 = extractvalue { double, double } %28, 0
  %31 = extractvalue { double, double } %28, 1
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %5, ptr noundef %27, double %.sroa.011.0.copyload, double %.sroa.212.0.copyload, double %30, double %31, i8 noundef zeroext 0, i16 noundef zeroext 0)
          to label %32 unwind label %83

32:                                               ; preds = %29
  %33 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 16 dereferenceable(256) %5)
          to label %34 unwind label %85

34:                                               ; preds = %32
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %5) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #8
  %35 = load ptr, ptr %17, align 8, !tbaa !5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %33)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 4 dereferenceable(4) %36, i32 noundef 1)
          to label %.preheader unwind label %88

37:                                               ; preds = %117
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %4, float noundef 0.000000e+00, float noundef 1.000000e+01, float noundef 0x3FC99999A0000000)
          to label %38 unwind label %81

38:                                               ; preds = %37
  %39 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #8
  %40 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.sroa.011.0.copyload.1 = load double, ptr %4, align 16
  %.sroa.212.0.copyload.1 = load double, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !17
  %41 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %42 unwind label %83

42:                                               ; preds = %38
  %43 = extractvalue { double, double } %41, 0
  %44 = extractvalue { double, double } %41, 1
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %5, ptr noundef %40, double %.sroa.011.0.copyload.1, double %.sroa.212.0.copyload.1, double %43, double %44, i8 noundef zeroext 0, i16 noundef zeroext 0)
          to label %45 unwind label %83

45:                                               ; preds = %42
  %46 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 16 dereferenceable(256) %5)
          to label %47 unwind label %85

47:                                               ; preds = %45
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %5) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #8
  %48 = load ptr, ptr %17, align 8, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %46)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 4 dereferenceable(4) %49, i32 noundef 1)
          to label %.preheader.1 unwind label %88

.preheader.1:                                     ; preds = %47, %78
  %.03652.1 = phi ptr [ %62, %78 ], [ %46, %47 ]
  %.03751.1 = phi i32 [ %79, %78 ], [ 1, %47 ]
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %50 unwind label %.loopexit.split-lp

50:                                               ; preds = %.preheader.1
  %51 = load double, ptr %6, align 16
  %52 = load double, ptr %18, align 8
  %53 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %4, double %51, double %52)
          to label %54 unwind label %.loopexit.split-lp

54:                                               ; preds = %50
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %7) #8
  %56 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.sroa.01.0.copyload.1 = load double, ptr %4, align 16
  %.sroa.22.0.copyload.1 = load double, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !17
  %57 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %58 unwind label %.loopexit.split-lp55

58:                                               ; preds = %54
  %59 = extractvalue { double, double } %57, 0
  %60 = extractvalue { double, double } %57, 1
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %7, ptr noundef %56, double %.sroa.01.0.copyload.1, double %.sroa.22.0.copyload.1, double %59, double %60, i8 noundef zeroext 2, i16 noundef zeroext 0)
          to label %61 unwind label %.loopexit.split-lp55

61:                                               ; preds = %58
  %62 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 16 dereferenceable(256) %7)
          to label %63 unwind label %.loopexit.split-lp60

63:                                               ; preds = %61
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %7) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #8
  %64 = load ptr, ptr %17, align 8, !tbaa !5
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %62)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 4 dereferenceable(4) %65, i32 noundef 0)
          to label %66 unwind label %.loopexit.split-lp65

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %8) #8
  invoke void @_ZN3JPH23FixedConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(144) %8)
          to label %67 unwind label %.loopexit.split-lp70

67:                                               ; preds = %66
  store i8 1, ptr %19, align 4, !tbaa !18
  %68 = sub nuw nsw i32 20, %.03751.1
  store i32 %68, ptr %20, align 16, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %69 = invoke noundef ptr @_ZNK3JPH23FixedConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(144) %8, ptr noundef nonnull align 16 dereferenceable(122) %.03652.1, ptr noundef nonnull align 16 dereferenceable(122) %62)
          to label %70 unwind label %.loopexit.split-lp75

70:                                               ; preds = %67
  invoke void @_ZN3JPH3RefINS_10ConstraintEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %69)
          to label %71 unwind label %.loopexit.split-lp75

71:                                               ; preds = %70
  %72 = load ptr, ptr %21, align 8, !tbaa !30
  %73 = call noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
  invoke void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172) %72, ptr noundef %73)
          to label %74 unwind label %.loopexit.split-lp80

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %75 = invoke noundef ptr @_ZN3JPH10StaticCastINS_15FixedConstraintENS_10ConstraintETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %76 unwind label %.loopexit.split-lp85

76:                                               ; preds = %74
  invoke void @_ZN3JPH3RefINS_15FixedConstraintEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %75)
          to label %77 unwind label %.loopexit.split-lp85

77:                                               ; preds = %76
  invoke void @_ZN3JPH5ArrayINS_3RefINS_15FixedConstraintEEENS_12STLAllocatorIS3_EEE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %78 unwind label %.loopexit.split-lp90

78:                                               ; preds = %77
  call void @_ZN3JPH3RefINS_15FixedConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN3JPH3RefINS_10ConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %8) #8
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %8) #8
  %79 = add nuw nsw i32 %.03751.1, 1
  %exitcond.1.not = icmp eq i32 %79, 20
  br i1 %exitcond.1.not, label %80, label %.preheader.1, !llvm.loop !31

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret void

81:                                               ; preds = %37, %16
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %126

83:                                               ; preds = %42, %38, %29, %25
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %87

85:                                               ; preds = %45, %32
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %5) #8
  br label %87

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

88:                                               ; preds = %47, %34
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %126

.preheader:                                       ; preds = %34, %117
  %.03652 = phi ptr [ %102, %117 ], [ %33, %34 ]
  %.03751 = phi i32 [ %118, %117 ], [ 1, %34 ]
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %90 unwind label %.loopexit

90:                                               ; preds = %.preheader
  %91 = load double, ptr %6, align 16
  %92 = load double, ptr %18, align 8
  %93 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %4, double %91, double %92)
          to label %94 unwind label %.loopexit

94:                                               ; preds = %90
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %7) #8
  %96 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.sroa.01.0.copyload = load double, ptr %4, align 16
  %.sroa.22.0.copyload = load double, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !17
  %97 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %98 unwind label %.loopexit54

98:                                               ; preds = %94
  %99 = extractvalue { double, double } %97, 0
  %100 = extractvalue { double, double } %97, 1
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %7, ptr noundef %96, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, double %99, double %100, i8 noundef zeroext 2, i16 noundef zeroext 0)
          to label %101 unwind label %.loopexit54

101:                                              ; preds = %98
  %102 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 16 dereferenceable(256) %7)
          to label %103 unwind label %.loopexit59

103:                                              ; preds = %101
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %7) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #8
  %104 = load ptr, ptr %17, align 8, !tbaa !5
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %102)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef nonnull align 4 dereferenceable(4) %105, i32 noundef 0)
          to label %106 unwind label %.loopexit64

106:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %8) #8
  invoke void @_ZN3JPH23FixedConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(144) %8)
          to label %107 unwind label %.loopexit69

107:                                              ; preds = %106
  store i8 1, ptr %19, align 4, !tbaa !18
  store i32 %.03751, ptr %20, align 16, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %108 = invoke noundef ptr @_ZNK3JPH23FixedConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(144) %8, ptr noundef nonnull align 16 dereferenceable(122) %.03652, ptr noundef nonnull align 16 dereferenceable(122) %102)
          to label %109 unwind label %.loopexit74

109:                                              ; preds = %107
  invoke void @_ZN3JPH3RefINS_10ConstraintEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %108)
          to label %110 unwind label %.loopexit74

110:                                              ; preds = %109
  %111 = load ptr, ptr %21, align 8, !tbaa !30
  %112 = call noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
  invoke void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172) %111, ptr noundef %112)
          to label %113 unwind label %.loopexit79

113:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %114 = invoke noundef ptr @_ZN3JPH10StaticCastINS_15FixedConstraintENS_10ConstraintETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %115 unwind label %.loopexit84

115:                                              ; preds = %113
  invoke void @_ZN3JPH3RefINS_15FixedConstraintEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %114)
          to label %116 unwind label %.loopexit84

116:                                              ; preds = %115
  invoke void @_ZN3JPH5ArrayINS_3RefINS_15FixedConstraintEEENS_12STLAllocatorIS3_EEE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %117 unwind label %.loopexit89

117:                                              ; preds = %116
  call void @_ZN3JPH3RefINS_15FixedConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN3JPH3RefINS_10ConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %8) #8
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %8) #8
  %118 = add nuw nsw i32 %.03751, 1
  %exitcond.not = icmp eq i32 %118, 20
  br i1 %exitcond.not, label %37, label %.preheader, !llvm.loop !31

.loopexit:                                        ; preds = %.preheader, %90
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %126

.loopexit.split-lp:                               ; preds = %.preheader.1, %50
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %126

.loopexit54:                                      ; preds = %94, %98
  %lpad.loopexit56 = landingpad { ptr, i32 }
          cleanup
  br label %120

.loopexit.split-lp55:                             ; preds = %54, %58
  %lpad.loopexit.split-lp57 = landingpad { ptr, i32 }
          cleanup
  br label %120

.loopexit59:                                      ; preds = %101
  %lpad.loopexit61 = landingpad { ptr, i32 }
          cleanup
  br label %119

.loopexit.split-lp60:                             ; preds = %61
  %lpad.loopexit.split-lp62 = landingpad { ptr, i32 }
          cleanup
  br label %119

119:                                              ; preds = %.loopexit.split-lp60, %.loopexit59
  %lpad.phi63 = phi { ptr, i32 } [ %lpad.loopexit61, %.loopexit59 ], [ %lpad.loopexit.split-lp62, %.loopexit.split-lp60 ]
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %7) #8
  br label %120

120:                                              ; preds = %.loopexit54, %.loopexit.split-lp55, %119
  %.pn39 = phi { ptr, i32 } [ %lpad.phi63, %119 ], [ %lpad.loopexit56, %.loopexit54 ], [ %lpad.loopexit.split-lp57, %.loopexit.split-lp55 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #8
  br label %126

.loopexit64:                                      ; preds = %103
  %lpad.loopexit66 = landingpad { ptr, i32 }
          cleanup
  br label %126

.loopexit.split-lp65:                             ; preds = %63
  %lpad.loopexit.split-lp67 = landingpad { ptr, i32 }
          cleanup
  br label %126

.loopexit69:                                      ; preds = %106
  %lpad.loopexit71 = landingpad { ptr, i32 }
          cleanup
  br label %125

.loopexit.split-lp70:                             ; preds = %66
  %lpad.loopexit.split-lp72 = landingpad { ptr, i32 }
          cleanup
  br label %125

.loopexit74:                                      ; preds = %107, %109
  %lpad.loopexit76 = landingpad { ptr, i32 }
          cleanup
  br label %124

.loopexit.split-lp75:                             ; preds = %67, %70
  %lpad.loopexit.split-lp77 = landingpad { ptr, i32 }
          cleanup
  br label %124

.loopexit79:                                      ; preds = %110
  %lpad.loopexit81 = landingpad { ptr, i32 }
          cleanup
  br label %123

.loopexit.split-lp80:                             ; preds = %71
  %lpad.loopexit.split-lp82 = landingpad { ptr, i32 }
          cleanup
  br label %123

.loopexit84:                                      ; preds = %113, %115
  %lpad.loopexit86 = landingpad { ptr, i32 }
          cleanup
  br label %122

.loopexit.split-lp85:                             ; preds = %74, %76
  %lpad.loopexit.split-lp87 = landingpad { ptr, i32 }
          cleanup
  br label %122

.loopexit89:                                      ; preds = %116
  %lpad.loopexit91 = landingpad { ptr, i32 }
          cleanup
  br label %121

.loopexit.split-lp90:                             ; preds = %77
  %lpad.loopexit.split-lp92 = landingpad { ptr, i32 }
          cleanup
  br label %121

121:                                              ; preds = %.loopexit.split-lp90, %.loopexit89
  %lpad.phi93 = phi { ptr, i32 } [ %lpad.loopexit91, %.loopexit89 ], [ %lpad.loopexit.split-lp92, %.loopexit.split-lp90 ]
  call void @_ZN3JPH3RefINS_15FixedConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br label %122

122:                                              ; preds = %.loopexit84, %.loopexit.split-lp85, %121
  %.pn41 = phi { ptr, i32 } [ %lpad.phi93, %121 ], [ %lpad.loopexit86, %.loopexit84 ], [ %lpad.loopexit.split-lp87, %.loopexit.split-lp85 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %123

123:                                              ; preds = %.loopexit79, %.loopexit.split-lp80, %122
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %122 ], [ %lpad.loopexit81, %.loopexit79 ], [ %lpad.loopexit.split-lp82, %.loopexit.split-lp80 ]
  call void @_ZN3JPH3RefINS_10ConstraintEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br label %124

124:                                              ; preds = %.loopexit74, %.loopexit.split-lp75, %123
  %.pn41.pn.pn = phi { ptr, i32 } [ %.pn41.pn, %123 ], [ %lpad.loopexit76, %.loopexit74 ], [ %lpad.loopexit.split-lp77, %.loopexit.split-lp75 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %8) #8
  br label %125

125:                                              ; preds = %.loopexit69, %.loopexit.split-lp70, %124
  %.pn41.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn, %124 ], [ %lpad.loopexit71, %.loopexit69 ], [ %lpad.loopexit.split-lp72, %.loopexit.split-lp70 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %8) #8
  br label %126

126:                                              ; preds = %.loopexit64, %.loopexit.split-lp65, %.loopexit, %.loopexit.split-lp, %87, %88, %120, %125, %81
  %.pn41.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %82, %81 ], [ %89, %88 ], [ %.pn, %87 ], [ %.pn41.pn.pn.pn, %125 ], [ %.pn39, %120 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit66, %.loopexit64 ], [ %lpad.loopexit.split-lp67, %.loopexit.split-lp65 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  br label %127

127:                                              ; preds = %126, %23
  %.pn41.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn.pn.pn.pn.pn.pn, %126 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn41.pn.pn.pn.pn.pn.pn.pn.pn
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) local_unnamed_addr #2 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef, ptr noundef) unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8BoxShapedlEPv(ptr noundef) local_unnamed_addr #4 align 2

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

declare noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #7 align 2

declare void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #6

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #3 align 2

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

declare noundef ptr @_ZNK3JPH23FixedConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122)) unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172), ptr noundef) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 24}
!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 = !{!19, !10, i64 44}
!19 = !{!"_ZTSN3JPH23FixedConstraintSettingsE", !20, i64 0, !27, i64 40, !10, i64 44, !28, i64 48, !28, i64 64, !28, i64 80, !28, i64 96, !28, i64 112, !28, i64 128}
!20 = !{!"_ZTSN3JPH25TwoBodyConstraintSettingsE", !21, i64 0}
!21 = !{!"_ZTSN3JPH18ConstraintSettingsE", !22, i64 0, !23, i64 8, !10, i64 12, !26, i64 16, !26, i64 20, !26, i64 24, !16, i64 28, !13, i64 32}
!22 = !{!"_ZTSN3JPH18SerializableObjectE"}
!23 = !{!"_ZTSN3JPH9RefTargetINS_18ConstraintSettingsEEE", !24, i64 0}
!24 = !{!"_ZTSSt6atomicIjE", !25, i64 0}
!25 = !{!"_ZTSSt13__atomic_baseIjE", !26, i64 0}
!26 = !{!"int", !8, i64 0}
!27 = !{!"_ZTSN3JPH16EConstraintSpaceE", !8, i64 0}
!28 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!29 = !{!21, !26, i64 16}
!30 = !{!6, !7, i64 16}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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