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

; 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::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::BoxShape" = type <{ %"class.JPH::ConvexShape.base", [4 x i8], %"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.4 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = 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 } @_ZNK3JPH4Vec33AbsEv(ptr noundef nonnull align 16 dereferenceable(16)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5AABoxC2ENS_4Vec3ES1_(ptr noundef nonnull align 16 dereferenceable(32), double, double, double, double) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH8BoxShape17GetSupportingFaceERKNS_10SubShapeIDENS_4Vec3ES4_RKNS_5Mat44ERNS_11StaticArrayIS4_Lj32EEE(ptr noundef nonnull align 16 dereferenceable(80) %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 #4 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::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::AABox", 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 ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  store double %2, ptr %29, align 16
  %30 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  store double %3, ptr %30, align 8
  %31 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %4, ptr %31, align 16
  %32 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %5, ptr %32, 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
  %33 = load ptr, ptr %11, align 8
  br label %34

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

37:                                               ; preds = %34
  %38 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.6, ptr noundef @.str.4, i32 noundef 132, ptr noundef @.str.7)
  br i1 %38, label %39, label %40

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

40:                                               ; preds = %39, %37, %34
  br label %41

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %42 = call { double, double } @_ZNK3JPH4Vec33AbsEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  %43 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %44 = getelementptr inbounds %union.anon.3, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %46 = extractvalue { double, double } %42, 0
  store double %46, ptr %45, align 16
  %47 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %48 = extractvalue { double, double } %42, 1
  store double %48, ptr %47, align 8
  %49 = getelementptr inbounds %"class.JPH::BoxShape", ptr %33, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %49, i64 16, i1 false), !tbaa.struct !10
  %50 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %51 = load double, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %53 = load double, ptr %52, align 8
  %54 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %17, double %51, double %53)
  %55 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %56 = getelementptr inbounds %union.anon.3, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 0
  %58 = extractvalue { double, double } %54, 0
  store double %58, ptr %57, align 16
  %59 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 1
  %60 = extractvalue { double, double } %54, 1
  store double %60, ptr %59, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  %61 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %16)
  %62 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, 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 @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !10
  %68 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %69 = load double, ptr %68, align 16
  %70 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %71 = load double, ptr %70, align 8
  %72 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %73 = load double, ptr %72, align 16
  %74 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %75 = load double, ptr %74, align 8
  call void @_ZN3JPH5AABoxC2ENS_4Vec3ES1_(ptr noundef nonnull align 16 dereferenceable(32) %19, double %69, double %71, double %73, double %75)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !10
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %78 = load double, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %80 = load double, ptr %79, align 8
  call void @_ZNK3JPH5AABox17GetSupportingFaceINS_11StaticArrayINS_4Vec3ELj32EEEEEvS3_RT_(ptr noundef nonnull align 16 dereferenceable(32) %19, double %78, double %80, ptr noundef nonnull align 16 dereferenceable(528) %76)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %81, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %82 = load ptr, ptr %23, align 8, !tbaa !5
  %83 = call noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(528) %82)
  store ptr %83, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %84 = load ptr, ptr %23, align 8, !tbaa !5
  %85 = call noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(528) %84)
  store ptr %85, ptr %25, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %107, %41
  %87 = load ptr, ptr %24, align 8, !tbaa !5
  %88 = load ptr, ptr %25, align 8, !tbaa !5
  %89 = icmp ne ptr %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %110

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %92 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %92, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = load ptr, ptr %26, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %94, i64 16, i1 false), !tbaa.struct !10
  %95 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %96 = load double, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %98 = load double, ptr %97, align 8
  %99 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %93, double %96, double %98)
  %100 = getelementptr inbounds %"class.JPH::Vec3", ptr %27, i32 0, i32 0
  %101 = getelementptr inbounds %union.anon.3, ptr %100, i32 0, i32 0
  %102 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 0
  %103 = extractvalue { double, double } %99, 0
  store double %103, ptr %102, align 16
  %104 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 1
  %105 = extractvalue { double, double } %99, 1
  store double %105, ptr %104, align 8
  %106 = load ptr, ptr %26, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %106, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %107

107:                                              ; preds = %91
  %108 = load ptr, ptr %24, align 8, !tbaa !5
  %109 = getelementptr inbounds %"class.JPH::Vec3", ptr %108, i32 1
  store ptr %109, ptr %24, align 8, !tbaa !5
  br label %86

110:                                              ; preds = %90
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, 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)) #5 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) #6

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) #2 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 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 = { 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 = { 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 #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 2157914002}
!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::Vec3" = type { %union.anon.3 }
%union.anon.3 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }

@.str.4 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = 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 } @_ZNK3JPH4Vec33AbsEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH8BoxShape17GetSupportingFaceERKNS_10SubShapeIDENS_4Vec3ES4_RKNS_5Mat44ERNS_11StaticArrayIS4_Lj32EEE(ptr nocapture noundef nonnull readonly align 16 dereferenceable(80) %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 %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::AABox", align 16
  store double %4, ptr %9, align 16
  %13 = getelementptr inbounds i8, ptr %9, i64 8
  store double %5, ptr %13, align 8
  %14 = tail call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br i1 %14, label %18, label %15

15:                                               ; preds = %8
  %16 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.4, i32 noundef 132, ptr noundef nonnull @.str.7)
  br i1 %16, label %17, label %18

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

18:                                               ; preds = %8, %15, %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %19 = call { double, double } @_ZNK3JPH4Vec33AbsEv(ptr noundef nonnull align 16 dereferenceable(16) %9)
  %20 = extractvalue { double, double } %19, 0
  store double %20, ptr %11, align 16
  %21 = getelementptr inbounds i8, ptr %11, i64 8
  %22 = extractvalue { double, double } %19, 1
  store double %22, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  %.sroa.015.0.copyload = load double, ptr %23, align 16
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 56
  %.sroa.216.0.copyload = load double, ptr %.sroa.216.0..sroa_idx, align 8, !tbaa !6
  %24 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.015.0.copyload, double %.sroa.216.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 @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  %28 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  %29 = extractvalue { double, double } %28, 0
  %30 = extractvalue { double, double } %28, 1
  %.sroa.011.0.copyload = load double, ptr %10, align 16
  %.sroa.212.0.copyload = load double, ptr %26, align 8, !tbaa !6
  call void @_ZN3JPH5AABoxC2ENS_4Vec3ES1_(ptr noundef nonnull align 16 dereferenceable(32) %12, double %29, double %30, double %.sroa.011.0.copyload, double %.sroa.212.0.copyload)
  call void @_ZNK3JPH5AABox17GetSupportingFaceINS_11StaticArrayINS_4Vec3ELj32EEEEEvS3_RT_(ptr noundef nonnull align 16 dereferenceable(32) %12, double %2, double %3, ptr noundef nonnull align 16 dereferenceable(528) %7)
  %31 = call noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(528) %7)
  %32 = call noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(528) %7)
  %.not24 = icmp eq ptr %31, %32
  br i1 %.not24, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %18
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  ret void

.lr.ph:                                           ; preds = %18, %.lr.ph
  %.025 = phi ptr [ %36, %.lr.ph ], [ %31, %18 ]
  %.sroa.0.0.copyload = load double, ptr %.025, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %.025, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !6
  %33 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %6, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %34 = extractvalue { double, double } %33, 0
  %35 = extractvalue { double, double } %33, 1
  store double %34, ptr %.025, align 16
  store double %35, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !6
  %36 = getelementptr inbounds i8, ptr %.025, i64 16
  %.not = icmp eq ptr %36, %32
  br i1 %.not, label %._crit_edge, label %.lr.ph
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(528)) local_unnamed_addr #2 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 #1 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 2157914002}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass