; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/descriptor (Corner)

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef float @_Z10interpPeakfff(float noundef %0, float noundef %1, float noundef %2) #0 {
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  store float %0, ptr %4, align 4, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !5
  store float %2, ptr %6, align 4, !tbaa !5
  %7 = load float, ptr %5, align 4, !tbaa !5
  %8 = fpext float %7 to double
  %9 = fcmp olt double %8, 0.000000e+00
  br i1 %9, label %10, label %17

10:                                               ; preds = %3
  %11 = load float, ptr %4, align 4, !tbaa !5
  %12 = fneg float %11
  store float %12, ptr %4, align 4, !tbaa !5
  %13 = load float, ptr %5, align 4, !tbaa !5
  %14 = fneg float %13
  store float %14, ptr %5, align 4, !tbaa !5
  %15 = load float, ptr %6, align 4, !tbaa !5
  %16 = fneg float %15
  store float %16, ptr %6, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %10, %3
  %18 = load float, ptr %4, align 4, !tbaa !5
  %19 = load float, ptr %6, align 4, !tbaa !5
  %20 = fsub float %18, %19
  %21 = fpext float %20 to double
  %22 = fmul double 5.000000e-01, %21
  %23 = load float, ptr %4, align 4, !tbaa !5
  %24 = fpext float %23 to double
  %25 = load float, ptr %5, align 4, !tbaa !5
  %26 = fpext float %25 to double
  %27 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %26, double %24)
  %28 = load float, ptr %6, align 4, !tbaa !5
  %29 = fpext float %28 to double
  %30 = fadd double %27, %29
  %31 = fadd double %30, 1.000000e-30
  %32 = fdiv double %22, %31
  %33 = fptrunc double %32 to float
  ret float %33
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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"}


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local noundef float @_Z10interpPeakfff(float noundef %0, float noundef %1, float noundef %2) local_unnamed_addr #0 {
  %4 = fcmp olt float %1, 0.000000e+00
  %5 = fneg float %0
  %6 = fneg float %1
  %7 = fneg float %2
  %.010 = select i1 %4, float %5, float %0
  %.09 = select i1 %4, float %6, float %1
  %.0 = select i1 %4, float %7, float %2
  %8 = fsub float %.010, %.0
  %9 = fpext float %8 to double
  %10 = fmul double %9, 5.000000e-01
  %11 = fpext float %.010 to double
  %12 = fpext float %.09 to double
  %13 = tail call double @llvm.fmuladd.f64(double %12, double -2.000000e+00, double %11)
  %14 = fpext float %.0 to double
  %15 = fadd double %13, %14
  %16 = fadd double %15, 1.000000e-30
  %17 = fdiv double %10, %16
  %18 = fptrunc double %17 to float
  ret float %18
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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)"}


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