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

; 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 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.5 }
%union.anon.5 = type { <4 x float> }
%"class.JPH::TriangleShape" = type <{ %"class.JPH::ConvexShape.base", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, [12 x i8] }>
%"class.JPH::ConvexShape.base" = type <{ %"class.JPH::Shape.base", [6 x i8], %"class.JPH::RefConst", float }>
%"class.JPH::Shape.base" = type <{ ptr, %"class.JPH::RefTarget.4", [4 x i8], i64, i8, i8 }>
%"class.JPH::RefTarget.4" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::RefConst" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13TriangleShape17GetSupportingFaceERKNS_10SubShapeIDENS_4Vec3ES4_RKNS_5Mat44ERNS_11StaticArrayIS4_Lj32EEE(ptr noundef nonnull align 16 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3, double %4, double %5, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 16 dereferenceable(528) %7) unnamed_addr #3 align 2 {
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.JPH::AssertLastParam", align 1
  %16 = alloca %"class.JPH::Mat44", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", 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 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  store double %2, ptr %31, align 16
  %32 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  store double %3, ptr %32, align 8
  %33 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %4, ptr %33, align 16
  %34 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %5, ptr %34, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %6, ptr %13, align 8, !tbaa !5
  store ptr %7, ptr %14, align 8, !tbaa !5
  %35 = load ptr, ptr %11, align 8
  br label %36

36:                                               ; preds = %8
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %37)
  br i1 %38, label %42, label %39

39:                                               ; preds = %36
  %40 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 164, ptr noundef @.str.6)
  br i1 %40, label %41, label %42

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

42:                                               ; preds = %41, %39, %36
  br label %43

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #7
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !10
  %45 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %46 = load double, ptr %45, align 16
  %47 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %48 = load double, ptr %47, align 8
  call void @_ZNK3JPH5Mat449PreScaledENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %16, ptr noundef nonnull align 16 dereferenceable(64) %44, double %46, double %48)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !10
  %49 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %50 = load double, ptr %49, align 16
  %51 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %52 = load double, ptr %51, align 8
  %53 = call noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double %50, double %52)
  br i1 %53, label %54, label %94

54:                                               ; preds = %43
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  %56 = getelementptr inbounds %"class.JPH::TriangleShape", ptr %35, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %56, i64 16, i1 false), !tbaa.struct !10
  %57 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %58 = load double, ptr %57, align 16
  %59 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %60 = load double, ptr %59, align 8
  %61 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %16, double %58, double %60)
  %62 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %63 = getelementptr inbounds %union.anon.3, 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
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %55, ptr noundef nonnull align 16 dereferenceable(16) %19)
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  %69 = getelementptr inbounds %"class.JPH::TriangleShape", ptr %35, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %69, i64 16, i1 false), !tbaa.struct !10
  %70 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %71 = load double, ptr %70, align 16
  %72 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %73 = load double, ptr %72, align 8
  %74 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %16, double %71, double %73)
  %75 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %76 = getelementptr inbounds %union.anon.3, ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 0
  %78 = extractvalue { double, double } %74, 0
  store double %78, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 1
  %80 = extractvalue { double, double } %74, 1
  store double %80, ptr %79, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %68, ptr noundef nonnull align 16 dereferenceable(16) %21)
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  %82 = getelementptr inbounds %"class.JPH::TriangleShape", ptr %35, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %82, i64 16, i1 false), !tbaa.struct !10
  %83 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  %87 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %16, double %84, double %86)
  %88 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %89 = getelementptr inbounds %union.anon.3, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 0
  %91 = extractvalue { double, double } %87, 0
  store double %91, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 1
  %93 = extractvalue { double, double } %87, 1
  store double %93, ptr %92, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %81, ptr noundef nonnull align 16 dereferenceable(16) %23)
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  br label %134

94:                                               ; preds = %43
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #7
  %96 = getelementptr inbounds %"class.JPH::TriangleShape", ptr %35, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %96, i64 16, i1 false), !tbaa.struct !10
  %97 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %98 = load double, ptr %97, align 16
  %99 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %100 = load double, ptr %99, align 8
  %101 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %16, double %98, double %100)
  %102 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %103 = getelementptr inbounds %union.anon.3, ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds { double, double }, ptr %103, i32 0, i32 0
  %105 = extractvalue { double, double } %101, 0
  store double %105, ptr %104, align 16
  %106 = getelementptr inbounds { double, double }, ptr %103, i32 0, i32 1
  %107 = extractvalue { double, double } %101, 1
  store double %107, ptr %106, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %95, ptr noundef nonnull align 16 dereferenceable(16) %25)
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  %109 = getelementptr inbounds %"class.JPH::TriangleShape", ptr %35, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %109, i64 16, i1 false), !tbaa.struct !10
  %110 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %111 = load double, ptr %110, align 16
  %112 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %113 = load double, ptr %112, align 8
  %114 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %16, double %111, double %113)
  %115 = getelementptr inbounds %"class.JPH::Vec3", ptr %27, i32 0, i32 0
  %116 = getelementptr inbounds %union.anon.3, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds { double, double }, ptr %116, i32 0, i32 0
  %118 = extractvalue { double, double } %114, 0
  store double %118, ptr %117, align 16
  %119 = getelementptr inbounds { double, double }, ptr %116, i32 0, i32 1
  %120 = extractvalue { double, double } %114, 1
  store double %120, ptr %119, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %108, ptr noundef nonnull align 16 dereferenceable(16) %27)
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  %122 = getelementptr inbounds %"class.JPH::TriangleShape", ptr %35, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %122, i64 16, i1 false), !tbaa.struct !10
  %123 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %124 = load double, ptr %123, align 16
  %125 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %126 = load double, ptr %125, align 8
  %127 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %16, double %124, double %126)
  %128 = getelementptr inbounds %"class.JPH::Vec3", ptr %29, i32 0, i32 0
  %129 = getelementptr inbounds %union.anon.3, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds { double, double }, ptr %129, i32 0, i32 0
  %131 = extractvalue { double, double } %127, 0
  store double %131, ptr %130, align 16
  %132 = getelementptr inbounds { double, double }, ptr %129, i32 0, i32 1
  %133 = extractvalue { double, double } %127, 1
  store double %133, ptr %132, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %121, ptr noundef nonnull align 16 dereferenceable(16) %29)
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  br label %134

134:                                              ; preds = %94, %54
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double, double) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528), ptr noundef nonnull align 16 dereferenceable(16)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #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 = { 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 2158192483}
!10 = !{i64 0, i64 16, !11}
!11 = !{!7, !7, 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"

%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.5 }
%union.anon.5 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon.3 }
%union.anon.3 = type { <4 x float> }

@.str.3 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13TriangleShape17GetSupportingFaceERKNS_10SubShapeIDENS_4Vec3ES4_RKNS_5Mat44ERNS_11StaticArrayIS4_Lj32EEE(ptr nocapture noundef nonnull readonly align 16 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3, double %4, double %5, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 16 dereferenceable(528) %7) unnamed_addr #2 align 2 {
  %9 = alloca %"class.JPH::Mat44", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = tail call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br i1 %16, label %20, label %17

17:                                               ; preds = %8
  %18 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 164, ptr noundef nonnull @.str.6)
  br i1 %18, label %19, label %20

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

20:                                               ; preds = %8, %17, %19
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #6
  call void @_ZNK3JPH5Mat449PreScaledENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %9, ptr noundef nonnull align 16 dereferenceable(64) %6, double %4, double %5)
  %21 = call noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double %4, double %5)
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 56
  br i1 %21, label %23, label %38

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %.sroa.09.0.copyload = load double, ptr %22, align 16
  %.sroa.210.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !6
  %24 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %9, double %.sroa.09.0.copyload, double %.sroa.210.0.copyload)
  %25 = extractvalue { double, double } %24, 0
  store double %25, ptr %10, align 16
  %26 = getelementptr inbounds i8, ptr %10, i64 8
  %27 = extractvalue { double, double } %24, 1
  store double %27, ptr %26, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %28 = getelementptr inbounds i8, ptr %0, i64 80
  %.sroa.07.0.copyload = load double, ptr %28, align 16
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  %.sroa.28.0.copyload = load double, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !6
  %29 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %9, double %.sroa.07.0.copyload, double %.sroa.28.0.copyload)
  %30 = extractvalue { double, double } %29, 0
  store double %30, ptr %11, align 16
  %31 = getelementptr inbounds i8, ptr %11, i64 8
  %32 = extractvalue { double, double } %29, 1
  store double %32, ptr %31, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  %33 = getelementptr inbounds i8, ptr %0, i64 64
  %.sroa.05.0.copyload = load double, ptr %33, align 16
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 72
  %.sroa.26.0.copyload = load double, ptr %.sroa.26.0..sroa_idx, align 8, !tbaa !6
  %34 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %9, double %.sroa.05.0.copyload, double %.sroa.26.0.copyload)
  %35 = extractvalue { double, double } %34, 0
  store double %35, ptr %12, align 16
  %36 = getelementptr inbounds i8, ptr %12, i64 8
  %37 = extractvalue { double, double } %34, 1
  store double %37, ptr %36, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  br label %53

38:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %.sroa.03.0.copyload = load double, ptr %22, align 16
  %.sroa.24.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !6
  %39 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %9, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
  %40 = extractvalue { double, double } %39, 0
  store double %40, ptr %13, align 16
  %41 = getelementptr inbounds i8, ptr %13, i64 8
  %42 = extractvalue { double, double } %39, 1
  store double %42, ptr %41, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  %43 = getelementptr inbounds i8, ptr %0, i64 64
  %.sroa.01.0.copyload = load double, ptr %43, align 16
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 72
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !6
  %44 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %9, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload)
  %45 = extractvalue { double, double } %44, 0
  store double %45, ptr %14, align 16
  %46 = getelementptr inbounds i8, ptr %14, i64 8
  %47 = extractvalue { double, double } %44, 1
  store double %47, ptr %46, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  %48 = getelementptr inbounds i8, ptr %0, i64 80
  %.sroa.0.0.copyload = load double, ptr %48, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !6
  %49 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %9, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %50 = extractvalue { double, double } %49, 0
  store double %50, ptr %15, align 16
  %51 = getelementptr inbounds i8, ptr %15, i64 8
  %52 = extractvalue { double, double } %49, 1
  store double %52, ptr %51, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  br label %53

53:                                               ; preds = %38, %23
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #6
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double, double) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 = { 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 2158192483}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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