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

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

@.str.7 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

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

; 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 } @_ZNK3JPH12CapsuleShape16GetSurfaceNormalERKNS_10SubShapeIDENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3) unnamed_addr #5 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 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  store double %2, ptr %16, align 16
  %17 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  store double %3, ptr %17, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8
  br label %19

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

22:                                               ; preds = %19
  %23 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.9, ptr noundef @.str.7, i32 noundef 250, ptr noundef @.str.10)
  br i1 %23, label %24, label %25

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

25:                                               ; preds = %24, %22, %19
  br label %26

26:                                               ; preds = %25
  %27 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %28 = getelementptr inbounds %"class.JPH::CapsuleShape", ptr %18, i32 0, i32 2
  %29 = load float, ptr %28, align 8, !tbaa !10
  %30 = fcmp ogt float %27, %29
  br i1 %30, label %31, label %52

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %32 = getelementptr inbounds %"class.JPH::CapsuleShape", ptr %18, i32 0, i32 2
  %33 = load float, ptr %32, align 8, !tbaa !10
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef 0.000000e+00, float noundef %33, float noundef 0.000000e+00)
  %34 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %35 = load double, ptr %34, align 16
  %36 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %37 = load double, ptr %36, align 8
  %38 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %35, double %37)
  %39 = getelementptr inbounds %"class.JPH::Vec3", ptr %10, i32 0, i32 0
  %40 = getelementptr inbounds %union.anon.12, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %42 = extractvalue { double, double } %38, 0
  store double %42, ptr %41, align 16
  %43 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %44 = extractvalue { double, double } %38, 1
  store double %44, ptr %43, align 8
  %45 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  %46 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %47 = getelementptr inbounds %union.anon.12, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %49 = extractvalue { double, double } %45, 0
  store double %49, ptr %48, align 16
  %50 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %51 = extractvalue { double, double } %45, 1
  store double %51, ptr %50, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  br label %101

52:                                               ; preds = %26
  %53 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %54 = getelementptr inbounds %"class.JPH::CapsuleShape", ptr %18, i32 0, i32 2
  %55 = load float, ptr %54, align 8, !tbaa !10
  %56 = fneg float %55
  %57 = fcmp olt float %53, %56
  br i1 %57, label %58, label %80

58:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %59 = getelementptr inbounds %"class.JPH::CapsuleShape", ptr %18, i32 0, i32 2
  %60 = load float, ptr %59, align 8, !tbaa !10
  %61 = fneg float %60
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %13, float noundef 0.000000e+00, float noundef %61, float noundef 0.000000e+00)
  %62 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %63 = load double, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %65 = load double, ptr %64, align 8
  %66 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %63, double %65)
  %67 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %68 = getelementptr inbounds %union.anon.12, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %70 = extractvalue { double, double } %66, 0
  store double %70, ptr %69, align 16
  %71 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %72 = extractvalue { double, double } %66, 1
  store double %72, ptr %71, align 8
  %73 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %74 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %75 = getelementptr inbounds %union.anon.12, ptr %74, i32 0, i32 0
  %76 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 0
  %77 = extractvalue { double, double } %73, 0
  store double %77, ptr %76, align 16
  %78 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 1
  %79 = extractvalue { double, double } %73, 1
  store double %79, ptr %78, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %101

80:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %81 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %82 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef %81, float noundef 0.000000e+00, float noundef %82)
  %83 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %84 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %85 = getelementptr inbounds %union.anon.12, ptr %84, i32 0, i32 0
  %86 = getelementptr inbounds { double, double }, ptr %85, i32 0, i32 0
  %87 = extractvalue { double, double } %83, 0
  store double %87, ptr %86, align 16
  %88 = getelementptr inbounds { double, double }, ptr %85, i32 0, i32 1
  %89 = extractvalue { double, double } %83, 1
  store double %89, ptr %88, align 8
  %90 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %91 = load double, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %93 = load double, ptr %92, align 8
  %94 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %91, double %93)
  %95 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %96 = getelementptr inbounds %union.anon.12, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 0
  %98 = extractvalue { double, double } %94, 0
  store double %98, ptr %97, align 16
  %99 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 1
  %100 = extractvalue { double, double } %94, 1
  store double %100, ptr %99, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %101

101:                                              ; preds = %80, %58, %31
  %102 = getelementptr inbounds %"class.JPH::Vec3", ptr %5, i32 0, i32 0
  %103 = getelementptr inbounds %union.anon.12, ptr %102, i32 0, i32 0
  %104 = load { double, double }, ptr %103, align 16
  ret { double, double } %104
}

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 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 = { 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 #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 2157984960}
!10 = !{!11, !22, i64 48}
!11 = !{!"_ZTSN3JPH12CapsuleShapeE", !12, i64 0, !22, i64 44, !22, i64 48}
!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}


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

@.str.7 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = 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 nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

; 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: 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 { 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 } @_ZNK3JPH12CapsuleShape16GetSurfaceNormalERKNS_10SubShapeIDENS_4Vec3E(ptr nocapture noundef nonnull readonly align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3) unnamed_addr #5 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
  store double %2, ptr %5, align 16
  %11 = getelementptr inbounds i8, ptr %5, i64 8
  store double %3, ptr %11, align 8
  %12 = tail call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br i1 %12, label %16, label %13

13:                                               ; preds = %4
  %14 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.7, i32 noundef 250, ptr noundef nonnull @.str.10)
  br i1 %14, label %15, label %16

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

16:                                               ; preds = %4, %13, %15
  %17 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %18 = getelementptr inbounds i8, ptr %0, i64 48
  %19 = load float, ptr %18, align 8, !tbaa !6
  %20 = fcmp ogt float %17, %19
  br i1 %20, label %21, label %30

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef 0.000000e+00, float noundef %19, float noundef 0.000000e+00)
  %22 = load double, ptr %7, align 16
  %23 = getelementptr inbounds i8, ptr %7, i64 8
  %24 = load double, ptr %23, align 8
  %25 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %22, double %24)
  %26 = extractvalue { double, double } %25, 0
  store double %26, ptr %6, align 16
  %27 = getelementptr inbounds i8, ptr %6, i64 8
  %28 = extractvalue { double, double } %25, 1
  store double %28, ptr %27, align 8
  %29 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %51

30:                                               ; preds = %16
  %31 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %32 = load float, ptr %18, align 8, !tbaa !6
  %33 = fneg float %32
  %34 = fcmp olt float %31, %33
  br i1 %34, label %35, label %44

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef 0.000000e+00, float noundef %33, float noundef 0.000000e+00)
  %36 = load double, ptr %9, align 16
  %37 = getelementptr inbounds i8, ptr %9, i64 8
  %38 = load double, ptr %37, align 8
  %39 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %36, double %38)
  %40 = extractvalue { double, double } %39, 0
  store double %40, ptr %8, align 16
  %41 = getelementptr inbounds i8, ptr %8, i64 8
  %42 = extractvalue { double, double } %39, 1
  store double %42, ptr %41, align 8
  %43 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %51

44:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %45 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %46 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef %45, float noundef 0.000000e+00, float noundef %46)
  %47 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %48 = extractvalue { double, double } %47, 0
  %49 = extractvalue { double, double } %47, 1
  %50 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %48, double %49)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %51

51:                                               ; preds = %44, %35, %21
  %.pn = phi { double, double } [ %29, %21 ], [ %43, %35 ], [ %50, %44 ]
  ret { double, double } %.pn
}

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 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 = { 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 #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 = !{i64 2157984960}
!6 = !{!7, !21, i64 48}
!7 = !{!"_ZTSN3JPH12CapsuleShapeE", !8, i64 0, !21, i64 44, !21, i64 48}
!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}


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