; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/General/DampingTest.ll (ZN11DampingTest10InitializeEv)

; 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.9", %"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.9" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.10 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.10 = type { i64, [8 x i8] }
%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 }

@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11DampingTest10InitializeEv(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 %"class.JPH::RefConst", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.JPH::BodyCreationSettings", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Quat", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.JPH::BodyCreationSettings", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Quat", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %20 = load ptr, ptr %2, align 8
  %21 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %20, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #10
  %22 = call noundef ptr @_ZN3JPH11SphereShapenwEm(i64 noundef 48)
  invoke void @_ZN3JPH11SphereShapeC2EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 8 dereferenceable(48) %22, float noundef 2.000000e+00, ptr noundef null)
          to label %23 unwind label %28

23:                                               ; preds = %1
  call void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %96, %23
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = icmp sle i32 %25, 10
  br i1 %26, label %32, label %27

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %122

28:                                               ; preds = %1
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %4, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %5, align 4
  call void @_ZN3JPH11SphereShapedlEPv(ptr noundef %22) #10
  br label %219

32:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %33 = getelementptr inbounds %class.Test, ptr %20, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 256, ptr %8) #10
  %35 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %36 unwind label %99

36:                                               ; preds = %32
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = sitofp i32 %37 to float
  %39 = call float @llvm.fmuladd.f32(float %38, float 1.000000e+01, float -5.000000e+01)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef %39, float noundef 2.000000e+00, float noundef -8.000000e+01)
          to label %40 unwind label %99

40:                                               ; preds = %36
  %41 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %42 unwind label %99

42:                                               ; preds = %40
  %43 = getelementptr inbounds %"class.JPH::Quat", ptr %10, i32 0, i32 0
  %44 = getelementptr inbounds %"class.JPH::Vec4", ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %union.anon.4, ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %47 = extractvalue { double, double } %41, 0
  store double %47, ptr %46, align 16
  %48 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %49 = extractvalue { double, double } %41, 1
  store double %49, ptr %48, align 8
  %50 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %51 = load double, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %53 = load double, ptr %52, align 8
  %54 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %55 = load double, ptr %54, align 16
  %56 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %57 = load double, ptr %56, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %8, ptr noundef %35, double %51, double %53, double %55, double %57, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %58 unwind label %99

58:                                               ; preds = %42
  %59 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 16 dereferenceable(256) %8)
          to label %60 unwind label %103

60:                                               ; preds = %58
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %8) #10
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #10
  store ptr %59, ptr %7, align 8, !tbaa !5
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %61)
          to label %63 unwind label %108

63:                                               ; preds = %60
  invoke void @_ZN3JPH16MotionProperties17SetAngularDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %62, float noundef 0.000000e+00)
          to label %64 unwind label %108

64:                                               ; preds = %63
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %65)
          to label %67 unwind label %108

67:                                               ; preds = %64
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = sitofp i32 %68 to float
  %70 = fmul float 0x3FB99999A0000000, %69
  invoke void @_ZN3JPH16MotionProperties16SetLinearDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %66, float noundef %70)
          to label %71 unwind label %108

71:                                               ; preds = %67
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+01)
          to label %73 unwind label %108

73:                                               ; preds = %71
  %74 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %75 = load double, ptr %74, align 16
  %76 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %77 = load double, ptr %76, align 8
  invoke void @_ZN3JPH4Body17SetLinearVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %72, double %75, double %77)
          to label %78 unwind label %108

78:                                               ; preds = %73
  %79 = getelementptr inbounds %class.Test, ptr %20, i32 0, i32 3
  %80 = load ptr, ptr %79, align 8, !tbaa !11
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %81)
          to label %83 unwind label %108

83:                                               ; preds = %78
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull align 4 dereferenceable(4) %82, i32 noundef 0)
          to label %84 unwind label %108

84:                                               ; preds = %83
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %85)
          to label %87 unwind label %108

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #10
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %88)
          to label %90 unwind label %112

90:                                               ; preds = %87
  %91 = invoke noundef float @_ZNK3JPH16MotionProperties16GetLinearDampingEv(ptr noundef nonnull align 16 dereferenceable(182) %89)
          to label %92 unwind label %112

92:                                               ; preds = %90
  %93 = fpext float %91 to double
  invoke void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef @.str.1, double noundef %93)
          to label %94 unwind label %112

94:                                               ; preds = %92
  invoke void @_ZN4Test12SetBodyLabelERKN3JPH6BodyIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(112) %20, ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %95 unwind label %116

95:                                               ; preds = %94
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %6, align 4, !tbaa !9
  br label %24, !llvm.loop !20

99:                                               ; preds = %42, %40, %36, %32
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %4, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %5, align 4
  br label %107

103:                                              ; preds = %58
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %4, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %5, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %8) #10
  br label %107

107:                                              ; preds = %103, %99
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #10
  br label %121

108:                                              ; preds = %84, %83, %78, %73, %71, %67, %64, %63, %60
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %4, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %5, align 4
  br label %121

112:                                              ; preds = %92, %90, %87
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %4, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %5, align 4
  br label %120

116:                                              ; preds = %94
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %4, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  br label %120

120:                                              ; preds = %116, %112
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #10
  br label %121

121:                                              ; preds = %120, %108, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %218

122:                                              ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %191, %122
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = icmp sle i32 %124, 10
  br i1 %125, label %127, label %126

126:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %217

127:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %128 = getelementptr inbounds %class.Test, ptr %20, i32 0, i32 3
  %129 = load ptr, ptr %128, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 256, ptr %15) #10
  %130 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %131 unwind label %194

131:                                              ; preds = %127
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = sitofp i32 %132 to float
  %134 = call float @llvm.fmuladd.f32(float %133, float 1.000000e+01, float -5.000000e+01)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef %134, float noundef 2.000000e+00, float noundef -9.000000e+01)
          to label %135 unwind label %194

135:                                              ; preds = %131
  %136 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %137 unwind label %194

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

153:                                              ; preds = %137
  %154 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %129, ptr noundef nonnull align 16 dereferenceable(256) %15)
          to label %155 unwind label %198

155:                                              ; preds = %153
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %15) #10
  call void @llvm.lifetime.end.p0(i64 256, ptr %15) #10
  store ptr %154, ptr %14, align 8, !tbaa !5
  %156 = load ptr, ptr %14, align 8, !tbaa !5
  %157 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %156)
          to label %158 unwind label %203

158:                                              ; preds = %155
  invoke void @_ZN3JPH16MotionProperties16SetLinearDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %157, float noundef 0.000000e+00)
          to label %159 unwind label %203

159:                                              ; preds = %158
  %160 = load ptr, ptr %14, align 8, !tbaa !5
  %161 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %160)
          to label %162 unwind label %203

162:                                              ; preds = %159
  %163 = load i32, ptr %13, align 4, !tbaa !9
  %164 = sitofp i32 %163 to float
  %165 = fmul float 0x3FB99999A0000000, %164
  invoke void @_ZN3JPH16MotionProperties17SetAngularDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %161, float noundef %165)
          to label %166 unwind label %203

166:                                              ; preds = %162
  %167 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %18, float noundef 0.000000e+00, float noundef 1.000000e+01, float noundef 0.000000e+00)
          to label %168 unwind label %203

168:                                              ; preds = %166
  %169 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %170 = load double, ptr %169, align 16
  %171 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %172 = load double, ptr %171, align 8
  invoke void @_ZN3JPH4Body18SetAngularVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %167, double %170, double %172)
          to label %173 unwind label %203

173:                                              ; preds = %168
  %174 = getelementptr inbounds %class.Test, ptr %20, i32 0, i32 3
  %175 = load ptr, ptr %174, align 8, !tbaa !11
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  %177 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %176)
          to label %178 unwind label %203

178:                                              ; preds = %173
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %175, ptr noundef nonnull align 4 dereferenceable(4) %177, i32 noundef 0)
          to label %179 unwind label %203

179:                                              ; preds = %178
  %180 = load ptr, ptr %14, align 8, !tbaa !5
  %181 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %180)
          to label %182 unwind label %203

182:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #10
  %183 = load ptr, ptr %14, align 8, !tbaa !5
  %184 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %183)
          to label %185 unwind label %207

185:                                              ; preds = %182
  %186 = invoke noundef float @_ZNK3JPH16MotionProperties17GetAngularDampingEv(ptr noundef nonnull align 16 dereferenceable(182) %184)
          to label %187 unwind label %207

187:                                              ; preds = %185
  %188 = fpext float %186 to double
  invoke void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef @.str.2, double noundef %188)
          to label %189 unwind label %207

189:                                              ; preds = %187
  invoke void @_ZN4Test12SetBodyLabelERKN3JPH6BodyIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(112) %20, ptr noundef nonnull align 4 dereferenceable(4) %181, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %190 unwind label %211

190:                                              ; preds = %189
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %13, align 4, !tbaa !9
  br label %123, !llvm.loop !22

194:                                              ; preds = %137, %135, %131, %127
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %4, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %5, align 4
  br label %202

198:                                              ; preds = %153
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %4, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %5, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %15) #10
  br label %202

202:                                              ; preds = %198, %194
  call void @llvm.lifetime.end.p0(i64 256, ptr %15) #10
  br label %216

203:                                              ; preds = %179, %178, %173, %168, %166, %162, %159, %158, %155
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %4, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %5, align 4
  br label %216

207:                                              ; preds = %187, %185, %182
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %4, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %5, align 4
  br label %215

211:                                              ; preds = %189
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %4, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  br label %215

215:                                              ; preds = %211, %207
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #10
  br label %216

216:                                              ; preds = %215, %203, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %218

217:                                              ; preds = %126
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #10
  ret void

218:                                              ; preds = %216, %121
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  br label %219

219:                                              ; preds = %218, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #10
  br label %220

220:                                              ; preds = %219
  %221 = load ptr, ptr %4, align 8
  %222 = load i32, ptr %5, align 4
  %223 = insertvalue { ptr, i32 } poison, ptr %221, 0
  %224 = insertvalue { ptr, i32 } %223, i32 %222, 1
  resume { ptr, i32 } %224
}

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH11SphereShapedlEPv(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)) #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH4Body17SetLinearVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122), double, double) #1 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)) #6 align 2

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

declare void @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties16GetLinearDampingEv(ptr noundef nonnull align 16 dereferenceable(182)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #9 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties17GetAngularDampingEv(ptr noundef nonnull align 16 dereferenceable(182)) #6 align 2

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

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


; 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.9", %"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.9" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.10 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.10 = type { i64, [8 x i8] }

@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11DampingTest10InitializeEv(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.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.JPH::BodyCreationSettings", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = 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) #10
  %12 = tail call noundef ptr @_ZN3JPH11SphereShapenwEm(i64 noundef 48)
  invoke void @_ZN3JPH11SphereShapeC2EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 8 dereferenceable(48) %12, float noundef 2.000000e+00, ptr noundef null)
          to label %13 unwind label %19

13:                                               ; preds = %1
  call void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %12)
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  br label %21

.preheader:                                       ; preds = %56
  %17 = getelementptr inbounds i8, ptr %8, i64 8
  %18 = getelementptr inbounds i8, ptr %9, i64 8
  br label %71

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH11SphereShapedlEPv(ptr noundef %12) #10
  br label %121

21:                                               ; preds = %13, %56
  %.03245 = phi i32 [ 0, %13 ], [ %57, %56 ]
  %22 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #10
  %23 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %24 = uitofp nneg i32 %.03245 to float
  %25 = call float @llvm.fmuladd.f32(float %24, float 1.000000e+01, float -5.000000e+01)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %4, float noundef %25, float noundef 2.000000e+00, float noundef -8.000000e+01)
          to label %26 unwind label %58

26:                                               ; preds = %21
  %27 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %28 unwind label %58

28:                                               ; preds = %26
  %29 = extractvalue { double, double } %27, 0
  %30 = extractvalue { double, double } %27, 1
  %31 = load double, ptr %4, align 16
  %32 = load double, ptr %15, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %3, ptr noundef %23, double %31, double %32, double %29, double %30, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %33 unwind label %58

33:                                               ; preds = %28
  %34 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 16 dereferenceable(256) %3)
          to label %35 unwind label %60

35:                                               ; preds = %33
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %3) #10
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #10
  %36 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %34)
          to label %37 unwind label %63

37:                                               ; preds = %35
  invoke void @_ZN3JPH16MotionProperties17SetAngularDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %36, float noundef 0.000000e+00)
          to label %38 unwind label %63

38:                                               ; preds = %37
  %39 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %34)
          to label %40 unwind label %63

40:                                               ; preds = %38
  %41 = fmul float %24, 0x3FB99999A0000000
  invoke void @_ZN3JPH16MotionProperties16SetLinearDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %39, float noundef %41)
          to label %42 unwind label %63

42:                                               ; preds = %40
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+01)
          to label %43 unwind label %63

43:                                               ; preds = %42
  %44 = load double, ptr %5, align 16
  %45 = load double, ptr %16, align 8
  invoke void @_ZN3JPH4Body17SetLinearVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %34, double %44, double %45)
          to label %46 unwind label %63

46:                                               ; preds = %43
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %34)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 4 dereferenceable(4) %48, i32 noundef 0)
          to label %49 unwind label %63

49:                                               ; preds = %46
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %34)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #10
  %51 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %34)
          to label %52 unwind label %65

52:                                               ; preds = %49
  %53 = call noundef float @_ZNK3JPH16MotionProperties16GetLinearDampingEv(ptr noundef nonnull align 16 dereferenceable(182) %51)
  %54 = fpext float %53 to double
  invoke void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull @.str.1, double noundef %54)
          to label %55 unwind label %65

55:                                               ; preds = %52
  invoke void @_ZN4Test12SetBodyLabelERKN3JPH6BodyIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(4) %50, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %56 unwind label %67

56:                                               ; preds = %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #10
  %57 = add nuw nsw i32 %.03245, 1
  %exitcond.not = icmp eq i32 %57, 11
  br i1 %exitcond.not, label %.preheader, label %21, !llvm.loop !17

58:                                               ; preds = %28, %26, %21
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %33
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %3) #10
  br label %62

62:                                               ; preds = %60, %58
  %.pn38 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #10
  br label %120

63:                                               ; preds = %46, %43, %42, %40, %38, %37, %35
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %120

65:                                               ; preds = %52, %49
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %69

67:                                               ; preds = %55
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  br label %69

69:                                               ; preds = %67, %65
  %.pn40 = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #10
  br label %120

70:                                               ; preds = %106
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  ret void

71:                                               ; preds = %.preheader, %106
  %.03346 = phi i32 [ 0, %.preheader ], [ %107, %106 ]
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %7) #10
  %73 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %74 = uitofp nneg i32 %.03346 to float
  %75 = call float @llvm.fmuladd.f32(float %74, float 1.000000e+01, float -5.000000e+01)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef %75, float noundef 2.000000e+00, float noundef -9.000000e+01)
          to label %76 unwind label %108

76:                                               ; preds = %71
  %77 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %78 unwind label %108

78:                                               ; preds = %76
  %79 = extractvalue { double, double } %77, 0
  %80 = extractvalue { double, double } %77, 1
  %81 = load double, ptr %8, align 16
  %82 = load double, ptr %17, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %7, ptr noundef %73, double %81, double %82, double %79, double %80, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %83 unwind label %108

83:                                               ; preds = %78
  %84 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 16 dereferenceable(256) %7)
          to label %85 unwind label %110

85:                                               ; preds = %83
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %7) #10
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #10
  %86 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %84)
          to label %87 unwind label %113

87:                                               ; preds = %85
  invoke void @_ZN3JPH16MotionProperties16SetLinearDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %86, float noundef 0.000000e+00)
          to label %88 unwind label %113

88:                                               ; preds = %87
  %89 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %84)
          to label %90 unwind label %113

90:                                               ; preds = %88
  %91 = fmul float %74, 0x3FB99999A0000000
  invoke void @_ZN3JPH16MotionProperties17SetAngularDampingEf(ptr noundef nonnull align 16 dereferenceable(182) %89, float noundef %91)
          to label %92 unwind label %113

92:                                               ; preds = %90
  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 %93 unwind label %113

93:                                               ; preds = %92
  %94 = load double, ptr %9, align 16
  %95 = load double, ptr %18, align 8
  invoke void @_ZN3JPH4Body18SetAngularVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %84, double %94, double %95)
          to label %96 unwind label %113

96:                                               ; preds = %93
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %84)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %97, ptr noundef nonnull align 4 dereferenceable(4) %98, i32 noundef 0)
          to label %99 unwind label %113

99:                                               ; preds = %96
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %84)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  %101 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %84)
          to label %102 unwind label %115

102:                                              ; preds = %99
  %103 = call noundef float @_ZNK3JPH16MotionProperties17GetAngularDampingEv(ptr noundef nonnull align 16 dereferenceable(182) %101)
  %104 = fpext float %103 to double
  invoke void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull @.str.2, double noundef %104)
          to label %105 unwind label %115

105:                                              ; preds = %102
  invoke void @_ZN4Test12SetBodyLabelERKN3JPH6BodyIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(4) %100, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %106 unwind label %117

106:                                              ; preds = %105
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  %107 = add nuw nsw i32 %.03346, 1
  %exitcond47.not = icmp eq i32 %107, 11
  br i1 %exitcond47.not, label %70, label %71, !llvm.loop !19

108:                                              ; preds = %78, %76, %71
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %112

110:                                              ; preds = %83
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %7) #10
  br label %112

112:                                              ; preds = %110, %108
  %.pn = phi { ptr, i32 } [ %111, %110 ], [ %109, %108 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #10
  br label %120

113:                                              ; preds = %96, %93, %92, %90, %88, %87, %85
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %120

115:                                              ; preds = %102, %99
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %119

117:                                              ; preds = %105
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br label %119

119:                                              ; preds = %117, %115
  %.pn35 = phi { ptr, i32 } [ %118, %117 ], [ %116, %115 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  br label %120

120:                                              ; preds = %112, %113, %119, %62, %63, %69
  %.pn40.pn.pn = phi { ptr, i32 } [ %.pn40, %69 ], [ %64, %63 ], [ %.pn38, %62 ], [ %.pn35, %119 ], [ %114, %113 ], [ %.pn, %112 ]
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #10
  br label %121

121:                                              ; preds = %120, %19
  %.pn40.pn.pn.pn = phi { ptr, i32 } [ %.pn40.pn.pn, %120 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn40.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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH11SphereShapedlEPv(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 #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 #6 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH4Body17SetLinearVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122), double, double) local_unnamed_addr #1 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 #6 align 2

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

declare void @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties16GetLinearDampingEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #9 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties17GetAngularDampingEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #6 align 2

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


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