; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/General/DynamicMeshTest.ll (ZN15DynamicMeshTest10InitializeEv)

; 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::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.6", %"class.JPH::RefConst" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.5", i32, i32 }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.6" = type { ptr }
%"class.JPH::BodyID" = type { 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 }

; 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 @_ZN15DynamicMeshTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca %"class.JPH::RefConst", align 8
  %6 = alloca %"class.JPH::BodyCreationSettings", align 16
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Quat", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::BodyID", align 4
  %14 = alloca %"class.JPH::RefConst", align 8
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca ptr, align 8
  %21 = alloca %"class.JPH::BodyCreationSettings", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Quat", align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  %24 = load ptr, ptr %2, align 8
  %25 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %24, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #10
  store float 3.000000e+00, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #10
  store float 1.000000e+00, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  call void @_ZN12ShapeCreator15CreateTorusMeshEffjj(ptr dead_on_unwind writable sret(%"class.JPH::RefConst") align 8 %5, float noundef 3.000000e+00, float noundef 1.000000e+00, i32 noundef 16, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 256, ptr %6) #10
  %26 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %27 unwind label %92

27:                                               ; preds = %1
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef 0.000000e+00, float noundef 1.000000e+01, float noundef 0.000000e+00)
          to label %28 unwind label %92

28:                                               ; preds = %27
  %29 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %30 unwind label %92

30:                                               ; preds = %28
  %31 = getelementptr inbounds %"class.JPH::Quat", ptr %10, i32 0, i32 0
  %32 = getelementptr inbounds %"class.JPH::Vec4", ptr %31, i32 0, i32 0
  %33 = getelementptr inbounds %union.anon.4, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %35 = extractvalue { double, double } %29, 0
  store double %35, ptr %34, align 16
  %36 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %37 = extractvalue { double, double } %29, 1
  store double %37, ptr %36, align 8
  %38 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %39 = load double, ptr %38, align 16
  %40 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %41 = load double, ptr %40, align 8
  %42 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %43 = load double, ptr %42, align 16
  %44 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %45 = load double, ptr %44, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %6, ptr noundef %26, double %39, double %41, double %43, double %45, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %46 unwind label %92

46:                                               ; preds = %30
  %47 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %6, i32 0, i32 26
  store i8 2, ptr %47, align 16, !tbaa !11
  %48 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %6, i32 0, i32 28
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef 3.000000e+00, float noundef 1.000000e+00, float noundef 3.000000e+00)
          to label %49 unwind label %96

49:                                               ; preds = %46
  %50 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %51 = load double, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %53 = load double, ptr %52, align 8
  %54 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef 2.000000e+00, double %51, double %53)
          to label %55 unwind label %96

55:                                               ; preds = %49
  %56 = getelementptr inbounds %"class.JPH::Vec3", ptr %11, i32 0, i32 0
  %57 = getelementptr inbounds %union.anon, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %59 = extractvalue { double, double } %54, 0
  store double %59, ptr %58, align 16
  %60 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %61 = extractvalue { double, double } %54, 1
  store double %61, ptr %60, align 8
  %62 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %63 = load double, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %65 = load double, ptr %64, align 8
  invoke void @_ZN3JPH14MassProperties27SetMassAndInertiaOfSolidBoxENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(80) %48, double %63, double %65, float noundef 1.000000e+03)
          to label %66 unwind label %96

66:                                               ; preds = %55
  %67 = getelementptr inbounds %class.Test, ptr %24, i32 0, i32 3
  %68 = load ptr, ptr %67, align 8, !tbaa !30
  %69 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 16 dereferenceable(256) %6, i32 noundef 0)
          to label %70 unwind label %96

70:                                               ; preds = %66
  %71 = getelementptr inbounds %"class.JPH::BodyID", ptr %13, i32 0, i32 0
  store i32 %69, ptr %71, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %72 = invoke noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
          to label %73 unwind label %100

73:                                               ; preds = %70
  %74 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 5.000000e-01)
          to label %75 unwind label %104

75:                                               ; preds = %73
  %76 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %77 = getelementptr inbounds %union.anon, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 0
  %79 = extractvalue { double, double } %74, 0
  store double %79, ptr %78, align 16
  %80 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 1
  %81 = extractvalue { double, double } %74, 1
  store double %81, ptr %80, align 8
  %82 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %83 = load double, ptr %82, align 16
  %84 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %85 = load double, ptr %84, align 8
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %72, double %83, double %85, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %86 unwind label %104

86:                                               ; preds = %75
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %72)
          to label %87 unwind label %100

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  store i32 0, ptr %16, align 4, !tbaa !36
  br label %88

88:                                               ; preds = %186, %87
  %89 = load i32, ptr %16, align 4, !tbaa !36
  %90 = icmp slt i32 %89, 7
  br i1 %90, label %108, label %91

91:                                               ; preds = %88
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  br label %189

92:                                               ; preds = %30, %28, %27, %1
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  br label %192

96:                                               ; preds = %66, %55, %49, %46
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %7, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %8, align 4
  br label %191

100:                                              ; preds = %86, %70
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %7, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %8, align 4
  br label %190

104:                                              ; preds = %75, %73
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %7, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %8, align 4
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %72) #10
  br label %190

108:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  %109 = load i32, ptr %16, align 4, !tbaa !36
  %110 = sdiv i32 %109, 2
  store i32 %110, ptr %18, align 4, !tbaa !36
  br label %111

111:                                              ; preds = %163, %108
  %112 = load i32, ptr %18, align 4, !tbaa !36
  %113 = load i32, ptr %16, align 4, !tbaa !36
  %114 = add nsw i32 %113, 1
  %115 = sdiv i32 %114, 2
  %116 = sub nsw i32 7, %115
  %117 = icmp slt i32 %112, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %111
  store i32 5, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  br label %185

119:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #10
  %120 = load i32, ptr %18, align 4, !tbaa !36
  %121 = sitofp i32 %120 to float
  %122 = call float @llvm.fmuladd.f32(float %121, float 1.000000e+00, float -3.500000e+00)
  %123 = load i32, ptr %16, align 4, !tbaa !36
  %124 = and i32 %123, 1
  %125 = icmp ne i32 %124, 0
  %126 = zext i1 %125 to i64
  %127 = select i1 %125, float 5.000000e-01, float 0.000000e+00
  %128 = fadd float %122, %127
  %129 = load i32, ptr %16, align 4, !tbaa !36
  %130 = sitofp i32 %129 to float
  %131 = call float @llvm.fmuladd.f32(float %130, float 1.000000e+00, float 5.000000e-01)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef %128, float noundef %131, float noundef 0.000000e+00)
          to label %132 unwind label %166

132:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %133 = getelementptr inbounds %class.Test, ptr %24, i32 0, i32 3
  %134 = load ptr, ptr %133, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 256, ptr %21) #10
  %135 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %136 unwind label %170

136:                                              ; preds = %132
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !37
  %137 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %138 unwind label %170

138:                                              ; preds = %136
  %139 = getelementptr inbounds %"class.JPH::Quat", ptr %23, i32 0, i32 0
  %140 = getelementptr inbounds %"class.JPH::Vec4", ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %union.anon.4, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds { double, double }, ptr %141, i32 0, i32 0
  %143 = extractvalue { double, double } %137, 0
  store double %143, ptr %142, align 16
  %144 = getelementptr inbounds { double, double }, ptr %141, i32 0, i32 1
  %145 = extractvalue { double, double } %137, 1
  store double %145, ptr %144, align 8
  %146 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %147 = load double, ptr %146, align 16
  %148 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %149 = load double, ptr %148, align 8
  %150 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %151 = load double, ptr %150, align 16
  %152 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %153 = load double, ptr %152, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %21, ptr noundef %135, double %147, double %149, double %151, double %153, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %154 unwind label %170

154:                                              ; preds = %138
  %155 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 16 dereferenceable(256) %21)
          to label %156 unwind label %174

156:                                              ; preds = %154
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %21) #10
  call void @llvm.lifetime.end.p0(i64 256, ptr %21) #10
  store ptr %155, ptr %20, align 8, !tbaa !5
  %157 = getelementptr inbounds %class.Test, ptr %24, i32 0, i32 3
  %158 = load ptr, ptr %157, align 8, !tbaa !30
  %159 = load ptr, ptr %20, align 8, !tbaa !5
  %160 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %159)
          to label %161 unwind label %179

161:                                              ; preds = %156
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %158, ptr noundef nonnull align 4 dereferenceable(4) %160, i32 noundef 0)
          to label %162 unwind label %179

162:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #10
  br label %163

163:                                              ; preds = %162
  %164 = load i32, ptr %18, align 4, !tbaa !36
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %18, align 4, !tbaa !36
  br label %111, !llvm.loop !39

166:                                              ; preds = %119
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %7, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %8, align 4
  br label %184

170:                                              ; preds = %138, %136, %132
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %7, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %8, align 4
  br label %178

174:                                              ; preds = %154
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %7, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %8, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %21) #10
  br label %178

178:                                              ; preds = %174, %170
  call void @llvm.lifetime.end.p0(i64 256, ptr %21) #10
  br label %183

179:                                              ; preds = %161, %156
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %7, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %8, align 4
  br label %183

183:                                              ; preds = %179, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %184

184:                                              ; preds = %183, %166
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #10
  br label %190

185:                                              ; preds = %118
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %16, align 4, !tbaa !36
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %16, align 4, !tbaa !36
  br label %88, !llvm.loop !41

189:                                              ; preds = %91
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %6) #10
  call void @llvm.lifetime.end.p0(i64 256, ptr %6) #10
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  ret void

190:                                              ; preds = %184, %104, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %191

191:                                              ; preds = %190, %96
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %6) #10
  br label %192

192:                                              ; preds = %191, %92
  call void @llvm.lifetime.end.p0(i64 256, ptr %6) #10
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr %7, align 8
  %195 = load i32, ptr %8, align 4
  %196 = insertvalue { ptr, i32 } poison, ptr %194, 0
  %197 = insertvalue { ptr, i32 } %196, i32 %195, 1
  resume { ptr, i32 } %197
}

declare noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112), float noundef) #2

declare void @_ZN12ShapeCreator15CreateTorusMeshEffjj(ptr dead_on_unwind writable sret(%"class.JPH::RefConst") align 8, float noundef, float noundef, i32 noundef, i32 noundef) #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: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() #5 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

declare void @_ZN3JPH14MassProperties27SetMassAndInertiaOfSolidBoxENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef) #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) #4

declare i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256), i32 noundef) #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef) #4 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) #6 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #8

declare noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256)) #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) #9

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="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 #5 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !25, i64 144}
!12 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !13, i64 0, !14, i64 16, !13, i64 32, !13, i64 48, !16, i64 64, !17, i64 72, !18, i64 80, !21, i64 96, !22, i64 97, !23, i64 98, !23, i64 99, !23, i64 100, !23, i64 101, !23, i64 102, !24, i64 103, !23, i64 104, !23, i64 105, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !20, i64 136, !20, i64 140, !25, i64 144, !10, i64 148, !26, i64 160, !28, i64 240, !29, i64 248}
!13 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!14 = !{!"_ZTSN3JPH4QuatE", !15, i64 0}
!15 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_ZTSN3JPH14CollisionGroupE", !19, i64 0, !20, i64 8, !20, i64 12}
!19 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !6, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!22 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!25 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!26 = !{!"_ZTSN3JPH14MassPropertiesE", !10, i64 0, !27, i64 16}
!27 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!28 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !6, i64 0}
!29 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!30 = !{!31, !6, i64 24}
!31 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !23, i64 48, !32, i64 56}
!32 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !33, i64 0}
!33 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !16, i64 8, !34, i64 16, !16, i64 24, !35, i64 32, !6, i64 48}
!34 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!35 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !10, i64 0, !16, i64 8}
!36 = !{!20, !20, i64 0}
!37 = !{i64 0, i64 16, !38}
!38 = !{!7, !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}


; 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::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.6", %"class.JPH::RefConst" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.5", i32, i32 }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.6" = 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 @_ZN15DynamicMeshTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::RefConst", align 8
  %3 = alloca %"class.JPH::BodyCreationSettings", align 16
  %4 = alloca %"class.JPH::Vec3", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::RefConst", align 8
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::BodyCreationSettings", align 16
  %9 = tail call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %0, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @_ZN12ShapeCreator15CreateTorusMeshEffjj(ptr dead_on_unwind nonnull writable sret(%"class.JPH::RefConst") align 8 %2, float noundef 3.000000e+00, float noundef 1.000000e+00, i32 noundef 16, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #8
  %10 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  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 %11 unwind label %43

11:                                               ; preds = %1
  %12 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %13 unwind label %43

13:                                               ; preds = %11
  %14 = extractvalue { double, double } %12, 0
  %15 = extractvalue { double, double } %12, 1
  %16 = load double, ptr %4, align 16
  %17 = getelementptr inbounds i8, ptr %4, i64 8
  %18 = load double, ptr %17, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %3, ptr noundef %10, double %16, double %18, double %14, double %15, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %19 unwind label %43

19:                                               ; preds = %13
  %20 = getelementptr inbounds i8, ptr %3, i64 144
  store i8 2, ptr %20, align 16, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %3, i64 160
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef 3.000000e+00, float noundef 1.000000e+00, float noundef 3.000000e+00)
          to label %22 unwind label %45

22:                                               ; preds = %19
  %23 = load double, ptr %5, align 16
  %24 = getelementptr inbounds i8, ptr %5, i64 8
  %25 = load double, ptr %24, align 8
  %26 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef 2.000000e+00, double %23, double %25)
          to label %27 unwind label %45

27:                                               ; preds = %22
  %28 = extractvalue { double, double } %26, 0
  %29 = extractvalue { double, double } %26, 1
  invoke void @_ZN3JPH14MassProperties27SetMassAndInertiaOfSolidBoxENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(80) %21, double %28, double %29, float noundef 1.000000e+03)
          to label %30 unwind label %45

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = load ptr, ptr %31, align 8, !tbaa !28
  %33 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 16 dereferenceable(256) %3, i32 noundef 0)
          to label %34 unwind label %45

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %35 = invoke noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
          to label %36 unwind label %47

36:                                               ; preds = %34
  %37 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 5.000000e-01)
          to label %38 unwind label %49

38:                                               ; preds = %36
  %39 = extractvalue { double, double } %37, 0
  %40 = extractvalue { double, double } %37, 1
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %35, double %39, double %40, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %41 unwind label %49

41:                                               ; preds = %38
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %35)
          to label %.preheader unwind label %47

.preheader:                                       ; preds = %41
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  br label %51

.loopexit:                                        ; preds = %77, %51
  %exitcond.not = icmp eq i32 %53, 7
  br i1 %exitcond.not, label %42, label %51, !llvm.loop !34

42:                                               ; preds = %.loopexit
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %3) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #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

43:                                               ; preds = %13, %11, %1
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %92

45:                                               ; preds = %30, %27, %22, %19
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %91

47:                                               ; preds = %41, %34
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %90

49:                                               ; preds = %38, %36
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %35) #8
  br label %90

51:                                               ; preds = %.preheader, %.loopexit
  %.02741 = phi i32 [ 0, %.preheader ], [ %53, %.loopexit ]
  %52 = lshr i32 %.02741, 1
  %53 = add nuw nsw i32 %.02741, 1
  %54 = lshr i32 %53, 1
  %55 = sub nuw nsw i32 7, %54
  %56 = icmp ult i32 %52, %55
  br i1 %56, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %51
  %57 = and i32 %.02741, 1
  %.not = icmp eq i32 %57, 0
  %58 = select i1 %.not, float 0.000000e+00, float 5.000000e-01
  %59 = uitofp nneg i32 %.02741 to float
  %60 = fadd float %59, 5.000000e-01
  br label %61

61:                                               ; preds = %.lr.ph, %77
  %.02840 = phi i32 [ %52, %.lr.ph ], [ %78, %77 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %62 = uitofp nneg i32 %.02840 to float
  %63 = fadd float %62, -3.500000e+00
  %64 = fadd float %58, %63
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef %64, float noundef %60, float noundef 0.000000e+00)
          to label %65 unwind label %80

65:                                               ; preds = %61
  %66 = load ptr, ptr %31, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) #8
  %67 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %.sroa.01.0.copyload = load double, ptr %7, align 16
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !36
  %68 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %69 unwind label %82

69:                                               ; preds = %65
  %70 = extractvalue { double, double } %68, 0
  %71 = extractvalue { double, double } %68, 1
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %8, ptr noundef %67, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, double %70, double %71, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %72 unwind label %82

72:                                               ; preds = %69
  %73 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 16 dereferenceable(256) %8)
          to label %74 unwind label %84

74:                                               ; preds = %72
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %8) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #8
  %75 = load ptr, ptr %31, align 8, !tbaa !28
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %73)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 4 dereferenceable(4) %76, i32 noundef 0)
          to label %77 unwind label %87

77:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  %78 = add nuw nsw i32 %.02840, 1
  %79 = icmp ult i32 %78, %55
  br i1 %79, label %61, label %.loopexit, !llvm.loop !37

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

82:                                               ; preds = %69, %65
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %86

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

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

87:                                               ; preds = %74
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %89

89:                                               ; preds = %86, %87, %80
  %.pn30.pn = phi { ptr, i32 } [ %81, %80 ], [ %88, %87 ], [ %.pn, %86 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br label %90

90:                                               ; preds = %89, %49, %47
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %89 ], [ %48, %47 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %91

91:                                               ; preds = %90, %45
  %.pn30.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn, %90 ], [ %46, %45 ]
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %3) #8
  br label %92

92:                                               ; preds = %91, %43
  %.pn30.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn.pn, %91 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #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
  resume { ptr, i32 } %.pn30.pn.pn.pn.pn
}

declare noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112), float noundef) local_unnamed_addr #2

declare void @_ZN12ShapeCreator15CreateTorusMeshEffjj(ptr dead_on_unwind writable sret(%"class.JPH::RefConst") align 8, float noundef, float noundef, i32 noundef, i32 noundef) local_unnamed_addr #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: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() local_unnamed_addr #5 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

declare void @_ZN3JPH14MassProperties27SetMassAndInertiaOfSolidBoxENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) local_unnamed_addr #4

declare i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256), i32 noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef) local_unnamed_addr #4 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 #6 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #3 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 #2

; 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 #3 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="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 #5 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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, !23, i64 144}
!6 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !7, i64 0, !10, i64 16, !7, i64 32, !7, i64 48, !12, i64 64, !13, i64 72, !14, i64 80, !18, i64 96, !19, i64 97, !20, i64 98, !20, i64 99, !20, i64 100, !20, i64 101, !20, i64 102, !21, i64 103, !20, i64 104, !20, i64 105, !22, i64 108, !22, i64 112, !22, i64 116, !22, i64 120, !22, i64 124, !22, i64 128, !22, i64 132, !17, i64 136, !17, i64 140, !23, i64 144, !22, i64 148, !24, i64 160, !26, i64 240, !27, i64 248}
!7 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH4QuatE", !11, i64 0}
!11 = !{!"_ZTSN3JPH4Vec4E", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"short", !8, i64 0}
!14 = !{!"_ZTSN3JPH14CollisionGroupE", !15, i64 0, !17, i64 8, !17, i64 12}
!15 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !16, i64 0}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!"_ZTSN3JPH11EMotionTypeE", !8, i64 0}
!19 = !{!"_ZTSN3JPH12EAllowedDOFsE", !8, i64 0}
!20 = !{!"bool", !8, i64 0}
!21 = !{!"_ZTSN3JPH14EMotionQualityE", !8, i64 0}
!22 = !{!"float", !8, i64 0}
!23 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !8, i64 0}
!24 = !{!"_ZTSN3JPH14MassPropertiesE", !22, i64 0, !25, i64 16}
!25 = !{!"_ZTSN3JPH5Mat44E", !8, i64 0}
!26 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !16, i64 0}
!27 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !16, i64 0}
!28 = !{!29, !16, i64 24}
!29 = !{!"_ZTS4Test", !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !20, i64 48, !30, i64 56}
!30 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !31, i64 0}
!31 = !{!"_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", !16, i64 0, !12, i64 8, !32, i64 16, !12, i64 24, !33, i64 32, !16, i64 48}
!32 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !16, i64 0}
!33 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !22, i64 0, !12, i64 8}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!8, !8, i64 0}
!37 = distinct !{!37, !35}


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