#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 */
int cos(double);
double log(double);
double pow(double, int);
double sub_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 Rrz, ALPHAz, Mz;
  double Rmean, terminal_v, fluctuat_v;
  double Vtz, Re, Nu;
  double sigz, dMdt;
  double temp;
  double psi_t, phi_t;
  Rrz = 4.6e-5 * pow(z, -.258);
  ALPHAz = 4.08 + 12.6 * z;
  Mz = (4. / 3.) * 3.1415927 * 917. * Rrz * Rrz * Rrz *
       (1. + (3. / ALPHAz) + (2. / (ALPHAz * ALPHAz)));
  Rmean = pow((3. * Mz) / (4. * 3.1415927 * 917.), 1. / 3.);
  terminal_v = 1.1e7 * pow(Rmean, 1.8);
  fluctuat_v = 0.005 * pow(Wind, 1.36);
  Vtz = terminal_v + 3. * fluctuat_v * cos(3.1415927 / 4.);
  Re = 2. * Rmean * Vtz / 1.3e-5;
  Nu = 1.79 + 0.606 * pow(Re, 0.5);
  sigz = ((EactAir / es) - 1.) * (1.019 + .027 * log(z));
  dMdt = 2 * 3.1415927 * Rmean * sigz * Nu / F;
  psi_t = dMdt / Mz;
  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 psi_t * phi_t;
}


x86 assembly (clang, -O0):
<sub_with_height>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%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  -0x8(%rbp),%xmm0
xor    %edi,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xf14(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeea(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xec9(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  0xe92(%rip),%xmm2
divsd  -0x50(%rbp),%xmm2
movsd  0xe2d(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  -0x50(%rbp),%xmm3
mulsd  -0x50(%rbp),%xmm3
movsd  0xe5f(%rip),%xmm2
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe56(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0xe61(%rip),%xmm1
divsd  %xmm1,%xmm0
xor    %edi,%edi
call   1050 <pow@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    $0x1,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe2f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe04(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xdde(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xdc1(%rip),%xmm0
call   1030 <cos@plt>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xd8b(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  0xd71(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
xor    %edi,%edi
call   1050 <pow@plt>
movsd  0xd44(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd40(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  0xcea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0xce1(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xcdd(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xcb5(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xc6e(%rip),%xmm0
mulsd  0x18(%rbp),%xmm0
mulsd  0x18(%rbp),%xmm0
movsd  0xc54(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xc26(%rip),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  0xbfc(%rip),%xmm2
mulsd  0x18(%rbp),%xmm2
movsd  0xbe7(%rip),%xmm1
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
call   1050 <pow@plt>
movsd  -0xc0(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_with_height>:
sub    $0x68,%rsp
movsd  %xmm7,0x48(%rsp)
movsd  %xmm6,0x40(%rsp)
movsd  %xmm5,(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x38(%rsp)
movsd  %xmm0,0x20(%rsp)
xor    %edi,%edi
call   1050 <pow@plt>
mulsd  0xe9a(%rip),%xmm0
movsd  0xe9a(%rip),%xmm1
mulsd  0x20(%rsp),%xmm1
addsd  0xe94(%rip),%xmm1
movsd  0xe94(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
unpcklpd %xmm0,%xmm1
movapd 0xf0c(%rip),%xmm3
divpd  %xmm1,%xmm3
movsd  0xe70(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
movapd %xmm3,%xmm0
addsd  %xmm1,%xmm0
unpckhpd %xmm3,%xmm3
addsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm3,0x50(%rsp)
movapd %xmm3,%xmm0
mulsd  0xe4c(%rip),%xmm0
divsd  0xe4c(%rip),%xmm0
xor    %edi,%edi
call   1050 <pow@plt>
movsd  %xmm0,0x28(%rsp)
mov    $0x1,%edi
call   1050 <pow@plt>
mulsd  0xe35(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x1,%edi
call   1050 <pow@plt>
mulsd  0xe1f(%rip),%xmm0
mulsd  0xdff(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0xe11(%rip),%xmm0
call   1030 <cos@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x30(%rsp),%xmm1
addsd  0x10(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
divsd  0xdeb(%rip),%xmm0
xor    %edi,%edi
call   1050 <pow@plt>
mulsd  0xde4(%rip),%xmm0
addsd  0xde4(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
divsd  0x38(%rsp),%xmm0
addsd  0xdd3(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x20(%rsp),%xmm0
call   1040 <log@plt>
mulsd  0xdc3(%rip),%xmm0
addsd  0xdc3(%rip),%xmm0
mulsd  (%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  0xdb8(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
divsd  0x40(%rsp),%xmm0
divsd  0x50(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xd9d(%rip),%xmm2
movsd  0x78(%rsp),%xmm0
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0xd85(%rip),%xmm0
divsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  0x48(%rsp),%xmm0
mulsd  0xd5f(%rip),%xmm1
movsd  0xd5f(%rip),%xmm2
divsd  %xmm1,%xmm2
cvttsd2si %xmm2,%edi
call   1050 <pow@plt>
mulsd  0x18(%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
mulsd  0x70(%rsp),%xmm0
mulsd  (%rsp),%xmm0
add    $0x68,%rsp
ret

LLVM IR (-O0):
define double @sub_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
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = 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
%37 = load double, double* %12
%38 = call double @pow(double %37, i32 0)
%39 = fmul double 4.600000e-05, %38
store double %39, double* %23
%40 = load double, double* %12
%41 = call double @llvm.fmuladd.f64(double 1.260000e+01, double %40, double 4.080000e+00)
store double %41, double* %24
%42 = load double, double* %23
%43 = fmul double 0x40AE023DC90D6C41, %42
%44 = load double, double* %23
%45 = fmul double %43, %44
%46 = load double, double* %23
%47 = fmul double %45, %46
%48 = load double, double* %24
%49 = fdiv double 3.000000e+00, %48
%50 = fadd double 1.000000e+00, %49
%51 = load double, double* %24
%52 = load double, double* %24
%53 = fmul double %51, %52
%54 = fdiv double 2.000000e+00, %53
%55 = fadd double %50, %54
%56 = fmul double %47, %55
store double %56, double* %25
%57 = load double, double* %25
%58 = fmul double 3.000000e+00, %57
%59 = fdiv double %58, 0x40C681AE56CA1130
%60 = call double @pow(double %59, i32 0)
store double %60, double* %26
%61 = load double, double* %26
%62 = call double @pow(double %61, i32 1)
%63 = fmul double 1.100000e+07, %62
store double %63, double* %27
%64 = load double, double* %14
%65 = call double @pow(double %64, i32 1)
%66 = fmul double 5.000000e-03, %65
store double %66, double* %28
%67 = load double, double* %27
%68 = load double, double* %28
%69 = fmul double 3.000000e+00, %68
%70 = call i32 @cos(double 0x3FE921FB5A7ED197)
%71 = sitofp i32 %70 to double
%72 = call double @llvm.fmuladd.f64(double %69, double %71, double %67)
store double %72, double* %29
%73 = load double, double* %26
%74 = fmul double 2.000000e+00, %73
%75 = load double, double* %29
%76 = fmul double %74, %75
%77 = fdiv double %76, 1.300000e-05
store double %77, double* %30
%78 = load double, double* %30
%79 = call double @pow(double %78, i32 0)
%80 = call double @llvm.fmuladd.f64(double 6.060000e-01, double %79, double 1.790000e+00)
store double %80, double* %31
%81 = load double, double* %17
%82 = load double, double* %13
%83 = fdiv double %81, %82
%84 = fsub double %83, 1.000000e+00
%85 = load double, double* %12
%86 = call double @log(double %85)
%87 = call double @llvm.fmuladd.f64(double 2.700000e-02, double %86, double 1.019000e+00)
%88 = fmul double %84, %87
store double %88, double* %32
%89 = load double, double* %26
%90 = fmul double 0x401921FB5A7ED197, %89
%91 = load double, double* %32
%92 = fmul double %90, %91
%93 = load double, double* %31
%94 = fmul double %92, %93
%95 = load double, double* %18
%96 = fdiv double %94, %95
store double %96, double* %33
%97 = load double, double* %33
%98 = load double, double* %25
%99 = fdiv double %97, %98
store double %99, double* %35
%100 = load double, double* %21
%101 = fmul double 5.000000e-01, %100
%102 = load double, double* %21
%103 = fmul double %101, %102
%104 = load double, double* %14
%105 = fmul double %104, 3.000000e-01
%106 = fdiv double %103, %105
store double %106, double* %34
%107 = load double, double* %20
%108 = load double, double* %34
%109 = fadd double %108, 1.000000e+00
%110 = load double, double* %12
%111 = load double, double* %19
%112 = fdiv double %110, %111
%113 = load double, double* %21
%114 = fmul double 4.000000e-01, %113
%115 = fdiv double -3.000000e-01, %114
%116 = fptosi double %115 to i32
%117 = call double @pow(double %112, i32 %116)
%118 = load double, double* %34
%119 = fneg double %118
%120 = call double @llvm.fmuladd.f64(double %109, double %117, double %119)
%121 = fmul double %107, %120
store double %121, double* %36
%122 = load double, double* %35
%123 = load double, double* %36
%124 = fmul double %122, %123
ret double %124
}

LLVM IR (-O2):
define double @sub_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 = tail call double @pow(double %0, i32 0)
%13 = fmul double %12, 4.600000e-05
%14 = tail call double @llvm.fmuladd.f64(double %0, double 1.260000e+01, double 4.080000e+00)
%15 = fmul double %13, 0x40AE023DC90D6C41
%16 = fmul double %13, %15
%17 = fmul double %13, %16
%18 = fmul double %14, %14
%19 = insertelement <2 x double> poison, double %14, i64 0
%20 = insertelement <2 x double> %19, double %18, i64 1
%21 = fdiv <2 x double> <double 3.000000e+00, double 2.000000e+00>, %20
%22 = extractelement <2 x double> %21, i64 0
%23 = fadd double %22, 1.000000e+00
%24 = extractelement <2 x double> %21, i64 1
%25 = fadd double %23, %24
%26 = fmul double %25, %17
%27 = fmul double %26, 3.000000e+00
%28 = fdiv double %27, 0x40C681AE56CA1130
%29 = tail call double @pow(double %28, i32 0)
%30 = tail call double @pow(double %29, i32 1)
%31 = fmul double %30, 1.100000e+07
%32 = tail call double @pow(double %2, i32 1)
%33 = fmul double %32, 5.000000e-03
%34 = fmul double %33, 3.000000e+00
%35 = tail call i32 @cos(double 0x3FE921FB5A7ED197)
%36 = sitofp i32 %35 to double
%37 = tail call double @llvm.fmuladd.f64(double %34, double %36, double %31)
%38 = fmul double %29, 2.000000e+00
%39 = fmul double %38, %37
%40 = fdiv double %39, 1.300000e-05
%41 = tail call double @pow(double %40, i32 0)
%42 = tail call double @llvm.fmuladd.f64(double %41, double 6.060000e-01, double 1.790000e+00)
%43 = fdiv double %5, %1
%44 = fadd double %43, -1.000000e+00
%45 = tail call double @log(double %0)
%46 = tail call double @llvm.fmuladd.f64(double %45, double 2.700000e-02, double 1.019000e+00)
%47 = fmul double %44, %46
%48 = fmul double %29, 0x401921FB5A7ED197
%49 = fmul double %48, %47
%50 = fmul double %42, %49
%51 = fdiv double %50, %6
%52 = fdiv double %51, %26
%53 = fmul double %9, 5.000000e-01
%54 = fmul double %53, %9
%55 = fmul double %2, 3.000000e-01
%56 = fdiv double %54, %55
%57 = fadd double %56, 1.000000e+00
%58 = fdiv double %0, %7
%59 = fmul double %9, 4.000000e-01
%60 = fdiv double -3.000000e-01, %59
%61 = fptosi double %60 to i32
%62 = tail call double @pow(double %58, i32 %61)
%63 = fneg double %56
%64 = tail call double @llvm.fmuladd.f64(double %57, double %62, double %63)
%65 = fmul double %64, %8
%66 = fmul double %65, %52
ret double %66
}