#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 dt_air(double, double, double, double);
double dt_air_desert(double, double, double);
double h_0(double, double, double);
double log(int);
int /*<<< orphan*/ printf(char *, ...);
double psi_h(double, double, double, double);
double rah1(double, double, double);
double rah_0(double, double);
double rohair(double, double, double);
double u_star(double, double, double, double, double, double);
double zom_0(double, double);
double sensi_h(int iteration, double t0_dem, double ndvi, double ndvi_max,
               double dem, double rnet_desert, double g0_desert,
               double t0_dem_desert, double t0_dem_water, double u2m,
               double dem_desert, int doy, double *dt) {
  double dtair[100 + 1], roh_air[100 + 1], rah[100 + 1];
  double h[100 + 1];
  double ustar[100 + 1];
  int ic, debug = 0;
  double u_0, zom0;
  double rah_desert;
  double psih_desert, ustar_desertold;
  double psih;
  if (iteration > 100) {
    iteration = 100;
  }
  double h_desert = rnet_desert - g0_desert;
  double dtair_desert = 0.2 * h_desert / u2m;
  double roh_air_desert = rohair(dem_desert, t0_dem_desert, dtair_desert);
  double zom_desert = 0.002;
  double ustar_desert = u2m * 0.41 / log(1000);
  dtair[0] = dt_air(t0_dem, t0_dem_water, t0_dem_desert, dtair_desert);
  roh_air[0] = rohair(dem, t0_dem, dtair[0]);
  zom0 = zom_0(ndvi, ndvi_max);
  u_0 = u2m;
  rah[0] = rah_0(zom0, u_0);
  h[0] = h_0(roh_air[0], rah[0], dtair[0]);
  if (debug == 1) {
    printf("*****************************\n");
    printf("t0_dem = %5.3f\n", t0_dem);
    printf("ndvi = %5.3f ndvimax = %5.3f\n", ndvi, ndvi_max);
    printf("*****************************\n");
    printf("dtair[0]	= %5.3f K\n", dtair[0]);
    printf("roh_air[0] 	= %5.3f kg/m3\n", roh_air[0]);
    printf("dtair_desert 	= %8.5f\n", dtair_desert);
    printf("roh_air_desert0 = %5.3f kg/m3\n", roh_air_desert);
    printf("h_desert 	= %5.3f\n", h_desert);
    printf("zom_0 		= %5.3f\n", zom0);
    printf("u_0 		= %5.3f\n", u_0);
    printf("rah[0] 		= %5.3f s/m\n", rah[0]);
    printf("h[0] 		= %5.3f W/m2\n", h[0]);
  }
  for (ic = 1; ic < iteration + 1; ic++) {
    psih = psi_h(t0_dem, h[0], u_0, roh_air[ic - 1]);
    ustar[ic] = u_star(t0_dem, h[0], u_0, roh_air[ic - 1], zom0, u2m);
    rah[ic] = rah1(psih, ustar[ic], zom0);
    roh_air_desert = rohair(dem_desert, t0_dem_desert, dtair_desert);
    h_desert = h_0(roh_air_desert, rah_desert, dtair_desert);
    if (h_desert <= 0.0)
      h_desert = rnet_desert;
    if (h_desert > rnet_desert)
      h_desert = rnet_desert;
    ustar_desertold = ustar_desert;
    psih_desert =
        psi_h(t0_dem_desert, h_desert, ustar_desertold, roh_air_desert);
    ustar_desert = u_star(t0_dem_desert, h_desert, ustar_desertold,
                          roh_air_desert, zom_desert, u2m);
    rah_desert = rah1(psih_desert, ustar_desert, zom_desert);
    dtair_desert = dt_air_desert(h_desert, roh_air_desert, rah_desert);
    if (dtair_desert <= 1.0 || dtair_desert > 50.0)
      dtair_desert = 0.2 * (rnet_desert - g0_desert) / u2m;
    dtair[ic] = dt_air(t0_dem, t0_dem_water, t0_dem_desert, dtair_desert);
    roh_air[ic] = rohair(dem, t0_dem, dtair[ic]);
    h[ic] = h_0(roh_air[ic], rah[ic], dtair[ic]);
    if (h[ic] <= 0.0)
      h[ic] = 0;
    if (h[ic] > rnet_desert)
      h[ic] = rnet_desert;
    if (debug == 1) {
      printf("\n ******** ITERATION %i *********\n", ic);
      printf("psih[%i] 	= %5.3f\n", ic, psih);
      printf("ustar[%i] 	= %5.3f\n", ic, ustar[ic]);
      printf("rah[%i]		= %5.3f s/m\n", ic, rah[ic]);
      printf("rohair_desert	= %5.3f\n", roh_air_desert);
      printf("h_desert 	= %5.3f\n", h_desert);
      printf(
          "psih_desert 	= %5.3f\tustar_desert = %5.3f\trah_desert = %5.3f\n",
          psih_desert, ustar_desert, rah_desert);
      printf("dtair_desert 	= %8.5f\n", dtair_desert);
      printf("dtair[%i] 	= %5.3f K\n", ic, dtair[ic]);
      printf("roh_air[%i] 	= %5.3f kg/m3\n", ic, roh_air[ic]);
      printf("h[%i] 		= %5.3f W/m2\n", ic, h[ic]);
    }
  }
  *dt = dtair[iteration];
  return h[iteration];
}


x86 assembly (clang, -O0):
<sensi_h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10b0,%rsp
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
movsd  %xmm7,-0x48(%rbp)
mov    %esi,-0x4c(%rbp)
mov    %rdx,-0x58(%rbp)
movl   $0x0,-0x1048(%rbp)
cmpl   $0x64,-0x4(%rbp)
jle    1214 <sensi_h+0x64>
movl   $0x64,-0x4(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1080(%rbp)
ff
movsd  0xde2(%rip),%xmm0
mulsd  -0x1080(%rbp),%xmm0
ff
divsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x1088(%rbp)
ff
movsd  0x18(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x1088(%rbp),%xmm2
ff
call   1050 <rohair@plt>
movsd  %xmm0,-0x1090(%rbp)
ff
movsd  0xd9e(%rip),%xmm0
movsd  %xmm0,-0x1098(%rbp)
ff
movsd  0xd86(%rip),%xmm0
mulsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x10a8(%rbp)
ff
mov    $0x3e8,%edi
call   10d0 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10a8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10a0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  -0x1088(%rbp),%xmm3
ff
call   10b0 <dt_air@plt>
movsd  %xmm0,-0x380(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x380(%rbp),%xmm2
ff
call   1050 <rohair@plt>
movsd  %xmm0,-0x6b0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10a0 <zom_0@plt>
movsd  %xmm0,-0x1058(%rbp)
ff
movsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x1050(%rbp)
ff
movsd  -0x1058(%rbp),%xmm0
ff
movsd  -0x1050(%rbp),%xmm1
ff
call   1070 <rah_0@plt>
movsd  %xmm0,-0x9e0(%rbp)
ff
movsd  -0x6b0(%rbp),%xmm0
ff
movsd  -0x9e0(%rbp),%xmm1
ff
movsd  -0x380(%rbp),%xmm2
ff
call   1030 <h_0@plt>
movsd  %xmm0,-0xd10(%rbp)
ff
cmpl   $0x1,-0x1048(%rbp)
jne    146b <sensi_h+0x2bb>
lea    0xcc3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xccf(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xcc7(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
lea    0xc8a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movsd  -0x380(%rbp),%xmm0
ff
lea    0xcc1(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x6b0(%rbp),%xmm0
ff
lea    0xcbf(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1088(%rbp),%xmm0
ff
lea    0xcc4(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1090(%rbp),%xmm0
ff
lea    0xcc5(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1080(%rbp),%xmm0
ff
lea    0xcce(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1058(%rbp),%xmm0
ff
lea    0xccb(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1050(%rbp),%xmm0
ff
lea    0xcc6(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x9e0(%rbp),%xmm0
ff
lea    0xcbf(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0xd10(%rbp),%xmm0
ff
lea    0xcbf(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movl   $0x1,-0x1044(%rbp)
mov    -0x1044(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    193d <sensi_h+0x78d>
movsd  -0x10(%rbp),%xmm0
movsd  -0xd10(%rbp),%xmm1
ff
movsd  -0x1050(%rbp),%xmm2
ff
mov    -0x1044(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x6b0(%rbp,%rax,8),%xmm3
ff ff
call   10c0 <psi_h@plt>
movsd  %xmm0,-0x1078(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  -0xd10(%rbp),%xmm1
ff
movsd  -0x1050(%rbp),%xmm2
ff
mov    -0x1044(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x6b0(%rbp,%rax,8),%xmm3
ff ff
movsd  -0x1058(%rbp),%xmm4
ff
movsd  0x10(%rbp),%xmm5
call   1080 <u_star@plt>
movslq -0x1044(%rbp),%rax
movsd  %xmm0,-0x1040(%rbp,%rax,8)
ff ff
movsd  -0x1078(%rbp),%xmm0
ff
movslq -0x1044(%rbp),%rax
movsd  -0x1040(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x1058(%rbp),%xmm2
ff
call   1090 <rah1@plt>
movslq -0x1044(%rbp),%rax
movsd  %xmm0,-0x9e0(%rbp,%rax,8)
ff ff
movsd  0x18(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x1088(%rbp),%xmm2
ff
call   1050 <rohair@plt>
movsd  %xmm0,-0x1090(%rbp)
ff
movsd  -0x1090(%rbp),%xmm0
ff
movsd  -0x1060(%rbp),%xmm1
ff
movsd  -0x1088(%rbp),%xmm2
ff
call   1030 <h_0@plt>
movsd  %xmm0,-0x1080(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x1080(%rbp),%xmm0
ff
jb     15a1 <sensi_h+0x3f1>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x1080(%rbp)
ff
movsd  -0x1080(%rbp),%xmm0
ff
ucomisd -0x30(%rbp),%xmm0
jbe    15c1 <sensi_h+0x411>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x1080(%rbp)
ff
movsd  -0x10a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1070(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x1080(%rbp),%xmm1
ff
movsd  -0x1070(%rbp),%xmm2
ff
movsd  -0x1090(%rbp),%xmm3
ff
call   10c0 <psi_h@plt>
movsd  %xmm0,-0x1068(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x1080(%rbp),%xmm1
ff
movsd  -0x1070(%rbp),%xmm2
ff
movsd  -0x1090(%rbp),%xmm3
ff
movsd  -0x1098(%rbp),%xmm4
ff
movsd  0x10(%rbp),%xmm5
call   1080 <u_star@plt>
movsd  %xmm0,-0x10a0(%rbp)
ff
movsd  -0x1068(%rbp),%xmm0
ff
movsd  -0x10a0(%rbp),%xmm1
ff
movsd  -0x1098(%rbp),%xmm2
ff
call   1090 <rah1@plt>
movsd  %xmm0,-0x1060(%rbp)
ff
movsd  -0x1080(%rbp),%xmm0
ff
movsd  -0x1090(%rbp),%xmm1
ff
movsd  -0x1060(%rbp),%xmm2
ff
call   1040 <dt_air_desert@plt>
movsd  %xmm0,-0x1088(%rbp)
ff
movsd  0x994(%rip),%xmm0
ucomisd -0x1088(%rbp),%xmm0
ff
jae    16ac <sensi_h+0x4fc>
movsd  -0x1088(%rbp),%xmm0
ff
movsd  0x97e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    16cf <sensi_h+0x51f>
movsd  -0x30(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
movsd  0x952(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x1088(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  -0x1088(%rbp),%xmm3
ff
call   10b0 <dt_air@plt>
movslq -0x1044(%rbp),%rax
movsd  %xmm0,-0x380(%rbp,%rax,8)
ff ff
movsd  -0x28(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movslq -0x1044(%rbp),%rax
movsd  -0x380(%rbp,%rax,8),%xmm2
ff ff
call   1050 <rohair@plt>
movslq -0x1044(%rbp),%rax
movsd  %xmm0,-0x6b0(%rbp,%rax,8)
ff ff
movslq -0x1044(%rbp),%rax
movsd  -0x6b0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x1044(%rbp),%rax
movsd  -0x9e0(%rbp,%rax,8),%xmm1
ff ff
movslq -0x1044(%rbp),%rax
movsd  -0x380(%rbp,%rax,8),%xmm2
ff ff
call   1030 <h_0@plt>
movslq -0x1044(%rbp),%rax
movsd  %xmm0,-0xd10(%rbp,%rax,8)
ff ff
movslq -0x1044(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd -0xd10(%rbp,%rax,8),%xmm0
ff ff
jb     179b <sensi_h+0x5eb>
movslq -0x1044(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd10(%rbp,%rax,8)
ff ff
movslq -0x1044(%rbp),%rax
movsd  -0xd10(%rbp,%rax,8),%xmm0
ff ff
ucomisd -0x30(%rbp),%xmm0
jbe    17cb <sensi_h+0x61b>
movsd  -0x30(%rbp),%xmm0
movslq -0x1044(%rbp),%rax
movsd  %xmm0,-0xd10(%rbp,%rax,8)
ff ff
cmpl   $0x1,-0x1048(%rbp)
jne    1924 <sensi_h+0x774>
mov    -0x1044(%rbp),%esi
lea    0x953(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1044(%rbp),%esi
movsd  -0x1078(%rbp),%xmm0
ff
lea    0x95a(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x1044(%rbp),%esi
movslq -0x1044(%rbp),%rax
movsd  -0x1040(%rbp,%rax,8),%xmm0
ff ff
lea    0x949(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x1044(%rbp),%esi
movslq -0x1044(%rbp),%rax
movsd  -0x9e0(%rbp,%rax,8),%xmm0
ff ff
lea    0x939(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1090(%rbp),%xmm0
ff
lea    0x939(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1080(%rbp),%xmm0
ff
lea    0x865(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1068(%rbp),%xmm0
ff
movsd  -0x10a0(%rbp),%xmm1
ff
movsd  -0x1060(%rbp),%xmm2
ff
lea    0x914(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
movsd  -0x1088(%rbp),%xmm0
ff
lea    0x7f3(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x1044(%rbp),%esi
movslq -0x1044(%rbp),%rax
movsd  -0x380(%rbp,%rax,8),%xmm0
ff ff
lea    0x918(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x1044(%rbp),%esi
movslq -0x1044(%rbp),%rax
movsd  -0x6b0(%rbp,%rax,8),%xmm0
ff ff
lea    0x90a(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x1044(%rbp),%esi
movslq -0x1044(%rbp),%rax
movsd  -0xd10(%rbp,%rax,8),%xmm0
ff ff
lea    0x902(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1929 <sensi_h+0x779>
mov    -0x1044(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1044(%rbp)
jmp    1475 <sensi_h+0x2c5>
movslq -0x4(%rbp),%rax
movsd  -0x380(%rbp,%rax,8),%xmm0
ff ff
mov    -0x58(%rbp),%rax
movsd  %xmm0,(%rax)
movslq -0x4(%rbp),%rax
movsd  -0xd10(%rbp,%rax,8),%xmm0
ff ff
add    $0x10b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sensi_h>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x6e8,%rsp
mov    %rdx,%r14
movsd  %xmm7,0x50(%rsp)
movsd  %xmm6,0x20(%rsp)
movsd  %xmm3,0x48(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x30(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0x718(%rsp),%xmm0
cmp    $0x64,%edi
mov    $0x64,%r15d
cmovl  %edi,%r15d
movapd %xmm4,0x80(%rsp)
movapd %xmm4,%xmm2
subsd  %xmm5,%xmm2
mulsd  0xdfc(%rip),%xmm2
divsd  0x710(%rsp),%xmm2
movapd %xmm2,0x60(%rsp)
movaps %xmm6,%xmm1
call   1050 <rohair@plt>
mov    $0x3e8,%edi
call   10c0 <log@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movapd 0x60(%rsp),%xmm3
call   10a0 <dt_air@plt>
movaps %xmm0,%xmm2
movsd  %xmm0,0x28(%rsp)
movsd  %xmm0,0x3c0(%rsp)
movsd  0x48(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <rohair@plt>
movsd  %xmm0,(%rsp)
movsd  0x30(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   1090 <zom_0@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x710(%rsp),%xmm1
call   1060 <rah_0@plt>
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
movsd  0x28(%rsp),%xmm2
call   1030 <h_0@plt>
movsd  %xmm0,0x90(%rsp)
test   %r15d,%r15d
jle    1509 <sensi_h+0x369>
movsd  0xd45(%rip),%xmm1
mulsd  0x710(%rsp),%xmm1
divsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
lea    0x1(%r15),%r12d
mov    $0x1,%ebx
movaps 0x60(%rsp),%xmm1
movaps %xmm1,0x30(%rsp)
movsd  %xmm0,0x28(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x710(%rsp),%xmm2
movsd  (%rsp),%xmm3
call   10b0 <psi_h@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x710(%rsp),%xmm2
movsd  (%rsp),%xmm3
movsd  0x58(%rsp),%xmm4
movaps %xmm2,%xmm5
call   1070 <u_star@plt>
movaps %xmm0,%xmm1
movsd  0x40(%rsp),%xmm0
movsd  0x58(%rsp),%xmm2
call   1080 <rah1@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x718(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1050 <rohair@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
call   1030 <h_0@plt>
movapd %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpnlesd %xmm2,%xmm1
andpd  %xmm1,%xmm0
movapd 0x80(%rsp),%xmm2
andnpd %xmm2,%xmm1
orpd   %xmm0,%xmm1
minsd  %xmm1,%xmm2
movapd %xmm2,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
movapd %xmm2,%xmm1
movsd  0x18(%rsp),%xmm2
movsd  (%rsp),%xmm3
call   10b0 <psi_h@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  (%rsp),%xmm3
movsd  0xc10(%rip),%xmm4
movsd  0x710(%rsp),%xmm5
call   1070 <u_star@plt>
movaps %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
movsd  %xmm1,0x18(%rsp)
movsd  0xbeb(%rip),%xmm2
call   1080 <rah1@plt>
movaps %xmm0,%xmm2
movapd 0x30(%rsp),%xmm0
movsd  (%rsp),%xmm1
movsd  %xmm2,0x10(%rsp)
call   1040 <dt_air_desert@plt>
movsd  0xbcd(%rip),%xmm1
cmpltsd %xmm0,%xmm1
movapd %xmm1,%xmm2
andnpd %xmm0,%xmm2
movapd 0x60(%rsp),%xmm4
andpd  %xmm4,%xmm1
orpd   %xmm2,%xmm1
cmplesd 0xbb1(%rip),%xmm0
movapd %xmm0,%xmm3
andnpd %xmm1,%xmm3
andpd  %xmm4,%xmm0
orpd   %xmm0,%xmm3
movsd  0x8(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movapd %xmm3,0x30(%rsp)
call   10a0 <dt_air@plt>
movaps %xmm0,%xmm2
movsd  %xmm0,0x78(%rsp)
movsd  %xmm0,0x3c0(%rsp,%rbx,8)
movsd  0x48(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <rohair@plt>
movsd  %xmm0,(%rsp)
movsd  0x40(%rsp),%xmm1
movsd  0x78(%rsp),%xmm2
call   1030 <h_0@plt>
movapd %xmm0,%xmm1
cmplesd 0xb46(%rip),%xmm1
andnpd %xmm0,%xmm1
movapd 0x80(%rsp),%xmm2
minsd  %xmm1,%xmm2
movsd  %xmm2,0x90(%rsp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1300 <sensi_h+0x160>
movslq %r15d,%rax
movsd  0x3c0(%rsp,%rax,8),%xmm0
movsd  %xmm0,(%r14)
movsd  0x90(%rsp,%rax,8),%xmm0
add    $0x6e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [31 x i8] c"*****************************\0A\00"
@.str.1 = [16 x i8] c"t0_dem = %5.3f\0A\00"
@.str.2 = [30 x i8] c"ndvi = %5.3f ndvimax = %5.3f\0A\00"
@.str.3 = [20 x i8] c"dtair[0]\09= %5.3f K\0A\00"
@.str.4 = [27 x i8] c"roh_air[0] \09= %5.3f kg/m3\0A\00"
@.str.5 = [23 x i8] c"dtair_desert \09= %8.5f\0A\00"
@.str.6 = [31 x i8] c"roh_air_desert0 = %5.3f kg/m3\0A\00"
@.str.7 = [19 x i8] c"h_desert \09= %5.3f\0A\00"
@.str.8 = [17 x i8] c"zom_0 \09\09= %5.3f\0A\00"
@.str.9 = [15 x i8] c"u_0 \09\09= %5.3f\0A\00"
@.str.10 = [22 x i8] c"rah[0] \09\09= %5.3f s/m\0A\00"
@.str.11 = [21 x i8] c"h[0] \09\09= %5.3f W/m2\0A\00"
@.str.12 = [35 x i8] c"\0A ******** ITERATION %i *********\0A\00"
@.str.13 = [19 x i8] c"psih[%i] \09= %5.3f\0A\00"
@.str.14 = [20 x i8] c"ustar[%i] \09= %5.3f\0A\00"
@.str.15 = [22 x i8] c"rah[%i]\09\09= %5.3f s/m\0A\00"
@.str.16 = [23 x i8] c"rohair_desert\09= %5.3f\0A\00"
@.str.17 = [62 x i8] c"psih_desert \09= %5.3f\09ustar_desert = %5.3f\09rah_desert = %5.3f\0A\00"
@.str.18 = [22 x i8] c"dtair[%i] \09= %5.3f K\0A\00"
@.str.19 = [28 x i8] c"roh_air[%i] \09= %5.3f kg/m3\0A\00"
@.str.20 = [22 x i8] c"h[%i] \09\09= %5.3f W/m2\0A\00"
define double @sensi_h(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, i32 %11, double* %12) {
%14 = alloca i32
%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 i32
%26 = alloca double*
%27 = alloca [101 x double]
%28 = alloca [101 x double]
%29 = alloca [101 x double]
%30 = alloca [101 x double]
%31 = alloca [101 x double]
%32 = alloca i32
%33 = alloca i32
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double
store i32 %0, i32* %14
store double %1, double* %15
store double %2, double* %16
store double %3, double* %17
store double %4, double* %18
store double %5, double* %19
store double %6, double* %20
store double %7, double* %21
store double %8, double* %22
store double %9, double* %23
store double %10, double* %24
store i32 %11, i32* %25
store double* %12, double** %26
store i32 0, i32* %33
%45 = load i32, i32* %14
%46 = icmp sgt i32 %45, 100
br i1 %46, label %47, label %48
47: ; preds = %13
store i32 100, i32* %14
br label %48
48: ; preds = %47, %13
%49 = load double, double* %19
%50 = load double, double* %20
%51 = fsub double %49, %50
store double %51, double* %40
%52 = load double, double* %40
%53 = fmul double 2.000000e-01, %52
%54 = load double, double* %23
%55 = fdiv double %53, %54
store double %55, double* %41
%56 = load double, double* %24
%57 = load double, double* %21
%58 = load double, double* %41
%59 = call double @rohair(double %56, double %57, double %58)
store double %59, double* %42
store double 2.000000e-03, double* %43
%60 = load double, double* %23
%61 = fmul double %60, 4.100000e-01
%62 = call double @log(i32 1000)
%63 = fdiv double %61, %62
store double %63, double* %44
%64 = load double, double* %15
%65 = load double, double* %22
%66 = load double, double* %21
%67 = load double, double* %41
%68 = call double @dt_air(double %64, double %65, double %66, double %67)
%69 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 0
store double %68, double* %69
%70 = load double, double* %18
%71 = load double, double* %15
%72 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 0
%73 = load double, double* %72
%74 = call double @rohair(double %70, double %71, double %73)
%75 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 0
store double %74, double* %75
%76 = load double, double* %16
%77 = load double, double* %17
%78 = call double @zom_0(double %76, double %77)
store double %78, double* %35
%79 = load double, double* %23
store double %79, double* %34
%80 = load double, double* %35
%81 = load double, double* %34
%82 = call double @rah_0(double %80, double %81)
%83 = getelementptr inbounds [101 x double], [101 x double]* %29, i64 0, i64 0
store double %82, double* %83
%84 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 0
%85 = load double, double* %84
%86 = getelementptr inbounds [101 x double], [101 x double]* %29, i64 0, i64 0
%87 = load double, double* %86
%88 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 0
%89 = load double, double* %88
%90 = call double @h_0(double %85, double %87, double %89)
%91 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 0
store double %90, double* %91
%92 = load i32, i32* %33
%93 = icmp eq i32 %92, 1
br i1 %93, label %94, label %124
94: ; preds = %48
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%96 = load double, double* %15
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %96)
%98 = load double, double* %16
%99 = load double, double* %17
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %98, double %99)
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%102 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 0
%103 = load double, double* %102
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %103)
%105 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 0
%106 = load double, double* %105
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %106)
%108 = load double, double* %41
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %108)
%110 = load double, double* %42
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), double %110)
%112 = load double, double* %40
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), double %112)
%114 = load double, double* %35
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), double %114)
%116 = load double, double* %34
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), double %116)
%118 = getelementptr inbounds [101 x double], [101 x double]* %29, i64 0, i64 0
%119 = load double, double* %118
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), double %119)
%121 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 0
%122 = load double, double* %121
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), double %122)
br label %124
124: ; preds = %94, %48
store i32 1, i32* %32
br label %125
125: ; preds = %324, %124
%126 = load i32, i32* %32
%127 = load i32, i32* %14
%128 = add nsw i32 %127, 1
%129 = icmp slt i32 %126, %128
br i1 %129, label %130, label %327
130: ; preds = %125
%131 = load double, double* %15
%132 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 0
%133 = load double, double* %132
%134 = load double, double* %34
%135 = load i32, i32* %32
%136 = sub nsw i32 %135, 1
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 %137
%139 = load double, double* %138
%140 = call double @psi_h(double %131, double %133, double %134, double %139)
store double %140, double* %39
%141 = load double, double* %15
%142 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 0
%143 = load double, double* %142
%144 = load double, double* %34
%145 = load i32, i32* %32
%146 = sub nsw i32 %145, 1
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 %147
%149 = load double, double* %148
%150 = load double, double* %35
%151 = load double, double* %23
%152 = call double @u_star(double %141, double %143, double %144, double %149, double %150, double %151)
%153 = load i32, i32* %32
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [101 x double], [101 x double]* %31, i64 0, i64 %154
store double %152, double* %155
%156 = load double, double* %39
%157 = load i32, i32* %32
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [101 x double], [101 x double]* %31, i64 0, i64 %158
%160 = load double, double* %159
%161 = load double, double* %35
%162 = call double @rah1(double %156, double %160, double %161)
%163 = load i32, i32* %32
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [101 x double], [101 x double]* %29, i64 0, i64 %164
store double %162, double* %165
%166 = load double, double* %24
%167 = load double, double* %21
%168 = load double, double* %41
%169 = call double @rohair(double %166, double %167, double %168)
store double %169, double* %42
%170 = load double, double* %42
%171 = load double, double* %36
%172 = load double, double* %41
%173 = call double @h_0(double %170, double %171, double %172)
store double %173, double* %40
%174 = load double, double* %40
%175 = fcmp ole double %174, 0.000000e+00
br i1 %175, label %176, label %178
176: ; preds = %130
%177 = load double, double* %19
store double %177, double* %40
br label %178
178: ; preds = %176, %130
%179 = load double, double* %40
%180 = load double, double* %19
%181 = fcmp ogt double %179, %180
br i1 %181, label %182, label %184
182: ; preds = %178
%183 = load double, double* %19
store double %183, double* %40
br label %184
184: ; preds = %182, %178
%185 = load double, double* %44
store double %185, double* %38
%186 = load double, double* %21
%187 = load double, double* %40
%188 = load double, double* %38
%189 = load double, double* %42
%190 = call double @psi_h(double %186, double %187, double %188, double %189)
store double %190, double* %37
%191 = load double, double* %21
%192 = load double, double* %40
%193 = load double, double* %38
%194 = load double, double* %42
%195 = load double, double* %43
%196 = load double, double* %23
%197 = call double @u_star(double %191, double %192, double %193, double %194, double %195, double %196)
store double %197, double* %44
%198 = load double, double* %37
%199 = load double, double* %44
%200 = load double, double* %43
%201 = call double @rah1(double %198, double %199, double %200)
store double %201, double* %36
%202 = load double, double* %40
%203 = load double, double* %42
%204 = load double, double* %36
%205 = call double @dt_air_desert(double %202, double %203, double %204)
store double %205, double* %41
%206 = load double, double* %41
%207 = fcmp ole double %206, 1.000000e+00
br i1 %207, label %211, label %208
208: ; preds = %184
%209 = load double, double* %41
%210 = fcmp ogt double %209, 5.000000e+01
br i1 %210, label %211, label %218
211: ; preds = %208, %184
%212 = load double, double* %19
%213 = load double, double* %20
%214 = fsub double %212, %213
%215 = fmul double 2.000000e-01, %214
%216 = load double, double* %23
%217 = fdiv double %215, %216
store double %217, double* %41
br label %218
218: ; preds = %211, %208
%219 = load double, double* %15
%220 = load double, double* %22
%221 = load double, double* %21
%222 = load double, double* %41
%223 = call double @dt_air(double %219, double %220, double %221, double %222)
%224 = load i32, i32* %32
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 %225
store double %223, double* %226
%227 = load double, double* %18
%228 = load double, double* %15
%229 = load i32, i32* %32
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 %230
%232 = load double, double* %231
%233 = call double @rohair(double %227, double %228, double %232)
%234 = load i32, i32* %32
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 %235
store double %233, double* %236
%237 = load i32, i32* %32
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 %238
%240 = load double, double* %239
%241 = load i32, i32* %32
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds [101 x double], [101 x double]* %29, i64 0, i64 %242
%244 = load double, double* %243
%245 = load i32, i32* %32
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 %246
%248 = load double, double* %247
%249 = call double @h_0(double %240, double %244, double %248)
%250 = load i32, i32* %32
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 %251
store double %249, double* %252
%253 = load i32, i32* %32
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 %254
%256 = load double, double* %255
%257 = fcmp ole double %256, 0.000000e+00
br i1 %257, label %258, label %262
258: ; preds = %218
%259 = load i32, i32* %32
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 %260
store double 0.000000e+00, double* %261
br label %262
262: ; preds = %258, %218
%263 = load i32, i32* %32
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 %264
%266 = load double, double* %265
%267 = load double, double* %19
%268 = fcmp ogt double %266, %267
br i1 %268, label %269, label %274
269: ; preds = %262
%270 = load double, double* %19
%271 = load i32, i32* %32
%272 = sext i32 %271 to i64
%273 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 %272
store double %270, double* %273
br label %274
274: ; preds = %269, %262
%275 = load i32, i32* %33
%276 = icmp eq i32 %275, 1
br i1 %276, label %277, label %323
277: ; preds = %274
%278 = load i32, i32* %32
%279 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0), i32 %278)
%280 = load i32, i32* %32
%281 = load double, double* %39
%282 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %280, double %281)
%283 = load i32, i32* %32
%284 = load i32, i32* %32
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds [101 x double], [101 x double]* %31, i64 0, i64 %285
%287 = load double, double* %286
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 %283, double %287)
%289 = load i32, i32* %32
%290 = load i32, i32* %32
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds [101 x double], [101 x double]* %29, i64 0, i64 %291
%293 = load double, double* %292
%294 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0), i32 %289, double %293)
%295 = load double, double* %42
%296 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), double %295)
%297 = load double, double* %40
%298 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), double %297)
%299 = load double, double* %37
%300 = load double, double* %44
%301 = load double, double* %36
%302 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.17, i64 0, i64 0), double %299, double %300, double %301)
%303 = load double, double* %41
%304 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %303)
%305 = load i32, i32* %32
%306 = load i32, i32* %32
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 %307
%309 = load double, double* %308
%310 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i32 %305, double %309)
%311 = load i32, i32* %32
%312 = load i32, i32* %32
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds [101 x double], [101 x double]* %28, i64 0, i64 %313
%315 = load double, double* %314
%316 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.19, i64 0, i64 0), i32 %311, double %315)
%317 = load i32, i32* %32
%318 = load i32, i32* %32
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 %319
%321 = load double, double* %320
%322 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.20, i64 0, i64 0), i32 %317, double %321)
br label %323
323: ; preds = %277, %274
br label %324
324: ; preds = %323
%325 = load i32, i32* %32
%326 = add nsw i32 %325, 1
store i32 %326, i32* %32
br label %125
327: ; preds = %125
%328 = load i32, i32* %14
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds [101 x double], [101 x double]* %27, i64 0, i64 %329
%331 = load double, double* %330
%332 = load double*, double** %26
store double %331, double* %332
%333 = load i32, i32* %14
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds [101 x double], [101 x double]* %30, i64 0, i64 %334
%336 = load double, double* %335
ret double %336
}

LLVM IR (-O2):
define double @sensi_h(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, i32 %11, double* nocapture writeonly %12) {
%14 = alloca [101 x double]
%15 = alloca [101 x double]
%16 = bitcast [101 x double]* %14 to i8*
%17 = bitcast [101 x double]* %15 to i8*
%18 = icmp slt i32 %0, 100
%19 = select i1 %18, i32 %0, i32 100
%20 = fsub double %5, %6
%21 = fmul double %20, 2.000000e-01
%22 = fdiv double %21, %9
%23 = tail call double @rohair(double %10, double %7, double %22)
%24 = tail call double @log(i32 1000)
%25 = tail call double @dt_air(double %1, double %8, double %7, double %22)
%26 = getelementptr inbounds [101 x double], [101 x double]* %14, i64 0, i64 0
store double %25, double* %26
%27 = tail call double @rohair(double %4, double %1, double %25)
%28 = tail call double @zom_0(double %2, double %3)
%29 = tail call double @rah_0(double %28, double %9)
%30 = tail call double @h_0(double %27, double %29, double %25)
%31 = getelementptr inbounds [101 x double], [101 x double]* %15, i64 0, i64 0
store double %30, double* %31
%32 = icmp slt i32 %19, 1
br i1 %32, label %72, label %33
33: ; preds = %13
%34 = fmul double %9, 4.100000e-01
%35 = fdiv double %34, %24
%36 = add nuw nsw i32 %19, 1
%37 = zext i32 %36 to i64
br label %38
38: ; preds = %33, %38
%39 = phi double [ %27, %33 ], [ %63, %38 ]
%40 = phi i64 [ 1, %33 ], [ %70, %38 ]
%41 = phi double [ %35, %33 ], [ %54, %38 ]
%42 = phi double [ %22, %33 ], [ %60, %38 ]
%43 = phi double [ undef, %33 ], [ %55, %38 ]
%44 = tail call double @psi_h(double %1, double %30, double %9, double %39)
%45 = tail call double @u_star(double %1, double %30, double %9, double %39, double %28, double %9)
%46 = tail call double @rah1(double %44, double %45, double %28)
%47 = tail call double @rohair(double %10, double %7, double %42)
%48 = tail call double @h_0(double %47, double %43, double %42)
%49 = fcmp ugt double %48, 0.000000e+00
%50 = select i1 %49, double %48, double %5
%51 = fcmp ogt double %50, %5
%52 = select i1 %51, double %5, double %50
%53 = tail call double @psi_h(double %7, double %52, double %41, double %47)
%54 = tail call double @u_star(double %7, double %52, double %41, double %47, double 2.000000e-03, double %9)
%55 = tail call double @rah1(double %53, double %54, double 2.000000e-03)
%56 = tail call double @dt_air_desert(double %52, double %47, double %55)
%57 = fcmp ole double %56, 1.000000e+00
%58 = fcmp ogt double %56, 5.000000e+01
%59 = or i1 %57, %58
%60 = select i1 %59, double %22, double %56
%61 = tail call double @dt_air(double %1, double %8, double %7, double %60)
%62 = getelementptr inbounds [101 x double], [101 x double]* %14, i64 0, i64 %40
store double %61, double* %62
%63 = tail call double @rohair(double %4, double %1, double %61)
%64 = tail call double @h_0(double %63, double %46, double %61)
%65 = getelementptr inbounds [101 x double], [101 x double]* %15, i64 0, i64 %40
%66 = fcmp ole double %64, 0.000000e+00
%67 = select i1 %66, double 0.000000e+00, double %64
%68 = fcmp ogt double %67, %5
%69 = select i1 %68, double %5, double %67
store double %69, double* %65
%70 = add nuw nsw i64 %40, 1
%71 = icmp eq i64 %70, %37
br i1 %71, label %72, label %38
72: ; preds = %38, %13
%73 = sext i32 %19 to i64
%74 = getelementptr inbounds [101 x double], [101 x double]* %14, i64 0, i64 %73
%75 = load double, double* %74
store double %75, double* %12
%76 = getelementptr inbounds [101 x double], [101 x double]* %15, i64 0, i64 %73
%77 = load double, double* %76
ret double %77
}