#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double const exp(double);
double const pow(double, int);
double phyCalcVapPresR410A(double temp) {
  const double A = -1.440004;
  const double B = -6.865265;
  const double C = -0.5354309;
  const double D = -3.749023;
  const double E = -3.521484;
  const double F = -7.75;
  const double X0 = 0.2086902;
  const double Tc = 345.28;
  const double Pc = 4926.1;
  double X, Tr;
  if (temp < -100.0)
    temp = -100.0;
  else if (temp > 72.0)
    temp = 72.0;
  Tr = (temp + 273.15) / Tc;
  X = (1.0 - Tr) - X0;
  return (double)(exp(1.0 / Tr *
                      (A + (B * X) + (C * pow(X, 2)) + (D * pow(X, 3)) +
                       (E * pow(X, 4)) + (F * pow(X, 5)))) *
                  Pc / 100.0);
}


x86 assembly (clang, -O0):
<phyCalcVapPresR410A>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf10(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xefb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee6(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xea7(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe92(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe7d(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe68(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe53(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    11ca <phyCalcVapPresR410A+0xaa>
movsd  0xe40(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11f3 <phyCalcVapPresR410A+0xd3>
movsd  -0x8(%rbp),%xmm0
movsd  0xe79(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11ee <phyCalcVapPresR410A+0xce>
movsd  0xe67(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11f3 <phyCalcVapPresR410A+0xd3>
movsd  0xe6d(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xe08(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe47(%rip),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  0xdf2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe29(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xdf2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdee(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xdb3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    $0x3,%edi
call   1040 <pow@plt>
movsd  -0x80(%rbp),%xmm1
movsd  0xd82(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    $0x4,%edi
call   1040 <pow@plt>
movsd  -0x78(%rbp),%xmm1
movsd  0xd51(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
movsd  -0x70(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  0xd18(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xce7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd2b(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phyCalcVapPresR410A>:
sub    $0x18,%rsp
movsd  0xed4(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1148 <phyCalcVapPresR410A+0x28>
ucomisd 0xece(%rip),%xmm0
movapd %xmm0,%xmm1
jbe    1148 <phyCalcVapPresR410A+0x28>
movsd  0xec0(%rip),%xmm1
addsd  0xec0(%rip),%xmm1
divsd  0xec0(%rip),%xmm1
movsd  0xec0(%rip),%xmm2
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
addsd  0xeb8(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
divsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0xea8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xea4(%rip),%xmm1
movsd  %xmm1,(%rsp)
mov    $0x2,%edi
call   1040 <pow@plt>
mulsd  0xe95(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x3,%edi
call   1040 <pow@plt>
mulsd  0xe7b(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x4,%edi
call   1040 <pow@plt>
mulsd  0xe61(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
mulsd  0xe47(%rip),%xmm0
addsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0xe37(%rip),%xmm0
divsd  0xe37(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @phyCalcVapPresR410A(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %2
store double 0xBFF70A41A261BF38, double* %3
store double 0xC01B760807357E67, double* %4
store double 0xBFE1223FFB989233, double* %5
store double 0xC00DFDFFC5479D4E, double* %6
store double 0xC00C2BFFCDAB191E, double* %7
store double -7.750000e+00, double* %8
store double 0x3FCAB65C47FF7312, double* %9
store double 3.452800e+02, double* %10
store double 4.926100e+03, double* %11
%14 = load double, double* %2
%15 = fcmp olt double %14, -1.000000e+02
br i1 %15, label %16, label %17
16: ; preds = %1
store double -1.000000e+02, double* %2
br label %22
17: ; preds = %1
%18 = load double, double* %2
%19 = fcmp ogt double %18, 7.200000e+01
br i1 %19, label %20, label %21
20: ; preds = %17
store double 7.200000e+01, double* %2
br label %21
21: ; preds = %20, %17
br label %22
22: ; preds = %21, %16
%23 = load double, double* %2
%24 = fadd double %23, 2.731500e+02
%25 = fdiv double %24, 3.452800e+02
store double %25, double* %13
%26 = load double, double* %13
%27 = fsub double 1.000000e+00, %26
%28 = fsub double %27, 0x3FCAB65C47FF7312
store double %28, double* %12
%29 = load double, double* %13
%30 = fdiv double 1.000000e+00, %29
%31 = load double, double* %12
%32 = call double @llvm.fmuladd.f64(double 0xC01B760807357E67, double %31, double 0xBFF70A41A261BF38)
%33 = load double, double* %12
%34 = call double @pow(double %33, i32 2)
%35 = call double @llvm.fmuladd.f64(double 0xBFE1223FFB989233, double %34, double %32)
%36 = load double, double* %12
%37 = call double @pow(double %36, i32 3)
%38 = call double @llvm.fmuladd.f64(double 0xC00DFDFFC5479D4E, double %37, double %35)
%39 = load double, double* %12
%40 = call double @pow(double %39, i32 4)
%41 = call double @llvm.fmuladd.f64(double 0xC00C2BFFCDAB191E, double %40, double %38)
%42 = load double, double* %12
%43 = call double @pow(double %42, i32 5)
%44 = call double @llvm.fmuladd.f64(double -7.750000e+00, double %43, double %41)
%45 = fmul double %30, %44
%46 = call double @exp(double %45)
%47 = fmul double %46, 4.926100e+03
%48 = fdiv double %47, 1.000000e+02
ret double %48
}

LLVM IR (-O2):
define double @phyCalcVapPresR410A(double %0) {
%2 = fcmp olt double %0, -1.000000e+02
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fcmp ogt double %0, 7.200000e+01
br i1 %4, label %5, label %6
5: ; preds = %3
br label %6
6: ; preds = %1, %3, %5
%7 = phi double [ 7.200000e+01, %5 ], [ %0, %3 ], [ -1.000000e+02, %1 ]
%8 = fadd double %7, 2.731500e+02
%9 = fdiv double %8, 3.452800e+02
%10 = fsub double 1.000000e+00, %9
%11 = fadd double %10, 0xBFCAB65C47FF7312
%12 = fdiv double 1.000000e+00, %9
%13 = tail call double @llvm.fmuladd.f64(double %11, double 0xC01B760807357E67, double 0xBFF70A41A261BF38)
%14 = tail call double @pow(double %11, i32 2)
%15 = tail call double @llvm.fmuladd.f64(double %14, double 0xBFE1223FFB989233, double %13)
%16 = tail call double @pow(double %11, i32 3)
%17 = tail call double @llvm.fmuladd.f64(double %16, double 0xC00DFDFFC5479D4E, double %15)
%18 = tail call double @pow(double %11, i32 4)
%19 = tail call double @llvm.fmuladd.f64(double %18, double 0xC00C2BFFCDAB191E, double %17)
%20 = tail call double @pow(double %11, i32 5)
%21 = tail call double @llvm.fmuladd.f64(double %20, double -7.750000e+00, double %19)
%22 = fmul double %12, %21
%23 = tail call double @exp(double %22)
%24 = fmul double %23, 4.926100e+03
%25 = fdiv double %24, 1.000000e+02
ret double %25
}