; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Character (CharacterVirtual)

; 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 }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::CharacterVirtual" = type <{ %"class.JPH::CharacterBase", %"class.JPH::CharacterID", [4 x i8], ptr, ptr, i8, [3 x i8], float, i32, i32, float, float, float, i32, float, float, i8, [3 x i8], float, float, [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Array.2", i32, [4 x i8], %"class.JPH::UnorderedMap", float, i8, [3 x i8], i64, %"class.JPH::BodyID", [12 x i8] }>
%"class.JPH::CharacterBase" = type { ptr, %"class.JPH::RefTarget", ptr, %"class.JPH::RefConst", %"class.JPH::Vec3", %"class.JPH::Plane", float, i32, %"class.JPH::BodyID", %"class.JPH::SubShapeID", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::RefConst.1", i64 }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::CharacterID" = type { i32 }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::BodyID" = type { i32 }

; 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: mustprogress uwtable
define dso_local { double, double } @_ZNK3JPH16CharacterVirtual32CalculateCharacterGroundVelocityENS_4Vec3ES1_S1_f(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2, double %3, double %4, double %5, double %6, float noundef %7) #2 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::Vec3", align 16
  %13 = alloca ptr, align 8
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca %"class.JPH::Quat", 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 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %1, ptr %27, align 16
  %28 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %2, ptr %28, align 8
  %29 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  store double %3, ptr %29, align 16
  %30 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  store double %4, ptr %30, align 8
  %31 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  store double %5, ptr %31, align 16
  %32 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %6, ptr %32, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store float %7, ptr %14, align 4, !tbaa !9
  %33 = load ptr, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %34 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  store float %34, ptr %15, align 4, !tbaa !9
  %35 = load float, ptr %15, align 4, !tbaa !9
  %36 = fcmp olt float %35, 0x3D71979980000000
  br i1 %36, label %37, label %38

37:                                               ; preds = %8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %16, align 4
  br label %129

38:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %39 = load float, ptr %15, align 4, !tbaa !9
  %40 = call noundef float @_ZSt4sqrtf(float noundef %39)
  store float %40, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %41 = load float, ptr %17, align 4, !tbaa !9
  %42 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef %41)
  %43 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %44 = getelementptr inbounds %union.anon, 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 = load float, ptr %17, align 4, !tbaa !9
  %50 = load float, ptr %14, align 4, !tbaa !9
  %51 = fmul float %49, %50
  %52 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %53 = load double, ptr %52, align 16
  %54 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %55 = load double, ptr %54, align 8
  %56 = call { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %53, double %55, float noundef %51)
  %57 = getelementptr inbounds %"class.JPH::Quat", ptr %18, i32 0, i32 0
  %58 = getelementptr inbounds %"class.JPH::Vec4", ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds %union.anon.0, ptr %58, i32 0, i32 0
  %60 = getelementptr inbounds { double, double }, ptr %59, i32 0, i32 0
  %61 = extractvalue { double, double } %56, 0
  store double %61, ptr %60, align 16
  %62 = getelementptr inbounds { double, double }, ptr %59, i32 0, i32 1
  %63 = extractvalue { double, double } %56, 1
  store double %63, ptr %62, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  %64 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %33, i32 0, i32 22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !11
  %65 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %66 = load double, ptr %65, align 16
  %67 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %68 = load double, ptr %67, align 8
  %69 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %64, double %66, double %68)
  %70 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %71 = getelementptr inbounds %union.anon, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 0
  %73 = extractvalue { double, double } %69, 0
  store double %73, ptr %72, align 16
  %74 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 1
  %75 = extractvalue { double, double } %69, 1
  store double %75, ptr %74, align 8
  %76 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %77 = load double, ptr %76, align 16
  %78 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %79 = load double, ptr %78, align 8
  %80 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %77, double %79)
  %81 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %82 = getelementptr inbounds %union.anon, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 0
  %84 = extractvalue { double, double } %80, 0
  store double %84, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 1
  %86 = extractvalue { double, double } %80, 1
  store double %86, ptr %85, align 8
  %87 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %88 = load double, ptr %87, align 16
  %89 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %90 = load double, ptr %89, align 8
  %91 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %88, double %90)
  %92 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %93 = getelementptr inbounds %union.anon, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds { double, double }, ptr %93, i32 0, i32 0
  %95 = extractvalue { double, double } %91, 0
  store double %95, ptr %94, align 16
  %96 = getelementptr inbounds { double, double }, ptr %93, i32 0, i32 1
  %97 = extractvalue { double, double } %91, 1
  store double %97, ptr %96, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #7
  %98 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %33, i32 0, i32 22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %98, i64 16, i1 false), !tbaa.struct !11
  %99 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %100 = load double, ptr %99, align 16
  %101 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %102 = load double, ptr %101, align 8
  %103 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %100, double %102)
  %104 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %105 = getelementptr inbounds %union.anon, 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
  %110 = load float, ptr %14, align 4, !tbaa !9
  %111 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %25, float noundef %110)
  %112 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %113 = getelementptr inbounds %union.anon, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds { double, double }, ptr %113, i32 0, i32 0
  %115 = extractvalue { double, double } %111, 0
  store double %115, ptr %114, align 16
  %116 = getelementptr inbounds { double, double }, ptr %113, i32 0, i32 1
  %117 = extractvalue { double, double } %111, 1
  store double %117, ptr %116, align 8
  %118 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %119 = load double, ptr %118, align 16
  %120 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %121 = load double, ptr %120, align 8
  %122 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %119, double %121)
  %123 = getelementptr inbounds %"class.JPH::Vec3", ptr %9, i32 0, i32 0
  %124 = getelementptr inbounds %union.anon, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds { double, double }, ptr %124, i32 0, i32 0
  %126 = extractvalue { double, double } %122, 0
  store double %126, ptr %125, align 16
  %127 = getelementptr inbounds { double, double }, ptr %124, i32 0, i32 1
  %128 = extractvalue { double, double } %122, 1
  store double %128, ptr %127, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %129

129:                                              ; preds = %38, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %130 = getelementptr inbounds %"class.JPH::Vec3", ptr %9, i32 0, i32 0
  %131 = getelementptr inbounds %union.anon, ptr %130, i32 0, i32 0
  %132 = load { double, double }, ptr %131, align 16
  ret { double, double } %132
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #4

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double, double, float noundef) #5 align 2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!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 }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local { double, double } @_ZNK3JPH16CharacterVirtual32CalculateCharacterGroundVelocityENS_4Vec3ES1_S1_f(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2, double %3, double %4, double %5, double %6, float noundef %7) local_unnamed_addr #1 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::Quat", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  store double %1, ptr %9, align 16
  %15 = getelementptr inbounds i8, ptr %9, i64 8
  store double %2, ptr %15, align 8
  store double %3, ptr %10, align 16
  %16 = getelementptr inbounds i8, ptr %10, i64 8
  store double %4, ptr %16, align 8
  store double %5, ptr %11, align 16
  %17 = getelementptr inbounds i8, ptr %11, i64 8
  store double %6, ptr %17, align 8
  %18 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
  %19 = fcmp olt float %18, 0x3D71979980000000
  br i1 %19, label %51, label %20

20:                                               ; preds = %8
  %21 = call noundef float @_ZSt4sqrtf(float noundef %18)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  %22 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef %21)
  %23 = extractvalue { double, double } %22, 0
  %24 = extractvalue { double, double } %22, 1
  %25 = fmul float %21, %7
  %26 = call { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %23, double %24, float noundef %25)
  %27 = extractvalue { double, double } %26, 0
  store double %27, ptr %12, align 16
  %28 = getelementptr inbounds i8, ptr %12, i64 8
  %29 = extractvalue { double, double } %26, 1
  store double %29, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %30 = getelementptr inbounds i8, ptr %0, i64 240
  %31 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %30, double %1, double %2)
  %32 = extractvalue { double, double } %31, 0
  %33 = extractvalue { double, double } %31, 1
  %34 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %12, double %32, double %33)
  %35 = extractvalue { double, double } %34, 0
  %36 = extractvalue { double, double } %34, 1
  %37 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %35, double %36)
  %38 = extractvalue { double, double } %37, 0
  store double %38, ptr %13, align 16
  %39 = getelementptr inbounds i8, ptr %13, i64 8
  %40 = extractvalue { double, double } %37, 1
  store double %40, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  %.sroa.0.0.copyload = load double, ptr %30, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 248
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  %41 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %42 = extractvalue { double, double } %41, 0
  store double %42, ptr %14, align 16
  %43 = getelementptr inbounds i8, ptr %14, i64 8
  %44 = extractvalue { double, double } %41, 1
  store double %44, ptr %43, align 8
  %45 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef %7)
  %46 = extractvalue { double, double } %45, 0
  %47 = extractvalue { double, double } %45, 1
  %48 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %46, double %47)
  %49 = extractvalue { double, double } %48, 0
  %50 = extractvalue { double, double } %48, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  br label %51

51:                                               ; preds = %8, %20
  %.sroa.017.0 = phi double [ %49, %20 ], [ %3, %8 ]
  %.sroa.3.0 = phi double [ %50, %20 ], [ %4, %8 ]
  %.fca.0.insert = insertvalue { double, double } poison, double %.sroa.017.0, 0
  %.fca.1.insert = insertvalue { double, double } %.fca.0.insert, double %.sroa.3.0, 1
  ret { double, double } %.fca.1.insert
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double, double, float noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #4 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 #5 align 2

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass