#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 log(double);
double pow(double, int);
double transport_with_height(double z, double es, double Wind, double AirDens,
                             double ZO, double EactAir, double F, double hsalt,
                             double phi_r, double ushear, double Zrh) {
  double u_z;
  double temp;
  double phi_t;
  u_z = ushear * log(z / ZO) / 0.40;
  temp = (0.5 * ushear * ushear) / (Wind * 0.3);
  phi_t =
      phi_r *
      ((temp + 1.) * pow((z / hsalt), (-1. * 0.3) / (0.40 * ushear)) - temp);
  return u_z * phi_t;
}


x86 assembly (clang, -O0):
<transport_with_height>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe79(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe80(%rip),%xmm0
mulsd  0x18(%rbp),%xmm0
mulsd  0x18(%rbp),%xmm0
movsd  0xe66(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe3e(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  0xe1a(%rip),%xmm2
mulsd  0x18(%rbp),%xmm2
movsd  0xe05(%rip),%xmm1
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <pow@plt>
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x60(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transport_with_height>:
sub    $0x28,%rsp
movsd  %xmm7,0x18(%rsp)
movsd  %xmm2,(%rsp)
movsd  %xmm0,0x10(%rsp)
divsd  %xmm4,%xmm0
call   1030 <log@plt>
movsd  0x38(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0xea6(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  (%rsp),%xmm3
mulsd  0xe99(%rip),%xmm3
divsd  %xmm3,%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe90(%rip),%xmm3
addsd  %xmm0,%xmm3
movsd  %xmm3,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
mulsd  %xmm1,%xmm2
movsd  0xe76(%rip),%xmm1
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <pow@plt>
mulsd  0x8(%rsp),%xmm0
subsd  (%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @transport_with_height(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
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
%26 = load double, double* %21
%27 = load double, double* %12
%28 = load double, double* %16
%29 = fdiv double %27, %28
%30 = call double @log(double %29)
%31 = fmul double %26, %30
%32 = fdiv double %31, 4.000000e-01
store double %32, double* %23
%33 = load double, double* %21
%34 = fmul double 5.000000e-01, %33
%35 = load double, double* %21
%36 = fmul double %34, %35
%37 = load double, double* %14
%38 = fmul double %37, 3.000000e-01
%39 = fdiv double %36, %38
store double %39, double* %24
%40 = load double, double* %20
%41 = load double, double* %24
%42 = fadd double %41, 1.000000e+00
%43 = load double, double* %12
%44 = load double, double* %19
%45 = fdiv double %43, %44
%46 = load double, double* %21
%47 = fmul double 4.000000e-01, %46
%48 = fdiv double -3.000000e-01, %47
%49 = fptosi double %48 to i32
%50 = call double @pow(double %45, i32 %49)
%51 = load double, double* %24
%52 = fneg double %51
%53 = call double @llvm.fmuladd.f64(double %42, double %50, double %52)
%54 = fmul double %40, %53
store double %54, double* %25
%55 = load double, double* %23
%56 = load double, double* %25
%57 = fmul double %55, %56
ret double %57
}

LLVM IR (-O2):
define double @transport_with_height(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = fdiv double %0, %4
%13 = tail call double @log(double %12)
%14 = fmul double %13, %9
%15 = fdiv double %14, 4.000000e-01
%16 = fmul double %9, 5.000000e-01
%17 = fmul double %16, %9
%18 = fmul double %2, 3.000000e-01
%19 = fdiv double %17, %18
%20 = fadd double %19, 1.000000e+00
%21 = fdiv double %0, %7
%22 = fmul double %9, 4.000000e-01
%23 = fdiv double -3.000000e-01, %22
%24 = fptosi double %23 to i32
%25 = tail call double @pow(double %21, i32 %24)
%26 = fneg double %19
%27 = tail call double @llvm.fmuladd.f64(double %20, double %25, double %26)
%28 = fmul double %27, %8
%29 = fmul double %15, %28
ret double %29
}