; LLVM IR from jrouwe/JoltPhysics :: UnitTests (PhysicsTestContext)

; 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::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.26 }
%union.anon.26 = 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.27", %"class.JPH::RefConst.28" }
%"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.27" = type { ptr }
%"class.JPH::RefConst.28" = type { ptr }
%class.PhysicsTestContext = type { ptr, ptr, %class.BPLayerInterfaceImpl, %class.ObjectVsBroadPhaseLayerFilterImpl, %class.ObjectLayerPairFilterImpl, ptr, float, i32 }
%class.BPLayerInterfaceImpl = type <{ %"class.JPH::BroadPhaseLayerInterface", [11 x %"class.JPH::BroadPhaseLayer"], [5 x i8] }>
%"class.JPH::BroadPhaseLayerInterface" = type { ptr }
%"class.JPH::BroadPhaseLayer" = type { i8 }
%class.ObjectVsBroadPhaseLayerFilterImpl = type { %"class.JPH::ObjectVsBroadPhaseLayerFilter" }
%"class.JPH::ObjectVsBroadPhaseLayerFilter" = type { ptr }
%class.ObjectLayerPairFilterImpl = type { %"class.JPH::ObjectLayerPairFilter" }
%"class.JPH::ObjectLayerPairFilter" = 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 @_ZN3JPH20BodyCreationSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) #3 align 2

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

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)) #5 align 2

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

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

29:                                               ; preds = %10
  %30 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !17
  %31 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !17
  %32 = load i8, ptr %15, align 1, !tbaa !9
  %33 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 7
  store i8 %32, ptr %33, align 16, !tbaa !19
  %34 = load i8, ptr %16, align 1, !tbaa !11
  %35 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 14
  store i8 %34, ptr %35, align 1, !tbaa !36
  %36 = load i16, ptr %17, align 2, !tbaa !13
  %37 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 5
  store i16 %36, ptr %37, align 8, !tbaa !37
  %38 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 19
  store float 0.000000e+00, ptr %38, align 4, !tbaa !38
  %39 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 20
  store float 0.000000e+00, ptr %39, align 8, !tbaa !39
  %40 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %19, i32 0, i32 6
  invoke void @_ZN3JPH14CollisionGroup10SetGroupIDEj(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef 0)
          to label %41 unwind label %58

41:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %42 = getelementptr inbounds %class.PhysicsTestContext, ptr %27, i32 0, i32 5
  %43 = load ptr, ptr %42, align 8, !tbaa !40
  %44 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %43)
          to label %45 unwind label %62

45:                                               ; preds = %41
  %46 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 16 dereferenceable(256) %19)
          to label %47 unwind label %62

47:                                               ; preds = %45
  store ptr %46, ptr %22, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.PhysicsTestContext, ptr %27, i32 0, i32 5
  %49 = load ptr, ptr %48, align 8, !tbaa !40
  %50 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %49)
          to label %51 unwind label %62

51:                                               ; preds = %47
  %52 = load ptr, ptr %22, align 8, !tbaa !5
  %53 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %52)
          to label %54 unwind label %62

54:                                               ; preds = %51
  %55 = load i32, ptr %18, align 4, !tbaa !15
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 4 dereferenceable(4) %53, i32 noundef %55)
          to label %56 unwind label %62

56:                                               ; preds = %54
  %57 = load ptr, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %19) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %19) #6
  ret ptr %57

58:                                               ; preds = %29, %10
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %20, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %21, align 4
  br label %66

62:                                               ; preds = %54, %51, %47, %45, %41
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %20, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %66

66:                                               ; preds = %62, %58
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %19) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %19) #6
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %20, align 8
  %69 = load i32, ptr %21, align 4
  %70 = insertvalue { ptr, i32 } poison, ptr %68, 0
  %71 = insertvalue { ptr, i32 } %70, i32 %69, 1
  resume { ptr, i32 } %71
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH14CollisionGroup10SetGroupIDEj(ptr noundef nonnull align 8 dereferenceable(16), i32 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 = { 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 = { 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 #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 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN3JPH11EActivationE", !7, i64 0}
!17 = !{i64 0, i64 16, !18}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !10, i64 96}
!20 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !21, i64 0, !22, i64 16, !21, i64 32, !21, i64 48, !24, i64 64, !14, i64 72, !25, i64 80, !10, i64 96, !28, i64 97, !29, i64 98, !29, i64 99, !29, i64 100, !29, i64 101, !29, i64 102, !12, i64 103, !29, i64 104, !29, i64 105, !30, i64 108, !30, i64 112, !30, i64 116, !30, i64 120, !30, i64 124, !30, i64 128, !30, i64 132, !27, i64 136, !27, i64 140, !31, i64 144, !30, i64 148, !32, i64 160, !34, i64 240, !35, i64 248}
!21 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!22 = !{!"_ZTSN3JPH4QuatE", !23, i64 0}
!23 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN3JPH14CollisionGroupE", !26, i64 0, !27, i64 8, !27, i64 12}
!26 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !6, i64 0}
!27 = !{!"int", !7, i64 0}
!28 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"float", !7, i64 0}
!31 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!32 = !{!"_ZTSN3JPH14MassPropertiesE", !30, i64 0, !33, i64 16}
!33 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!34 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !6, i64 0}
!35 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!36 = !{!20, !12, i64 103}
!37 = !{!20, !14, i64 72}
!38 = !{!20, !30, i64 116}
!39 = !{!20, !30, i64 120}
!40 = !{!41, !6, i64 56}
!41 = !{!"_ZTS18PhysicsTestContext", !6, i64 0, !6, i64 8, !42, i64 16, !44, i64 40, !46, i64 48, !6, i64 56, !30, i64 64, !27, i64 68}
!42 = !{!"_ZTS20BPLayerInterfaceImpl", !43, i64 0, !7, i64 8}
!43 = !{!"_ZTSN3JPH24BroadPhaseLayerInterfaceE"}
!44 = !{!"_ZTS33ObjectVsBroadPhaseLayerFilterImpl", !45, i64 0}
!45 = !{!"_ZTSN3JPH29ObjectVsBroadPhaseLayerFilterE"}
!46 = !{!"_ZTS25ObjectLayerPairFilterImpl", !47, i64 0}
!47 = !{!"_ZTSN3JPH21ObjectLayerPairFilterE"}


; 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.27", %"class.JPH::RefConst.28" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.26 }
%union.anon.26 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = 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.27" = type { ptr }
%"class.JPH::RefConst.28" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZN18PhysicsTestContext10CreateBodyEPKN3JPH13ShapeSettingsENS0_4Vec3ENS0_4QuatENS0_11EMotionTypeENS0_14EMotionQualityEtNS0_11EActivationE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(72) %0, ptr noundef %1, double %2, double %3, double %4, double %5, i8 noundef zeroext %6, i8 noundef zeroext %7, i16 noundef zeroext %8, i32 noundef %9) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %11 = alloca %"class.JPH::BodyCreationSettings", align 16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %11) #5
  call void @_ZN3JPH20BodyCreationSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(256) %11)
  invoke void @_ZN3JPH20BodyCreationSettings16SetShapeSettingsEPKNS_13ShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(256) %11, ptr noundef %1)
          to label %12 unwind label %28

12:                                               ; preds = %10
  store double %2, ptr %11, align 16
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store double %3, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %11, i64 16
  store double %4, ptr %13, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 24
  store double %5, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %11, i64 96
  store i8 %6, ptr %14, align 16, !tbaa !8
  %15 = getelementptr inbounds i8, ptr %11, i64 103
  store i8 %7, ptr %15, align 1, !tbaa !29
  %16 = getelementptr inbounds i8, ptr %11, i64 72
  store i16 %8, ptr %16, align 8, !tbaa !30
  %17 = getelementptr inbounds i8, ptr %11, i64 116
  store <2 x float> zeroinitializer, ptr %17, align 4, !tbaa !31
  %18 = getelementptr inbounds i8, ptr %11, i64 80
  call void @_ZN3JPH14CollisionGroup10SetGroupIDEj(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 0)
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  %20 = load ptr, ptr %19, align 8, !tbaa !32
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %20)
  %22 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 16 dereferenceable(256) %11)
          to label %23 unwind label %30

23:                                               ; preds = %12
  %24 = load ptr, ptr %19, align 8, !tbaa !32
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %24)
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %22)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 4 dereferenceable(4) %26, i32 noundef %9)
          to label %27 unwind label %30

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettings16SetShapeSettingsEPKNS_13ShapeSettingsE(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 @_ZN3JPH14CollisionGroup10SetGroupIDEj(ptr noundef nonnull align 8 dereferenceable(16), i32 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 = { 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 = { 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !19, i64 96}
!9 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !10, i64 0, !11, i64 16, !10, i64 32, !10, i64 48, !13, i64 64, !14, i64 72, !15, 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}
!10 = !{!"_ZTSN3JPH4Vec3E", !6, i64 0}
!11 = !{!"_ZTSN3JPH4QuatE", !12, i64 0}
!12 = !{!"_ZTSN3JPH4Vec4E", !6, i64 0}
!13 = !{!"long", !6, i64 0}
!14 = !{!"short", !6, i64 0}
!15 = !{!"_ZTSN3JPH14CollisionGroupE", !16, i64 0, !18, i64 8, !18, i64 12}
!16 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !17, i64 0}
!17 = !{!"any pointer", !6, i64 0}
!18 = !{!"int", !6, i64 0}
!19 = !{!"_ZTSN3JPH11EMotionTypeE", !6, i64 0}
!20 = !{!"_ZTSN3JPH12EAllowedDOFsE", !6, i64 0}
!21 = !{!"bool", !6, i64 0}
!22 = !{!"_ZTSN3JPH14EMotionQualityE", !6, i64 0}
!23 = !{!"float", !6, i64 0}
!24 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !6, i64 0}
!25 = !{!"_ZTSN3JPH14MassPropertiesE", !23, i64 0, !26, i64 16}
!26 = !{!"_ZTSN3JPH5Mat44E", !6, i64 0}
!27 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !17, i64 0}
!28 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !17, i64 0}
!29 = !{!9, !22, i64 103}
!30 = !{!9, !14, i64 72}
!31 = !{!23, !23, i64 0}
!32 = !{!33, !17, i64 56}
!33 = !{!"_ZTS18PhysicsTestContext", !17, i64 0, !17, i64 8, !34, i64 16, !36, i64 40, !38, i64 48, !17, i64 56, !23, i64 64, !18, i64 68}
!34 = !{!"_ZTS20BPLayerInterfaceImpl", !35, i64 0, !6, i64 8}
!35 = !{!"_ZTSN3JPH24BroadPhaseLayerInterfaceE"}
!36 = !{!"_ZTS33ObjectVsBroadPhaseLayerFilterImpl", !37, i64 0}
!37 = !{!"_ZTSN3JPH29ObjectVsBroadPhaseLayerFilterE"}
!38 = !{!"_ZTS25ObjectLayerPairFilterImpl", !39, i64 0}
!39 = !{!"_ZTSN3JPH21ObjectLayerPairFilterE"}


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