#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(double, double);
double getreynoldsnum(double tcair, double tc_composite, double ustar,
                      double z0m, double rhoair, double mu0) {
  double tas, mu, nu, re;
  tas = 0.5 * (tcair + tc_composite);
  mu = ((296.16 + 393.16) / (tas + 393.16)) * pow((tas / 296.16), (3.0 / 2.0)) *
       mu0;
  nu = mu / rhoair;
  re = ustar * z0m / nu;
  return (re);
}


x86 assembly (clang, -O0):
<getreynoldsnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
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  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xed8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xebf(%rip),%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0xeaa(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe78(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getreynoldsnum>:
sub    $0x28,%rsp
movsd  %xmm5,0x8(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x10(%rsp)
addsd  %xmm1,%xmm0
mulsd  0xec8(%rip),%xmm0
movsd  0xec8(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xec4(%rip),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
divsd  0xebb(%rip),%xmm0
movsd  0xebb(%rip),%xmm1
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @getreynoldsnum(double %0, double %1, double %2, double %3, double %4, double %5) {
%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
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%17 = load double, double* %7
%18 = load double, double* %8
%19 = fadd double %17, %18
%20 = fmul double 5.000000e-01, %19
store double %20, double* %13
%21 = load double, double* %13
%22 = fadd double %21, 3.931600e+02
%23 = fdiv double 6.893200e+02, %22
%24 = load double, double* %13
%25 = fdiv double %24, 2.961600e+02
%26 = call double @pow(double %25, double 1.500000e+00)
%27 = fmul double %23, %26
%28 = load double, double* %12
%29 = fmul double %27, %28
store double %29, double* %14
%30 = load double, double* %14
%31 = load double, double* %11
%32 = fdiv double %30, %31
store double %32, double* %15
%33 = load double, double* %9
%34 = load double, double* %10
%35 = fmul double %33, %34
%36 = load double, double* %15
%37 = fdiv double %35, %36
store double %37, double* %16
%38 = load double, double* %16
ret double %38
}

LLVM IR (-O2):
define double @getreynoldsnum(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fadd double %0, %1
%8 = fmul double %7, 5.000000e-01
%9 = fadd double %8, 3.931600e+02
%10 = fdiv double 6.893200e+02, %9
%11 = fdiv double %8, 2.961600e+02
%12 = tail call double @pow(double %11, double 1.500000e+00)
%13 = fmul double %10, %12
%14 = fmul double %13, %5
%15 = fdiv double %14, %4
%16 = fmul double %2, %3
%17 = fdiv double %16, %15
ret double %17
}