#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 acos(double);
double pow(int, double);
double tan(double);
void thornthwaite(double *tempSeries, int n, double tmsg, double lat,
                  double *etpSeries) {
  double T, J, J2, J3, c, N, omega, K[13], tanLatMonth;
  int month, i, k;
  double pi = 3.14159265358979;
  double tanLat = tan(0.0174532925 * lat);
  double tanDelta[13] = {-0.37012566, -0.23853358, -0.04679872, 0.16321764,
                         0.32930908,  0.40677729,  0.3747741,   0.239063,
                         0.04044485,  -0.16905776, -0.33306377, -0.40743608};
  double days[13] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  for (i = 0; i < n; i++)
    etpSeries[i] = tmsg;
  J = 0;
  for (month = 1; month < 13; month++) {
    T = k = 0;
    for (i = month - 1; i < n; i += 12) {
      if (tempSeries[i] != tmsg) {
        T = T + tempSeries[i];
        k++;
      }
    }
    T = T / k;
    if (T > 0)
      J = J + pow(T / 5, 1.514);
  }
  if (J == 0.0) {
    for (i = 0; i < n; i++) {
      if (tempSeries[i] != tmsg)
        etpSeries[i] = 0.0;
    }
    return;
  }
  J2 = J * J;
  J3 = J2 * J;
  c = 0.000000675 * J3 - 0.0000771 * J2 + 0.01792 * J + 0.49239;
  for (month = 1; month < 13; month++) {
    tanLatMonth = tanLat * tanDelta[month - 1];
    if (tanLatMonth > -1 && tanLatMonth < 1)
      omega = acos(-tanLatMonth);
    if (tanLatMonth <= -1)
      omega = 0;
    if (tanLatMonth >= 1)
      omega = pi;
    N = 24 * omega / pi;
    K[month] = N / 12 * days[month - 1] / 30;
  }
  month = 1;
  for (i = 0; i < n; i++) {
    if (tempSeries[i] != tmsg) {
      if (tempSeries[i] > 0 && J > 0)
        etpSeries[i] = K[month] * 16 * pow((10 * tempSeries[i] / J), c);
      else
        etpSeries[i] = 0;
    }
    if (month < 12)
      month++;
    else
      month = 1;
  }
}


x86 assembly (clang, -O0):
<thornthwaite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xe88(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1050 <tan@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
lea    -0x160(%rbp),%rdi
lea    0xee8(%rip),%rsi
mov    $0x68,%edx
call   1040 <memcpy@plt>
lea    -0x1d0(%rbp),%rdi
lea    0xf40(%rip),%rsi
mov    $0x68,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0xe0(%rbp)
mov    -0xe0(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11fc <thornthwaite+0xbc>
movsd  -0x18(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0xe0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    11c4 <thornthwaite+0x84>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0xdc(%rbp)
cmpl   $0xd,-0xdc(%rbp)
jge    1337 <thornthwaite+0x1f7>
movl   $0x0,-0xe4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xe0(%rbp)
mov    -0xe0(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12b3 <thornthwaite+0x173>
mov    -0x8(%rbp),%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    1271 <thornthwaite+0x131>
jp     1271 <thornthwaite+0x131>
jmp    129a <thornthwaite+0x15a>
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0xe0(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    129f <thornthwaite+0x15f>
mov    -0xe0(%rbp),%eax
add    $0xc,%eax
mov    %eax,-0xe0(%rbp)
jmp    123c <thornthwaite+0xfc>
movsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0xe4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    131e <thornthwaite+0x1de>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  0xd7b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xd63(%rip),%xmm0
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1d8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1323 <thornthwaite+0x1e3>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    120e <thornthwaite+0xce>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13bf <thornthwaite+0x27f>
jp     13bf <thornthwaite+0x27f>
movl   $0x0,-0xe0(%rbp)
mov    -0xe0(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13ba <thornthwaite+0x27a>
mov    -0x8(%rbp),%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    138e <thornthwaite+0x24e>
jp     138e <thornthwaite+0x24e>
jmp    13a1 <thornthwaite+0x261>
mov    -0x28(%rbp),%rax
movslq -0xe0(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    13a6 <thornthwaite+0x266>
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    1359 <thornthwaite+0x219>
jmp    16c7 <thornthwaite+0x587>
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  0xc3e(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xc12(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  0xbf5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xbdd(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0xdc(%rbp)
cmpl   $0xd,-0xdc(%rbp)
jge    1584 <thornthwaite+0x444>
movsd  -0xf8(%rbp),%xmm0
ff
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mulsd  -0x160(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  0xbb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14d0 <thornthwaite+0x390>
movsd  0xbaf(%rip),%xmm0
ucomisd -0xd8(%rbp),%xmm0
ff
jbe    14d0 <thornthwaite+0x390>
movsd  -0xd8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  0xb68(%rip),%xmm0
ucomisd -0xd8(%rbp),%xmm0
ff
jb     14ee <thornthwaite+0x3ae>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0xd8(%rbp),%xmm0
ff
movsd  0xb4a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1515 <thornthwaite+0x3d5>
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  0xb43(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
divsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xb1c(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mulsd  -0x1d0(%rbp,%rax,8),%xmm0
ff ff
movsd  0xaf4(%rip),%xmm1
divsd  %xmm1,%xmm0
movslq -0xdc(%rbp),%rax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    1446 <thornthwaite+0x306>
movl   $0x1,-0xdc(%rbp)
movl   $0x0,-0xe0(%rbp)
mov    -0xe0(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    16c7 <thornthwaite+0x587>
mov    -0x8(%rbp),%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    15cd <thornthwaite+0x48d>
jp     15cd <thornthwaite+0x48d>
jmp    1683 <thornthwaite+0x543>
mov    -0x8(%rbp),%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    166b <thornthwaite+0x52b>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    166b <thornthwaite+0x52b>
movslq -0xdc(%rbp),%rax
movsd  0xa2d(%rip),%xmm0
mulsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1e0(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0xe0(%rbp),%rcx
movsd  0xa01(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x38(%rbp),%xmm0
cvttsd2si %xmm0,%edi
movsd  -0x50(%rbp),%xmm0
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1e0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0xe0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    167e <thornthwaite+0x53e>
mov    -0x28(%rbp),%rax
movslq -0xe0(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1683 <thornthwaite+0x543>
cmpl   $0xc,-0xdc(%rbp)
jge    16a4 <thornthwaite+0x564>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    16ae <thornthwaite+0x56e>
movl   $0x1,-0xdc(%rbp)
jmp    16b3 <thornthwaite+0x573>
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    1598 <thornthwaite+0x458>
add    $0x1e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thornthwaite>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rdx,%r14
movaps %xmm0,0x20(%rsp)
mov    %esi,%r15d
mov    %rdi,%r12
mulsd  0xea9(%rip),%xmm1
movapd %xmm1,%xmm0
call   1040 <tan@plt>
movapd 0x20(%rsp),%xmm3
movsd  %xmm0,0x18(%rsp)
test   %r15d,%r15d
jle    129f <thornthwaite+0x16f>
mov    %r15d,%eax
cmp    $0x4,%r15d
jae    1185 <thornthwaite+0x55>
xor    %ecx,%ecx
jmp    1290 <thornthwaite+0x160>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm3,%xmm0
unpcklpd %xmm3,%xmm0
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x1c,%rdi
jae    11b3 <thornthwaite+0x83>
xor    %edi,%edi
jmp    1255 <thornthwaite+0x125>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
nopl   0x0(%rax)
movupd %xmm0,(%r14,%rdi,8)
movupd %xmm0,0x10(%r14,%rdi,8)
movupd %xmm0,0x20(%r14,%rdi,8)
movupd %xmm0,0x30(%r14,%rdi,8)
movupd %xmm0,0x40(%r14,%rdi,8)
movupd %xmm0,0x50(%r14,%rdi,8)
movupd %xmm0,0x60(%r14,%rdi,8)
movupd %xmm0,0x70(%r14,%rdi,8)
movupd %xmm0,0x80(%r14,%rdi,8)
movupd %xmm0,0x90(%r14,%rdi,8)
movupd %xmm0,0xa0(%r14,%rdi,8)
movupd %xmm0,0xb0(%r14,%rdi,8)
movupd %xmm0,0xc0(%r14,%rdi,8)
movupd %xmm0,0xd0(%r14,%rdi,8)
movupd %xmm0,0xe0(%r14,%rdi,8)
movupd %xmm0,0xf0(%r14,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    11c0 <thornthwaite+0x90>
test   %rdx,%rdx
je     1284 <thornthwaite+0x154>
lea    (%r14,%rdi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movupd %xmm0,-0x10(%rsi,%rdi,1)
movupd %xmm0,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1270 <thornthwaite+0x140>
cmp    %rax,%rcx
je     129f <thornthwaite+0x16f>
nopl   0x0(%rax)
movsd  %xmm3,(%r14,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1290 <thornthwaite+0x160>
movslq %r15d,%rbp
mov    $0x1,%r13d
xorpd  %xmm4,%xmm4
xor    %ebx,%ebx
movsd  0xd52(%rip),%xmm5
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    12e2 <thornthwaite+0x1b2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r13d
add    $0x1,%rbx
cmp    $0xc,%rbx
je     1385 <thornthwaite+0x255>
mov    $0x0,%eax
xorpd  %xmm0,%xmm0
cmp    %r15d,%r13d
jle    1340 <thornthwaite+0x210>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
ucomisd %xmm4,%xmm0
jbe    12d0 <thornthwaite+0x1a0>
divsd  0xd07(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xd03(%rip),%xmm0
call   1050 <pow@plt>
movsd  0xce6(%rip),%xmm5
xorpd  %xmm4,%xmm4
movapd 0x20(%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
jmp    12d0 <thornthwaite+0x1a0>
xchg   %ax,%ax
xor    %eax,%eax
xorpd  %xmm0,%xmm0
mov    %rbx,%rcx
jmp    1369 <thornthwaite+0x239>
nopl   0x0(%rax,%rax,1)
addsd  %xmm2,%xmm0
cmpneqsd %xmm3,%xmm1
movq   %xmm1,%rdx
sub    %edx,%eax
add    $0xc,%rcx
cmp    %rbp,%rcx
jge    12f0 <thornthwaite+0x1c0>
movsd  (%r12,%rcx,8),%xmm1
ucomisd %xmm1,%xmm3
movapd %xmm1,%xmm2
jne    1350 <thornthwaite+0x220>
movapd %xmm1,%xmm2
jp     1350 <thornthwaite+0x220>
movapd %xmm5,%xmm2
jmp    1350 <thornthwaite+0x220>
xorpd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm2
ucomisd %xmm0,%xmm2
jne    13d6 <thornthwaite+0x2a6>
jp     13d6 <thornthwaite+0x2a6>
test   %r15d,%r15d
jle    15d8 <thornthwaite+0x4a8>
mov    %r15d,%eax
cmp    $0x1,%r15d
jne    15ea <thornthwaite+0x4ba>
xor    %ecx,%ecx
test   $0x1,%al
je     15d8 <thornthwaite+0x4a8>
movsd  (%r12,%rcx,8),%xmm0
ucomisd %xmm3,%xmm0
jne    13c9 <thornthwaite+0x299>
jnp    15d8 <thornthwaite+0x4a8>
movq   $0x0,(%r14,%rcx,8)
jmp    15d8 <thornthwaite+0x4a8>
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm2,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xc32(%rip),%xmm0
mulsd  0xc32(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xc2e(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
xor    %ebx,%ebx
lea    0xc87(%rip),%r13
movsd  0xc17(%rip),%xmm2
movsd  0xc17(%rip),%xmm4
movsd  0xc17(%rip),%xmm5
movsd  0xc16(%rip),%xmm9
movsd  0xc16(%rip),%xmm7
lea    0xcc7(%rip),%rbp
movsd  0xc0e(%rip),%xmm8
jmp    14ad <thornthwaite+0x37d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm4,%xmm6
cmpnlesd %xmm1,%xmm6
cmpnlesd %xmm2,%xmm1
andpd  %xmm0,%xmm1
andpd  %xmm6,%xmm1
andnpd %xmm5,%xmm6
orpd   %xmm1,%xmm6
movapd %xmm6,%xmm0
movapd %xmm6,%xmm1
mulsd  %xmm9,%xmm1
divsd  %xmm5,%xmm1
divsd  %xmm7,%xmm1
mulsd  (%rbx,%rbp,1),%xmm1
divsd  %xmm8,%xmm1
movsd  %xmm1,0x48(%rsp,%rbx,1)
add    $0x8,%rbx
cmp    $0x60,%rbx
je     151f <thornthwaite+0x3ef>
movsd  (%rbx,%r13,1),%xmm1
mulsd  0x18(%rsp),%xmm1
ucomisd %xmm2,%xmm1
jbe    1460 <thornthwaite+0x330>
ucomisd %xmm1,%xmm4
jbe    1460 <thornthwaite+0x330>
movapd %xmm1,%xmm0
xorpd  0xbbf(%rip),%xmm0
movapd %xmm1,0x30(%rsp)
call   1030 <acos@plt>
movapd 0x30(%rsp),%xmm1
movsd  0xb75(%rip),%xmm8
movsd  0xb65(%rip),%xmm7
movsd  0xb54(%rip),%xmm9
movsd  0xb44(%rip),%xmm5
movsd  0xb34(%rip),%xmm4
movsd  0xb24(%rip),%xmm2
movapd 0x20(%rsp),%xmm3
jmp    1460 <thornthwaite+0x330>
test   %r15d,%r15d
jle    15d8 <thornthwaite+0x4a8>
movsd  0x10(%rsp),%xmm0
addsd  0xb32(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %r15d,%r13d
mov    $0x1,%r15d
xor    %ebp,%ebp
mov    $0x1,%ebx
jmp    156b <thornthwaite+0x43b>
xchg   %ax,%ax
movsd  %xmm0,(%r14,%rbp,8)
cmp    $0xc,%ebx
lea    0x1(%rbx),%eax
cmovge %r15d,%eax
add    $0x1,%rbp
mov    %eax,%ebx
cmp    %rbp,%r13
je     15d8 <thornthwaite+0x4a8>
movsd  (%r12,%rbp,8),%xmm1
ucomisd %xmm3,%xmm1
jne    1579 <thornthwaite+0x449>
jnp    1556 <thornthwaite+0x426>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    1550 <thornthwaite+0x420>
movsd  0x8(%rsp),%xmm2
ucomisd 0xaef(%rip),%xmm2
jbe    1550 <thornthwaite+0x420>
movslq %ebx,%rax
movsd  0x40(%rsp,%rax,8),%xmm0
mulsd  0xacc(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
mulsd  0xac6(%rip),%xmm1
divsd  0x8(%rsp),%xmm1
cvttsd2si %xmm1,%edi
movsd  0x10(%rsp),%xmm0
call   1050 <pow@plt>
movapd 0x20(%rsp),%xmm3
mulsd  0x18(%rsp),%xmm0
jmp    1550 <thornthwaite+0x420>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%edx
and    $0xfffffffe,%edx
xor    %ecx,%ecx
jmp    160d <thornthwaite+0x4dd>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x2,%rcx
cmp    %rcx,%rdx
je     13af <thornthwaite+0x27f>
movsd  (%r12,%rcx,8),%xmm0
ucomisd %xmm3,%xmm0
jne    161b <thornthwaite+0x4eb>
jnp    1623 <thornthwaite+0x4f3>
movq   $0x0,(%r14,%rcx,8)
movsd  0x8(%r12,%rcx,8),%xmm0
ucomisd %xmm3,%xmm0
jne    1632 <thornthwaite+0x502>
jnp    1600 <thornthwaite+0x4d0>
movq   $0x0,0x8(%r14,%rcx,8)
jmp    1600 <thornthwaite+0x4d0>

LLVM IR (-O0):
@__const.thornthwaite.tanDelta = [13 x double] [double 0xBFD7B0238947110C, double 0xBFCE8844B28C84B3, double 0xBFA7F60077CA1106, double 0x3FC4E450CCF7141E, double 0x3FD5136664380DE3, double 0x3FDA08A39D538D71, double 0x3FD7FC4C81B8D244, double 2.390630e-01, double 0x3FA4B52FF8154FF3, double 0xBFC5A3AF472AE1D6, double 0xBFD550EAB3E87A52, double 0xBFDA136EC7B3DE3E, double 0.000000e+00]
@__const.thornthwaite.days = [13 x double] [double 3.100000e+01, double 2.800000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 0.000000e+00]
define void @thornthwaite(double* %0, i32 %1, double %2, double %3, double* %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double*
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca [13 x double]
%19 = alloca double
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca double
%24 = alloca double
%25 = alloca [13 x double]
%26 = alloca [13 x double]
store double* %0, double** %6
store i32 %1, i32* %7
store double %2, double* %8
store double %3, double* %9
store double* %4, double** %10
store double 0x400921FB54442D11, double* %23
%27 = load double, double* %9
%28 = fmul double 0x3F91DF46A1FAE711, %27
%29 = call double @tan(double %28)
store double %29, double* %24
%30 = bitcast [13 x double]* %25 to i8*
%31 = bitcast [13 x double]* %26 to i8*
store i32 0, i32* %21
br label %32
32: ; preds = %42, %5
%33 = load i32, i32* %21
%34 = load i32, i32* %7
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %45
36: ; preds = %32
%37 = load double, double* %8
%38 = load double*, double** %10
%39 = load i32, i32* %21
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
store double %37, double* %41
br label %42
42: ; preds = %36
%43 = load i32, i32* %21
%44 = add nsw i32 %43, 1
store i32 %44, i32* %21
br label %32
45: ; preds = %32
store double 0.000000e+00, double* %12
store i32 1, i32* %20
br label %46
46: ; preds = %93, %45
%47 = load i32, i32* %20
%48 = icmp slt i32 %47, 13
br i1 %48, label %49, label %96
49: ; preds = %46
store i32 0, i32* %22
store double 0.000000e+00, double* %11
%50 = load i32, i32* %20
%51 = sub nsw i32 %50, 1
store i32 %51, i32* %21
br label %52
52: ; preds = %75, %49
%53 = load i32, i32* %21
%54 = load i32, i32* %7
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %78
56: ; preds = %52
%57 = load double*, double** %6
%58 = load i32, i32* %21
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %57, i64 %59
%61 = load double, double* %60
%62 = load double, double* %8
%63 = fcmp une double %61, %62
br i1 %63, label %64, label %74
64: ; preds = %56
%65 = load double, double* %11
%66 = load double*, double** %6
%67 = load i32, i32* %21
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
%70 = load double, double* %69
%71 = fadd double %65, %70
store double %71, double* %11
%72 = load i32, i32* %22
%73 = add nsw i32 %72, 1
store i32 %73, i32* %22
br label %74
74: ; preds = %64, %56
br label %75
75: ; preds = %74
%76 = load i32, i32* %21
%77 = add nsw i32 %76, 12
store i32 %77, i32* %21
br label %52
78: ; preds = %52
%79 = load double, double* %11
%80 = load i32, i32* %22
%81 = sitofp i32 %80 to double
%82 = fdiv double %79, %81
store double %82, double* %11
%83 = load double, double* %11
%84 = fcmp ogt double %83, 0.000000e+00
br i1 %84, label %85, label %92
85: ; preds = %78
%86 = load double, double* %12
%87 = load double, double* %11
%88 = fdiv double %87, 5.000000e+00
%89 = fptosi double %88 to i32
%90 = call double @pow(i32 %89, double 1.514000e+00)
%91 = fadd double %86, %90
store double %91, double* %12
br label %92
92: ; preds = %85, %78
br label %93
93: ; preds = %92
%94 = load i32, i32* %20
%95 = add nsw i32 %94, 1
store i32 %95, i32* %20
br label %46
96: ; preds = %46
%97 = load double, double* %12
%98 = fcmp oeq double %97, 0.000000e+00
br i1 %98, label %99, label %122
99: ; preds = %96
store i32 0, i32* %21
br label %100
100: ; preds = %118, %99
%101 = load i32, i32* %21
%102 = load i32, i32* %7
%103 = icmp slt i32 %101, %102
br i1 %103, label %104, label %121
104: ; preds = %100
%105 = load double*, double** %6
%106 = load i32, i32* %21
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
%110 = load double, double* %8
%111 = fcmp une double %109, %110
br i1 %111, label %112, label %117
112: ; preds = %104
%113 = load double*, double** %10
%114 = load i32, i32* %21
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
store double 0.000000e+00, double* %116
br label %117
117: ; preds = %112, %104
br label %118
118: ; preds = %117
%119 = load i32, i32* %21
%120 = add nsw i32 %119, 1
store i32 %120, i32* %21
br label %100
121: ; preds = %100
br label %248
122: ; preds = %96
%123 = load double, double* %12
%124 = load double, double* %12
%125 = fmul double %123, %124
store double %125, double* %13
%126 = load double, double* %13
%127 = load double, double* %12
%128 = fmul double %126, %127
store double %128, double* %14
%129 = load double, double* %14
%130 = load double, double* %13
%131 = fmul double 7.710000e-05, %130
%132 = fneg double %131
%133 = call double @llvm.fmuladd.f64(double 0x3EA6A634B28F33E5, double %129, double %132)
%134 = load double, double* %12
%135 = call double @llvm.fmuladd.f64(double 1.792000e-02, double %134, double %133)
%136 = fadd double %135, 4.923900e-01
store double %136, double* %15
store i32 1, i32* %20
br label %137
137: ; preds = %183, %122
%138 = load i32, i32* %20
%139 = icmp slt i32 %138, 13
br i1 %139, label %140, label %186
140: ; preds = %137
%141 = load double, double* %24
%142 = load i32, i32* %20
%143 = sub nsw i32 %142, 1
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [13 x double], [13 x double]* %25, i64 0, i64 %144
%146 = load double, double* %145
%147 = fmul double %141, %146
store double %147, double* %19
%148 = load double, double* %19
%149 = fcmp ogt double %148, -1.000000e+00
br i1 %149, label %150, label %157
150: ; preds = %140
%151 = load double, double* %19
%152 = fcmp olt double %151, 1.000000e+00
br i1 %152, label %153, label %157
153: ; preds = %150
%154 = load double, double* %19
%155 = fneg double %154
%156 = call double @acos(double %155)
store double %156, double* %17
br label %157
157: ; preds = %153, %150, %140
%158 = load double, double* %19
%159 = fcmp ole double %158, -1.000000e+00
br i1 %159, label %160, label %161
160: ; preds = %157
store double 0.000000e+00, double* %17
br label %161
161: ; preds = %160, %157
%162 = load double, double* %19
%163 = fcmp oge double %162, 1.000000e+00
br i1 %163, label %164, label %166
164: ; preds = %161
%165 = load double, double* %23
store double %165, double* %17
br label %166
166: ; preds = %164, %161
%167 = load double, double* %17
%168 = fmul double 2.400000e+01, %167
%169 = load double, double* %23
%170 = fdiv double %168, %169
store double %170, double* %16
%171 = load double, double* %16
%172 = fdiv double %171, 1.200000e+01
%173 = load i32, i32* %20
%174 = sub nsw i32 %173, 1
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [13 x double], [13 x double]* %26, i64 0, i64 %175
%177 = load double, double* %176
%178 = fmul double %172, %177
%179 = fdiv double %178, 3.000000e+01
%180 = load i32, i32* %20
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [13 x double], [13 x double]* %18, i64 0, i64 %181
store double %179, double* %182
br label %183
183: ; preds = %166
%184 = load i32, i32* %20
%185 = add nsw i32 %184, 1
store i32 %185, i32* %20
br label %137
186: ; preds = %137
store i32 1, i32* %20
store i32 0, i32* %21
br label %187
187: ; preds = %245, %186
%188 = load i32, i32* %21
%189 = load i32, i32* %7
%190 = icmp slt i32 %188, %189
br i1 %190, label %191, label %248
191: ; preds = %187
%192 = load double*, double** %6
%193 = load i32, i32* %21
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds double, double* %192, i64 %194
%196 = load double, double* %195
%197 = load double, double* %8
%198 = fcmp une double %196, %197
br i1 %198, label %199, label %237
199: ; preds = %191
%200 = load double*, double** %6
%201 = load i32, i32* %21
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %200, i64 %202
%204 = load double, double* %203
%205 = fcmp ogt double %204, 0.000000e+00
br i1 %205, label %206, label %231
206: ; preds = %199
%207 = load double, double* %12
%208 = fcmp ogt double %207, 0.000000e+00
br i1 %208, label %209, label %231
209: ; preds = %206
%210 = load i32, i32* %20
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [13 x double], [13 x double]* %18, i64 0, i64 %211
%213 = load double, double* %212
%214 = fmul double %213, 1.600000e+01
%215 = load double*, double** %6
%216 = load i32, i32* %21
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double, double* %215, i64 %217
%219 = load double, double* %218
%220 = fmul double 1.000000e+01, %219
%221 = load double, double* %12
%222 = fdiv double %220, %221
%223 = fptosi double %222 to i32
%224 = load double, double* %15
%225 = call double @pow(i32 %223, double %224)
%226 = fmul double %214, %225
%227 = load double*, double** %10
%228 = load i32, i32* %21
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %227, i64 %229
store double %226, double* %230
br label %236
231: ; preds = %206, %199
%232 = load double*, double** %10
%233 = load i32, i32* %21
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %232, i64 %234
store double 0.000000e+00, double* %235
br label %236
236: ; preds = %231, %209
br label %237
237: ; preds = %236, %191
%238 = load i32, i32* %20
%239 = icmp slt i32 %238, 12
br i1 %239, label %240, label %243
240: ; preds = %237
%241 = load i32, i32* %20
%242 = add nsw i32 %241, 1
store i32 %242, i32* %20
br label %244
243: ; preds = %237
store i32 1, i32* %20
br label %244
244: ; preds = %243, %240
br label %245
245: ; preds = %244
%246 = load i32, i32* %21
%247 = add nsw i32 %246, 1
store i32 %247, i32* %21
br label %187
248: ; preds = %121, %187
ret void
}

LLVM IR (-O2):
@__const.thornthwaite.tanDelta = [13 x double] [double 0xBFD7B0238947110C, double 0xBFCE8844B28C84B3, double 0xBFA7F60077CA1106, double 0x3FC4E450CCF7141E, double 0x3FD5136664380DE3, double 0x3FDA08A39D538D71, double 0x3FD7FC4C81B8D244, double 2.390630e-01, double 0x3FA4B52FF8154FF3, double 0xBFC5A3AF472AE1D6, double 0xBFD550EAB3E87A52, double 0xBFDA136EC7B3DE3E, double 0.000000e+00]
@__const.thornthwaite.days = [13 x double] [double 3.100000e+01, double 2.800000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 3.000000e+01, double 3.100000e+01, double 0.000000e+00]
define void @thornthwaite(double* nocapture %0, i32 %1, double %2, double %3, double* nocapture writeonly %4) {
%6 = alloca [13 x double]
%7 = bitcast [13 x double]* %6 to i8*
%8 = fmul double %3, 0x3F91DF46A1FAE711
%9 = tail call double @tan(double %8)
%10 = icmp sgt i32 %1, 0
br i1 %10, label %11, label %89
11: ; preds = %5
%12 = zext i32 %1 to i64
%13 = icmp ult i32 %1, 4
br i1 %13, label %87, label %14
14: ; preds = %11
%15 = and i64 %12, 4294967292
%16 = insertelement <2 x double> poison, double %2, i64 0
%17 = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> zeroinitializer
%18 = insertelement <2 x double> poison, double %2, i64 0
%19 = shufflevector <2 x double> %18, <2 x double> poison, <2 x i32> zeroinitializer
%20 = add nsw i64 %15, -4
%21 = lshr exact i64 %20, 2
%22 = add nuw nsw i64 %21, 1
%23 = and i64 %22, 7
%24 = icmp ult i64 %20, 28
br i1 %24, label %72, label %25
25: ; preds = %14
%26 = and i64 %22, 9223372036854775800
br label %27
27: ; preds = %27, %25
%28 = phi i64 [ 0, %25 ], [ %69, %27 ]
%29 = phi i64 [ 0, %25 ], [ %70, %27 ]
%30 = getelementptr inbounds double, double* %4, i64 %28
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> %17, <2 x double>* %31
%32 = getelementptr inbounds double, double* %30, i64 2
%33 = bitcast double* %32 to <2 x double>*
store <2 x double> %19, <2 x double>* %33
%34 = or i64 %28, 4
%35 = getelementptr inbounds double, double* %4, i64 %34
%36 = bitcast double* %35 to <2 x double>*
store <2 x double> %17, <2 x double>* %36
%37 = getelementptr inbounds double, double* %35, i64 2
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> %19, <2 x double>* %38
%39 = or i64 %28, 8
%40 = getelementptr inbounds double, double* %4, i64 %39
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> %17, <2 x double>* %41
%42 = getelementptr inbounds double, double* %40, i64 2
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> %19, <2 x double>* %43
%44 = or i64 %28, 12
%45 = getelementptr inbounds double, double* %4, i64 %44
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> %17, <2 x double>* %46
%47 = getelementptr inbounds double, double* %45, i64 2
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> %19, <2 x double>* %48
%49 = or i64 %28, 16
%50 = getelementptr inbounds double, double* %4, i64 %49
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> %17, <2 x double>* %51
%52 = getelementptr inbounds double, double* %50, i64 2
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> %19, <2 x double>* %53
%54 = or i64 %28, 20
%55 = getelementptr inbounds double, double* %4, i64 %54
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> %17, <2 x double>* %56
%57 = getelementptr inbounds double, double* %55, i64 2
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> %19, <2 x double>* %58
%59 = or i64 %28, 24
%60 = getelementptr inbounds double, double* %4, i64 %59
%61 = bitcast double* %60 to <2 x double>*
store <2 x double> %17, <2 x double>* %61
%62 = getelementptr inbounds double, double* %60, i64 2
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %19, <2 x double>* %63
%64 = or i64 %28, 28
%65 = getelementptr inbounds double, double* %4, i64 %64
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> %17, <2 x double>* %66
%67 = getelementptr inbounds double, double* %65, i64 2
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %19, <2 x double>* %68
%69 = add nuw i64 %28, 32
%70 = add i64 %29, 8
%71 = icmp eq i64 %70, %26
br i1 %71, label %72, label %27
72: ; preds = %27, %14
%73 = phi i64 [ 0, %14 ], [ %69, %27 ]
%74 = icmp eq i64 %23, 0
br i1 %74, label %85, label %75
75: ; preds = %72, %75
%76 = phi i64 [ %82, %75 ], [ %73, %72 ]
%77 = phi i64 [ %83, %75 ], [ 0, %72 ]
%78 = getelementptr inbounds double, double* %4, i64 %76
%79 = bitcast double* %78 to <2 x double>*
store <2 x double> %17, <2 x double>* %79
%80 = getelementptr inbounds double, double* %78, i64 2
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %19, <2 x double>* %81
%82 = add nuw i64 %76, 4
%83 = add i64 %77, 1
%84 = icmp eq i64 %83, %23
br i1 %84, label %85, label %75
85: ; preds = %75, %72
%86 = icmp eq i64 %15, %12
br i1 %86, label %89, label %87
87: ; preds = %11, %85
%88 = phi i64 [ 0, %11 ], [ %15, %85 ]
br label %91
89: ; preds = %91, %85, %5
%90 = sext i32 %1 to i64
br label %96
91: ; preds = %87, %91
%92 = phi i64 [ %94, %91 ], [ %88, %87 ]
%93 = getelementptr inbounds double, double* %4, i64 %92
store double %2, double* %93
%94 = add nuw nsw i64 %92, 1
%95 = icmp eq i64 %94, %12
br i1 %95, label %89, label %91
96: ; preds = %89, %125
%97 = phi i64 [ 0, %89 ], [ %128, %125 ]
%98 = phi double [ 0.000000e+00, %89 ], [ %126, %125 ]
%99 = phi i32 [ 1, %89 ], [ %127, %125 ]
%100 = icmp sgt i32 %99, %1
br i1 %100, label %114, label %101
101: ; preds = %96, %101
%102 = phi i64 [ %112, %101 ], [ %97, %96 ]
%103 = phi double [ %111, %101 ], [ 0.000000e+00, %96 ]
%104 = phi i32 [ %109, %101 ], [ 0, %96 ]
%105 = getelementptr inbounds double, double* %0, i64 %102
%106 = load double, double* %105
%107 = fcmp une double %106, %2
%108 = zext i1 %107 to i32
%109 = add nuw nsw i32 %104, %108
%110 = select i1 %107, double %106, double -0.000000e+00
%111 = fadd double %103, %110
%112 = add nuw nsw i64 %102, 12
%113 = icmp slt i64 %112, %90
br i1 %113, label %101, label %114
114: ; preds = %101, %96
%115 = phi i32 [ 0, %96 ], [ %109, %101 ]
%116 = phi double [ 0.000000e+00, %96 ], [ %111, %101 ]
%117 = sitofp i32 %115 to double
%118 = fdiv double %116, %117
%119 = fcmp ogt double %118, 0.000000e+00
br i1 %119, label %120, label %125
120: ; preds = %114
%121 = fdiv double %118, 5.000000e+00
%122 = fptosi double %121 to i32
%123 = tail call double @pow(i32 %122, double 1.514000e+00)
%124 = fadd double %98, %123
br label %125
125: ; preds = %114, %120
%126 = phi double [ %124, %120 ], [ %98, %114 ]
%127 = add nuw nsw i32 %99, 1
%128 = add nuw nsw i64 %97, 1
%129 = icmp eq i64 %128, 12
br i1 %129, label %130, label %96
130: ; preds = %125
%131 = fcmp oeq double %126, 0.000000e+00
br i1 %131, label %132, label %158
132: ; preds = %130
br i1 %10, label %133, label %235
133: ; preds = %132
%134 = zext i32 %1 to i64
%135 = and i64 %134, 1
%136 = icmp eq i32 %1, 1
br i1 %136, label %226, label %137
137: ; preds = %133
%138 = and i64 %134, 4294967294
br label %139
139: ; preds = %154, %137
%140 = phi i64 [ 0, %137 ], [ %155, %154 ]
%141 = phi i64 [ 0, %137 ], [ %156, %154 ]
%142 = getelementptr inbounds double, double* %0, i64 %140
%143 = load double, double* %142
%144 = fcmp une double %143, %2
br i1 %144, label %145, label %147
145: ; preds = %139
%146 = getelementptr inbounds double, double* %4, i64 %140
store double 0.000000e+00, double* %146
br label %147
147: ; preds = %139, %145
%148 = or i64 %140, 1
%149 = getelementptr inbounds double, double* %0, i64 %148
%150 = load double, double* %149
%151 = fcmp une double %150, %2
br i1 %151, label %152, label %154
152: ; preds = %147
%153 = getelementptr inbounds double, double* %4, i64 %148
store double 0.000000e+00, double* %153
br label %154
154: ; preds = %152, %147
%155 = add nuw nsw i64 %140, 2
%156 = add i64 %141, 2
%157 = icmp eq i64 %156, %138
br i1 %157, label %226, label %139
158: ; preds = %130
%159 = fmul double %126, %126
%160 = fmul double %126, %159
%161 = fmul double %159, -7.710000e-05
%162 = tail call double @llvm.fmuladd.f64(double %160, double 0x3EA6A634B28F33E5, double %161)
%163 = tail call double @llvm.fmuladd.f64(double %126, double 1.792000e-02, double %162)
br label %169
164: ; preds = %182
%165 = fadd double %163, 4.923900e-01
br i1 %10, label %166, label %235
166: ; preds = %164
%167 = fcmp ogt double %126, 0.000000e+00
%168 = zext i32 %1 to i64
br label %198
169: ; preds = %158, %182
%170 = phi i64 [ 1, %158 ], [ %196, %182 ]
%171 = phi double [ undef, %158 ], [ %187, %182 ]
%172 = add nsw i64 %170, -1
%173 = getelementptr inbounds [13 x double], [13 x double]* @__const.thornthwaite.tanDelta, i64 0, i64 %172
%174 = load double, double* %173
%175 = fmul double %9, %174
%176 = fcmp ogt double %175, -1.000000e+00
%177 = fcmp olt double %175, 1.000000e+00
%178 = and i1 %176, %177
br i1 %178, label %179, label %182
179: ; preds = %169
%180 = fneg double %175
%181 = tail call double @acos(double %180)
br label %182
182: ; preds = %179, %169
%183 = phi double [ %181, %179 ], [ %171, %169 ]
%184 = fcmp ugt double %175, -1.000000e+00
%185 = select i1 %184, double %183, double 0.000000e+00
%186 = fcmp ult double %175, 1.000000e+00
%187 = select i1 %186, double %185, double 0x400921FB54442D11
%188 = fmul double %187, 2.400000e+01
%189 = fdiv double %188, 0x400921FB54442D11
%190 = fdiv double %189, 1.200000e+01
%191 = getelementptr inbounds [13 x double], [13 x double]* @__const.thornthwaite.days, i64 0, i64 %172
%192 = load double, double* %191
%193 = fmul double %192, %190
%194 = fdiv double %193, 3.000000e+01
%195 = getelementptr inbounds [13 x double], [13 x double]* %6, i64 0, i64 %170
store double %194, double* %195
%196 = add nuw nsw i64 %170, 1
%197 = icmp eq i64 %196, 13
br i1 %197, label %164, label %169
198: ; preds = %166, %220
%199 = phi i64 [ 0, %166 ], [ %224, %220 ]
%200 = phi i32 [ 1, %166 ], [ %223, %220 ]
%201 = getelementptr inbounds double, double* %0, i64 %199
%202 = load double, double* %201
%203 = fcmp une double %202, %2
br i1 %203, label %204, label %220
204: ; preds = %198
%205 = fcmp ogt double %202, 0.000000e+00
%206 = select i1 %205, i1 %167, i1 false
br i1 %206, label %207, label %217
207: ; preds = %204
%208 = sext i32 %200 to i64
%209 = getelementptr inbounds [13 x double], [13 x double]* %6, i64 0, i64 %208
%210 = load double, double* %209
%211 = fmul double %210, 1.600000e+01
%212 = fmul double %202, 1.000000e+01
%213 = fdiv double %212, %126
%214 = fptosi double %213 to i32
%215 = tail call double @pow(i32 %214, double %165)
%216 = fmul double %211, %215
br label %217
217: ; preds = %204, %207
%218 = phi double [ %216, %207 ], [ 0.000000e+00, %204 ]
%219 = getelementptr inbounds double, double* %4, i64 %199
store double %218, double* %219
br label %220
220: ; preds = %217, %198
%221 = icmp slt i32 %200, 12
%222 = add nsw i32 %200, 1
%223 = select i1 %221, i32 %222, i32 1
%224 = add nuw nsw i64 %199, 1
%225 = icmp eq i64 %224, %168
br i1 %225, label %235, label %198
226: ; preds = %154, %133
%227 = phi i64 [ 0, %133 ], [ %155, %154 ]
%228 = icmp eq i64 %135, 0
br i1 %228, label %235, label %229
229: ; preds = %226
%230 = getelementptr inbounds double, double* %0, i64 %227
%231 = load double, double* %230
%232 = fcmp une double %231, %2
br i1 %232, label %233, label %235
233: ; preds = %229
%234 = getelementptr inbounds double, double* %4, i64 %227
store double 0.000000e+00, double* %234
br label %235
235: ; preds = %220, %226, %233, %229, %164, %132
ret void
}