; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/General/ModifyMassTest.ll (ZN14ModifyMassTest10InitializeEv)

; 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::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.24", %"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.18", i32, i32 }
%"class.JPH::RefConst.18" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.24" = type { ptr }
%"class.JPH::RefConst" = 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 }
%class.ModifyMassTest = type <{ %class.Test, %"class.JPH::ContactListener", float, [2 x %"class.JPH::BodyID"], [4 x i8] }>
%"class.JPH::ContactListener" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14ModifyMassTest11ResetBodiesEi(ptr noundef nonnull align 8 dereferenceable(132), i32 noundef) #1 align 2

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14ModifyMassTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(132) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.JPH::BodyCreationSettings", align 16
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Quat", align 16
  %8 = alloca %"class.JPH::BodyID", align 4
  %9 = alloca %"class.JPH::BodyID", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  %11 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %10, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 256, ptr %3) #8
  %12 = call noundef ptr @_ZN3JPH11SphereShapenwEm(i64 noundef 48)
  invoke void @_ZN3JPH11SphereShapeC2EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 8 dereferenceable(48) %12, float noundef 1.000000e+00, ptr noundef null)
          to label %13 unwind label %54

13:                                               ; preds = %1
  %14 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %15 = getelementptr inbounds %"class.JPH::Vec3", ptr %6, i32 0, i32 0
  %16 = getelementptr inbounds %union.anon, ptr %15, i32 0, i32 0
  %17 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %18 = extractvalue { double, double } %14, 0
  store double %18, ptr %17, align 16
  %19 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %20 = extractvalue { double, double } %14, 1
  store double %20, ptr %19, align 8
  %21 = call { double, double } @_ZN3JPH4Quat9sIdentityEv()
  %22 = getelementptr inbounds %"class.JPH::Quat", ptr %7, i32 0, i32 0
  %23 = getelementptr inbounds %"class.JPH::Vec4", ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %union.anon.4, ptr %23, i32 0, i32 0
  %25 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %26 = extractvalue { double, double } %21, 0
  store double %26, ptr %25, align 16
  %27 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %28 = extractvalue { double, double } %21, 1
  store double %28, ptr %27, align 8
  %29 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  %30 = load double, ptr %29, align 16
  %31 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  %32 = load double, ptr %31, align 8
  %33 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  %34 = load double, ptr %33, align 16
  %35 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  %36 = load double, ptr %35, align 8
  call void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %3, ptr noundef %12, double %30, double %32, double %34, double %36, i8 noundef zeroext 2, i16 noundef zeroext 1)
  %37 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %3, i32 0, i32 18
  store float 1.000000e+00, ptr %37, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %38 = getelementptr inbounds %class.Test, ptr %10, i32 0, i32 3
  %39 = load ptr, ptr %38, align 8, !tbaa !29
  %40 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 16 dereferenceable(256) %3, i32 noundef 0)
          to label %41 unwind label %58

41:                                               ; preds = %13
  %42 = getelementptr inbounds %"class.JPH::BodyID", ptr %8, i32 0, i32 0
  store i32 %40, ptr %42, align 4
  %43 = getelementptr inbounds %class.ModifyMassTest, ptr %10, i32 0, i32 3
  %44 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %43, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %44, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %45 = getelementptr inbounds %class.Test, ptr %10, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !29
  %47 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 16 dereferenceable(256) %3, i32 noundef 0)
          to label %48 unwind label %62

48:                                               ; preds = %41
  %49 = getelementptr inbounds %"class.JPH::BodyID", ptr %9, i32 0, i32 0
  store i32 %47, ptr %49, align 4
  %50 = getelementptr inbounds %class.ModifyMassTest, ptr %10, i32 0, i32 3
  %51 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %50, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 4 %9, i64 4, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  invoke void @_ZN14ModifyMassTest11ResetBodiesEi(ptr noundef nonnull align 8 dereferenceable(132) %10, i32 noundef 0)
          to label %52 unwind label %66

52:                                               ; preds = %48
  invoke void @_ZN14ModifyMassTest12UpdateLabelsEv(ptr noundef nonnull align 8 dereferenceable(132) %10)
          to label %53 unwind label %66

53:                                               ; preds = %52
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %3) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %3) #8
  ret void

54:                                               ; preds = %1
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %4, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %5, align 4
  call void @_ZN3JPH11SphereShapedlEPv(ptr noundef %12) #8
  br label %71

58:                                               ; preds = %13
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %4, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %70

62:                                               ; preds = %41
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %4, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %70

66:                                               ; preds = %52, %48
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %4, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %5, align 4
  br label %70

70:                                               ; preds = %66, %62, %58
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %3) #8
  br label %71

71:                                               ; preds = %70, %54
  call void @llvm.lifetime.end.p0(i64 256, ptr %3) #8
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %4, align 8
  %74 = load i32, ptr %5, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76
}

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH11SphereShapenwEm(i64 noundef) #2 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) #6 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 i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256), i32 noundef) #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !23, i64 112}
!10 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !11, i64 0, !12, i64 16, !11, i64 32, !11, i64 48, !14, i64 64, !15, i64 72, !16, i64 80, !19, i64 96, !20, i64 97, !21, i64 98, !21, i64 99, !21, i64 100, !21, i64 101, !21, i64 102, !22, i64 103, !21, i64 104, !21, i64 105, !23, i64 108, !23, i64 112, !23, i64 116, !23, i64 120, !23, i64 124, !23, i64 128, !23, i64 132, !18, i64 136, !18, i64 140, !24, i64 144, !23, i64 148, !25, i64 160, !27, i64 240, !28, i64 248}
!11 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!12 = !{!"_ZTSN3JPH4QuatE", !13, i64 0}
!13 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTSN3JPH14CollisionGroupE", !17, i64 0, !18, i64 8, !18, i64 12}
!17 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !6, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!20 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!25 = !{!"_ZTSN3JPH14MassPropertiesE", !23, i64 0, !26, i64 16}
!26 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!27 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !6, i64 0}
!28 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!29 = !{!30, !6, i64 24}
!30 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !21, i64 48, !31, i64 56}
!31 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !32, i64 0}
!32 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !14, i64 8, !33, i64 16, !14, i64 24, !34, i64 32, !6, i64 48}
!33 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!34 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !23, i64 0, !14, i64 8}
!35 = !{i64 0, i64 4, !36}
!36 = !{!18, !18, i64 0}


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

%"class.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.24", %"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.18", i32, i32 }
%"class.JPH::RefConst.18" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.24" = type { ptr }
%"class.JPH::RefConst" = 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
declare dso_local void @_ZN14ModifyMassTest11ResetBodiesEi(ptr noundef nonnull align 8 dereferenceable(132), i32 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14ModifyMassTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(132) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::BodyCreationSettings", align 16
  %3 = 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 256, ptr nonnull %2) #7
  %4 = tail call noundef ptr @_ZN3JPH11SphereShapenwEm(i64 noundef 48)
  invoke void @_ZN3JPH11SphereShapeC2EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 8 dereferenceable(48) %4, float noundef 1.000000e+00, ptr noundef null)
          to label %5 unwind label %24

5:                                                ; preds = %1
  %6 = tail call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %7 = extractvalue { double, double } %6, 0
  %8 = extractvalue { double, double } %6, 1
  %9 = tail call { double, double } @_ZN3JPH4Quat9sIdentityEv()
  %10 = extractvalue { double, double } %9, 0
  %11 = extractvalue { double, double } %9, 1
  call void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %2, ptr noundef nonnull %4, double %7, double %8, double %10, double %11, i8 noundef zeroext 2, i16 noundef zeroext 1)
  %12 = getelementptr inbounds i8, ptr %2, i64 112
  store float 1.000000e+00, ptr %12, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load ptr, ptr %13, align 8, !tbaa !28
  %15 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 16 dereferenceable(256) %2, i32 noundef 0)
          to label %16 unwind label %26

16:                                               ; preds = %5
  %17 = getelementptr inbounds i8, ptr %0, i64 124
  store i32 %15, ptr %17, align 4, !tbaa !34
  %18 = load ptr, ptr %13, align 8, !tbaa !28
  %19 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 16 dereferenceable(256) %2, i32 noundef 0)
          to label %20 unwind label %28

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %0, i64 128
  store i32 %19, ptr %21, align 8, !tbaa !34
  invoke void @_ZN14ModifyMassTest11ResetBodiesEi(ptr noundef nonnull align 8 dereferenceable(132) %0, i32 noundef 0)
          to label %22 unwind label %30

22:                                               ; preds = %20
  invoke void @_ZN14ModifyMassTest12UpdateLabelsEv(ptr noundef nonnull align 8 dereferenceable(132) %0)
          to label %23 unwind label %30

23:                                               ; preds = %22
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %2) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %2) #7
  ret void

24:                                               ; preds = %1
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH11SphereShapedlEPv(ptr noundef %4) #7
  br label %33

26:                                               ; preds = %5
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %32

28:                                               ; preds = %16
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %22, %20
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %32

32:                                               ; preds = %30, %28, %26
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ], [ %27, %26 ]
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %2) #7
  br label %33

33:                                               ; preds = %32, %24
  %.pn.pn = phi { ptr, i32 } [ %.pn, %32 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH11SphereShapenwEm(i64 noundef) local_unnamed_addr #2 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 #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 i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress 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 = { 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, !22, i64 112}
!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 = !{!17, !17, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass