#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 const);
double const pow(double, double);
double rhtoah(double rhpc, double degC) {
  const double c = 2.16679;
  const double tc = 647.096;
  const double tt = 273.16;
  const double pc = 22064000;
  const double c1 = -7.85951783;
  const double c2 = 1.84408259;
  const double c3 = -11.7866497;
  const double c4 = 22.6807411;
  const double c5 = -15.9618719;
  const double c6 = 1.80122502;
  double pw, pws, K, eta, coeff;
  K = degC + tt;
  eta = 1.0 - (K / tc);
  coeff = c1 * eta;
  coeff += c2 * pow(eta, 1.5);
  coeff += c3 * pow(eta, 3);
  coeff += c4 * pow(eta, 3.5);
  coeff += c5 * pow(eta, 4);
  coeff += c6 * pow(eta, 7.5);
  pws = pc * exp((tc / K) * coeff);
  pw = pws * rhpc * 0.01;
  return c * pw / K;
}


x86 assembly (clang, -O0):
<rhtoah>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xf29(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xeff(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe6e(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xec1(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm1
movsd  0xe42(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe96(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe7d(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xe5b(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xe3e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xe19(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xdfc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xdd7(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xdba(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xd95(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xd78(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xd53(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xd36(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd16(%rip),%xmm0
divsd  -0x78(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xcf1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xcce(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xcb5(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rhtoah>:
sub    $0x28,%rsp
movsd  %xmm0,0x20(%rsp)
addsd  0xece(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
divsd  0xec8(%rip),%xmm1
movsd  0xec8(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xebe(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xeb4(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0xeaf(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xea3(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  0xe98(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe8c(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  0xe81(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe75(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  0xe6a(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe5e(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  0xe53(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0xde5(%rip),%xmm1
divsd  0x18(%rsp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0xe36(%rip),%xmm0
mulsd  0x20(%rsp),%xmm0
mulsd  0xe30(%rip),%xmm0
mulsd  0xe30(%rip),%xmm0
divsd  0x18(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @rhtoah(double %0, double %1) {
%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
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 2.166790e+00, double* %5
store double 6.470960e+02, double* %6
store double 2.731600e+02, double* %7
store double 2.206400e+07, double* %8
store double 0xC01F70257128B72E, double* %9
store double 0x3FFD815CBEF2C483, double* %10
store double 0xC02792C3BFDDD101, double* %11
store double 0x4036AE450C798B06, double* %12
store double 0xC02FEC7A7942E1FD, double* %13
store double 0x3FFCD1D1539A30EE, double* %14
%20 = load double, double* %4
%21 = fadd double %20, 2.731600e+02
store double %21, double* %17
%22 = load double, double* %17
%23 = fdiv double %22, 6.470960e+02
%24 = fsub double 1.000000e+00, %23
store double %24, double* %18
%25 = load double, double* %18
%26 = fmul double 0xC01F70257128B72E, %25
store double %26, double* %19
%27 = load double, double* %18
%28 = call double @pow(double %27, double 1.500000e+00)
%29 = load double, double* %19
%30 = call double @llvm.fmuladd.f64(double 0x3FFD815CBEF2C483, double %28, double %29)
store double %30, double* %19
%31 = load double, double* %18
%32 = call double @pow(double %31, double 3.000000e+00)
%33 = load double, double* %19
%34 = call double @llvm.fmuladd.f64(double 0xC02792C3BFDDD101, double %32, double %33)
store double %34, double* %19
%35 = load double, double* %18
%36 = call double @pow(double %35, double 3.500000e+00)
%37 = load double, double* %19
%38 = call double @llvm.fmuladd.f64(double 0x4036AE450C798B06, double %36, double %37)
store double %38, double* %19
%39 = load double, double* %18
%40 = call double @pow(double %39, double 4.000000e+00)
%41 = load double, double* %19
%42 = call double @llvm.fmuladd.f64(double 0xC02FEC7A7942E1FD, double %40, double %41)
store double %42, double* %19
%43 = load double, double* %18
%44 = call double @pow(double %43, double 7.500000e+00)
%45 = load double, double* %19
%46 = call double @llvm.fmuladd.f64(double 0x3FFCD1D1539A30EE, double %44, double %45)
store double %46, double* %19
%47 = load double, double* %17
%48 = fdiv double 6.470960e+02, %47
%49 = load double, double* %19
%50 = fmul double %48, %49
%51 = call double @exp(double %50)
%52 = fmul double 2.206400e+07, %51
store double %52, double* %16
%53 = load double, double* %16
%54 = load double, double* %3
%55 = fmul double %53, %54
%56 = fmul double %55, 1.000000e-02
store double %56, double* %15
%57 = load double, double* %15
%58 = fmul double 2.166790e+00, %57
%59 = load double, double* %17
%60 = fdiv double %58, %59
ret double %60
}

LLVM IR (-O2):
define double @rhtoah(double %0, double %1) {
%3 = fadd double %1, 2.731600e+02
%4 = fdiv double %3, 6.470960e+02
%5 = fsub double 1.000000e+00, %4
%6 = fmul double %5, 0xC01F70257128B72E
%7 = tail call double @pow(double %5, double 1.500000e+00)
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3FFD815CBEF2C483, double %6)
%9 = tail call double @pow(double %5, double 3.000000e+00)
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0xC02792C3BFDDD101, double %8)
%11 = tail call double @pow(double %5, double 3.500000e+00)
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x4036AE450C798B06, double %10)
%13 = tail call double @pow(double %5, double 4.000000e+00)
%14 = tail call double @llvm.fmuladd.f64(double %13, double 0xC02FEC7A7942E1FD, double %12)
%15 = tail call double @pow(double %5, double 7.500000e+00)
%16 = tail call double @llvm.fmuladd.f64(double %15, double 0x3FFCD1D1539A30EE, double %14)
%17 = fdiv double 6.470960e+02, %3
%18 = fmul double %17, %16
%19 = tail call double @exp(double %18)
%20 = fmul double %19, 2.206400e+07
%21 = fmul double %20, %0
%22 = fmul double %21, 1.000000e-02
%23 = fmul double %22, 2.166790e+00
%24 = fdiv double %23, %3
ret double %24
}