; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/General (HighSpeedTest)

; 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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.5", %"class.JPH::RefConst.6" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst", i32, i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::RefConst.6" = type { ptr }
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

; 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 @_ZN3JPH20BodyCreationSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13HighSpeedTest19CreateDynamicObjectEN3JPH4Vec3ES1_PNS0_5ShapeENS0_14EMotionQualityE(ptr noundef nonnull align 8 dereferenceable(112) %0, double %1, double %2, double %3, double %4, ptr noundef %5, i8 noundef zeroext %6) #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca %"class.JPH::BodyCreationSettings", align 16
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  store double %1, ptr %18, align 16
  %19 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  store double %2, ptr %19, align 8
  %20 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  store double %3, ptr %20, align 16
  %21 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  store double %4, ptr %21, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  store i8 %6, ptr %12, align 1, !tbaa !9
  %22 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 256, ptr %13) #6
  call void @_ZN3JPH20BodyCreationSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(256) %13)
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN3JPH20BodyCreationSettings8SetShapeEPKNS_5ShapeE(ptr noundef nonnull align 16 dereferenceable(256) %13, ptr noundef %23)
          to label %24 unwind label %53

24:                                               ; preds = %7
  %25 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %13, i32 0, i32 17
  store float 0.000000e+00, ptr %25, align 4, !tbaa !11
  %26 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %13, i32 0, i32 18
  store float 1.000000e+00, ptr %26, align 16, !tbaa !30
  %27 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %13, i32 0, i32 19
  store float 0.000000e+00, ptr %27, align 4, !tbaa !31
  %28 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %13, i32 0, i32 20
  store float 0.000000e+00, ptr %28, align 8, !tbaa !32
  %29 = load i8, ptr %12, align 1, !tbaa !9
  %30 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %13, i32 0, i32 14
  store i8 %29, ptr %30, align 1, !tbaa !33
  %31 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %13, i32 0, i32 5
  store i16 1, ptr %31, align 8, !tbaa !34
  %32 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %13, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %8, i64 16, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %33 = getelementptr inbounds %class.Test, ptr %22, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !37
  %35 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 16 dereferenceable(256) %13)
          to label %36 unwind label %57

36:                                               ; preds = %24
  store ptr %35, ptr %16, align 8, !tbaa !5
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !35
  %38 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %39 = load double, ptr %38, align 16
  %40 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %41 = load double, ptr %40, align 8
  invoke void @_ZN3JPH4Body17SetLinearVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %37, double %39, double %41)
          to label %42 unwind label %57

42:                                               ; preds = %36
  %43 = getelementptr inbounds %class.Test, ptr %22, i32 0, i32 3
  %44 = load ptr, ptr %43, align 8, !tbaa !37
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %45)
          to label %47 unwind label %57

47:                                               ; preds = %42
  %48 = invoke noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef 0x3D71979980000000)
          to label %49 unwind label %57

49:                                               ; preds = %47
  %50 = zext i1 %48 to i64
  %51 = select i1 %48, i32 1, i32 0
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 4 dereferenceable(4) %46, i32 noundef %51)
          to label %52 unwind label %57

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

53:                                               ; preds = %7
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %14, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %15, align 4
  br label %61

57:                                               ; preds = %49, %47, %42, %36, %24
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %14, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %61

61:                                               ; preds = %57, %53
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %13) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %13) #6
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr %14, align 8
  %64 = load i32, ptr %15, align 4
  %65 = insertvalue { ptr, i32 } poison, ptr %63, 0
  %66 = insertvalue { ptr, i32 } %65, i32 %64, 1
  resume { ptr, i32 } %66
}

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

; 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) #4

; 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) #5 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!11 = !{!12, !24, i64 108}
!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, !10, i64 103, !23, i64 104, !23, i64 105, !24, i64 108, !24, i64 112, !24, i64 116, !24, i64 120, !24, i64 124, !24, i64 128, !24, i64 132, !20, i64 136, !20, i64 140, !25, i64 144, !24, 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 = !{!"float", !7, i64 0}
!25 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!26 = !{!"_ZTSN3JPH14MassPropertiesE", !24, i64 0, !27, i64 16}
!27 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!28 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !6, i64 0}
!29 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!30 = !{!12, !24, i64 112}
!31 = !{!12, !24, i64 116}
!32 = !{!12, !24, i64 120}
!33 = !{!12, !10, i64 103}
!34 = !{!12, !17, i64 72}
!35 = !{i64 0, i64 16, !36}
!36 = !{!7, !7, i64 0}
!37 = !{!38, !6, i64 24}
!38 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !23, i64 48, !39, i64 56}
!39 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !40, i64 0}
!40 = !{!"_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, !41, i64 16, !16, i64 24, !42, i64 32, !6, i64 48}
!41 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!42 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !24, i64 0, !16, i64 8}


; 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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.5", %"class.JPH::RefConst.6" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst", i32, i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.5" = type { ptr }
%"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
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettings8SetShapeEPKNS_5ShapeE(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef) local_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 #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13HighSpeedTest19CreateDynamicObjectEN3JPH4Vec3ES1_PNS0_5ShapeENS0_14EMotionQualityE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(112) %0, double %1, double %2, double %3, double %4, ptr noundef %5, i8 noundef zeroext %6) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::BodyCreationSettings", align 16
  store double %3, ptr %8, align 16
  %10 = getelementptr inbounds i8, ptr %8, i64 8
  store double %4, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %9) #5
  call void @_ZN3JPH20BodyCreationSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(256) %9)
  invoke void @_ZN3JPH20BodyCreationSettings8SetShapeEPKNS_5ShapeE(ptr noundef nonnull align 16 dereferenceable(256) %9, ptr noundef %5)
          to label %11 unwind label %25

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %9, i64 108
  store <4 x float> <float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00>, ptr %12, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %9, i64 103
  store i8 %6, ptr %13, align 1, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %9, i64 72
  store i16 1, ptr %14, align 8, !tbaa !29
  store double %1, ptr %9, align 16
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store double %2, ptr %.sroa.27.0..sroa_idx, align 8, !tbaa !30
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !31
  %17 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 16 dereferenceable(256) %9)
          to label %18 unwind label %27

18:                                               ; preds = %11
  invoke void @_ZN3JPH4Body17SetLinearVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %17, double %3, double %4)
          to label %19 unwind label %27

19:                                               ; preds = %18
  %20 = load ptr, ptr %15, align 8, !tbaa !31
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %17)
  %22 = call noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef 0x3D71979980000000)
  %23 = zext i1 %22 to i32
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef %23)
          to label %24 unwind label %27

24:                                               ; preds = %19
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %9) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %9) #5
  ret void

25:                                               ; preds = %7
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %19, %18, %11
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %9) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %9) #5
  resume { ptr, i32 } %.pn
}

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) local_unnamed_addr #4 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 = { 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 #3 = { "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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !23, i64 103}
!10 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !11, i64 0, !12, i64 16, !11, i64 32, !11, i64 48, !14, i64 64, !15, i64 72, !16, i64 80, !20, i64 96, !21, i64 97, !22, i64 98, !22, i64 99, !22, i64 100, !22, i64 101, !22, i64 102, !23, i64 103, !22, i64 104, !22, i64 105, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !6, i64 132, !19, i64 136, !19, i64 140, !24, i64 144, !6, 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, !19, i64 8, !19, i64 12}
!17 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!21 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!24 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!25 = !{!"_ZTSN3JPH14MassPropertiesE", !6, i64 0, !26, i64 16}
!26 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!27 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !18, i64 0}
!28 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !18, i64 0}
!29 = !{!10, !15, i64 72}
!30 = !{!7, !7, i64 0}
!31 = !{!32, !18, i64 24}
!32 = !{!"_ZTS4Test", !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40, !22, i64 48, !33, i64 56}
!33 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !34, i64 0}
!34 = !{!"_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", !18, i64 0, !14, i64 8, !35, i64 16, !14, i64 24, !36, i64 32, !18, i64 48}
!35 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !18, i64 0}
!36 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !6, i64 0, !14, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass