#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 const exp(double const);
double const pow(double, double const);
void conservativeHeadRichardsJLeverett(
    const int nSimplex, const int nPointsPerSimplex, const int nSpace,
    const int *materialTypes, const double rho, const double beta,
    const double *gravity, const double *phi, const double *psiD,
    const double *ns, const double *nk, const double *S_wirr,
    const double *S_nwr, const double *kr0, double *u, double *mass,
    double *dmass, double *f, double *df, double *a, double *da) {
  int i, j, k, I, matID;
  const int nSpace2 = nSpace * nSpace;
  register double psiC, Se, Sw, dSw, kr, dkr, rho2 = rho * rho, rhom, drhom;
  const double reg_diff = 1.0e-2;
  for (i = 0; i < nSimplex; i++) {
    matID = materialTypes[i];
    for (j = 0; j < nPointsPerSimplex; j++) {
      k = i * nPointsPerSimplex + j;
      psiC = -u[k];
      if (psiC > 0.0 && psiC < psiD[matID]) {
        Se = 1.0 - pow(psiC / psiD[matID], ns[matID]);
        Sw = Se * (1.0 - S_wirr[matID] - S_nwr[matID]) + S_wirr[matID];
        dSw = (1.0 - S_wirr[matID] - S_nwr[matID]) *
              pow(psiC / psiD[matID], ns[matID] - 1.0) * ns[matID] /
              psiD[matID];
        kr = kr0[matID] * pow(Se, nk[matID]) + reg_diff;
        dkr = kr0[matID] * pow(Se, nk[matID] - 1.0) * nk[matID] *
              pow(psiC / psiD[matID], ns[matID] - 1.0) * ns[matID] /
              psiD[matID];
      } else if (psiC <= 0.0) {
        Se = 1.0;
        Sw = 1.0 - S_nwr[matID];
        dSw = 0.0;
        kr = kr0[matID] + reg_diff;
        dkr = 0.0;
      } else {
        Se = 0.0;
        Sw = S_wirr[matID];
        dSw = 0.0;
        kr = reg_diff;
        dkr = 0.0;
      }
      rhom = rho * exp(beta * u[k]);
      drhom = beta * rhom;
      mass[k] = rhom * Sw * phi[matID];
      dmass[k] = rhom * dSw * phi[matID] + drhom * Sw * phi[matID];
      for (I = 0; I < nSpace; I++) {
        f[k * nSpace + I] = rho2 * kr * gravity[I];
        df[k * nSpace + I] = rho2 * dkr * gravity[I];
        a[k * nSpace2 + I * nSpace + I] = rho * kr;
        da[k * nSpace2 + I * nSpace + I] = rho * dkr;
      }
    }
  }
}


x86 assembly (clang, -O0):
<conservativeHeadRichardsJLeverett>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe5e(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    16a7 <conservativeHeadRichardsJLeverett+0x587>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1694 <conservativeHeadRichardsJLeverett+0x574>
mov    -0x3c(%rbp),%eax
imul   -0x8(%rbp),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    144e <conservativeHeadRichardsJLeverett+0x32e>
movsd  -0x58(%rbp),%xmm1
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    144e <conservativeHeadRichardsJLeverett+0x32e>
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd97(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xd79(%rip),%xmm2
subsd  (%rax,%rcx,8),%xmm2
mov    0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mov    0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xd3d(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xcfc(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xc7a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xc4a(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xbf6(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    14ee <conservativeHeadRichardsJLeverett+0x3ce>
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jb     14b2 <conservativeHeadRichardsJLeverett+0x392>
movsd  0xba4(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xb8f(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xb65(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    14e9 <conservativeHeadRichardsJLeverett+0x3c9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xb24(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    14ee <conservativeHeadRichardsJLeverett+0x3ce>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mov    0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x68(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x68(%rbp),%xmm1
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1681 <conservativeHeadRichardsJLeverett+0x561>
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x58(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
mov    0x68(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x50(%rbp),%ecx
mov    -0x48(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    0x70(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x50(%rbp),%ecx
mov    -0x48(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    15b5 <conservativeHeadRichardsJLeverett+0x495>
jmp    1686 <conservativeHeadRichardsJLeverett+0x566>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11d2 <conservativeHeadRichardsJLeverett+0xb2>
jmp    1699 <conservativeHeadRichardsJLeverett+0x579>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11b1 <conservativeHeadRichardsJLeverett+0x91>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conservativeHeadRichardsJLeverett>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    %r9,0xd8(%rsp)
movsd  %xmm1,0x70(%rsp)
movsd  %xmm0,0x38(%rsp)
mov    %rcx,0xa0(%rsp)
mov    %edx,0xc(%rsp)
mov    %esi,0x8(%rsp)
test   %edi,%edi
jle    16fb <conservativeHeadRichardsJLeverett+0x5db>
mov    %r8,%rbx
mov    0x1d0(%rsp),%rax
mov    %rax,0x68(%rsp)
mov    0x1c8(%rsp),%rax
mov    %rax,0x60(%rsp)
movsd  0x38(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0xc0(%rsp)
movslq 0xc(%rsp),%rcx
mov    0x8(%rsp),%eax
movslq %eax,%rdx
mov    %edi,%esi
mov    %rsi,0xb0(%rsp)
mov    %ecx,%r13d
mov    %ecx,%esi
imul   %ecx,%esi
mov    %esi,0x48(%rsp)
imul   %eax,%esi
mov    %esi,0x44(%rsp)
lea    0x1(%rcx),%r14d
mov    %rcx,%rax
imul   %rdx,%rax
shl    $0x3,%rax
mov    %rax,0xa8(%rsp)
shl    $0x3,%rcx
mov    %rcx,0xd0(%rsp)
mov    %rdx,0x98(%rsp)
mov    %edx,%eax
mov    %rax,0xc8(%rsp)
xor    %eax,%eax
mov    %rax,0x30(%rsp)
xor    %eax,%eax
mov    %rax,0x28(%rsp)
jmp    123f <conservativeHeadRichardsJLeverett+0x11f>
nopl   0x0(%rax,%rax,1)
mov    0x28(%rsp),%rcx
add    $0x1,%rcx
mov    0x30(%rsp),%rax
add    0x44(%rsp),%eax
mov    %rax,0x30(%rsp)
mov    0xa8(%rsp),%rax
add    %rax,0x60(%rsp)
add    %rax,0x68(%rsp)
mov    %rcx,%rax
mov    %rcx,0x28(%rsp)
cmp    0xb0(%rsp),%rcx
je     16fb <conservativeHeadRichardsJLeverett+0x5db>
cmpl   $0x0,0x8(%rsp)
jle    1200 <conservativeHeadRichardsJLeverett+0xe0>
mov    0xa0(%rsp),%rax
mov    0x28(%rsp),%rcx
movslq (%rax,%rcx,4),%r15
imul   0x98(%rsp),%rcx
mov    %rcx,0xe0(%rsp)
mov    0x68(%rsp),%r12
mov    0x60(%rsp),%rbp
mov    0x30(%rsp),%rax
mov    %eax,%edi
xor    %ecx,%ecx
jmp    12ac <conservativeHeadRichardsJLeverett+0x18c>
nopl   (%rax)
mov    0xe8(%rsp),%rcx
add    $0x1,%rcx
add    0x48(%rsp),%edi
mov    0xd0(%rsp),%rax
add    %rax,%rbp
add    %rax,%r12
cmp    0xc8(%rsp),%rcx
je     1200 <conservativeHeadRichardsJLeverett+0xe0>
mov    0xe0(%rsp),%rax
lea    (%rcx,%rax,1),%rdx
mov    0x1b0(%rsp),%rax
mov    %rdx,0x78(%rsp)
movsd  (%rax,%rdx,8),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
mov    %edi,0x4c(%rsp)
mov    %rcx,0xe8(%rsp)
jbe    1570 <conservativeHeadRichardsJLeverett+0x450>
movapd %xmm0,%xmm2
xorpd  0xd10(%rip),%xmm2
mov    0x180(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
ucomisd %xmm2,%xmm1
jbe    1570 <conservativeHeadRichardsJLeverett+0x450>
movapd %xmm2,%xmm0
divsd  %xmm1,%xmm0
mov    0x188(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
movapd %xmm2,0xf0(%rsp)
call   1040 <pow@plt>
movsd  0xcec(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd 0xf0(%rsp),%xmm0
mov    0x180(%rsp),%rax
divsd  (%rax,%r15,8),%xmm0
mov    0x198(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
movaps %xmm1,0x110(%rsp)
mov    0x188(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
movsd  0xcaf(%rip),%xmm2
addsd  %xmm2,%xmm1
mov    0x1a0(%rsp),%rax
movsd  (%rax,%r15,8),%xmm2
movaps %xmm2,0x80(%rsp)
call   1040 <pow@plt>
movapd %xmm0,0x120(%rsp)
mov    0x1a8(%rsp),%rax
movsd  (%rax,%r15,8),%xmm0
movsd  %xmm0,0xb8(%rsp)
mov    0x190(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
mov    0x188(%rsp),%rax
movsd  (%rax,%r15,8),%xmm0
movaps %xmm0,0x50(%rsp)
mov    0x180(%rsp),%rax
movsd  (%rax,%r15,8),%xmm0
movaps %xmm0,0x130(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,(%rsp)
mov    0x190(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
addsd  0xc13(%rip),%xmm1
movaps 0xbec(%rip),%xmm0
mov    0x1a8(%rsp),%rax
movhps (%rax,%r15,8),%xmm0
movaps %xmm0,0x100(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
movapd 0x110(%rsp),%xmm2
movapd %xmm2,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x100(%rsp),%xmm1
movsd  0xbba(%rip),%xmm0
subsd  %xmm2,%xmm0
movapd %xmm2,%xmm3
movapd 0x80(%rsp),%xmm2
mov    0x190(%rsp),%rax
movhpd (%rax,%r15,8),%xmm2
shufpd $0x2,%xmm1,%xmm0
subpd  %xmm2,%xmm0
mulpd  %xmm1,%xmm2
movsd  %xmm0,%xmm2
movapd %xmm2,0x80(%rsp)
mulsd  0x10(%rsp),%xmm0
addsd  %xmm3,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xb8(%rsp),%xmm0
addsd  0xb63(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    0x180(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
movapd 0xf0(%rsp),%xmm0
divsd  %xmm1,%xmm0
mov    0x188(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
addsd  0xb35(%rip),%xmm1
call   1040 <pow@plt>
movapd 0x120(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x80(%rsp),%xmm1
mov    0x188(%rsp),%rax
movapd 0x50(%rsp),%xmm0
movhpd (%rax,%r15,8),%xmm0
mulpd  %xmm1,%xmm0
mov    0x180(%rsp),%rax
movapd 0x130(%rsp),%xmm1
movhpd (%rax,%r15,8),%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,0x50(%rsp)
mov    0x1b0(%rsp),%rax
mov    0x78(%rsp),%rcx
movsd  (%rax,%rcx,8),%xmm0
jmp    15f1 <conservativeHeadRichardsJLeverett+0x4d1>
cs nopw 0x0(%rax,%rax,1)
ucomisd 0xac0(%rip),%xmm0
jae    15b0 <conservativeHeadRichardsJLeverett+0x490>
mov    0x198(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
movaps %xmm1,0x10(%rsp)
xorps  %xmm1,%xmm1
movaps %xmm1,0x50(%rsp)
movsd  0xa8b(%rip),%xmm1
movsd  %xmm1,(%rsp)
jmp    15f1 <conservativeHeadRichardsJLeverett+0x4d1>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0xa68(%rip),%xmm1
mov    0x1a0(%rsp),%rax
subsd  (%rax,%r15,8),%xmm1
movapd %xmm1,0x10(%rsp)
mov    0x1a8(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
addsd  0xa46(%rip),%xmm1
movsd  %xmm1,(%rsp)
xorpd  %xmm1,%xmm1
movapd %xmm1,0x50(%rsp)
mulsd  0x70(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x38(%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  0x70(%rsp),%xmm1
movapd 0x10(%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
mov    0xd8(%rsp),%rax
mulsd  (%rax,%r15,8),%xmm2
mov    0x1b8(%rsp),%rcx
mov    0x78(%rsp),%rdx
movsd  %xmm2,(%rcx,%rdx,8)
movapd 0x50(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movsd  (%rax,%r15,8),%xmm2
mulsd  %xmm4,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x1c0(%rsp),%rax
movsd  %xmm0,(%rax,%rdx,8)
cmpl   $0x0,0xc(%rsp)
mov    0x1e0(%rsp),%rdx
mov    0x1d8(%rsp),%rsi
mov    0x4c(%rsp),%edi
movsd  (%rsp),%xmm4
jle    1280 <conservativeHeadRichardsJLeverett+0x160>
movsd  0xc0(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm4,%xmm0
unpckhpd %xmm3,%xmm3
mulsd  %xmm3,%xmm1
movsd  0x38(%rsp),%xmm2
mulsd  %xmm2,%xmm4
mulsd  %xmm2,%xmm3
mov    %edi,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x0(%rbp,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%r12,%rcx,8)
cltq
movsd  %xmm4,(%rsi,%rax,8)
movsd  %xmm3,(%rdx,%rax,8)
add    $0x1,%rcx
add    %r14d,%eax
cmp    %rcx,%r13
jne    16c0 <conservativeHeadRichardsJLeverett+0x5a0>
jmp    1280 <conservativeHeadRichardsJLeverett+0x160>
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @conservativeHeadRichardsJLeverett(i32 %0, i32 %1, i32 %2, i32* nocapture %3, double %4, double %5, double* nocapture %6, double* nocapture %7, double* nocapture %8, double* nocapture %9, double* nocapture %10, double* nocapture %11, double* nocapture %12, double* nocapture %13, double* nocapture %14, double* nocapture writeonly %15, double* nocapture writeonly %16, double* nocapture writeonly %17, double* nocapture writeonly %18, double* nocapture writeonly %19, double* nocapture writeonly %20) {
%22 = fmul double %4, %4
%23 = icmp sgt i32 %0, 0
br i1 %23, label %24, label %173
24: ; preds = %21
%25 = icmp sgt i32 %1, 0
%26 = icmp sgt i32 %2, 0
%27 = sext i32 %2 to i64
%28 = sext i32 %1 to i64
%29 = zext i32 %0 to i64
%30 = zext i32 %1 to i64
%31 = zext i32 %2 to i64
br label %32
32: ; preds = %24, %170
%33 = phi i64 [ 0, %24 ], [ %171, %170 ]
br i1 %25, label %34, label %170
34: ; preds = %32
%35 = getelementptr inbounds i32, i32* %3, i64 %33
%36 = load i32, i32* %35
%37 = mul nsw i64 %33, %28
%38 = sext i32 %36 to i64
%39 = getelementptr inbounds double, double* %8, i64 %38
%40 = getelementptr inbounds double, double* %12, i64 %38
%41 = getelementptr inbounds double, double* %13, i64 %38
%42 = getelementptr inbounds double, double* %11, i64 %38
%43 = getelementptr inbounds double, double* %9, i64 %38
%44 = getelementptr inbounds double, double* %10, i64 %38
%45 = getelementptr inbounds double, double* %7, i64 %38
br label %46
46: ; preds = %34, %167
%47 = phi i64 [ 0, %34 ], [ %168, %167 ]
%48 = add nsw i64 %47, %37
%49 = getelementptr inbounds double, double* %14, i64 %48
%50 = load double, double* %49
%51 = fneg double %50
%52 = fcmp olt double %50, 0.000000e+00
br i1 %52, label %53, label %109
53: ; preds = %46
%54 = load double, double* %39
%55 = fcmp ogt double %54, %51
br i1 %55, label %56, label %109
56: ; preds = %53
%57 = fdiv double %51, %54
%58 = load double, double* %43
%59 = tail call double @pow(double %57, double %58)
%60 = fsub double 1.000000e+00, %59
%61 = load double, double* %42
%62 = load double, double* %40
%63 = load double, double* %39
%64 = fdiv double %51, %63
%65 = load double, double* %43
%66 = fadd double %65, -1.000000e+00
%67 = tail call double @pow(double %64, double %66)
%68 = load double, double* %43
%69 = load double, double* %39
%70 = load double, double* %41
%71 = load double, double* %44
%72 = tail call double @pow(double %60, double %71)
%73 = load double, double* %41
%74 = load double, double* %44
%75 = fadd double %74, -1.000000e+00
%76 = tail call double @pow(double %60, double %75)
%77 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %73, i64 1
%78 = insertelement <2 x double> poison, double %61, i64 0
%79 = insertelement <2 x double> %78, double %76, i64 1
%80 = fsub <2 x double> %77, %79
%81 = fmul <2 x double> %77, %79
%82 = shufflevector <2 x double> %80, <2 x double> %81, <2 x i32> <i32 0, i32 3>
%83 = load double, double* %44
%84 = insertelement <2 x double> poison, double %62, i64 0
%85 = insertelement <2 x double> %84, double %83, i64 1
%86 = fsub <2 x double> %82, %85
%87 = fmul <2 x double> %82, %85
%88 = shufflevector <2 x double> %86, <2 x double> %87, <2 x i32> <i32 0, i32 3>
%89 = extractelement <2 x double> %86, i64 0
%90 = tail call double @llvm.fmuladd.f64(double %60, double %89, double %61)
%91 = tail call double @llvm.fmuladd.f64(double %70, double %72, double 1.000000e-02)
%92 = load double, double* %39
%93 = fdiv double %51, %92
%94 = load double, double* %43
%95 = fadd double %94, -1.000000e+00
%96 = tail call double @pow(double %93, double %95)
%97 = insertelement <2 x double> poison, double %67, i64 0
%98 = insertelement <2 x double> %97, double %96, i64 1
%99 = fmul <2 x double> %88, %98
%100 = load double, double* %43
%101 = insertelement <2 x double> poison, double %68, i64 0
%102 = insertelement <2 x double> %101, double %100, i64 1
%103 = fmul <2 x double> %99, %102
%104 = load double, double* %39
%105 = insertelement <2 x double> poison, double %69, i64 0
%106 = insertelement <2 x double> %105, double %104, i64 1
%107 = fdiv <2 x double> %103, %106
%108 = load double, double* %49
br label %118
109: ; preds = %53, %46
%110 = fcmp ult double %50, 0.000000e+00
br i1 %110, label %116, label %111
111: ; preds = %109
%112 = load double, double* %40
%113 = fsub double 1.000000e+00, %112
%114 = load double, double* %41
%115 = fadd double %114, 1.000000e-02
br label %118
116: ; preds = %109
%117 = load double, double* %42
br label %118
118: ; preds = %111, %116, %56
%119 = phi double [ %108, %56 ], [ %50, %111 ], [ %50, %116 ]
%120 = phi double [ %90, %56 ], [ %113, %111 ], [ %117, %116 ]
%121 = phi double [ %91, %56 ], [ %115, %111 ], [ 1.000000e-02, %116 ]
%122 = phi <2 x double> [ %107, %56 ], [ zeroinitializer, %111 ], [ zeroinitializer, %116 ]
%123 = fmul double %119, %5
%124 = tail call double @exp(double %123)
%125 = fmul double %124, %4
%126 = fmul double %125, %5
%127 = fmul double %120, %125
%128 = load double, double* %45
%129 = fmul double %128, %127
%130 = getelementptr inbounds double, double* %15, i64 %48
store double %129, double* %130
%131 = extractelement <2 x double> %122, i64 0
%132 = fmul double %131, %125
%133 = load double, double* %45
%134 = fmul double %120, %126
%135 = fmul double %134, %133
%136 = tail call double @llvm.fmuladd.f64(double %132, double %133, double %135)
%137 = getelementptr inbounds double, double* %16, i64 %48
store double %136, double* %137
br i1 %26, label %138, label %167
138: ; preds = %118
%139 = fmul double %22, %121
%140 = mul nsw i64 %48, %27
%141 = extractelement <2 x double> %122, i64 1
%142 = fmul double %22, %141
%143 = fmul double %121, %4
%144 = trunc i64 %48 to i32
%145 = mul i32 %144, %2
%146 = fmul double %141, %4
br label %147
147: ; preds = %138, %147
%148 = phi i64 [ 0, %138 ], [ %165, %147 ]
%149 = getelementptr inbounds double, double* %6, i64 %148
%150 = load double, double* %149
%151 = fmul double %139, %150
%152 = add nsw i64 %148, %140
%153 = getelementptr inbounds double, double* %17, i64 %152
store double %151, double* %153
%154 = load double, double* %149
%155 = fmul double %142, %154
%156 = getelementptr inbounds double, double* %18, i64 %152
store double %155, double* %156
%157 = trunc i64 %148 to i32
%158 = add i32 %145, %157
%159 = mul i32 %158, %2
%160 = trunc i64 %148 to i32
%161 = add i32 %159, %160
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds double, double* %19, i64 %162
store double %143, double* %163
%164 = getelementptr inbounds double, double* %20, i64 %162
store double %146, double* %164
%165 = add nuw nsw i64 %148, 1
%166 = icmp eq i64 %165, %31
br i1 %166, label %167, label %147
167: ; preds = %147, %118
%168 = add nuw nsw i64 %47, 1
%169 = icmp eq i64 %168, %30
br i1 %169, label %170, label %46
170: ; preds = %167, %32
%171 = add nuw nsw i64 %33, 1
%172 = icmp eq i64 %171, %29
br i1 %172, label %173, label %32
173: ; preds = %170, %21
ret void
}