#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 pow(int, double);
double rohair(double dem, double t0, double dTair) {
  double patm = 101.3 * pow((293 - 0.0065 * dem) / 293, 5.26);
  return (patm * 1000 / (1.01 * (t0 - dTair) * 287));
}


x86 assembly (clang, -O0):
<rohair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xec4(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xeac(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe93(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  0xe74(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe60(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rohair>:
sub    $0x28,%rsp
movsd  %xmm2,0x8(%rsp)
movaps %xmm1,0x10(%rsp)
mulsd  0xed9(%rip),%xmm0
movsd  0xed9(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xecd(%rip),%xmm0
call   1030 <pow@plt>
movapd 0x10(%rsp),%xmm1
subsd  0x8(%rsp),%xmm1
unpcklpd %xmm1,%xmm0
mulpd  0xec0(%rip),%xmm0
mulpd  0xec8(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
divsd  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @rohair(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = call double @llvm.fmuladd.f64(double 0xBF7A9FBE76C8B439, double %8, double 2.930000e+02)
%10 = fdiv double %9, 2.930000e+02
%11 = fptosi double %10 to i32
%12 = call double @pow(i32 %11, double 5.260000e+00)
%13 = fmul double 1.013000e+02, %12
store double %13, double* %7
%14 = load double, double* %7
%15 = fmul double %14, 1.000000e+03
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fsub double %16, %17
%19 = fmul double 1.010000e+00, %18
%20 = fmul double %19, 2.870000e+02
%21 = fdiv double %15, %20
ret double %21
}

LLVM IR (-O2):
define double @rohair(double %0, double %1, double %2) {
%4 = tail call double @llvm.fmuladd.f64(double %0, double 0xBF7A9FBE76C8B439, double 2.930000e+02)
%5 = fdiv double %4, 2.930000e+02
%6 = fptosi double %5 to i32
%7 = tail call double @pow(i32 %6, double 5.260000e+00)
%8 = fsub double %1, %2
%9 = insertelement <2 x double> poison, double %7, i64 0
%10 = insertelement <2 x double> %9, double %8, i64 1
%11 = fmul <2 x double> %10, <double 1.013000e+02, double 1.010000e+00>
%12 = fmul <2 x double> %11, <double 1.000000e+03, double 2.870000e+02>
%13 = extractelement <2 x double> %12, i64 0
%14 = extractelement <2 x double> %12, i64 1
%15 = fdiv double %13, %14
ret double %15
}