#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 exp(double);
double log(double);
double pow(double, double);
double ra_funcbareRe(double Zt, double Zref, double d0m, double z0m,
                     double Psih, double Psir, double ustar, double K,
                     double rho, double tkair, double tkrad) {
  double rabrRe;
  double Tas;
  double mu, mu0;
  double nu;
  double Restar;
  double z0h;
  Tas = 0.5 * (tkair + tkrad);
  mu0 = 1.8325e-5;
  mu = ((296.16 + 393.16) / (Tas + 393.16)) * (pow((Tas / 296.16), 1.5)) * mu0;
  nu = mu / rho;
  Restar = ustar * z0m / nu;
  z0h = z0m * exp(-K * (4.0 * (pow(Restar, 0.15)) - 5.0));
  rabrRe = (log((Zt - d0m) / z0h) - Psih) / (ustar * K);
  return (rabrRe);
}


x86 assembly (clang, -O0):
<ra_funcbareRe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  0x18(%rbp),%xmm1
addsd  0x20(%rbp),%xmm1
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe8b(%rip),%xmm1
addsd  -0x50(%rbp),%xmm1
movsd  0xe76(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  0xe55(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe41(%rip),%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
divsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  0xdbd(%rip),%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xd95(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd91(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
call   1040 <log@plt>
subsd  -0x28(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ra_funcbareRe>:
sub    $0x58,%rsp
movaps %xmm7,0x40(%rsp)
movsd  %xmm6,0x8(%rsp)
movsd  %xmm4,0x38(%rsp)
movsd  %xmm3,(%rsp)
movsd  %xmm2,0x30(%rsp)
movsd  %xmm0,0x28(%rsp)
movsd  0x68(%rsp),%xmm0
addsd  0x70(%rsp),%xmm0
mulsd  0xe96(%rip),%xmm0
movsd  0xe96(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe92(%rip),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
divsd  0xe88(%rip),%xmm0
movsd  0xe88(%rip),%xmm1
call   1050 <pow@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0xe7d(%rip),%xmm0
divsd  0x60(%rsp),%xmm0
movsd  (%rsp),%xmm2
mulsd  0x8(%rsp),%xmm2
divsd  %xmm0,%xmm2
movaps 0xe89(%rip),%xmm0
xorps  0x40(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0xe57(%rip),%xmm1
movapd %xmm2,%xmm0
call   1050 <pow@plt>
mulsd  0xe4e(%rip),%xmm0
addsd  0xe4e(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
subsd  0x30(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <log@plt>
subsd  0x38(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x40(%rsp),%xmm1
divsd  %xmm1,%xmm0
add    $0x58,%rsp
ret

LLVM IR (-O0):
define double @ra_funcbareRe(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
store double %0, double* %12
store double %1, double* %13
store double %2, double* %14
store double %3, double* %15
store double %4, double* %16
store double %5, double* %17
store double %6, double* %18
store double %7, double* %19
store double %8, double* %20
store double %9, double* %21
store double %10, double* %22
%30 = load double, double* %21
%31 = load double, double* %22
%32 = fadd double %30, %31
%33 = fmul double 5.000000e-01, %32
store double %33, double* %24
store double 1.832500e-05, double* %26
%34 = load double, double* %24
%35 = fadd double %34, 3.931600e+02
%36 = fdiv double 6.893200e+02, %35
%37 = load double, double* %24
%38 = fdiv double %37, 2.961600e+02
%39 = call double @pow(double %38, double 1.500000e+00)
%40 = fmul double %36, %39
%41 = load double, double* %26
%42 = fmul double %40, %41
store double %42, double* %25
%43 = load double, double* %25
%44 = load double, double* %20
%45 = fdiv double %43, %44
store double %45, double* %27
%46 = load double, double* %18
%47 = load double, double* %15
%48 = fmul double %46, %47
%49 = load double, double* %27
%50 = fdiv double %48, %49
store double %50, double* %28
%51 = load double, double* %15
%52 = load double, double* %19
%53 = fneg double %52
%54 = load double, double* %28
%55 = call double @pow(double %54, double 1.500000e-01)
%56 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %55, double -5.000000e+00)
%57 = fmul double %53, %56
%58 = call double @exp(double %57)
%59 = fmul double %51, %58
store double %59, double* %29
%60 = load double, double* %12
%61 = load double, double* %14
%62 = fsub double %60, %61
%63 = load double, double* %29
%64 = fdiv double %62, %63
%65 = call double @log(double %64)
%66 = load double, double* %16
%67 = fsub double %65, %66
%68 = load double, double* %18
%69 = load double, double* %19
%70 = fmul double %68, %69
%71 = fdiv double %67, %70
store double %71, double* %23
%72 = load double, double* %23
ret double %72
}

LLVM IR (-O2):
define double @ra_funcbareRe(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = fadd double %9, %10
%13 = fmul double %12, 5.000000e-01
%14 = fadd double %13, 3.931600e+02
%15 = fdiv double 6.893200e+02, %14
%16 = fdiv double %13, 2.961600e+02
%17 = tail call double @pow(double %16, double 1.500000e+00)
%18 = fmul double %15, %17
%19 = fmul double %18, 1.832500e-05
%20 = fdiv double %19, %8
%21 = fmul double %3, %6
%22 = fdiv double %21, %20
%23 = fneg double %7
%24 = tail call double @pow(double %22, double 1.500000e-01)
%25 = tail call double @llvm.fmuladd.f64(double %24, double 4.000000e+00, double -5.000000e+00)
%26 = fmul double %25, %23
%27 = tail call double @exp(double %26)
%28 = fmul double %27, %3
%29 = fsub double %0, %2
%30 = fdiv double %29, %28
%31 = tail call double @log(double %30)
%32 = fsub double %31, %4
%33 = fmul double %6, %7
%34 = fdiv double %32, %33
ret double %34
}