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

; 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

; Function Attrs: nounwind uwtable
define dso_local void @calcfgh_dfgh_psat(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !9
  store double %4, ptr %11, align 8, !tbaa !9
  store double %5, ptr %12, align 8, !tbaa !9
  %13 = load double, ptr %10, align 8, !tbaa !9
  %14 = load double, ptr %10, align 8, !tbaa !9
  %15 = load double, ptr %10, align 8, !tbaa !9
  %16 = fmul double %14, %15
  %17 = load double, ptr %10, align 8, !tbaa !9
  %18 = load double, ptr %9, align 8, !tbaa !9
  %19 = call double @phird(double noundef %17, double noundef %18)
  %20 = call double @llvm.fmuladd.f64(double %16, double %19, double %13)
  %21 = load double, ptr %12, align 8, !tbaa !9
  %22 = load double, ptr %9, align 8, !tbaa !9
  %23 = fmul double %21, %22
  %24 = fdiv double %23, 0x41799F511B06F09E
  %25 = fsub double %20, %24
  %26 = fneg double %25
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 0
  store double %26, ptr %28, align 8, !tbaa !9
  %29 = load double, ptr %10, align 8, !tbaa !9
  %30 = load double, ptr %10, align 8, !tbaa !9
  %31 = fmul double %29, %30
  %32 = load double, ptr %10, align 8, !tbaa !9
  %33 = load double, ptr %9, align 8, !tbaa !9
  %34 = call double @phirdt(double noundef %32, double noundef %33)
  %35 = load double, ptr %12, align 8, !tbaa !9
  %36 = fdiv double %35, 0x41799F511B06F09E
  %37 = fneg double %36
  %38 = call double @llvm.fmuladd.f64(double %31, double %34, double %37)
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds [3 x double], ptr %39, i64 0
  %41 = getelementptr inbounds [3 x double], ptr %40, i64 0, i64 0
  store double %38, ptr %41, align 8, !tbaa !9
  %42 = load double, ptr %10, align 8, !tbaa !9
  %43 = fmul double 2.000000e+00, %42
  %44 = load double, ptr %10, align 8, !tbaa !9
  %45 = load double, ptr %9, align 8, !tbaa !9
  %46 = call double @phird(double noundef %44, double noundef %45)
  %47 = call double @llvm.fmuladd.f64(double %43, double %46, double 1.000000e+00)
  %48 = load double, ptr %10, align 8, !tbaa !9
  %49 = load double, ptr %10, align 8, !tbaa !9
  %50 = fmul double %48, %49
  %51 = load double, ptr %10, align 8, !tbaa !9
  %52 = load double, ptr %9, align 8, !tbaa !9
  %53 = call double @phirdd(double noundef %51, double noundef %52)
  %54 = call double @llvm.fmuladd.f64(double %50, double %53, double %47)
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds [3 x double], ptr %55, i64 0
  %57 = getelementptr inbounds [3 x double], ptr %56, i64 0, i64 1
  store double %54, ptr %57, align 8, !tbaa !9
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds [3 x double], ptr %58, i64 0
  %60 = getelementptr inbounds [3 x double], ptr %59, i64 0, i64 2
  store double 0.000000e+00, ptr %60, align 8, !tbaa !9
  %61 = load double, ptr %11, align 8, !tbaa !9
  %62 = load double, ptr %11, align 8, !tbaa !9
  %63 = load double, ptr %11, align 8, !tbaa !9
  %64 = fmul double %62, %63
  %65 = load double, ptr %11, align 8, !tbaa !9
  %66 = load double, ptr %9, align 8, !tbaa !9
  %67 = call double @phird(double noundef %65, double noundef %66)
  %68 = call double @llvm.fmuladd.f64(double %64, double %67, double %61)
  %69 = load double, ptr %12, align 8, !tbaa !9
  %70 = load double, ptr %9, align 8, !tbaa !9
  %71 = fmul double %69, %70
  %72 = fdiv double %71, 0x41799F511B06F09E
  %73 = fsub double %68, %72
  %74 = fneg double %73
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i64 1
  store double %74, ptr %76, align 8, !tbaa !9
  %77 = load double, ptr %11, align 8, !tbaa !9
  %78 = load double, ptr %11, align 8, !tbaa !9
  %79 = fmul double %77, %78
  %80 = load double, ptr %11, align 8, !tbaa !9
  %81 = load double, ptr %9, align 8, !tbaa !9
  %82 = call double @phirdt(double noundef %80, double noundef %81)
  %83 = load double, ptr %12, align 8, !tbaa !9
  %84 = fdiv double %83, 0x41799F511B06F09E
  %85 = fneg double %84
  %86 = call double @llvm.fmuladd.f64(double %79, double %82, double %85)
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds [3 x double], ptr %87, i64 1
  %89 = getelementptr inbounds [3 x double], ptr %88, i64 0, i64 0
  store double %86, ptr %89, align 8, !tbaa !9
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds [3 x double], ptr %90, i64 1
  %92 = getelementptr inbounds [3 x double], ptr %91, i64 0, i64 1
  store double 0.000000e+00, ptr %92, align 8, !tbaa !9
  %93 = load double, ptr %11, align 8, !tbaa !9
  %94 = fmul double 2.000000e+00, %93
  %95 = load double, ptr %11, align 8, !tbaa !9
  %96 = load double, ptr %9, align 8, !tbaa !9
  %97 = call double @phird(double noundef %95, double noundef %96)
  %98 = call double @llvm.fmuladd.f64(double %94, double %97, double 1.000000e+00)
  %99 = load double, ptr %11, align 8, !tbaa !9
  %100 = load double, ptr %11, align 8, !tbaa !9
  %101 = fmul double %99, %100
  %102 = load double, ptr %11, align 8, !tbaa !9
  %103 = load double, ptr %9, align 8, !tbaa !9
  %104 = call double @phirdd(double noundef %102, double noundef %103)
  %105 = call double @llvm.fmuladd.f64(double %101, double %104, double %98)
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds [3 x double], ptr %106, i64 1
  %108 = getelementptr inbounds [3 x double], ptr %107, i64 0, i64 2
  store double %105, ptr %108, align 8, !tbaa !9
  %109 = load double, ptr %10, align 8, !tbaa !9
  %110 = load double, ptr %9, align 8, !tbaa !9
  %111 = call double @phir(double noundef %109, double noundef %110)
  %112 = load double, ptr %11, align 8, !tbaa !9
  %113 = load double, ptr %9, align 8, !tbaa !9
  %114 = call double @phir(double noundef %112, double noundef %113)
  %115 = fsub double %111, %114
  %116 = load double, ptr %12, align 8, !tbaa !9
  %117 = load double, ptr %9, align 8, !tbaa !9
  %118 = fmul double %116, %117
  %119 = fdiv double %118, 0x41799F511B06F09E
  %120 = load double, ptr %11, align 8, !tbaa !9
  %121 = fdiv double 1.000000e+00, %120
  %122 = load double, ptr %10, align 8, !tbaa !9
  %123 = fdiv double 1.000000e+00, %122
  %124 = fsub double %121, %123
  %125 = fneg double %119
  %126 = call double @llvm.fmuladd.f64(double %125, double %124, double %115)
  %127 = load double, ptr %10, align 8, !tbaa !9
  %128 = load double, ptr %11, align 8, !tbaa !9
  %129 = fdiv double %127, %128
  %130 = call double @log(double noundef %129) #4
  %131 = fadd double %126, %130
  %132 = fneg double %131
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds double, ptr %133, i64 2
  store double %132, ptr %134, align 8, !tbaa !9
  %135 = load double, ptr %10, align 8, !tbaa !9
  %136 = load double, ptr %9, align 8, !tbaa !9
  %137 = call double @phirt(double noundef %135, double noundef %136)
  %138 = load double, ptr %11, align 8, !tbaa !9
  %139 = load double, ptr %9, align 8, !tbaa !9
  %140 = call double @phirt(double noundef %138, double noundef %139)
  %141 = fsub double %137, %140
  %142 = load double, ptr %12, align 8, !tbaa !9
  %143 = load double, ptr %11, align 8, !tbaa !9
  %144 = fdiv double 1.000000e+00, %143
  %145 = load double, ptr %10, align 8, !tbaa !9
  %146 = fdiv double 1.000000e+00, %145
  %147 = fsub double %144, %146
  %148 = fmul double %142, %147
  %149 = fdiv double %148, 0x41799F511B06F09E
  %150 = fsub double %141, %149
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds [3 x double], ptr %151, i64 2
  %153 = getelementptr inbounds [3 x double], ptr %152, i64 0, i64 0
  store double %150, ptr %153, align 8, !tbaa !9
  %154 = load double, ptr %10, align 8, !tbaa !9
  %155 = load double, ptr %9, align 8, !tbaa !9
  %156 = call double @phird(double noundef %154, double noundef %155)
  %157 = load double, ptr %12, align 8, !tbaa !9
  %158 = load double, ptr %9, align 8, !tbaa !9
  %159 = fmul double %157, %158
  %160 = load double, ptr %10, align 8, !tbaa !9
  %161 = fmul double 0x41799F511B06F09E, %160
  %162 = load double, ptr %10, align 8, !tbaa !9
  %163 = fmul double %161, %162
  %164 = fdiv double %159, %163
  %165 = fsub double %156, %164
  %166 = load double, ptr %10, align 8, !tbaa !9
  %167 = fdiv double 1.000000e+00, %166
  %168 = fadd double %165, %167
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds [3 x double], ptr %169, i64 2
  %171 = getelementptr inbounds [3 x double], ptr %170, i64 0, i64 1
  store double %168, ptr %171, align 8, !tbaa !9
  %172 = load double, ptr %11, align 8, !tbaa !9
  %173 = load double, ptr %9, align 8, !tbaa !9
  %174 = call double @phird(double noundef %172, double noundef %173)
  %175 = fneg double %174
  %176 = load double, ptr %12, align 8, !tbaa !9
  %177 = load double, ptr %9, align 8, !tbaa !9
  %178 = fmul double %176, %177
  %179 = load double, ptr %11, align 8, !tbaa !9
  %180 = fmul double 0x41799F511B06F09E, %179
  %181 = load double, ptr %11, align 8, !tbaa !9
  %182 = fmul double %180, %181
  %183 = fdiv double %178, %182
  %184 = fadd double %175, %183
  %185 = load double, ptr %11, align 8, !tbaa !9
  %186 = fdiv double 1.000000e+00, %185
  %187 = fsub double %184, %186
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = getelementptr inbounds [3 x double], ptr %188, i64 2
  %190 = getelementptr inbounds [3 x double], ptr %189, i64 0, i64 2
  store double %187, ptr %190, align 8, !tbaa !9
  ret void
}

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

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

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

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

; Function Attrs: nounwind
declare double @log(double noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local void @calcfgh_dfgh_psat(ptr nocapture noundef writeonly %0, ptr nocapture noundef writeonly %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) local_unnamed_addr #1 {
  %7 = fmul double %3, %3
  %8 = tail call double @phird(double noundef %3, double noundef %2) #4
  %9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %3)
  %10 = fmul double %2, %5
  %11 = fdiv double %10, 0x41799F511B06F09E
  %12 = fsub double %9, %11
  %13 = fneg double %12
  store double %13, ptr %1, align 8, !tbaa !5
  %14 = tail call double @phirdt(double noundef %3, double noundef %2) #4
  %15 = fdiv double %5, 0xC1799F511B06F09E
  %16 = tail call double @llvm.fmuladd.f64(double %7, double %14, double %15)
  store double %16, ptr %0, align 8, !tbaa !5
  %17 = fmul double %3, 2.000000e+00
  %18 = tail call double @phird(double noundef %3, double noundef %2) #4
  %19 = tail call double @llvm.fmuladd.f64(double %17, double %18, double 1.000000e+00)
  %20 = tail call double @phirdd(double noundef %3, double noundef %2) #4
  %21 = tail call double @llvm.fmuladd.f64(double %7, double %20, double %19)
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  store double %21, ptr %22, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  store double 0.000000e+00, ptr %23, align 8, !tbaa !5
  %24 = fmul double %4, %4
  %25 = tail call double @phird(double noundef %4, double noundef %2) #4
  %26 = tail call double @llvm.fmuladd.f64(double %24, double %25, double %4)
  %27 = fsub double %26, %11
  %28 = fneg double %27
  %29 = getelementptr inbounds i8, ptr %1, i64 8
  store double %28, ptr %29, align 8, !tbaa !5
  %30 = tail call double @phirdt(double noundef %4, double noundef %2) #4
  %31 = tail call double @llvm.fmuladd.f64(double %24, double %30, double %15)
  %32 = getelementptr inbounds i8, ptr %0, i64 24
  store double %31, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %0, i64 32
  store double 0.000000e+00, ptr %33, align 8, !tbaa !5
  %34 = fmul double %4, 2.000000e+00
  %35 = tail call double @phird(double noundef %4, double noundef %2) #4
  %36 = tail call double @llvm.fmuladd.f64(double %34, double %35, double 1.000000e+00)
  %37 = tail call double @phirdd(double noundef %4, double noundef %2) #4
  %38 = tail call double @llvm.fmuladd.f64(double %24, double %37, double %36)
  %39 = getelementptr inbounds i8, ptr %0, i64 40
  store double %38, ptr %39, align 8, !tbaa !5
  %40 = tail call double @phir(double noundef %3, double noundef %2) #4
  %41 = tail call double @phir(double noundef %4, double noundef %2) #4
  %42 = fsub double %40, %41
  %43 = fdiv double 1.000000e+00, %4
  %44 = fdiv double 1.000000e+00, %3
  %45 = fsub double %43, %44
  %46 = fneg double %11
  %47 = tail call double @llvm.fmuladd.f64(double %46, double %45, double %42)
  %48 = fdiv double %3, %4
  %49 = tail call double @log(double noundef %48) #4
  %50 = fadd double %49, %47
  %51 = fneg double %50
  %52 = getelementptr inbounds i8, ptr %1, i64 16
  store double %51, ptr %52, align 8, !tbaa !5
  %53 = tail call double @phirt(double noundef %3, double noundef %2) #4
  %54 = tail call double @phirt(double noundef %4, double noundef %2) #4
  %55 = fsub double %53, %54
  %56 = fmul double %45, %5
  %57 = fdiv double %56, 0x41799F511B06F09E
  %58 = fsub double %55, %57
  %59 = getelementptr inbounds i8, ptr %0, i64 48
  store double %58, ptr %59, align 8, !tbaa !5
  %60 = tail call double @phird(double noundef %3, double noundef %2) #4
  %61 = fmul double %3, 0x41799F511B06F09E
  %62 = fmul double %61, %3
  %63 = fdiv double %10, %62
  %64 = fsub double %60, %63
  %65 = fadd double %44, %64
  %66 = getelementptr inbounds i8, ptr %0, i64 56
  store double %65, ptr %66, align 8, !tbaa !5
  %67 = tail call double @phird(double noundef %4, double noundef %2) #4
  %68 = fmul double %4, 0x41799F511B06F09E
  %69 = fmul double %68, %4
  %70 = fdiv double %10, %69
  %71 = fsub double %70, %67
  %72 = fsub double %71, %43
  %73 = getelementptr inbounds i8, ptr %0, i64 64
  store double %72, ptr %73, align 8, !tbaa !5
  ret void
}

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #3

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

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