; LLVM IR from zhenrong-wang/co2 :: co2_property_calc (calcfg_dfg_ps)

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

declare double @phird(double noundef, double noundef) #1

declare double @phirdt(double noundef, double noundef) #1

declare double @phirdd(double noundef, double noundef) #1

declare double @phir(double noundef, double noundef) #1

declare double @phirt(double noundef, double noundef) #1

declare double @phi0t(double noundef) #1

declare double @phi0(double noundef, double noundef) #1

declare double @phi0d(double noundef) #1

declare double @phi0tt(double noundef) #1

declare double @phirtt(double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @calcfg_dfg_ps(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9) #2 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store double %6, ptr %17, align 8, !tbaa !9
  store double %7, ptr %18, align 8, !tbaa !9
  store double %8, ptr %19, align 8, !tbaa !9
  store double %9, ptr %20, align 8, !tbaa !9
  %21 = load double, ptr %18, align 8, !tbaa !9
  %22 = load double, ptr %18, align 8, !tbaa !9
  %23 = load double, ptr %18, align 8, !tbaa !9
  %24 = fmul double %22, %23
  %25 = load double, ptr %18, align 8, !tbaa !9
  %26 = load double, ptr %17, align 8, !tbaa !9
  %27 = call double @phird(double noundef %25, double noundef %26)
  %28 = call double @llvm.fmuladd.f64(double %24, double %27, double %21)
  %29 = load double, ptr %19, align 8, !tbaa !9
  %30 = load double, ptr %17, align 8, !tbaa !9
  %31 = fmul double %29, %30
  %32 = fdiv double %31, 0x41799F511B06F09E
  %33 = fsub double %28, %32
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  store double %33, ptr %34, align 8, !tbaa !9
  %35 = load double, ptr %18, align 8, !tbaa !9
  %36 = load double, ptr %18, align 8, !tbaa !9
  %37 = fmul double %35, %36
  %38 = load double, ptr %18, align 8, !tbaa !9
  %39 = load double, ptr %17, align 8, !tbaa !9
  %40 = call double @phirdt(double noundef %38, double noundef %39)
  %41 = load double, ptr %19, align 8, !tbaa !9
  %42 = fdiv double %41, 0x41799F511B06F09E
  %43 = fneg double %42
  %44 = call double @llvm.fmuladd.f64(double %37, double %40, double %43)
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  store double %44, ptr %45, align 8, !tbaa !9
  %46 = load double, ptr %18, align 8, !tbaa !9
  %47 = load double, ptr %18, align 8, !tbaa !9
  %48 = fmul double %46, %47
  %49 = load double, ptr %18, align 8, !tbaa !9
  %50 = load double, ptr %17, align 8, !tbaa !9
  %51 = call double @phirdd(double noundef %49, double noundef %50)
  %52 = call double @llvm.fmuladd.f64(double %48, double %51, double 1.000000e+00)
  %53 = load double, ptr %18, align 8, !tbaa !9
  %54 = fmul double 2.000000e+00, %53
  %55 = load double, ptr %18, align 8, !tbaa !9
  %56 = load double, ptr %17, align 8, !tbaa !9
  %57 = call double @phird(double noundef %55, double noundef %56)
  %58 = call double @llvm.fmuladd.f64(double %54, double %57, double %52)
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  store double %58, ptr %59, align 8, !tbaa !9
  %60 = load double, ptr %17, align 8, !tbaa !9
  %61 = load double, ptr %17, align 8, !tbaa !9
  %62 = call double @phi0t(double noundef %61)
  %63 = load double, ptr %18, align 8, !tbaa !9
  %64 = load double, ptr %17, align 8, !tbaa !9
  %65 = call double @phirt(double noundef %63, double noundef %64)
  %66 = fadd double %62, %65
  %67 = load double, ptr %18, align 8, !tbaa !9
  %68 = load double, ptr %17, align 8, !tbaa !9
  %69 = call double @phi0(double noundef %67, double noundef %68)
  %70 = fneg double %69
  %71 = call double @llvm.fmuladd.f64(double %60, double %66, double %70)
  %72 = load double, ptr %18, align 8, !tbaa !9
  %73 = load double, ptr %17, align 8, !tbaa !9
  %74 = call double @phir(double noundef %72, double noundef %73)
  %75 = fsub double %71, %74
  %76 = load double, ptr %20, align 8, !tbaa !9
  %77 = fdiv double %76, 0x40679D923A29C77A
  %78 = fsub double %75, %77
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  store double %78, ptr %79, align 8, !tbaa !9
  %80 = load double, ptr %17, align 8, !tbaa !9
  %81 = load double, ptr %17, align 8, !tbaa !9
  %82 = call double @phi0tt(double noundef %81)
  %83 = load double, ptr %18, align 8, !tbaa !9
  %84 = load double, ptr %17, align 8, !tbaa !9
  %85 = call double @phirtt(double noundef %83, double noundef %84)
  %86 = fadd double %82, %85
  %87 = fmul double %80, %86
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  store double %87, ptr %88, align 8, !tbaa !9
  %89 = load double, ptr %17, align 8, !tbaa !9
  %90 = load double, ptr %18, align 8, !tbaa !9
  %91 = load double, ptr %17, align 8, !tbaa !9
  %92 = call double @phirdt(double noundef %90, double noundef %91)
  %93 = load double, ptr %18, align 8, !tbaa !9
  %94 = call double @phi0d(double noundef %93)
  %95 = fneg double %94
  %96 = call double @llvm.fmuladd.f64(double %89, double %92, double %95)
  %97 = load double, ptr %18, align 8, !tbaa !9
  %98 = load double, ptr %17, align 8, !tbaa !9
  %99 = call double @phird(double noundef %97, double noundef %98)
  %100 = fsub double %96, %99
  %101 = load ptr, ptr %16, align 8, !tbaa !5
  store double %100, ptr %101, align 8, !tbaa !9
  ret void
}

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

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !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"

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

declare double @phird(double noundef, double noundef) local_unnamed_addr #1

declare double @phirdt(double noundef, double noundef) local_unnamed_addr #1

declare double @phirdd(double noundef, double noundef) local_unnamed_addr #1

declare double @phir(double noundef, double noundef) local_unnamed_addr #1

declare double @phirt(double noundef, double noundef) local_unnamed_addr #1

declare double @phi0t(double noundef) local_unnamed_addr #1

declare double @phi0(double noundef, double noundef) local_unnamed_addr #1

declare double @phi0d(double noundef) local_unnamed_addr #1

declare double @phi0tt(double noundef) local_unnamed_addr #1

declare double @phirtt(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @calcfg_dfg_ps(ptr nocapture noundef writeonly %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9) local_unnamed_addr #2 {
  %11 = fmul double %7, %7
  %12 = tail call double @phird(double noundef %7, double noundef %6) #3
  %13 = tail call double @llvm.fmuladd.f64(double %11, double %12, double %7)
  %14 = fmul double %6, %8
  %15 = fdiv double %14, 0x41799F511B06F09E
  %16 = fsub double %13, %15
  store double %16, ptr %0, align 8, !tbaa !5
  %17 = tail call double @phirdt(double noundef %7, double noundef %6) #3
  %18 = fdiv double %8, 0xC1799F511B06F09E
  %19 = tail call double @llvm.fmuladd.f64(double %11, double %17, double %18)
  store double %19, ptr %2, align 8, !tbaa !5
  %20 = tail call double @phirdd(double noundef %7, double noundef %6) #3
  %21 = tail call double @llvm.fmuladd.f64(double %11, double %20, double 1.000000e+00)
  %22 = fmul double %7, 2.000000e+00
  %23 = tail call double @phird(double noundef %7, double noundef %6) #3
  %24 = tail call double @llvm.fmuladd.f64(double %22, double %23, double %21)
  store double %24, ptr %3, align 8, !tbaa !5
  %25 = tail call double @phi0t(double noundef %6) #3
  %26 = tail call double @phirt(double noundef %7, double noundef %6) #3
  %27 = fadd double %25, %26
  %28 = tail call double @phi0(double noundef %7, double noundef %6) #3
  %29 = fneg double %28
  %30 = tail call double @llvm.fmuladd.f64(double %6, double %27, double %29)
  %31 = tail call double @phir(double noundef %7, double noundef %6) #3
  %32 = fsub double %30, %31
  %33 = fdiv double %9, 0x40679D923A29C77A
  %34 = fsub double %32, %33
  store double %34, ptr %1, align 8, !tbaa !5
  %35 = tail call double @phi0tt(double noundef %6) #3
  %36 = tail call double @phirtt(double noundef %7, double noundef %6) #3
  %37 = fadd double %35, %36
  %38 = fmul double %37, %6
  store double %38, ptr %4, align 8, !tbaa !5
  %39 = tail call double @phirdt(double noundef %7, double noundef %6) #3
  %40 = tail call double @phi0d(double noundef %7) #3
  %41 = fneg double %40
  %42 = tail call double @llvm.fmuladd.f64(double %6, double %39, double %41)
  %43 = tail call double @phird(double noundef %7, double noundef %6) #3
  %44 = fsub double %42, %43
  store double %44, ptr %5, align 8, !tbaa !5
  ret void
}

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


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