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

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

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__._Z10InterpPeakfff = external hidden unnamed_addr constant [38 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef float @_Z10InterpPeakfff(float noundef %0, float noundef %1, float noundef %2) #1 {
  %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 %5, align 4, !tbaa !5
  %19 = load float, ptr %4, align 4, !tbaa !5
  %20 = fcmp oge float %18, %19
  br i1 %20, label %21, label %25

21:                                               ; preds = %17
  %22 = load float, ptr %5, align 4, !tbaa !5
  %23 = load float, ptr %6, align 4, !tbaa !5
  %24 = fcmp oge float %22, %23
  br label %25

25:                                               ; preds = %21, %17
  %26 = phi i1 [ false, %17 ], [ %24, %21 ]
  br i1 %26, label %27, label %28

27:                                               ; preds = %25
  br label %30

28:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 177, ptr noundef @__PRETTY_FUNCTION__._Z10InterpPeakfff) #3
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  %31 = load float, ptr %4, align 4, !tbaa !5
  %32 = load float, ptr %6, align 4, !tbaa !5
  %33 = fsub float %31, %32
  %34 = fpext float %33 to double
  %35 = fmul double 5.000000e-01, %34
  %36 = load float, ptr %4, align 4, !tbaa !5
  %37 = fpext float %36 to double
  %38 = load float, ptr %5, align 4, !tbaa !5
  %39 = fpext float %38 to double
  %40 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %39, double %37)
  %41 = load float, ptr %6, align 4, !tbaa !5
  %42 = fpext float %41 to double
  %43 = fadd double %40, %42
  %44 = fdiv double %35, %43
  %45 = fptrunc double %44 to float
  ret float %45
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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


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

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__._Z10InterpPeakfff = external hidden unnamed_addr constant [38 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef float @_Z10InterpPeakfff(float noundef %0, float noundef %1, float noundef %2) local_unnamed_addr #1 {
  %4 = fcmp olt float %1, 0.000000e+00
  %5 = fneg float %0
  %6 = fneg float %1
  %7 = fneg float %2
  %.014 = select i1 %4, float %5, float %0
  %.013 = select i1 %4, float %6, float %1
  %.0 = select i1 %4, float %7, float %2
  %8 = fcmp oge float %.013, %.014
  %9 = fcmp oge float %.013, %.0
  %10 = and i1 %8, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 177, ptr noundef nonnull @__PRETTY_FUNCTION__._Z10InterpPeakfff) #3
  unreachable

12:                                               ; preds = %3
  %13 = fsub float %.014, %.0
  %14 = fpext float %13 to double
  %15 = fmul double %14, 5.000000e-01
  %16 = fpext float %.014 to double
  %17 = fpext float %.013 to double
  %18 = tail call double @llvm.fmuladd.f64(double %17, double -2.000000e+00, double %16)
  %19 = fpext float %.0 to double
  %20 = fadd double %18, %19
  %21 = fdiv double %15, %20
  %22 = fptrunc double %21 to float
  ret float %22
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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


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