#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 /*<<< orphan*/ eddy(int, double, double *, double *, double *, double, int,
                        double, double);
int /*<<< orphan*/ energycalc(double *, double *, int, double, double, double *,
                              double *, double *);
double fabs(double);
int /*<<< orphan*/ iceform(double *, double *, double, double, double *, int,
                           int, double, double, double *, double *, double *,
                           double *, double *, double);
int /*<<< orphan*/ latsens(double, double, double, double, double, double,
                           double, double, double *, double *, double);
int /*<<< orphan*/ temp_area(double, double, double, double *, double *,
                             double *, double *, int, double *, int, double,
                             double, double *, double *, double *);
int water_energy_balance(int numnod, double *surface, double *evapw, int dt,
                         int freezeflag, double dz, double surfdz, double lat,
                         double Tcutoff, double Tair, double wind,
                         double pressure, double vp, double air_density,
                         double longwave, double shortwave, double sumjoulb,
                         double wind_h, double *Qh, double *Qle, double *LWnet,
                         double *T, double *water_density, double *deltaH,
                         double *energy_ice_formation, double fracprv,
                         double *new_ice_area, double *cp,
                         double *new_ice_height, double *energy_out_bottom,
                         double *new_ice_water_eq, double lvolume) {
  double Ts;
  double Tcutk;
  double Tskin;
  double Tnew[20];
  int k;
  double sumjouli;
  double Tmean;
  int iterations;
  double Le;
  double jouleold;
  double joulenew;
  double error;
  double Told;
  double Tupper, Tlower;
  double de[20];
  double epsilon = 0.0001;
  Tmean = -999.;
  error = -999.;
  Ts = T[0];
  iterations = 0;
  for (k = 0; k < numnod; k++)
    Tnew[k] = T[k];
  energycalc(T, &jouleold, numnod, dz, surfdz, surface, cp, water_density);
  while ((fabs(Tmean - Ts) > epsilon) && iterations < 50) {
    if (iterations == 0)
      Ts = T[0];
    else
      Ts = Tmean;
    Tskin = Ts + 273.15;
    Tcutk = Tcutoff + 273.15;
    latsens(Tskin, Tcutk, 0.0, Tair, wind, pressure, vp, air_density, evapw, Qh,
            wind_h);
    Le = (2.501 - 0.002361 * Tair) * 1.0e6;
    *Qle = -1. * (*evapw) * Le;
    *LWnet = longwave - .98 * 5.6696e-8 * Tskin * Tskin * Tskin * Tskin;
    eddy(1, wind, T, water_density, de, lat, numnod, dz, surfdz);
    temp_area(shortwave * 0.7, shortwave * 0.3, *Qle + *Qh + *LWnet, T, Tnew,
              water_density, de, dt, surface, numnod, dz, surfdz, &joulenew, cp,
              energy_out_bottom);
    if (Tnew[0] < Tcutoff) {
      iceform(energy_ice_formation, Tnew, Tcutoff, fracprv, new_ice_area,
              numnod, dt, dz, surfdz, cp, surface, new_ice_height,
              water_density, new_ice_water_eq, lvolume);
      energycalc(Tnew, &sumjouli, numnod, dz, surfdz, surface, cp,
                 water_density);
      *deltaH = (sumjouli - jouleold) / (surface[0] * dt * 3600);
    } else {
      *deltaH = (joulenew - jouleold) / (surface[0] * dt * 3600);
      *energy_ice_formation = 0.0;
    }
    Tmean = (Tnew[0] + T[0]) / 2.;
    error = *LWnet + shortwave - *energy_out_bottom + *Qh + *Qle - *deltaH +
            *energy_ice_formation;
    iterations += 1;
  }
  if (fabs(Tmean - Ts) <= epsilon) {
    for (k = 0; k < numnod; k++)
      T[k] = Tnew[k];
    return (0);
  } else {
    Tskin = T[0] + 273.15;
    Tcutk = Tcutoff + 273.15;
    latsens(Tskin, Tcutk, 0.0, Tair, wind, pressure, vp, air_density, evapw, Qh,
            wind_h);
    Le = (2.501 - 0.002361 * Tair) * 1.0e6;
    *Qle = -1. * (*evapw) * Le;
    *LWnet = longwave - .98 * 5.6696e-8 * Tskin * Tskin * Tskin * Tskin;
    if (T[0] < Tcutoff) {
      iceform(energy_ice_formation, T, Tcutoff, fracprv, new_ice_area, numnod,
              dt, dz, surfdz, cp, surface, new_ice_height, water_density,
              new_ice_water_eq, lvolume);
    } else {
      *energy_ice_formation = 0.0;
    }
    *deltaH = 0.0;
    return (0);
  }
}


x86 assembly (clang, -O0):
<water_energy_balance>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x258,%rsp
movsd  0x98(%rbp),%xmm8
mov    0x90(%rbp),%rax
mov    0x88(%rbp),%rax
mov    0x80(%rbp),%rax
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
movsd  0x68(%rbp),%xmm8
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
movsd  %xmm2,-0x40(%rbp)
movsd  %xmm3,-0x48(%rbp)
movsd  %xmm4,-0x50(%rbp)
movsd  %xmm5,-0x58(%rbp)
movsd  %xmm6,-0x60(%rbp)
movsd  %xmm7,-0x68(%rbp)
mov    %r9,-0x70(%rbp)
movsd  0xe04(%rip),%xmm0
movsd  %xmm0,-0x238(%rbp)
ff
movsd  0xdec(%rip),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0xddc(%rip),%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
mov    0x48(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x14c(%rbp)
movl   $0x0,-0x134(%rbp)
mov    -0x134(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1290 <water_energy_balance+0x140>
mov    0x48(%rbp),%rax
movslq -0x134(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x134(%rbp),%rax
movsd  %xmm0,-0x130(%rbp,%rax,8)
ff ff
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    124d <water_energy_balance+0xfd>
mov    0x48(%rbp),%rdi
mov    -0x10(%rbp),%edx
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
mov    -0x18(%rbp),%rcx
mov    0x78(%rbp),%r8
mov    0x50(%rbp),%r9
lea    -0x160(%rbp),%rsi
call   1030 <energycalc@plt>
movsd  -0x148(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
movaps 0xd93(%rip),%xmm1
pand   %xmm1,%xmm0
xor    %eax,%eax
ucomisd -0x238(%rbp),%xmm0
ff
mov    %al,-0x239(%rbp)
jbe    12f7 <water_energy_balance+0x1a7>
cmpl   $0x32,-0x14c(%rbp)
setl   %al
mov    %al,-0x239(%rbp)
mov    -0x239(%rbp),%al
test   $0x1,%al
jne    130a <water_energy_balance+0x1ba>
jmp    169c <water_energy_balance+0x54c>
cmpl   $0x0,-0x14c(%rbp)
jne    1329 <water_energy_balance+0x1d9>
mov    0x48(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1336 <water_energy_balance+0x1e6>
movsd  -0x148(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  0xcfa(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xce5(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm4
movsd  -0x60(%rbp),%xmm5
movsd  -0x68(%rbp),%xmm6
movsd  0x10(%rbp),%xmm7
mov    -0x20(%rbp),%rdi
mov    -0x70(%rbp),%rsi
movsd  0x30(%rbp),%xmm8
xorps  %xmm2,%xmm2
movsd  %xmm8,(%rsp)
call   1040 <latsens@plt>
movsd  -0x50(%rbp),%xmm0
movsd  0xc7c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc78(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xc5c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0xc3c(%rip),%xmm0
mulsd  (%rax),%xmm0
mulsd  -0x158(%rbp),%xmm0
ff
mov    0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x18(%rbp),%xmm1
movsd  0xc13(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
mov    0x48(%rbp),%rsi
mov    0x50(%rbp),%rdx
lea    -0x230(%rbp),%rcx
movsd  -0x40(%rbp),%xmm1
mov    -0x10(%rbp),%r8d
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
mov    $0x1,%edi
call   1060 <eddy@plt>
movsd  0xbcb(%rip),%xmm0
mulsd  0x20(%rbp),%xmm0
movsd  0xbb6(%rip),%xmm1
mulsd  0x20(%rbp),%xmm1
mov    0x38(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x70(%rbp),%rax
addsd  (%rax),%xmm2
mov    0x40(%rbp),%rax
addsd  (%rax),%xmm2
mov    0x48(%rbp),%rdi
lea    -0x130(%rbp),%rsi
mov    0x50(%rbp),%rdx
lea    -0x230(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x18(%rbp),%r9
mov    -0x10(%rbp),%ebx
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
mov    0x78(%rbp),%r10
mov    0x88(%rbp),%rax
lea    -0x168(%rbp),%r11
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1050 <temp_area@plt>
movsd  -0x130(%rbp),%xmm1
ff
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    15e0 <water_energy_balance+0x490>
mov    0x60(%rbp),%rdi
lea    -0x130(%rbp),%rsi
movsd  -0x48(%rbp),%xmm0
movsd  0x68(%rbp),%xmm1
mov    0x70(%rbp),%rdx
mov    -0x10(%rbp),%ecx
mov    -0x24(%rbp),%r8d
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
mov    0x78(%rbp),%r9
mov    -0x18(%rbp),%rbx
mov    0x80(%rbp),%r11
mov    0x50(%rbp),%r10
mov    0x90(%rbp),%rax
movsd  0x98(%rbp),%xmm4
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1070 <iceform@plt>
lea    -0x130(%rbp),%rdi
mov    -0x10(%rbp),%edx
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
mov    -0x18(%rbp),%rcx
mov    0x78(%rbp),%r8
mov    0x50(%rbp),%r9
lea    -0x140(%rbp),%rsi
call   1030 <energycalc@plt>
movsd  -0x140(%rbp),%xmm0
ff
subsd  -0x160(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
cvtsi2sdl -0x24(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa85(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    0x58(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1624 <water_energy_balance+0x4d4>
movsd  -0x168(%rbp),%xmm0
ff
subsd  -0x160(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
cvtsi2sdl -0x24(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa47(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    0x58(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x60(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x130(%rbp),%xmm0
ff
mov    0x48(%rbp),%rax
addsd  (%rax),%xmm0
movsd  0xa1c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
mov    0x40(%rbp),%rax
movsd  (%rax),%xmm0
addsd  0x20(%rbp),%xmm0
mov    0x88(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x70(%rbp),%rax
addsd  (%rax),%xmm0
mov    0x38(%rbp),%rax
addsd  (%rax),%xmm0
mov    0x58(%rbp),%rax
subsd  (%rax),%xmm0
mov    0x60(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    12b9 <water_energy_balance+0x169>
movsd  -0x148(%rbp),%xmm1
ff
subsd  -0x78(%rbp),%xmm1
movaps 0x9b0(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x238(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     171f <water_energy_balance+0x5cf>
movl   $0x0,-0x134(%rbp)
mov    -0x134(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1713 <water_energy_balance+0x5c3>
movslq -0x134(%rbp),%rax
movsd  -0x130(%rbp,%rax,8),%xmm0
ff ff
mov    0x48(%rbp),%rax
movslq -0x134(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    16d0 <water_energy_balance+0x580>
movl   $0x0,-0xc(%rbp)
jmp    18ca <water_energy_balance+0x77a>
mov    0x48(%rbp),%rax
movsd  0x90d(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0x8f9(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm4
movsd  -0x60(%rbp),%xmm5
movsd  -0x68(%rbp),%xmm6
movsd  0x10(%rbp),%xmm7
mov    -0x20(%rbp),%rdi
mov    -0x70(%rbp),%rsi
movsd  0x30(%rbp),%xmm8
xorps  %xmm2,%xmm2
movsd  %xmm8,(%rsp)
call   1040 <latsens@plt>
movsd  -0x50(%rbp),%xmm0
movsd  0x890(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x88c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x870(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x850(%rip),%xmm0
mulsd  (%rax),%xmm0
mulsd  -0x158(%rbp),%xmm0
ff
mov    0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x18(%rbp),%xmm1
movsd  0x827(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x40(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x48(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    18ad <water_energy_balance+0x75d>
mov    0x60(%rbp),%rdi
mov    0x48(%rbp),%rsi
movsd  -0x48(%rbp),%xmm0
movsd  0x68(%rbp),%xmm1
mov    0x70(%rbp),%rdx
mov    -0x10(%rbp),%ecx
mov    -0x24(%rbp),%r8d
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
mov    0x78(%rbp),%r9
mov    -0x18(%rbp),%rbx
mov    0x80(%rbp),%r11
mov    0x50(%rbp),%r10
mov    0x90(%rbp),%rax
movsd  0x98(%rbp),%xmm4
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1070 <iceform@plt>
jmp    18b8 <water_energy_balance+0x768>
mov    0x60(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x58(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x258,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<water_energy_balance>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x208,%rsp
mov    %r9,0x60(%rsp)
movsd  %xmm7,0x58(%rsp)
movsd  %xmm6,0x50(%rsp)
movsd  %xmm5,0x40(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x98(%rsp)
mov    %ecx,0x4(%rsp)
mov    %rdx,0x68(%rsp)
mov    %rsi,0x38(%rsp)
mov    %edi,%ebp
mov    0x2a8(%rsp),%r8
mov    0x280(%rsp),%r14
mov    0x278(%rsp),%r12
movsd  (%r12),%xmm2
movsd  %xmm2,0x18(%rsp)
test   %edi,%edi
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
jle    120b <water_energy_balance+0xab>
mov    %ebp,%edx
shl    $0x3,%rdx
lea    0xc0(%rsp),%rdi
mov    %r12,%rsi
call   1040 <memcpy@plt>
mov    0x2a8(%rsp),%r8
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
lea    0x70(%rsp),%rsi
mov    %r12,%rdi
mov    %rbp,0x30(%rsp)
mov    %ebp,%edx
mov    0x38(%rsp),%rcx
mov    %r14,%r9
call   1030 <energycalc@plt>
movsd  0xdd1(%rip),%xmm3
movapd %xmm3,%xmm1
subsd  0x18(%rsp),%xmm1
andpd  0xe1f(%rip),%xmm1
ucomisd 0xdbf(%rip),%xmm1
jbe    15d7 <water_energy_balance+0x477>
movsd  0x250(%rsp),%xmm0
movsd  0xdb0(%rip),%xmm1
addsd  0x28(%rsp),%xmm1
movsd  %xmm1,0x88(%rsp)
movsd  0xda1(%rip),%xmm1
mulsd  0x20(%rsp),%xmm1
addsd  0xd9b(%rip),%xmm1
mulsd  0xd9b(%rip),%xmm1
movsd  %xmm1,0x80(%rsp)
movsd  0xd92(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x78(%rsp)
mulsd  0xd88(%rip),%xmm0
movsd  %xmm0,0x90(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x4(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
xor    %eax,%eax
mov    0x30(%rsp),%r13
nop
mov    %rax,0xa0(%rsp)
test   %eax,%eax
jne    12e2 <water_energy_balance+0x182>
movsd  (%r12),%xmm3
movsd  %xmm3,0x18(%rsp)
addsd  0xd20(%rip),%xmm3
movsd  %xmm3,0xa8(%rsp)
sub    $0x10,%rsp
movsd  0x270(%rsp),%xmm0
movsd  %xmm0,(%rsp)
xorpd  %xmm2,%xmm2
movapd %xmm3,%xmm0
movsd  0x98(%rsp),%xmm1
movsd  0x30(%rsp),%xmm3
movsd  0x50(%rsp),%xmm4
movsd  0x60(%rsp),%xmm5
movsd  0x68(%rsp),%xmm6
movsd  0x250(%rsp),%xmm7
mov    0x78(%rsp),%rbx
mov    %rbx,%rdi
mov    0x70(%rsp),%rbp
mov    %rbp,%rsi
call   1050 <latsens@plt>
add    $0x10,%rsp
movsd  (%rbx),%xmm0
xorpd  0xd0e(%rip),%xmm0
mulsd  0x80(%rsp),%xmm0
mov    0x268(%rsp),%rax
movsd  %xmm0,(%rax)
movsd  0xa8(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  0xcb4(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x248(%rsp),%xmm0
mov    0x270(%rsp),%r14
movsd  %xmm0,(%r14)
mov    $0x1,%edi
movsd  0x40(%rsp),%xmm0
mov    %r12,%rsi
mov    %r12,%rbx
mov    0x280(%rsp),%r15
mov    %r15,%rdx
lea    0x160(%rsp),%r12
mov    %r12,%rcx
movsd  0x98(%rsp),%xmm1
mov    %r13d,%r8d
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
call   1070 <eddy@plt>
mov    0x268(%rsp),%rax
movsd  (%rax),%xmm2
addsd  0x0(%rbp),%xmm2
addsd  (%r14),%xmm2
movsd  0x78(%rsp),%xmm0
movsd  0x90(%rsp),%xmm1
mov    %rbx,%rdi
lea    0xc0(%rsp),%r14
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    0x4(%rsp),%ebx
mov    %ebx,%r8d
mov    0x38(%rsp),%rbp
mov    %rbp,%r9
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
push   0x2b8(%rsp)
mov    0x2b0(%rsp),%r15
push   %r15
lea    0xc0(%rsp),%rax
push   %rax
push   %r13
call   1060 <temp_area@plt>
add    $0x20,%rsp
movsd  0xc0(%rsp),%xmm3
movsd  0x28(%rsp),%xmm0
ucomisd %xmm3,%xmm0
jbe    1550 <water_energy_balance+0x3f0>
mov    0x290(%rsp),%rdi
mov    %r14,%rsi
movsd  0x298(%rsp),%xmm1
mov    0x2a0(%rsp),%rdx
mov    %r13d,%ecx
mov    %ebx,%r8d
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
mov    %r15,%r9
movsd  0x2c8(%rsp),%xmm4
push   0x2c0(%rsp)
mov    0x288(%rsp),%rbx
push   %rbx
push   0x2c0(%rsp)
push   %rbp
call   1080 <iceform@plt>
add    $0x20,%rsp
mov    %r14,%rdi
lea    0xb8(%rsp),%rsi
mov    %r13d,%edx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %rbp,%rcx
mov    %r15,%r8
mov    %rbx,%r9
call   1030 <energycalc@plt>
movsd  0xb8(%rsp),%xmm0
subsd  0x70(%rsp),%xmm0
movsd  0x0(%rbp),%xmm1
mulsd  0x48(%rsp),%xmm1
mulsd  0xb1f(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    0x288(%rsp),%rax
movsd  %xmm0,(%rax)
movsd  0xc0(%rsp),%xmm3
jmp    1591 <water_energy_balance+0x431>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0xb0(%rsp),%xmm1
subsd  0x70(%rsp),%xmm1
movsd  0x0(%rbp),%xmm2
mulsd  0x48(%rsp),%xmm2
mulsd  0xad6(%rip),%xmm2
divsd  %xmm2,%xmm1
mov    0x288(%rsp),%rax
movsd  %xmm1,(%rax)
mov    0x290(%rsp),%rax
movq   $0x0,(%rax)
mov    0x278(%rsp),%r12
addsd  (%r12),%xmm3
mulsd  0xaa9(%rip),%xmm3
movapd %xmm3,%xmm1
subsd  0x18(%rsp),%xmm1
andpd  0xaa7(%rip),%xmm1
ucomisd 0xa47(%rip),%xmm1
jbe    15d7 <water_energy_balance+0x477>
mov    0xa0(%rsp),%rcx
lea    0x1(%rcx),%eax
cmp    $0x31,%ecx
jb     12d0 <water_energy_balance+0x170>
movsd  0xa29(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1732 <water_energy_balance+0x5d2>
movsd  0xa1f(%rip),%xmm1
movsd  (%r12),%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x18(%rsp)
addsd  0x28(%rsp),%xmm1
sub    $0x10,%rsp
movsd  0x270(%rsp),%xmm0
movsd  %xmm0,(%rsp)
xorpd  %xmm2,%xmm2
movapd %xmm3,%xmm0
movsd  0x30(%rsp),%xmm3
movsd  0x50(%rsp),%xmm4
movsd  0x60(%rsp),%xmm5
movsd  0x68(%rsp),%xmm6
movsd  0x250(%rsp),%xmm7
mov    0x78(%rsp),%rbx
mov    %rbx,%rdi
mov    0x70(%rsp),%rsi
call   1050 <latsens@plt>
movsd  0x38(%rsp),%xmm0
add    $0x10,%rsp
movsd  0x20(%rsp),%xmm1
mulsd  0x9ac(%rip),%xmm1
addsd  0x9ac(%rip),%xmm1
mulsd  0x9dc(%rip),%xmm1
mulsd  (%rbx),%xmm1
mov    0x268(%rsp),%rax
movsd  %xmm1,(%rax)
movsd  0x9ac(%rip),%xmm1
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  0x248(%rsp),%xmm1
mov    0x270(%rsp),%rax
movsd  %xmm1,(%rax)
ucomisd (%r12),%xmm0
jbe    1753 <water_energy_balance+0x5f3>
mov    0x290(%rsp),%rdi
mov    %r12,%rsi
movsd  0x298(%rsp),%xmm1
mov    0x2a0(%rsp),%rdx
mov    0x30(%rsp),%rcx
mov    0x4(%rsp),%r8d
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
mov    0x2a8(%rsp),%r9
movsd  0x2c8(%rsp),%xmm4
push   0x2c0(%rsp)
push   0x288(%rsp)
push   0x2c0(%rsp)
push   0x50(%rsp)
call   1080 <iceform@plt>
add    $0x20,%rsp
jmp    1762 <water_energy_balance+0x602>
mov    0x30(%rsp),%rax
test   %eax,%eax
jle    1771 <water_energy_balance+0x611>
mov    %eax,%edx
shl    $0x3,%rdx
lea    0xc0(%rsp),%rsi
mov    %r12,%rdi
call   1040 <memcpy@plt>
jmp    1771 <water_energy_balance+0x611>
mov    0x290(%rsp),%rax
movq   $0x0,(%rax)
mov    0x288(%rsp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
add    $0x208,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @water_energy_balance(i32 %0, double* %1, double* %2, i32 %3, i32 %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, double %17, double* %18, double* %19, double* %20, double* %21, double* %22, double* %23, double* %24, double %25, double* %26, double* %27, double* %28, double* %29, double* %30, double %31) {
%33 = alloca i32
%34 = alloca i32
%35 = alloca double*
%36 = alloca double*
%37 = alloca i32
%38 = alloca i32
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double
%45 = alloca double
%46 = alloca double
%47 = alloca double
%48 = alloca double
%49 = alloca double
%50 = alloca double
%51 = alloca double
%52 = alloca double*
%53 = alloca double*
%54 = alloca double*
%55 = alloca double*
%56 = alloca double*
%57 = alloca double*
%58 = alloca double*
%59 = alloca double
%60 = alloca double*
%61 = alloca double*
%62 = alloca double*
%63 = alloca double*
%64 = alloca double*
%65 = alloca double
%66 = alloca double
%67 = alloca double
%68 = alloca double
%69 = alloca [20 x double]
%70 = alloca i32
%71 = alloca double
%72 = alloca double
%73 = alloca i32
%74 = alloca double
%75 = alloca double
%76 = alloca double
%77 = alloca double
%78 = alloca double
%79 = alloca double
%80 = alloca double
%81 = alloca [20 x double]
%82 = alloca double
store i32 %0, i32* %34
store double* %1, double** %35
store double* %2, double** %36
store i32 %3, i32* %37
store i32 %4, i32* %38
store double %5, double* %39
store double %6, double* %40
store double %7, double* %41
store double %8, double* %42
store double %9, double* %43
store double %10, double* %44
store double %11, double* %45
store double %12, double* %46
store double %13, double* %47
store double %14, double* %48
store double %15, double* %49
store double %16, double* %50
store double %17, double* %51
store double* %18, double** %52
store double* %19, double** %53
store double* %20, double** %54
store double* %21, double** %55
store double* %22, double** %56
store double* %23, double** %57
store double* %24, double** %58
store double %25, double* %59
store double* %26, double** %60
store double* %27, double** %61
store double* %28, double** %62
store double* %29, double** %63
store double* %30, double** %64
store double %31, double* %65
store double 1.000000e-04, double* %82
store double -9.990000e+02, double* %72
store double -9.990000e+02, double* %77
%83 = load double*, double** %55
%84 = getelementptr inbounds double, double* %83, i64 0
%85 = load double, double* %84
store double %85, double* %66
store i32 0, i32* %73
store i32 0, i32* %70
br label %86
86: ; preds = %99, %32
%87 = load i32, i32* %70
%88 = load i32, i32* %34
%89 = icmp slt i32 %87, %88
br i1 %89, label %90, label %102
90: ; preds = %86
%91 = load double*, double** %55
%92 = load i32, i32* %70
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
%95 = load double, double* %94
%96 = load i32, i32* %70
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [20 x double], [20 x double]* %69, i64 0, i64 %97
store double %95, double* %98
br label %99
99: ; preds = %90
%100 = load i32, i32* %70
%101 = add nsw i32 %100, 1
store i32 %101, i32* %70
br label %86
102: ; preds = %86
%103 = load double*, double** %55
%104 = load i32, i32* %34
%105 = load double, double* %39
%106 = load double, double* %40
%107 = load double*, double** %35
%108 = load double*, double** %61
%109 = load double*, double** %56
%110 = call i32 @energycalc(double* %103, double* %75, i32 %104, double %105, double %106, double* %107, double* %108, double* %109)
br label %111
111: ; preds = %256, %102
%112 = load double, double* %72
%113 = load double, double* %66
%114 = fsub double %112, %113
%115 = call double @llvm.fabs.f64(double %114)
%116 = load double, double* %82
%117 = fcmp ogt double %115, %116
br i1 %117, label %118, label %121
118: ; preds = %111
%119 = load i32, i32* %73
%120 = icmp slt i32 %119, 50
br label %121
121: ; preds = %118, %111
%122 = phi i1 [ false, %111 ], [ %120, %118 ]
br i1 %122, label %123, label %285
123: ; preds = %121
%124 = load i32, i32* %73
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %130
126: ; preds = %123
%127 = load double*, double** %55
%128 = getelementptr inbounds double, double* %127, i64 0
%129 = load double, double* %128
store double %129, double* %66
br label %132
130: ; preds = %123
%131 = load double, double* %72
store double %131, double* %66
br label %132
132: ; preds = %130, %126
%133 = load double, double* %66
%134 = fadd double %133, 2.731500e+02
store double %134, double* %68
%135 = load double, double* %42
%136 = fadd double %135, 2.731500e+02
store double %136, double* %67
%137 = load double, double* %68
%138 = load double, double* %67
%139 = load double, double* %43
%140 = load double, double* %44
%141 = load double, double* %45
%142 = load double, double* %46
%143 = load double, double* %47
%144 = load double*, double** %36
%145 = load double*, double** %52
%146 = load double, double* %51
%147 = call i32 @latsens(double %137, double %138, double 0.000000e+00, double %139, double %140, double %141, double %142, double %143, double* %144, double* %145, double %146)
%148 = load double, double* %43
%149 = call double @llvm.fmuladd.f64(double -2.361000e-03, double %148, double 2.501000e+00)
%150 = fmul double %149, 1.000000e+06
store double %150, double* %74
%151 = load double*, double** %36
%152 = load double, double* %151
%153 = fmul double -1.000000e+00, %152
%154 = load double, double* %74
%155 = fmul double %153, %154
%156 = load double*, double** %53
store double %155, double* %156
%157 = load double, double* %48
%158 = load double, double* %68
%159 = fmul double 0x3E6DD464E5915F3B, %158
%160 = load double, double* %68
%161 = fmul double %159, %160
%162 = load double, double* %68
%163 = fmul double %161, %162
%164 = load double, double* %68
%165 = fneg double %163
%166 = call double @llvm.fmuladd.f64(double %165, double %164, double %157)
%167 = load double*, double** %54
store double %166, double* %167
%168 = load double, double* %44
%169 = load double*, double** %55
%170 = load double*, double** %56
%171 = getelementptr inbounds [20 x double], [20 x double]* %81, i64 0, i64 0
%172 = load double, double* %41
%173 = load i32, i32* %34
%174 = load double, double* %39
%175 = load double, double* %40
%176 = call i32 @eddy(i32 1, double %168, double* %169, double* %170, double* %171, double %172, i32 %173, double %174, double %175)
%177 = load double, double* %49
%178 = fmul double %177, 0x3FE6666666666666
%179 = load double, double* %49
%180 = fmul double %179, 3.000000e-01
%181 = load double*, double** %53
%182 = load double, double* %181
%183 = load double*, double** %52
%184 = load double, double* %183
%185 = fadd double %182, %184
%186 = load double*, double** %54
%187 = load double, double* %186
%188 = fadd double %185, %187
%189 = load double*, double** %55
%190 = getelementptr inbounds [20 x double], [20 x double]* %69, i64 0, i64 0
%191 = load double*, double** %56
%192 = getelementptr inbounds [20 x double], [20 x double]* %81, i64 0, i64 0
%193 = load i32, i32* %37
%194 = load double*, double** %35
%195 = load i32, i32* %34
%196 = load double, double* %39
%197 = load double, double* %40
%198 = load double*, double** %61
%199 = load double*, double** %63
%200 = call i32 @temp_area(double %178, double %180, double %188, double* %189, double* %190, double* %191, double* %192, i32 %193, double* %194, i32 %195, double %196, double %197, double* %76, double* %198, double* %199)
%201 = getelementptr inbounds [20 x double], [20 x double]* %69, i64 0, i64 0
%202 = load double, double* %201
%203 = load double, double* %42
%204 = fcmp olt double %202, %203
br i1 %204, label %205, label %242
205: ; preds = %132
%206 = load double*, double** %58
%207 = getelementptr inbounds [20 x double], [20 x double]* %69, i64 0, i64 0
%208 = load double, double* %42
%209 = load double, double* %59
%210 = load double*, double** %60
%211 = load i32, i32* %34
%212 = load i32, i32* %37
%213 = load double, double* %39
%214 = load double, double* %40
%215 = load double*, double** %61
%216 = load double*, double** %35
%217 = load double*, double** %62
%218 = load double*, double** %56
%219 = load double*, double** %64
%220 = load double, double* %65
%221 = call i32 @iceform(double* %206, double* %207, double %208, double %209, double* %210, i32 %211, i32 %212, double %213, double %214, double* %215, double* %216, double* %217, double* %218, double* %219, double %220)
%222 = getelementptr inbounds [20 x double], [20 x double]* %69, i64 0, i64 0
%223 = load i32, i32* %34
%224 = load double, double* %39
%225 = load double, double* %40
%226 = load double*, double** %35
%227 = load double*, double** %61
%228 = load double*, double** %56
%229 = call i32 @energycalc(double* %222, double* %71, i32 %223, double %224, double %225, double* %226, double* %227, double* %228)
%230 = load double, double* %71
%231 = load double, double* %75
%232 = fsub double %230, %231
%233 = load double*, double** %35
%234 = getelementptr inbounds double, double* %233, i64 0
%235 = load double, double* %234
%236 = load i32, i32* %37
%237 = sitofp i32 %236 to double
%238 = fmul double %235, %237
%239 = fmul double %238, 3.600000e+03
%240 = fdiv double %232, %239
%241 = load double*, double** %57
store double %240, double* %241
br label %256
242: ; preds = %132
%243 = load double, double* %76
%244 = load double, double* %75
%245 = fsub double %243, %244
%246 = load double*, double** %35
%247 = getelementptr inbounds double, double* %246, i64 0
%248 = load double, double* %247
%249 = load i32, i32* %37
%250 = sitofp i32 %249 to double
%251 = fmul double %248, %250
%252 = fmul double %251, 3.600000e+03
%253 = fdiv double %245, %252
%254 = load double*, double** %57
store double %253, double* %254
%255 = load double*, double** %58
store double 0.000000e+00, double* %255
br label %256
256: ; preds = %242, %205
%257 = getelementptr inbounds [20 x double], [20 x double]* %69, i64 0, i64 0
%258 = load double, double* %257
%259 = load double*, double** %55
%260 = getelementptr inbounds double, double* %259, i64 0
%261 = load double, double* %260
%262 = fadd double %258, %261
%263 = fdiv double %262, 2.000000e+00
store double %263, double* %72
%264 = load double*, double** %54
%265 = load double, double* %264
%266 = load double, double* %49
%267 = fadd double %265, %266
%268 = load double*, double** %63
%269 = load double, double* %268
%270 = fsub double %267, %269
%271 = load double*, double** %52
%272 = load double, double* %271
%273 = fadd double %270, %272
%274 = load double*, double** %53
%275 = load double, double* %274
%276 = fadd double %273, %275
%277 = load double*, double** %57
%278 = load double, double* %277
%279 = fsub double %276, %278
%280 = load double*, double** %58
%281 = load double, double* %280
%282 = fadd double %279, %281
store double %282, double* %77
%283 = load i32, i32* %73
%284 = add nsw i32 %283, 1
store i32 %284, i32* %73
br label %111
285: ; preds = %121
%286 = load double, double* %72
%287 = load double, double* %66
%288 = fsub double %286, %287
%289 = call double @llvm.fabs.f64(double %288)
%290 = load double, double* %82
%291 = fcmp ole double %289, %290
br i1 %291, label %292, label %310
292: ; preds = %285
store i32 0, i32* %70
br label %293
293: ; preds = %306, %292
%294 = load i32, i32* %70
%295 = load i32, i32* %34
%296 = icmp slt i32 %294, %295
br i1 %296, label %297, label %309
297: ; preds = %293
%298 = load i32, i32* %70
%299 = sext i32 %298 to i64
%300 = getelementptr inbounds [20 x double], [20 x double]* %69, i64 0, i64 %299
%301 = load double, double* %300
%302 = load double*, double** %55
%303 = load i32, i32* %70
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds double, double* %302, i64 %304
store double %301, double* %305
br label %306
306: ; preds = %297
%307 = load i32, i32* %70
%308 = add nsw i32 %307, 1
store i32 %308, i32* %70
br label %293
309: ; preds = %293
store i32 0, i32* %33
br label %374
310: ; preds = %285
%311 = load double*, double** %55
%312 = getelementptr inbounds double, double* %311, i64 0
%313 = load double, double* %312
%314 = fadd double %313, 2.731500e+02
store double %314, double* %68
%315 = load double, double* %42
%316 = fadd double %315, 2.731500e+02
store double %316, double* %67
%317 = load double, double* %68
%318 = load double, double* %67
%319 = load double, double* %43
%320 = load double, double* %44
%321 = load double, double* %45
%322 = load double, double* %46
%323 = load double, double* %47
%324 = load double*, double** %36
%325 = load double*, double** %52
%326 = load double, double* %51
%327 = call i32 @latsens(double %317, double %318, double 0.000000e+00, double %319, double %320, double %321, double %322, double %323, double* %324, double* %325, double %326)
%328 = load double, double* %43
%329 = call double @llvm.fmuladd.f64(double -2.361000e-03, double %328, double 2.501000e+00)
%330 = fmul double %329, 1.000000e+06
store double %330, double* %74
%331 = load double*, double** %36
%332 = load double, double* %331
%333 = fmul double -1.000000e+00, %332
%334 = load double, double* %74
%335 = fmul double %333, %334
%336 = load double*, double** %53
store double %335, double* %336
%337 = load double, double* %48
%338 = load double, double* %68
%339 = fmul double 0x3E6DD464E5915F3B, %338
%340 = load double, double* %68
%341 = fmul double %339, %340
%342 = load double, double* %68
%343 = fmul double %341, %342
%344 = load double, double* %68
%345 = fneg double %343
%346 = call double @llvm.fmuladd.f64(double %345, double %344, double %337)
%347 = load double*, double** %54
store double %346, double* %347
%348 = load double*, double** %55
%349 = getelementptr inbounds double, double* %348, i64 0
%350 = load double, double* %349
%351 = load double, double* %42
%352 = fcmp olt double %350, %351
br i1 %352, label %353, label %370
353: ; preds = %310
%354 = load double*, double** %58
%355 = load double*, double** %55
%356 = load double, double* %42
%357 = load double, double* %59
%358 = load double*, double** %60
%359 = load i32, i32* %34
%360 = load i32, i32* %37
%361 = load double, double* %39
%362 = load double, double* %40
%363 = load double*, double** %61
%364 = load double*, double** %35
%365 = load double*, double** %62
%366 = load double*, double** %56
%367 = load double*, double** %64
%368 = load double, double* %65
%369 = call i32 @iceform(double* %354, double* %355, double %356, double %357, double* %358, i32 %359, i32 %360, double %361, double %362, double* %363, double* %364, double* %365, double* %366, double* %367, double %368)
br label %372
370: ; preds = %310
%371 = load double*, double** %58
store double 0.000000e+00, double* %371
br label %372
372: ; preds = %370, %353
%373 = load double*, double** %57
store double 0.000000e+00, double* %373
store i32 0, i32* %33
br label %374
374: ; preds = %372, %309
%375 = load i32, i32* %33
ret i32 %375
}

LLVM IR (-O2):
define i32 @water_energy_balance(i32 %0, double* %1, double* %2, i32 %3, i32 %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, double %17, double* %18, double* nocapture %19, double* nocapture %20, double* %21, double* %22, double* nocapture writeonly %23, double* %24, double %25, double* %26, double* %27, double* %28, double* %29, double* %30, double %31) {
%33 = bitcast double* %21 to i8*
%34 = alloca [20 x double]
%35 = bitcast [20 x double]* %34 to i8*
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca [20 x double]
%40 = bitcast double* %36 to i8*
%41 = bitcast double* %37 to i8*
%42 = bitcast double* %38 to i8*
%43 = bitcast [20 x double]* %39 to i8*
%44 = load double, double* %21
%45 = icmp sgt i32 %0, 0
br i1 %45, label %46, label %49
46: ; preds = %32
%47 = zext i32 %0 to i64
%48 = shl nuw nsw i64 %47, 3
br label %49
49: ; preds = %46, %32
%50 = call i32 @energycalc(double* %21, double* %37, i32 %0, double %5, double %6, double* %1, double* %27, double* %22)
%51 = fsub double -9.990000e+02, %44
%52 = call double @llvm.fabs.f64(double %51)
%53 = fcmp ogt double %52, 1.000000e-04
br i1 %53, label %54, label %119
54: ; preds = %49
%55 = fadd double %8, 2.731500e+02
%56 = call double @llvm.fmuladd.f64(double %9, double -2.361000e-03, double 2.501000e+00)
%57 = fmul double %56, 1.000000e+06
%58 = getelementptr inbounds [20 x double], [20 x double]* %39, i64 0, i64 0
%59 = fmul double %15, 0x3FE6666666666666
%60 = fmul double %15, 3.000000e-01
%61 = getelementptr inbounds [20 x double], [20 x double]* %34, i64 0, i64 0
%62 = sitofp i32 %3 to double
br label %63
63: ; preds = %54, %108
%64 = phi i32 [ 0, %54 ], [ %113, %108 ]
%65 = phi double [ -9.990000e+02, %54 ], [ %112, %108 ]
%66 = icmp eq i32 %64, 0
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = load double, double* %21
br label %69
69: ; preds = %63, %67
%70 = phi double [ %68, %67 ], [ %65, %63 ]
%71 = fadd double %70, 2.731500e+02
%72 = call i32 @latsens(double %71, double %55, double 0.000000e+00, double %9, double %10, double %11, double %12, double %13, double* %2, double* %18, double %17)
%73 = load double, double* %2
%74 = fneg double %73
%75 = fmul double %57, %74
store double %75, double* %19
%76 = fmul double %71, 0xBE6DD464E5915F3B
%77 = fmul double %71, %76
%78 = fmul double %71, %77
%79 = call double @llvm.fmuladd.f64(double %78, double %71, double %14)
store double %79, double* %20
%80 = call i32 @eddy(i32 1, double %10, double* %21, double* %22, double* %58, double %7, i32 %0, double %5, double %6)
%81 = load double, double* %19
%82 = load double, double* %18
%83 = fadd double %81, %82
%84 = load double, double* %20
%85 = fadd double %83, %84
%86 = call i32 @temp_area(double %59, double %60, double %85, double* %21, double* %61, double* %22, double* %58, i32 %3, double* %1, i32 %0, double %5, double %6, double* %38, double* %27, double* %29)
%87 = load double, double* %61
%88 = fcmp olt double %87, %8
br i1 %88, label %89, label %100
89: ; preds = %69
%90 = call i32 @iceform(double* %24, double* %61, double %8, double %25, double* %26, i32 %0, i32 %3, double %5, double %6, double* %27, double* %1, double* %28, double* %22, double* %30, double %31)
%91 = call i32 @energycalc(double* %61, double* %36, i32 %0, double %5, double %6, double* %1, double* %27, double* %22)
%92 = load double, double* %36
%93 = load double, double* %37
%94 = fsub double %92, %93
%95 = load double, double* %1
%96 = fmul double %95, %62
%97 = fmul double %96, 3.600000e+03
%98 = fdiv double %94, %97
store double %98, double* %23
%99 = load double, double* %61
br label %108
100: ; preds = %69
%101 = load double, double* %38
%102 = load double, double* %37
%103 = fsub double %101, %102
%104 = load double, double* %1
%105 = fmul double %104, %62
%106 = fmul double %105, 3.600000e+03
%107 = fdiv double %103, %106
store double %107, double* %23
store double 0.000000e+00, double* %24
br label %108
108: ; preds = %100, %89
%109 = phi double [ %87, %100 ], [ %99, %89 ]
%110 = load double, double* %21
%111 = fadd double %109, %110
%112 = fmul double %111, 5.000000e-01
%113 = add nuw nsw i32 %64, 1
%114 = fsub double %112, %70
%115 = call double @llvm.fabs.f64(double %114)
%116 = fcmp ogt double %115, 1.000000e-04
%117 = icmp ult i32 %64, 49
%118 = select i1 %116, i1 %117, i1 false
br i1 %118, label %63, label %119
119: ; preds = %108, %49
%120 = phi double [ %52, %49 ], [ %115, %108 ]
%121 = fcmp ugt double %120, 1.000000e-04
br i1 %121, label %126, label %122
122: ; preds = %119
br i1 %45, label %123, label %146
123: ; preds = %122
%124 = zext i32 %0 to i64
%125 = shl nuw nsw i64 %124, 3
br label %146
126: ; preds = %119
%127 = load double, double* %21
%128 = fadd double %127, 2.731500e+02
%129 = fadd double %8, 2.731500e+02
%130 = call i32 @latsens(double %128, double %129, double 0.000000e+00, double %9, double %10, double %11, double %12, double %13, double* %2, double* %18, double %17)
%131 = call double @llvm.fmuladd.f64(double %9, double -2.361000e-03, double 2.501000e+00)
%132 = fmul double %131, 1.000000e+06
%133 = load double, double* %2
%134 = fneg double %133
%135 = fmul double %132, %134
store double %135, double* %19
%136 = fmul double %128, 0xBE6DD464E5915F3B
%137 = fmul double %128, %136
%138 = fmul double %128, %137
%139 = call double @llvm.fmuladd.f64(double %138, double %128, double %14)
store double %139, double* %20
%140 = load double, double* %21
%141 = fcmp olt double %140, %8
br i1 %141, label %142, label %144
142: ; preds = %126
%143 = call i32 @iceform(double* %24, double* %21, double %8, double %25, double* %26, i32 %0, i32 %3, double %5, double %6, double* %27, double* %1, double* %28, double* %22, double* %30, double %31)
br label %145
144: ; preds = %126
store double 0.000000e+00, double* %24
br label %145
145: ; preds = %144, %142
store double 0.000000e+00, double* %23
br label %146
146: ; preds = %123, %122, %145
ret i32 0
}