; LLVM IR from ashishzero/karma :: src/modules/core/lin_maths.ll (Z5slerp4QuatS_f)

; 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"

%union.Quat = type { [4 x float] }

; 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) #0

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

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

; Function Attrs: nounwind
declare float @acosf(float noundef) #2

; Function Attrs: nounwind
declare float @cosf(float noundef) #2

; Function Attrs: nounwind
declare float @sinf(float noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_Z8quat_dot4QuatS_(<2 x float>, <2 x float>, <2 x float>, <2 x float>) #3

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, <2 x float> } @_Z5slerp4QuatS_f(<2 x float> %0, <2 x float> %1, <2 x float> %2, <2 x float> %3, float noundef %4) #4 {
  %6 = alloca %union.Quat, align 4
  %7 = alloca %union.Quat, align 4
  %8 = alloca %union.Quat, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca %union.Quat, align 4
  %12 = alloca %union.Quat, align 4
  %13 = alloca %union.Quat, align 4
  %14 = alloca %union.Quat, align 4
  %15 = alloca %union.Quat, align 4
  %16 = alloca %union.Quat, align 4
  %17 = alloca %union.Quat, align 4
  %18 = alloca %union.Quat, align 4
  %19 = alloca %union.Quat, align 4
  %20 = alloca %union.Quat, align 4
  %21 = alloca %union.Quat, align 4
  %22 = alloca i32, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca %union.Quat, align 4
  %30 = alloca %union.Quat, align 4
  %31 = alloca %union.Quat, align 4
  %32 = alloca %union.Quat, align 4
  %33 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 0
  store <2 x float> %0, ptr %33, align 4
  %34 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 1
  store <2 x float> %1, ptr %34, align 4
  %35 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %2, ptr %35, align 4
  %36 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %3, ptr %36, align 4
  store float %4, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %7, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !9
  %37 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 0
  %38 = load <2 x float>, ptr %37, align 4
  %39 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 1
  %40 = load <2 x float>, ptr %39, align 4
  %41 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 0
  %42 = load <2 x float>, ptr %41, align 4
  %43 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 1
  %44 = load <2 x float>, ptr %43, align 4
  %45 = call noundef float @_Z8quat_dot4QuatS_(<2 x float> %38, <2 x float> %40, <2 x float> %42, <2 x float> %44)
  %46 = fcmp ogt float -1.000000e+00, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %5
  br label %58

48:                                               ; preds = %5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %7, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !9
  %49 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %50 = load <2 x float>, ptr %49, align 4
  %51 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %52 = load <2 x float>, ptr %51, align 4
  %53 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 0
  %54 = load <2 x float>, ptr %53, align 4
  %55 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 1
  %56 = load <2 x float>, ptr %55, align 4
  %57 = call noundef float @_Z8quat_dot4QuatS_(<2 x float> %50, <2 x float> %52, <2 x float> %54, <2 x float> %56)
  br label %58

58:                                               ; preds = %48, %47
  %59 = phi float [ -1.000000e+00, %47 ], [ %57, %48 ]
  %60 = fcmp olt float 1.000000e+00, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  br label %86

62:                                               ; preds = %58
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %7, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !9
  %63 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 0
  %64 = load <2 x float>, ptr %63, align 4
  %65 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 1
  %66 = load <2 x float>, ptr %65, align 4
  %67 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %16, i32 0, i32 0
  %68 = load <2 x float>, ptr %67, align 4
  %69 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %16, i32 0, i32 1
  %70 = load <2 x float>, ptr %69, align 4
  %71 = call noundef float @_Z8quat_dot4QuatS_(<2 x float> %64, <2 x float> %66, <2 x float> %68, <2 x float> %70)
  %72 = fcmp ogt float -1.000000e+00, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %62
  br label %84

74:                                               ; preds = %62
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %7, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !9
  %75 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %76 = load <2 x float>, ptr %75, align 4
  %77 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %78 = load <2 x float>, ptr %77, align 4
  %79 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %18, i32 0, i32 0
  %80 = load <2 x float>, ptr %79, align 4
  %81 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %18, i32 0, i32 1
  %82 = load <2 x float>, ptr %81, align 4
  %83 = call noundef float @_Z8quat_dot4QuatS_(<2 x float> %76, <2 x float> %78, <2 x float> %80, <2 x float> %82)
  br label %84

84:                                               ; preds = %74, %73
  %85 = phi float [ -1.000000e+00, %73 ], [ %83, %74 ]
  br label %86

86:                                               ; preds = %84, %61
  %87 = phi float [ 1.000000e+00, %61 ], [ %85, %84 ]
  store float %87, ptr %10, align 4, !tbaa !5
  %88 = load float, ptr %10, align 4, !tbaa !5
  %89 = fcmp olt float %88, 0.000000e+00
  br i1 %89, label %90, label %99

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %91 = call { <2 x float>, <2 x float> } @_ZngR4Quat(ptr noundef nonnull align 4 dereferenceable(16) %8)
  %92 = getelementptr inbounds %union.Quat, ptr %19, i32 0, i32 0
  %93 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %92, i32 0, i32 0
  %94 = extractvalue { <2 x float>, <2 x float> } %91, 0
  store <2 x float> %94, ptr %93, align 4
  %95 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %92, i32 0, i32 1
  %96 = extractvalue { <2 x float>, <2 x float> } %91, 1
  store <2 x float> %96, ptr %95, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %19, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  %97 = load float, ptr %10, align 4, !tbaa !5
  %98 = fneg float %97
  store float %98, ptr %10, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %90, %86
  %100 = load float, ptr %10, align 4, !tbaa !5
  %101 = fcmp ogt float %100, 0x3FEFFF2E40000000
  br i1 %101, label %102, label %118

102:                                              ; preds = %99
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %7, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !9
  %103 = load float, ptr %9, align 4, !tbaa !5
  %104 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 0
  %105 = load <2 x float>, ptr %104, align 4
  %106 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 1
  %107 = load <2 x float>, ptr %106, align 4
  %108 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %21, i32 0, i32 0
  %109 = load <2 x float>, ptr %108, align 4
  %110 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %21, i32 0, i32 1
  %111 = load <2 x float>, ptr %110, align 4
  %112 = call { <2 x float>, <2 x float> } @_Z4lerpI4QuatET_S1_S1_f(<2 x float> %105, <2 x float> %107, <2 x float> %109, <2 x float> %111, float noundef %103)
  %113 = getelementptr inbounds %union.Quat, ptr %6, i32 0, i32 0
  %114 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %113, i32 0, i32 0
  %115 = extractvalue { <2 x float>, <2 x float> } %112, 0
  store <2 x float> %115, ptr %114, align 4
  %116 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %113, i32 0, i32 1
  %117 = extractvalue { <2 x float>, <2 x float> } %112, 1
  store <2 x float> %117, ptr %116, align 4
  store i32 1, ptr %22, align 4
  br label %175

118:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %119 = load float, ptr %10, align 4, !tbaa !5
  %120 = call float @acosf(float noundef %119) #6
  store float %120, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %121 = load float, ptr %23, align 4, !tbaa !5
  %122 = load float, ptr %9, align 4, !tbaa !5
  %123 = fmul float %121, %122
  store float %123, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %124 = load float, ptr %24, align 4, !tbaa !5
  %125 = call float @sinf(float noundef %124) #6
  store float %125, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %126 = load float, ptr %23, align 4, !tbaa !5
  %127 = call float @sinf(float noundef %126) #6
  store float %127, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %128 = load float, ptr %24, align 4, !tbaa !5
  %129 = call float @cosf(float noundef %128) #6
  %130 = load float, ptr %10, align 4, !tbaa !5
  %131 = load float, ptr %25, align 4, !tbaa !5
  %132 = fmul float %130, %131
  %133 = load float, ptr %26, align 4, !tbaa !5
  %134 = fdiv float %132, %133
  %135 = fsub float %129, %134
  store float %135, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %136 = load float, ptr %25, align 4, !tbaa !5
  %137 = load float, ptr %26, align 4, !tbaa !5
  %138 = fdiv float %136, %137
  store float %138, ptr %28, align 4, !tbaa !5
  %139 = load float, ptr %27, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %7, i64 16, i1 false), !tbaa.struct !9
  %140 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %30, i32 0, i32 0
  %141 = load <2 x float>, ptr %140, align 4
  %142 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %30, i32 0, i32 1
  %143 = load <2 x float>, ptr %142, align 4
  %144 = call { <2 x float>, <2 x float> } @_Zmlf4Quat(float noundef %139, <2 x float> %141, <2 x float> %143)
  %145 = getelementptr inbounds %union.Quat, ptr %29, i32 0, i32 0
  %146 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %145, i32 0, i32 0
  %147 = extractvalue { <2 x float>, <2 x float> } %144, 0
  store <2 x float> %147, ptr %146, align 4
  %148 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %145, i32 0, i32 1
  %149 = extractvalue { <2 x float>, <2 x float> } %144, 1
  store <2 x float> %149, ptr %148, align 4
  %150 = load float, ptr %28, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !9
  %151 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %32, i32 0, i32 0
  %152 = load <2 x float>, ptr %151, align 4
  %153 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %32, i32 0, i32 1
  %154 = load <2 x float>, ptr %153, align 4
  %155 = call { <2 x float>, <2 x float> } @_Zmlf4Quat(float noundef %150, <2 x float> %152, <2 x float> %154)
  %156 = getelementptr inbounds %union.Quat, ptr %31, i32 0, i32 0
  %157 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %156, i32 0, i32 0
  %158 = extractvalue { <2 x float>, <2 x float> } %155, 0
  store <2 x float> %158, ptr %157, align 4
  %159 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %156, i32 0, i32 1
  %160 = extractvalue { <2 x float>, <2 x float> } %155, 1
  store <2 x float> %160, ptr %159, align 4
  %161 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 0
  %162 = load <2 x float>, ptr %161, align 4
  %163 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 1
  %164 = load <2 x float>, ptr %163, align 4
  %165 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %31, i32 0, i32 0
  %166 = load <2 x float>, ptr %165, align 4
  %167 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %31, i32 0, i32 1
  %168 = load <2 x float>, ptr %167, align 4
  %169 = call { <2 x float>, <2 x float> } @_Zpl4QuatS_(<2 x float> %162, <2 x float> %164, <2 x float> %166, <2 x float> %168)
  %170 = getelementptr inbounds %union.Quat, ptr %6, i32 0, i32 0
  %171 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %170, i32 0, i32 0
  %172 = extractvalue { <2 x float>, <2 x float> } %169, 0
  store <2 x float> %172, ptr %171, align 4
  %173 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %170, i32 0, i32 1
  %174 = extractvalue { <2 x float>, <2 x float> } %169, 1
  store <2 x float> %174, ptr %173, align 4
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %175

175:                                              ; preds = %118, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %176 = getelementptr inbounds %union.Quat, ptr %6, i32 0, i32 0
  %177 = load { <2 x float>, <2 x float> }, ptr %176, align 4
  ret { <2 x float>, <2 x float> } %177
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZngR4Quat(ptr noundef nonnull align 4 dereferenceable(16)) #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_Z4lerpI4QuatET_S1_S1_f(<2 x float>, <2 x float>, <2 x float>, <2 x float>, float noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_Zpl4QuatS_(<2 x float>, <2 x float>, <2 x float>, <2 x float>) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_Zmlf4Quat(float noundef, <2 x float>, <2 x float>) #5

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

%union.Quat = type { [4 x float] }

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @acosf(float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sinf(float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_Z8quat_dot4QuatS_(<2 x float>, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, <2 x float> } @_Z5slerp4QuatS_f(<2 x float> %0, <2 x float> %1, <2 x float> %2, <2 x float> %3, float noundef %4) local_unnamed_addr #2 {
  %6 = alloca %union.Quat, align 8
  store <2 x float> %2, ptr %6, align 8
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  store <2 x float> %3, ptr %7, align 8
  %8 = tail call noundef float @_Z8quat_dot4QuatS_(<2 x float> %0, <2 x float> %1, <2 x float> %2, <2 x float> %3)
  %9 = fcmp olt float %8, -1.000000e+00
  br i1 %9, label %.critedge, label %10

10:                                               ; preds = %5
  %11 = tail call noundef float @_Z8quat_dot4QuatS_(<2 x float> %0, <2 x float> %1, <2 x float> %2, <2 x float> %3)
  %12 = fcmp ogt float %11, 1.000000e+00
  br i1 %12, label %.thread59, label %.critedge

.critedge:                                        ; preds = %5, %10
  %13 = tail call noundef float @_Z8quat_dot4QuatS_(<2 x float> %0, <2 x float> %1, <2 x float> %2, <2 x float> %3)
  %14 = fcmp olt float %13, -1.000000e+00
  br i1 %14, label %.thread, label %15

15:                                               ; preds = %.critedge
  %16 = tail call noundef float @_Z8quat_dot4QuatS_(<2 x float> %0, <2 x float> %1, <2 x float> %2, <2 x float> %3)
  %17 = fcmp olt float %16, 0.000000e+00
  br i1 %17, label %.thread, label %23

.thread:                                          ; preds = %.critedge, %15
  %18 = phi float [ %16, %15 ], [ -1.000000e+00, %.critedge ]
  %19 = call { <2 x float>, <2 x float> } @_ZngR4Quat(ptr noundef nonnull align 4 dereferenceable(16) %6)
  %20 = extractvalue { <2 x float>, <2 x float> } %19, 0
  %21 = extractvalue { <2 x float>, <2 x float> } %19, 1
  store <2 x float> %20, ptr %6, align 8
  store <2 x float> %21, ptr %7, align 8, !tbaa !5
  %22 = fneg float %18
  br label %23

23:                                               ; preds = %.thread, %15
  %.sroa.217.0.copyload64 = phi <2 x float> [ %21, %.thread ], [ %3, %15 ]
  %.sroa.016.0.copyload62 = phi <2 x float> [ %20, %.thread ], [ %2, %15 ]
  %.0 = phi float [ %22, %.thread ], [ %16, %15 ]
  %24 = fcmp ogt float %.0, 0x3FEFFF2E40000000
  br i1 %24, label %.thread59, label %26

.thread59:                                        ; preds = %10, %23
  %.sroa.217.0.copyload = phi <2 x float> [ %3, %10 ], [ %.sroa.217.0.copyload64, %23 ]
  %.sroa.016.0.copyload = phi <2 x float> [ %2, %10 ], [ %.sroa.016.0.copyload62, %23 ]
  %25 = call { <2 x float>, <2 x float> } @_Z4lerpI4QuatET_S1_S1_f(<2 x float> %0, <2 x float> %1, <2 x float> %.sroa.016.0.copyload, <2 x float> %.sroa.217.0.copyload, float noundef %4)
  br label %43

26:                                               ; preds = %23
  %27 = call float @acosf(float noundef %.0) #4
  %28 = fmul float %27, %4
  %29 = call float @sinf(float noundef %28) #4
  %30 = call float @sinf(float noundef %27) #4
  %31 = call float @cosf(float noundef %28) #4
  %32 = fmul float %.0, %29
  %33 = fdiv float %32, %30
  %34 = fsub float %31, %33
  %35 = fdiv float %29, %30
  %36 = call { <2 x float>, <2 x float> } @_Zmlf4Quat(float noundef %34, <2 x float> %0, <2 x float> %1)
  %37 = extractvalue { <2 x float>, <2 x float> } %36, 0
  %38 = extractvalue { <2 x float>, <2 x float> } %36, 1
  %.sroa.0.0.copyload = load <2 x float>, ptr %6, align 8
  %.sroa.2.0.copyload = load <2 x float>, ptr %7, align 8, !tbaa !5
  %39 = call { <2 x float>, <2 x float> } @_Zmlf4Quat(float noundef %35, <2 x float> %.sroa.0.0.copyload, <2 x float> %.sroa.2.0.copyload)
  %40 = extractvalue { <2 x float>, <2 x float> } %39, 0
  %41 = extractvalue { <2 x float>, <2 x float> } %39, 1
  %42 = call { <2 x float>, <2 x float> } @_Zpl4QuatS_(<2 x float> %37, <2 x float> %38, <2 x float> %40, <2 x float> %41)
  br label %43

43:                                               ; preds = %26, %.thread59
  %.pn = phi { <2 x float>, <2 x float> } [ %25, %.thread59 ], [ %42, %26 ]
  ret { <2 x float>, <2 x float> } %.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZngR4Quat(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_Z4lerpI4QuatET_S1_S1_f(<2 x float>, <2 x float>, <2 x float>, <2 x float>, float noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_Zpl4QuatS_(<2 x float>, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_Zmlf4Quat(float noundef, <2 x float>, <2 x float>) local_unnamed_addr #3

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="64" "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 uwtable "min-legal-vector-width"="64" "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 = { 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,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass