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

; 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.3 }
%union.anon.3 = type { <4 x float> }
%"struct.JPH::AssertLastParam" = type { i8 }
%struct.Visitor.44 = type <{ %"class.JPH::CastConvexVsTriangles.base", [4 x i8], ptr, [8 x i8], %"class.JPH::RayInvDirection", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::SubShapeIDCreator", [128 x float], [8 x i8] }>
%"class.JPH::CastConvexVsTriangles.base" = type <{ ptr, ptr, ptr, [8 x i8], %"class.JPH::Vec3", %"class.JPH::SubShapeIDCreator", ptr, %"class.JPH::ConvexShape::SupportBuffer", ptr, float }>
%"class.JPH::ConvexShape::SupportBuffer" = type { [4160 x i8] }
%"class.JPH::RayInvDirection" = type { %"class.JPH::Vec3", %"class.JPH::UVec4" }
%"class.JPH::UVec4" = type { %union.anon.31 }
%union.anon.31 = type { <2 x i64> }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"struct.JPH::ShapeCastT" = type { ptr, %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::AABox" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.29 }
%union.anon.29 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }

@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [52 x i8], align 1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShape24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144) %0, ptr noundef nonnull align 16 dereferenceable(36) %1, ptr noundef %2, double %3, double %4, ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(24) %9) #3 align 2 {
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.JPH::AssertLastParam", align 1
  %21 = alloca ptr, align 8
  %22 = alloca %struct.Visitor.44, align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  store double %3, ptr %27, align 16
  %28 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  store double %4, ptr %28, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  store ptr %9, ptr %19, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %10
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  %31 = call noundef zeroext i8 @_ZNK3JPH5Shape10GetSubTypeEv(ptr noundef nonnull align 8 dereferenceable(26) %30)
  %32 = icmp eq i8 %31, 13
  br i1 %32, label %36, label %33

33:                                               ; preds = %29
  %34 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.29, ptr noundef @.str.2, i32 noundef 2345)
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !9
  br label %36

36:                                               ; preds = %35, %33, %29
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %38, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4848, ptr %22) #5
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !10
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  %42 = load ptr, ptr %17, align 8, !tbaa !5
  %43 = load ptr, ptr %19, align 8, !tbaa !5
  %44 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %45 = load double, ptr %44, align 16
  %46 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %47 = load double, ptr %46, align 8
  call void @_ZZN3JPH16HeightFieldShape24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEEN7VisitorCI2NS_21CastConvexVsTrianglesEES3_S6_SA_SG_SJ_SO_(ptr noundef nonnull align 16 dereferenceable(4840) %22, ptr noundef nonnull align 16 dereferenceable(144) %39, ptr noundef nonnull align 16 dereferenceable(36) %40, double %45, double %47, ptr noundef nonnull align 16 dereferenceable(64) %41, ptr noundef nonnull align 4 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(24) %43)
  %48 = load ptr, ptr %21, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.Visitor.44, ptr %22, i32 0, i32 2
  store ptr %48, ptr %49, align 16, !tbaa !12
  %50 = getelementptr inbounds %struct.Visitor.44, ptr %22, i32 0, i32 4
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.JPH::ShapeCastT", ptr %51, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %52, i64 16, i1 false), !tbaa.struct !10
  %53 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %54 = load double, ptr %53, align 16
  %55 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %56 = load double, ptr %55, align 8
  call void @_ZN3JPH15RayInvDirection3SetENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %50, double %54, double %56)
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.JPH::ShapeCastT", ptr %57, i32 0, i32 4
  %59 = call { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32) %58)
  %60 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %61 = getelementptr inbounds %union.anon.3, ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 0
  %63 = extractvalue { double, double } %59, 0
  store double %63, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 1
  %65 = extractvalue { double, double } %59, 1
  store double %65, ptr %64, align 8
  %66 = getelementptr inbounds %struct.Visitor.44, ptr %22, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %66, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.JPH::ShapeCastT", ptr %67, i32 0, i32 4
  %69 = call { double, double } @_ZNK3JPH5AABox9GetExtentEv(ptr noundef nonnull align 16 dereferenceable(32) %68)
  %70 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %71 = getelementptr inbounds %union.anon.3, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 0
  %73 = extractvalue { double, double } %69, 0
  store double %73, ptr %72, align 16
  %74 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 1
  %75 = extractvalue { double, double } %69, 1
  store double %75, ptr %74, align 8
  %76 = getelementptr inbounds %struct.Visitor.44, ptr %22, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %76, ptr align 16 %26, i64 16, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.Visitor.44, ptr %22, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %78, ptr align 4 %77, i64 8, i1 false), !tbaa.struct !23
  %79 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZNK3JPH16HeightFieldShape15WalkHeightFieldIZNS0_24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE7VisitorEEvRT_(ptr noundef nonnull align 16 dereferenceable(176) %79, ptr noundef nonnull align 16 dereferenceable(4840) %22)
  call void @llvm.lifetime.end.p0(i64 4848, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH5Shape10GetSubTypeEv(ptr noundef nonnull align 8 dereferenceable(26)) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH15RayInvDirection3SetENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5AABox9GetExtentEv(ptr noundef nonnull align 16 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNK3JPH16HeightFieldShape15WalkHeightFieldIZNS0_24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE7VisitorEEvRT_(ptr noundef nonnull align 16 dereferenceable(176), ptr noundef nonnull align 16 dereferenceable(4840)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 2158629675}
!10 = !{i64 0, i64 16, !11}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 4240}
!13 = !{!"_ZTSZN3JPH16HeightFieldShape24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE7Visitor", !14, i64 0, !6, i64 4240, !21, i64 4256, !15, i64 4288, !15, i64 4304, !16, i64 4320, !7, i64 4328}
!14 = !{!"_ZTSN3JPH21CastConvexVsTrianglesE", !6, i64 0, !6, i64 8, !6, i64 16, !15, i64 32, !16, i64 48, !6, i64 56, !19, i64 64, !6, i64 4224, !20, i64 4232}
!15 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!16 = !{!"_ZTSN3JPH17SubShapeIDCreatorE", !17, i64 0, !18, i64 4}
!17 = !{!"_ZTSN3JPH10SubShapeIDE", !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN3JPH11ConvexShape13SupportBufferE", !7, i64 0}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTSN3JPH15RayInvDirectionE", !15, i64 0, !22, i64 16}
!22 = !{!"_ZTSN3JPH5UVec4E", !7, i64 0}
!23 = !{i64 0, i64 4, !24, i64 4, i64 4, !24}
!24 = !{!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"

%struct.Visitor.44 = type <{ %"class.JPH::CastConvexVsTriangles.base", [4 x i8], ptr, [8 x i8], %"class.JPH::RayInvDirection", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::SubShapeIDCreator", [128 x float], [8 x i8] }>
%"class.JPH::CastConvexVsTriangles.base" = type <{ ptr, ptr, ptr, [8 x i8], %"class.JPH::Vec3", %"class.JPH::SubShapeIDCreator", ptr, %"class.JPH::ConvexShape::SupportBuffer", ptr, float }>
%"class.JPH::ConvexShape::SupportBuffer" = type { [4160 x i8] }
%"class.JPH::RayInvDirection" = type { %"class.JPH::Vec3", %"class.JPH::UVec4" }
%"class.JPH::UVec4" = type { %union.anon.31 }
%union.anon.31 = type { <2 x i64> }
%"class.JPH::Vec3" = type { %union.anon.3 }
%union.anon.3 = type { <4 x float> }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SubShapeID" = type { i32 }

@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [52 x i8], align 1

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

; 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 uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShape24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144) %0, ptr noundef nonnull align 16 dereferenceable(36) %1, ptr noundef nonnull %2, double %3, double %4, ptr nocapture noundef nonnull readnone align 8 dereferenceable(12) %5, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 4 dereferenceable(8) %7, ptr nocapture noundef nonnull readonly align 4 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(24) %9) local_unnamed_addr #2 align 2 {
  %11 = alloca %struct.Visitor.44, align 16
  %12 = tail call noundef zeroext i8 @_ZNK3JPH5Shape10GetSubTypeEv(ptr noundef nonnull align 8 dereferenceable(26) %2)
  %13 = icmp eq i8 %12, 13
  br i1 %13, label %17, label %14

14:                                               ; preds = %10
  %15 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.2, i32 noundef 2345)
  br i1 %15, label %16, label %17

16:                                               ; preds = %14
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !5
  br label %17

17:                                               ; preds = %10, %14, %16
  call void @llvm.lifetime.start.p0(i64 4848, ptr nonnull %11) #4
  call void @_ZZN3JPH16HeightFieldShape24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEEN7VisitorCI2NS_21CastConvexVsTrianglesEES3_S6_SA_SG_SJ_SO_(ptr noundef nonnull align 16 dereferenceable(4840) %11, ptr noundef nonnull align 16 dereferenceable(144) %0, ptr noundef nonnull align 16 dereferenceable(36) %1, double %3, double %4, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(24) %9)
  %18 = getelementptr inbounds i8, ptr %11, i64 4240
  store ptr %2, ptr %18, align 16, !tbaa !6
  %19 = getelementptr inbounds i8, ptr %11, i64 4256
  %20 = getelementptr inbounds i8, ptr %0, i64 96
  %.sroa.03.0.copyload = load double, ptr %20, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 104
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !20
  call void @_ZN3JPH15RayInvDirection3SetENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %19, double %.sroa.03.0.copyload, double %.sroa.2.0.copyload)
  %21 = getelementptr inbounds i8, ptr %0, i64 112
  %22 = call { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32) %21)
  %23 = extractvalue { double, double } %22, 0
  %24 = extractvalue { double, double } %22, 1
  %25 = getelementptr inbounds i8, ptr %11, i64 4288
  store double %23, ptr %25, align 16
  %.sroa.42.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 4296
  store double %24, ptr %.sroa.42.0..sroa_idx, align 8, !tbaa !20
  %26 = call { double, double } @_ZNK3JPH5AABox9GetExtentEv(ptr noundef nonnull align 16 dereferenceable(32) %21)
  %27 = extractvalue { double, double } %26, 0
  %28 = extractvalue { double, double } %26, 1
  %29 = getelementptr inbounds i8, ptr %11, i64 4304
  store double %27, ptr %29, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 4312
  store double %28, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %11, i64 4320
  %31 = load i64, ptr %8, align 4
  store i64 %31, ptr %30, align 16
  call void @_ZNK3JPH16HeightFieldShape15WalkHeightFieldIZNS0_24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE7VisitorEEvRT_(ptr noundef nonnull align 16 dereferenceable(176) %2, ptr noundef nonnull align 16 dereferenceable(4840) %11)
  call void @llvm.lifetime.end.p0(i64 4848, ptr nonnull %11) #4
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH5Shape10GetSubTypeEv(ptr noundef nonnull align 8 dereferenceable(26)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZZN3JPH16HeightFieldShape24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEEN7VisitorCI2NS_21CastConvexVsTrianglesEES3_S6_SA_SG_SJ_SO_(ptr noundef nonnull align 16 dereferenceable(4840), ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNK3JPH16HeightFieldShape15WalkHeightFieldIZNS0_24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE7VisitorEEvRT_(ptr noundef nonnull align 16 dereferenceable(176), ptr noundef nonnull align 16 dereferenceable(4840)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { 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 = { 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 = !{i64 2158629675}
!6 = !{!7, !9, i64 4240}
!7 = !{!"_ZTSZN3JPH16HeightFieldShape24sCastConvexVsHeightFieldERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE7Visitor", !8, i64 0, !9, i64 4240, !18, i64 4256, !12, i64 4288, !12, i64 4304, !13, i64 4320, !10, i64 4328}
!8 = !{!"_ZTSN3JPH21CastConvexVsTrianglesE", !9, i64 0, !9, i64 8, !9, i64 16, !12, i64 32, !13, i64 48, !9, i64 56, !16, i64 64, !9, i64 4224, !17, i64 4232}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3JPH4Vec3E", !10, i64 0}
!13 = !{!"_ZTSN3JPH17SubShapeIDCreatorE", !14, i64 0, !15, i64 4}
!14 = !{!"_ZTSN3JPH10SubShapeIDE", !15, i64 0}
!15 = !{!"int", !10, i64 0}
!16 = !{!"_ZTSN3JPH11ConvexShape13SupportBufferE", !10, i64 0}
!17 = !{!"float", !10, i64 0}
!18 = !{!"_ZTSN3JPH15RayInvDirectionE", !12, i64 0, !19, i64 16}
!19 = !{!"_ZTSN3JPH5UVec4E", !10, i64 0}
!20 = !{!10, !10, i64 0}


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