; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision (TransformedShape)

; 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"struct.JPH::ShapeCast" = type { %"struct.JPH::ShapeCastT" }
%"struct.JPH::ShapeCastT" = type { ptr, %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::AABox" }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"struct.JPH::RShapeCast" = type { %"struct.JPH::ShapeCastT.5" }
%"struct.JPH::ShapeCastT.5" = type { ptr, %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::AABox" }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::TransformedShape" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::RefConst", %"class.JPH::Float3", %"class.JPH::BodyID", %"class.JPH::SubShapeIDCreator" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::ShapeFilter" = type <{ ptr, %"class.JPH::BodyID", [4 x i8] }>

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8RefConstINS_5ShapeEEneEPKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16TransformedShape13GetShapeScaleEv(ptr noundef nonnull align 16 dereferenceable(64)) #2 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) #3

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64), double, double) #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH16TransformedShape24GetCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH16TransformedShape9CastShapeERKNS_10RShapeCastERKNS_17ShapeCastSettingsENS_4Vec3ERNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(64) %0, ptr noundef nonnull align 16 dereferenceable(144) %1, ptr noundef nonnull align 16 dereferenceable(36) %2, double %3, double %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(12) %6) #7 align 2 {
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.JPH::ShapeCast", align 16
  %15 = alloca %"struct.JPH::RShapeCast", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Mat44", align 16
  %18 = alloca %"class.JPH::Mat44", align 16
  %19 = alloca %"class.JPH::Mat44", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %22 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  store double %3, ptr %24, align 16
  %25 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  store double %4, ptr %25, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  store ptr %6, ptr %13, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8
  %27 = getelementptr inbounds %"class.JPH::TransformedShape", ptr %26, i32 0, i32 2
  %28 = call noundef zeroext i1 @_ZNK3JPH8RefConstINS_5ShapeEEneEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef null)
  br i1 %28, label %29, label %74

29:                                               ; preds = %7
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN3JPH18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEE10SetContextEPKNS_16TransformedShapeE(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef %26)
  %31 = getelementptr inbounds %"class.JPH::TransformedShape", ptr %26, i32 0, i32 4
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.JPH::ShapeFilter", ptr %32, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 4 %31, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 144, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 144, ptr %15) #9
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  %36 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %37 = getelementptr inbounds %union.anon, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %39 = extractvalue { double, double } %35, 0
  store double %39, ptr %38, align 16
  %40 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %41 = extractvalue { double, double } %35, 1
  store double %41, ptr %40, align 8
  %42 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %43 = load double, ptr %42, align 16
  %44 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %45 = load double, ptr %44, align 8
  call void @_ZNK3JPH10ShapeCastTINS_4Vec3ENS_5Mat44ENS_10RShapeCastEE14PostTranslatedES1_(ptr dead_on_unwind writable sret(%"struct.JPH::RShapeCast") align 16 %15, ptr noundef nonnull align 16 dereferenceable(144) %34, double %43, double %45)
  call void @_ZNK3JPH10RShapeCastcvNS_9ShapeCastEEv(ptr dead_on_unwind writable sret(%"struct.JPH::ShapeCast") align 16 %14, ptr noundef nonnull align 16 dereferenceable(144) %15)
  call void @llvm.lifetime.end.p0(i64 144, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #9
  call void @_ZNK3JPH16TransformedShape24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %19, ptr noundef nonnull align 16 dereferenceable(64) %26)
  %46 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  %47 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %48 = getelementptr inbounds %union.anon, ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %50 = extractvalue { double, double } %46, 0
  store double %50, ptr %49, align 16
  %51 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %52 = extractvalue { double, double } %46, 1
  store double %52, ptr %51, align 8
  %53 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %54 = load double, ptr %53, align 16
  %55 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %56 = load double, ptr %55, align 8
  call void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %18, ptr noundef nonnull align 16 dereferenceable(64) %19, double %54, double %56)
  call void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %17, ptr noundef nonnull align 16 dereferenceable(64) %18)
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %21) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %57 = getelementptr inbounds %"class.JPH::TransformedShape", ptr %26, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %57, i64 8, i1 false), !tbaa.struct !12
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.JPH::TransformedShape", ptr %26, i32 0, i32 2
  %60 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %59)
  %61 = call { double, double } @_ZNK3JPH16TransformedShape13GetShapeScaleEv(ptr noundef nonnull align 16 dereferenceable(64) %26)
  %62 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %63 = getelementptr inbounds %union.anon, ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 0
  %65 = extractvalue { double, double } %61, 0
  store double %65, ptr %64, align 16
  %66 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 1
  %67 = extractvalue { double, double } %61, 1
  store double %67, ptr %66, align 8
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %71 = load double, ptr %70, align 16
  %72 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %73 = load double, ptr %72, align 8
  call void @_ZN3JPH17CollisionDispatch27sCastShapeVsShapeWorldSpaceERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144) %14, ptr noundef nonnull align 16 dereferenceable(36) %58, ptr noundef %60, double %71, double %73, ptr noundef nonnull align 8 dereferenceable(12) %68, ptr noundef nonnull align 16 dereferenceable(64) %17, ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(24) %69)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %14) #9
  br label %74

74:                                               ; preds = %29, %7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEE10SetContextEPKNS_16TransformedShapeE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #8 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH10ShapeCastTINS_4Vec3ENS_5Mat44ENS_10RShapeCastEE14PostTranslatedES1_(ptr dead_on_unwind noalias writable sret(%"struct.JPH::RShapeCast") align 16, ptr noundef nonnull align 16 dereferenceable(144), double, double) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH10RShapeCastcvNS_9ShapeCastEEv(ptr dead_on_unwind noalias writable sret(%"struct.JPH::ShapeCast") align 16, ptr noundef nonnull align 16 dereferenceable(144)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch27sCastShapeVsShapeWorldSpaceERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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


; 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"struct.JPH::ShapeCast" = type { %"struct.JPH::ShapeCastT" }
%"struct.JPH::ShapeCastT" = type { ptr, %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::AABox" }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"struct.JPH::RShapeCast" = type { %"struct.JPH::ShapeCastT.5" }
%"struct.JPH::ShapeCastT.5" = type { ptr, %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::AABox" }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SubShapeID" = type { i32 }

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH8RefConstINS_5ShapeEEneEPKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16TransformedShape13GetShapeScaleEv(ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #2 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64), double, double) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH16TransformedShape24GetCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #2 align 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH16TransformedShape9CastShapeERKNS_10RShapeCastERKNS_17ShapeCastSettingsENS_4Vec3ERNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(64) %0, ptr noundef nonnull align 16 dereferenceable(144) %1, ptr noundef nonnull align 16 dereferenceable(36) %2, double %3, double %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(12) %6) local_unnamed_addr #6 align 2 {
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"struct.JPH::ShapeCast", align 16
  %10 = alloca %"struct.JPH::RShapeCast", align 16
  %11 = alloca %"class.JPH::Mat44", align 16
  %12 = alloca %"class.JPH::Mat44", align 16
  %13 = alloca %"class.JPH::Mat44", align 16
  %14 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %15 = alloca %"class.JPH::SubShapeIDCreator", align 8
  store double %3, ptr %8, align 16
  %16 = getelementptr inbounds i8, ptr %8, i64 8
  store double %4, ptr %16, align 8
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  %18 = tail call noundef zeroext i1 @_ZNK3JPH8RefConstINS_5ShapeEEneEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef null)
  br i1 %18, label %19, label %35

19:                                               ; preds = %7
  tail call void @_ZN3JPH18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEE10SetContextEPKNS_16TransformedShapeE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull %0)
  %20 = getelementptr inbounds i8, ptr %0, i64 52
  %21 = getelementptr inbounds i8, ptr %6, i64 8
  %22 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %22, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %10) #8
  %23 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  %24 = extractvalue { double, double } %23, 0
  %25 = extractvalue { double, double } %23, 1
  call void @_ZNK3JPH10ShapeCastTINS_4Vec3ENS_5Mat44ENS_10RShapeCastEE14PostTranslatedES1_(ptr dead_on_unwind nonnull writable sret(%"struct.JPH::RShapeCast") align 16 %10, ptr noundef nonnull align 16 dereferenceable(144) %1, double %24, double %25)
  call void @_ZNK3JPH10RShapeCastcvNS_9ShapeCastEEv(ptr dead_on_unwind nonnull writable sret(%"struct.JPH::ShapeCast") align 16 %9, ptr noundef nonnull align 16 dereferenceable(144) %10)
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #8
  call void @_ZNK3JPH16TransformedShape24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %13, ptr noundef nonnull align 16 dereferenceable(64) %0)
  %26 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  %27 = extractvalue { double, double } %26, 0
  %28 = extractvalue { double, double } %26, 1
  call void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %12, ptr noundef nonnull align 16 dereferenceable(64) %13, double %27, double %28)
  call void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %11, ptr noundef nonnull align 16 dereferenceable(64) %12)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %29 = getelementptr inbounds i8, ptr %0, i64 56
  %30 = load i64, ptr %29, align 8
  store i64 %30, ptr %15, align 8
  %31 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %32 = call { double, double } @_ZNK3JPH16TransformedShape13GetShapeScaleEv(ptr noundef nonnull align 16 dereferenceable(64) %0)
  %33 = extractvalue { double, double } %32, 0
  %34 = extractvalue { double, double } %32, 1
  call void @_ZN3JPH17CollisionDispatch27sCastShapeVsShapeWorldSpaceERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144) %9, ptr noundef nonnull align 16 dereferenceable(36) %2, ptr noundef %31, double %33, double %34, ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 16 dereferenceable(64) %11, ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %9) #8
  br label %35

35:                                               ; preds = %19, %7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEE10SetContextEPKNS_16TransformedShapeE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH10ShapeCastTINS_4Vec3ENS_5Mat44ENS_10RShapeCastEE14PostTranslatedES1_(ptr dead_on_unwind noalias writable sret(%"struct.JPH::RShapeCast") align 16, ptr noundef nonnull align 16 dereferenceable(144), double, double) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH10RShapeCastcvNS_9ShapeCastEEv(ptr dead_on_unwind noalias writable sret(%"struct.JPH::ShapeCast") align 16, ptr noundef nonnull align 16 dereferenceable(144)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch27sCastShapeVsShapeWorldSpaceERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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


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