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

; 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.3 }
%union.anon.3 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon.5 }
%union.anon.5 = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"struct.JPH::AssertLastParam" = type { i8 }
%"struct.JPH::PlaneShape::PSGetTrianglesContext" = type <{ [4 x %"class.JPH::Float3"], i8, [3 x i8] }>
%"class.JPH::Float3" = type { float, float, float }

@.str.3 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [54 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH10PlaneShape11GetVerticesEPNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(96), 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double, double) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIN3JPH4Vec3EENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #5

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH10PlaneShape17GetTrianglesStartERNS_5Shape19GetTrianglesContextERKNS_5AABoxENS_4Vec3ENS_4QuatES7_(ptr noundef nonnull align 16 dereferenceable(96) %0, ptr noundef nonnull align 16 dereferenceable(4288) %1, ptr noundef nonnull align 16 dereferenceable(32) %2, double %3, double %4, double %5, double %6, double %7, double %8) unnamed_addr #1 align 2 {
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Quat", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.JPH::AssertLastParam", align 1
  %17 = alloca ptr, align 8
  %18 = alloca [4 x %"class.JPH::Vec3"], align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Mat44", align 16
  %21 = alloca %"class.JPH::Mat44", align 16
  %22 = alloca %"class.JPH::Quat", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca i32, align 4
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %3, ptr %28, align 16
  %29 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %4, ptr %29, align 8
  %30 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  store double %5, ptr %30, align 16
  %31 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  store double %6, ptr %31, align 8
  %32 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  store double %7, ptr %32, align 16
  %33 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %8, ptr %33, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store ptr %2, ptr %15, align 8, !tbaa !5
  %34 = load ptr, ptr %13, align 8
  br label %35

35:                                               ; preds = %9
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = call noundef zeroext i1 @_ZN3JPH9IsAlignedIPNS_5Shape19GetTrianglesContextEEEbT_m(ptr noundef %36, i64 noundef 4)
  br i1 %37, label %41, label %38

38:                                               ; preds = %35
  %39 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 392)
  br i1 %39, label %40, label %41

40:                                               ; preds = %38
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !9
  br label %41

41:                                               ; preds = %40, %38, %35
  br label %42

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %43 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %43, i8 0, i64 52, i1 false)
  call void @_ZN3JPH10PlaneShape21PSGetTrianglesContextC2Ev(ptr noundef nonnull align 4 dereferenceable(49) %43) #8
  store ptr %43, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #8
  %44 = getelementptr inbounds [4 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 0
  call void @_ZNK3JPH10PlaneShape11GetVerticesEPNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(96) %34, ptr noundef %44)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !10
  %45 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %46 = load double, ptr %45, align 16
  %47 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %48 = load double, ptr %47, align 8
  %49 = call noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double %46, double %48)
  br i1 %49, label %50, label %55

50:                                               ; preds = %42
  %51 = getelementptr inbounds [4 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 0
  %52 = getelementptr inbounds [4 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 3
  call void @_ZSt4swapIN3JPH4Vec3EENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 16 dereferenceable(16) %51, ptr noundef nonnull align 16 dereferenceable(16) %52) #8
  %53 = getelementptr inbounds [4 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 1
  %54 = getelementptr inbounds [4 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 2
  call void @_ZSt4swapIN3JPH4Vec3EENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 16 dereferenceable(16) %53, ptr noundef nonnull align 16 dereferenceable(16) %54) #8
  br label %55

55:                                               ; preds = %50, %42
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !10
  %56 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %57 = load double, ptr %56, align 16
  %58 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %59 = load double, ptr %58, align 8
  %60 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %61 = load double, ptr %60, align 16
  %62 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %63 = load double, ptr %62, align 8
  call void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %21, double %57, double %59, double %61, double %63)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !10
  %64 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %65 = load double, ptr %64, align 16
  %66 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %67 = load double, ptr %66, align 8
  call void @_ZNK3JPH5Mat449PreScaledENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %20, ptr noundef nonnull align 16 dereferenceable(64) %21, double %65, double %67)
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !12
  br label %68

68:                                               ; preds = %92, %55
  %69 = load i32, ptr %25, align 4, !tbaa !12
  %70 = icmp ult i32 %69, 4
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %95

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  %73 = load i32, ptr %25, align 4, !tbaa !12
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds [4 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 %74
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %75, i64 16, i1 false), !tbaa.struct !10
  %76 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %77 = load double, ptr %76, align 16
  %78 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %79 = load double, ptr %78, align 8
  %80 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %20, double %77, double %79)
  %81 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %82 = getelementptr inbounds %union.anon.5, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 0
  %84 = extractvalue { double, double } %80, 0
  store double %84, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 1
  %86 = extractvalue { double, double } %80, 1
  store double %86, ptr %85, align 8
  %87 = load ptr, ptr %17, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.JPH::PlaneShape::PSGetTrianglesContext", ptr %87, i32 0, i32 0
  %89 = load i32, ptr %25, align 4, !tbaa !12
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds [4 x %"class.JPH::Float3"], ptr %88, i64 0, i64 %90
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %26, ptr noundef %91)
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %92

92:                                               ; preds = %72
  %93 = load i32, ptr %25, align 4, !tbaa !12
  %94 = add i32 %93, 1
  store i32 %94, ptr %25, align 4, !tbaa !12
  br label %68, !llvm.loop !14

95:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH9IsAlignedIPNS_5Shape19GetTrianglesContextEEEbT_m(ptr noundef, i64 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10PlaneShape21PSGetTrianglesContextC2Ev(ptr noundef nonnull align 4 dereferenceable(49)) unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double, double, double) #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) #7 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 2158188712}
!10 = !{i64 0, i64 16, !11}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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.3 }
%union.anon.3 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon.5 }
%union.anon.5 = type { <4 x float> }

@.str.3 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [54 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH10PlaneShape11GetVerticesEPNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(96), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double, double) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIN3JPH4Vec3EENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH5Mat449PreScaledENS_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 #5 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH10PlaneShape17GetTrianglesStartERNS_5Shape19GetTrianglesContextERKNS_5AABoxENS_4Vec3ENS_4QuatES7_(ptr noundef nonnull align 16 dereferenceable(96) %0, ptr noundef nonnull align 16 dereferenceable(4288) %1, ptr nocapture noundef nonnull readnone align 16 dereferenceable(32) %2, double %3, double %4, double %5, double %6, double %7, double %8) unnamed_addr #1 align 2 {
  %10 = alloca [4 x %"class.JPH::Vec3"], align 16
  %11 = alloca %"class.JPH::Mat44", align 16
  %12 = alloca %"class.JPH::Mat44", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = tail call noundef zeroext i1 @_ZN3JPH9IsAlignedIPNS_5Shape19GetTrianglesContextEEEbT_m(ptr noundef nonnull %1, i64 noundef 4)
  br i1 %14, label %18, label %15

15:                                               ; preds = %9
  %16 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 392)
  br i1 %16, label %17, label %18

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

18:                                               ; preds = %9, %15, %17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %1, i8 0, i64 52, i1 false)
  tail call void @_ZN3JPH10PlaneShape21PSGetTrianglesContextC2Ev(ptr noundef nonnull align 4 dereferenceable(49) %1) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  call void @_ZNK3JPH10PlaneShape11GetVerticesEPNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(96) %0, ptr noundef nonnull %10)
  %19 = call noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double %7, double %8)
  br i1 %19, label %20, label %24

20:                                               ; preds = %18
  %21 = getelementptr inbounds i8, ptr %10, i64 48
  call void @_ZSt4swapIN3JPH4Vec3EENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %21) #7
  %22 = getelementptr inbounds i8, ptr %10, i64 16
  %23 = getelementptr inbounds i8, ptr %10, i64 32
  call void @_ZSt4swapIN3JPH4Vec3EENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 16 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) %23) #7
  br label %24

24:                                               ; preds = %20, %18
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #7
  call void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %12, double %5, double %6, double %3, double %4)
  call void @_ZNK3JPH5Mat449PreScaledENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %11, ptr noundef nonnull align 16 dereferenceable(64) %12, double %7, double %8)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  %25 = getelementptr inbounds i8, ptr %13, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %.sroa.0.0.copyload = load double, ptr %10, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !6
  %26 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %11, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %27 = extractvalue { double, double } %26, 0
  store double %27, ptr %13, align 16
  %28 = extractvalue { double, double } %26, 1
  store double %28, ptr %25, align 8
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull %1)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %29 = getelementptr inbounds i8, ptr %10, i64 16
  %.sroa.0.0.copyload.1 = load double, ptr %29, align 16
  %.sroa.2.0..sroa_idx.1 = getelementptr inbounds i8, ptr %10, i64 24
  %.sroa.2.0.copyload.1 = load double, ptr %.sroa.2.0..sroa_idx.1, align 8, !tbaa !6
  %30 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %11, double %.sroa.0.0.copyload.1, double %.sroa.2.0.copyload.1)
  %31 = extractvalue { double, double } %30, 0
  store double %31, ptr %13, align 16
  %32 = extractvalue { double, double } %30, 1
  store double %32, ptr %25, align 8
  %33 = getelementptr inbounds i8, ptr %1, i64 12
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull %33)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %34 = getelementptr inbounds i8, ptr %10, i64 32
  %.sroa.0.0.copyload.2 = load double, ptr %34, align 16
  %.sroa.2.0..sroa_idx.2 = getelementptr inbounds i8, ptr %10, i64 40
  %.sroa.2.0.copyload.2 = load double, ptr %.sroa.2.0..sroa_idx.2, align 8, !tbaa !6
  %35 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %11, double %.sroa.0.0.copyload.2, double %.sroa.2.0.copyload.2)
  %36 = extractvalue { double, double } %35, 0
  store double %36, ptr %13, align 16
  %37 = extractvalue { double, double } %35, 1
  store double %37, ptr %25, align 8
  %38 = getelementptr inbounds i8, ptr %1, i64 24
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull %38)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %39 = getelementptr inbounds i8, ptr %10, i64 48
  %.sroa.0.0.copyload.3 = load double, ptr %39, align 16
  %.sroa.2.0..sroa_idx.3 = getelementptr inbounds i8, ptr %10, i64 56
  %.sroa.2.0.copyload.3 = load double, ptr %.sroa.2.0..sroa_idx.3, align 8, !tbaa !6
  %40 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %11, double %.sroa.0.0.copyload.3, double %.sroa.2.0.copyload.3)
  %41 = extractvalue { double, double } %40, 0
  store double %41, ptr %13, align 16
  %42 = extractvalue { double, double } %40, 1
  store double %42, ptr %25, align 8
  %43 = getelementptr inbounds i8, ptr %1, i64 36
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull %43)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH9IsAlignedIPNS_5Shape19GetTrianglesContextEEEbT_m(ptr noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double, double, double) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) local_unnamed_addr #6 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 2158188712}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass