; LLVM IR from sympiler/nasoq :: src/symbolic/performanceModel.ll (ZN5nasoq18computeCostColFactEdd)

; 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 double @_ZN5nasoq18computeCostColFactEdd(double noundef %0, double noundef %1) #0 {
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  store double %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  %6 = load double, ptr %4, align 8, !tbaa !5
  %7 = load double, ptr %3, align 8, !tbaa !5
  %8 = call double @llvm.fmuladd.f64(double 0x3E0F8906E36F8D4F, double %7, double 0x3E8E6A5C25FFA915)
  %9 = load double, ptr %3, align 8, !tbaa !5
  %10 = fmul double 0x3DBAD2DC57F46C4C, %9
  %11 = load double, ptr %3, align 8, !tbaa !5
  %12 = fmul double %10, %11
  %13 = load double, ptr %3, align 8, !tbaa !5
  %14 = load double, ptr %3, align 8, !tbaa !5
  %15 = fmul double 0x3E52542EAF6BB774, %14
  %16 = load double, ptr %3, align 8, !tbaa !5
  %17 = fmul double %15, %16
  %18 = call double @llvm.fmuladd.f64(double %12, double %13, double %17)
  %19 = load double, ptr %3, align 8, !tbaa !5
  %20 = call double @llvm.fmuladd.f64(double 0xBE83BA838E5A8DB9, double %19, double %18)
  %21 = fadd double %20, 0x3E9B52CBB7336EC8
  %22 = call double @llvm.fmuladd.f64(double %6, double %8, double %21)
  %23 = load double, ptr %3, align 8, !tbaa !5
  %24 = fmul double 0x3DF20C04F9D2050D, %23
  %25 = load double, ptr %3, align 8, !tbaa !5
  %26 = fmul double %24, %25
  %27 = load double, ptr %4, align 8, !tbaa !5
  %28 = load double, ptr %3, align 8, !tbaa !5
  %29 = fmul double 0x3E6558D84C9F7EA6, %28
  %30 = call double @llvm.fmuladd.f64(double %26, double %27, double %29)
  %31 = fadd double %30, 0x3ECB4E6B887EA07D
  %32 = fadd double %22, %31
  store double %32, ptr %5, align 8, !tbaa !5
  %33 = load double, ptr %5, align 8, !tbaa !5
  %34 = fcmp ogt double %33, 0.000000e+00
  br i1 %34, label %35, label %37

35:                                               ; preds = %2
  %36 = load double, ptr %5, align 8, !tbaa !5
  br label %38

37:                                               ; preds = %2
  br label %38

38:                                               ; preds = %37, %35
  %39 = phi double [ %36, %35 ], [ 0.000000e+00, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret double %39
}

; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = !{!"double", !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 double @_ZN5nasoq18computeCostColFactEdd(double noundef %0, double noundef %1) local_unnamed_addr #0 {
  %3 = tail call double @llvm.fmuladd.f64(double %0, double 0x3E0F8906E36F8D4F, double 0x3E8E6A5C25FFA915)
  %4 = fmul double %0, 0x3DBAD2DC57F46C4C
  %5 = fmul double %4, %0
  %6 = fmul double %0, 0x3E52542EAF6BB774
  %7 = fmul double %6, %0
  %8 = tail call double @llvm.fmuladd.f64(double %5, double %0, double %7)
  %9 = tail call double @llvm.fmuladd.f64(double %0, double 0xBE83BA838E5A8DB9, double %8)
  %10 = fadd double %9, 0x3E9B52CBB7336EC8
  %11 = tail call double @llvm.fmuladd.f64(double %1, double %3, double %10)
  %12 = fmul double %0, 0x3DF20C04F9D2050D
  %13 = fmul double %12, %0
  %14 = fmul double %0, 0x3E6558D84C9F7EA6
  %15 = tail call double @llvm.fmuladd.f64(double %13, double %1, double %14)
  %16 = fadd double %15, 0x3ECB4E6B887EA07D
  %17 = fadd double %16, %11
  %18 = fcmp ogt double %17, 0.000000e+00
  %19 = select i1 %18, double %17, double 0.000000e+00
  ret double %19
}

; 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