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

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

@.str.6 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = 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 nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16)) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local { double, double } @_ZNK3JPH19TaperedCapsuleShape16GetSurfaceNormalERKNS_10SubShapeIDENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(96) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3) unnamed_addr #7 align 2 {
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.JPH::AssertLastParam", align 1
  %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 = alloca %"class.JPH::Vec3", align 16
  %17 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  store double %2, ptr %17, align 16
  %18 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  store double %3, ptr %18, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %7, align 8
  br label %20

20:                                               ; preds = %4
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
  br i1 %22, label %26, label %23

23:                                               ; preds = %20
  %24 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.13, ptr noundef @.str.6, i32 noundef 260, ptr noundef @.str.14)
  br i1 %24, label %25, label %26

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

26:                                               ; preds = %25, %23, %20
  br label %27

27:                                               ; preds = %26
  %28 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %29 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 5
  %30 = load float, ptr %29, align 8, !tbaa !10
  %31 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 8
  %32 = load float, ptr %31, align 4, !tbaa !24
  %33 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 3
  %34 = load float, ptr %33, align 16, !tbaa !25
  %35 = call float @llvm.fmuladd.f32(float %32, float %34, float %30)
  %36 = fcmp ogt float %28, %35
  br i1 %36, label %37, label %58

37:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  %38 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 5
  %39 = load float, ptr %38, align 8, !tbaa !10
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef 0.000000e+00, float noundef %39, float noundef 0.000000e+00)
  %40 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %41 = load double, ptr %40, align 16
  %42 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %43 = load double, ptr %42, align 8
  %44 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %41, double %43)
  %45 = getelementptr inbounds %"class.JPH::Vec3", ptr %10, i32 0, i32 0
  %46 = getelementptr inbounds %union.anon.6, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %48 = extractvalue { double, double } %44, 0
  store double %48, ptr %47, align 16
  %49 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %50 = extractvalue { double, double } %44, 1
  store double %50, ptr %49, align 8
  %51 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  %52 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %53 = getelementptr inbounds %union.anon.6, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %55 = extractvalue { double, double } %51, 0
  store double %55, ptr %54, align 16
  %56 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %57 = extractvalue { double, double } %51, 1
  store double %57, ptr %56, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  br label %119

58:                                               ; preds = %27
  %59 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %60 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 6
  %61 = load float, ptr %60, align 4, !tbaa !26
  %62 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 8
  %63 = load float, ptr %62, align 4, !tbaa !24
  %64 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 4
  %65 = load float, ptr %64, align 4, !tbaa !27
  %66 = call float @llvm.fmuladd.f32(float %63, float %65, float %61)
  %67 = fcmp olt float %59, %66
  br i1 %67, label %68, label %89

68:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %69 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 6
  %70 = load float, ptr %69, align 4, !tbaa !26
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %13, float noundef 0.000000e+00, float noundef %70, float noundef 0.000000e+00)
  %71 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %72 = load double, ptr %71, align 16
  %73 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %74 = load double, ptr %73, align 8
  %75 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %72, double %74)
  %76 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %77 = getelementptr inbounds %union.anon.6, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 0
  %79 = extractvalue { double, double } %75, 0
  store double %79, ptr %78, align 16
  %80 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 1
  %81 = extractvalue { double, double } %75, 1
  store double %81, ptr %80, align 8
  %82 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %83 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %84 = getelementptr inbounds %union.anon.6, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds { double, double }, ptr %84, i32 0, i32 0
  %86 = extractvalue { double, double } %82, 0
  store double %86, ptr %85, align 16
  %87 = getelementptr inbounds { double, double }, ptr %84, i32 0, i32 1
  %88 = extractvalue { double, double } %82, 1
  store double %88, ptr %87, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  br label %119

89:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #9
  %90 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %91 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %90, float noundef 0.000000e+00, float noundef %91)
  %92 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %93 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %94 = getelementptr inbounds %union.anon.6, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds { double, double }, ptr %94, i32 0, i32 0
  %96 = extractvalue { double, double } %92, 0
  store double %96, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %94, i32 0, i32 1
  %98 = extractvalue { double, double } %92, 1
  store double %98, ptr %97, align 8
  %99 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %100 = load double, ptr %99, align 16
  %101 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %102 = load double, ptr %101, align 8
  %103 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %100, double %102)
  %104 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %105 = getelementptr inbounds %union.anon.6, ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds { double, double }, ptr %105, i32 0, i32 0
  %107 = extractvalue { double, double } %103, 0
  store double %107, ptr %106, align 16
  %108 = getelementptr inbounds { double, double }, ptr %105, i32 0, i32 1
  %109 = extractvalue { double, double } %103, 1
  store double %109, ptr %108, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #9
  %110 = getelementptr inbounds %"class.JPH::TaperedCapsuleShape", ptr %19, i32 0, i32 9
  %111 = load float, ptr %110, align 8, !tbaa !28
  call void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef %111)
  %112 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
  %113 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %114 = getelementptr inbounds %union.anon.6, ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds { double, double }, ptr %114, i32 0, i32 0
  %116 = extractvalue { double, double } %112, 0
  store double %116, ptr %115, align 16
  %117 = getelementptr inbounds { double, double }, ptr %114, i32 0, i32 1
  %118 = extractvalue { double, double } %112, 1
  store double %118, ptr %117, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #9
  br label %119

119:                                              ; preds = %89, %68, %37
  %120 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %121 = getelementptr inbounds %union.anon.6, ptr %120, i32 0, i32 0
  %122 = load { double, double }, ptr %121, align 16
  ret { double, double } %122
}

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16)) #4 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisXEv() #8 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) #4 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 2157954228}
!10 = !{!11, !22, i64 72}
!11 = !{!"_ZTSN3JPH19TaperedCapsuleShapeE", !12, i64 0, !23, i64 48, !22, i64 64, !22, i64 68, !22, i64 72, !22, i64 76, !22, i64 80, !22, i64 84, !22, i64 88}
!12 = !{!"_ZTSN3JPH11ConvexShapeE", !13, i64 0, !21, i64 32, !22, i64 40}
!13 = !{!"_ZTSN3JPH5ShapeE", !14, i64 8, !18, i64 16, !19, i64 24, !20, i64 25}
!14 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !15, i64 0}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!20 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!21 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!24 = !{!11, !22, i64 84}
!25 = !{!11, !22, i64 64}
!26 = !{!11, !22, i64 76}
!27 = !{!11, !22, i64 68}
!28 = !{!11, !22, i64 88}


; 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.6 }
%union.anon.6 = type { <4 x float> }

@.str.6 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local { double, double } @_ZNK3JPH19TaperedCapsuleShape16GetSurfaceNormalERKNS_10SubShapeIDENS_4Vec3E(ptr nocapture noundef nonnull readonly align 16 dereferenceable(96) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3) unnamed_addr #7 align 2 {
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  store double %2, ptr %5, align 16
  %12 = getelementptr inbounds i8, ptr %5, i64 8
  store double %3, ptr %12, align 8
  %13 = tail call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br i1 %13, label %17, label %14

14:                                               ; preds = %4
  %15 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.6, i32 noundef 260, ptr noundef nonnull @.str.14)
  br i1 %15, label %16, label %17

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

17:                                               ; preds = %4, %14, %16
  %18 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = load float, ptr %19, align 8, !tbaa !6
  %21 = getelementptr inbounds i8, ptr %0, i64 84
  %22 = load float, ptr %21, align 4, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  %24 = load float, ptr %23, align 16, !tbaa !24
  %25 = call float @llvm.fmuladd.f32(float %22, float %24, float %20)
  %26 = fcmp ogt float %18, %25
  br i1 %26, label %27, label %36

27:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef 0.000000e+00, float noundef %20, float noundef 0.000000e+00)
  %28 = load double, ptr %7, align 16
  %29 = getelementptr inbounds i8, ptr %7, i64 8
  %30 = load double, ptr %29, align 8
  %31 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %28, double %30)
  %32 = extractvalue { double, double } %31, 0
  store double %32, ptr %6, align 16
  %33 = getelementptr inbounds i8, ptr %6, i64 8
  %34 = extractvalue { double, double } %31, 1
  store double %34, ptr %33, align 8
  %35 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  br label %67

36:                                               ; preds = %17
  %37 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %38 = getelementptr inbounds i8, ptr %0, i64 76
  %39 = load float, ptr %38, align 4, !tbaa !25
  %40 = load float, ptr %21, align 4, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %0, i64 68
  %42 = load float, ptr %41, align 4, !tbaa !26
  %43 = call float @llvm.fmuladd.f32(float %40, float %42, float %39)
  %44 = fcmp olt float %37, %43
  br i1 %44, label %45, label %54

45:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef 0.000000e+00, float noundef %39, float noundef 0.000000e+00)
  %46 = load double, ptr %9, align 16
  %47 = getelementptr inbounds i8, ptr %9, i64 8
  %48 = load double, ptr %47, align 8
  %49 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %46, double %48)
  %50 = extractvalue { double, double } %49, 0
  store double %50, ptr %8, align 16
  %51 = getelementptr inbounds i8, ptr %8, i64 8
  %52 = extractvalue { double, double } %49, 1
  store double %52, ptr %51, align 8
  %53 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  br label %67

54:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #9
  %55 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %56 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef %55, float noundef 0.000000e+00, float noundef %56)
  %57 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %58 = extractvalue { double, double } %57, 0
  %59 = extractvalue { double, double } %57, 1
  %60 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %58, double %59)
  %61 = extractvalue { double, double } %60, 0
  store double %61, ptr %10, align 16
  %62 = getelementptr inbounds i8, ptr %10, i64 8
  %63 = extractvalue { double, double } %60, 1
  store double %63, ptr %62, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #9
  %64 = getelementptr inbounds i8, ptr %0, i64 88
  %65 = load float, ptr %64, align 8, !tbaa !27
  call void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef %65)
  %66 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  br label %67

67:                                               ; preds = %54, %45, %27
  %.pn = phi { double, double } [ %35, %27 ], [ %53, %45 ], [ %66, %54 ]
  ret { double, double } %.pn
}

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #4 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisXEv() local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) local_unnamed_addr #4 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 2157954228}
!6 = !{!7, !21, i64 72}
!7 = !{!"_ZTSN3JPH19TaperedCapsuleShapeE", !8, i64 0, !22, i64 48, !21, i64 64, !21, i64 68, !21, i64 72, !21, i64 76, !21, i64 80, !21, i64 84, !21, i64 88}
!8 = !{!"_ZTSN3JPH11ConvexShapeE", !9, i64 0, !19, i64 32, !21, i64 40}
!9 = !{!"_ZTSN3JPH5ShapeE", !10, i64 8, !16, i64 16, !17, i64 24, !18, i64 25}
!10 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !11, i64 0}
!11 = !{!"_ZTSSt6atomicIjE", !12, i64 0}
!12 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!13 = !{!"int", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"long", !14, i64 0}
!17 = !{!"_ZTSN3JPH10EShapeTypeE", !14, i64 0}
!18 = !{!"_ZTSN3JPH13EShapeSubTypeE", !14, i64 0}
!19 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !20, i64 0}
!20 = !{!"any pointer", !14, i64 0}
!21 = !{!"float", !14, i64 0}
!22 = !{!"_ZTSN3JPH4Vec3E", !14, i64 0}
!23 = !{!7, !21, i64 84}
!24 = !{!7, !21, i64 64}
!25 = !{!7, !21, i64 76}
!26 = !{!7, !21, i64 68}
!27 = !{!7, !21, i64 88}


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