void conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate(
    const int nSimplices, const int nPointsPerSimplex, const int nSpace,
    const double rho, const double *gravity, const double *alpha,
    const double *n, const double *thetaR, const double *thetaSR,
    const double *KWs, double *dV, double *u, double *mass, double *dmass,
    double *f, double *df, double *a, double *da) {
  int k, I, J, eN;
  const int nSpace2 = nSpace * nSpace;
  register double psiC, pcBar, pcBar_n, pcBar_nM1, pcBar_nM2, onePlus_pcBar_n,
      sBar, sqrt_sBar, DsBar_DpsiC, thetaW, DthetaW_DpsiC, vBar, vBar2,
      DvBar_DpsiC, KW, DKW_DpsiC, rho2 = rho * rho;
  register double thetaS, m;
  double mavg, dmavg, vol;
  double favg[3] = {0.0, 0.0, 0.0};
  double dfavg[3] = {0.0, 0.0, 0.0};
  double aavg[3][3] = {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}};
  double daavg[3][3] = {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}};
  for (eN = 0; eN < nSimplices; eN++) {
    mavg = 0.0;
    dmavg = 0.0;
    vol = 0.0;
    for (I = 0; I < nSpace; I++) {
      favg[I] = 0.0;
      dfavg[I] = 0.0;
      for (J = 0; J < nSpace; J++) {
        aavg[I][J] = 0.0;
        daavg[I][J] = 0.0;
      }
    }
    for (k = 0; k < nPointsPerSimplex; k++) {
      psiC = -u[eN * nPointsPerSimplex + k];
      m = 1.0 - 1.0 / n[eN * nPointsPerSimplex + k];
      thetaS = thetaR[eN * nPointsPerSimplex + k] +
               thetaSR[eN * nPointsPerSimplex + k];
      if (psiC > 0.0) {
        pcBar = alpha[eN * nPointsPerSimplex + k] * psiC;
        pcBar_nM2 = pow(pcBar, n[eN * nPointsPerSimplex + k] - 2);
        pcBar_nM1 = pcBar_nM2 * pcBar;
        pcBar_n = pcBar_nM1 * pcBar;
        onePlus_pcBar_n = 1.0 + pcBar_n;
        sBar = pow(onePlus_pcBar_n, -m);
        DsBar_DpsiC = alpha[eN * nPointsPerSimplex + k] *
                      (1.0 - n[eN * nPointsPerSimplex + k]) *
                      (sBar / onePlus_pcBar_n) * pcBar_nM1;
        vBar = 1.0 - pcBar_nM1 * sBar;
        vBar2 = vBar * vBar;
        DvBar_DpsiC = -alpha[eN * nPointsPerSimplex + k] *
                          (n[eN * nPointsPerSimplex + k] - 1.0) * pcBar_nM2 *
                          sBar -
                      pcBar_nM1 * DsBar_DpsiC;
        thetaW = thetaSR[eN * nPointsPerSimplex + k] * sBar +
                 thetaR[eN * nPointsPerSimplex + k];
        DthetaW_DpsiC = thetaSR[eN * nPointsPerSimplex + k] * DsBar_DpsiC;
        sqrt_sBar = sqrt(sBar);
        KW = KWs[eN * nPointsPerSimplex + k] * sqrt_sBar * vBar2;
        DKW_DpsiC = KWs[eN * nPointsPerSimplex + k] *
                    ((0.5 / sqrt_sBar) * DsBar_DpsiC * vBar2 +
                     2.0 * sqrt_sBar * vBar * DvBar_DpsiC);
      } else {
        thetaW = thetaS;
        DthetaW_DpsiC = 0.0;
        KW = KWs[eN * nPointsPerSimplex + k];
        DKW_DpsiC = 0.0;
      }
      vol += dV[eN * nPointsPerSimplex + k];
      mavg += rho * thetaW * dV[eN * nPointsPerSimplex + k];
      dmavg += -rho * DthetaW_DpsiC * dV[eN * nPointsPerSimplex + k];
      dmass[eN * nPointsPerSimplex + k] = -rho * DthetaW_DpsiC;
      for (I = 0; I < nSpace; I++) {
        favg[I] += rho2 * KW * gravity[I] * dV[eN * nPointsPerSimplex + k];
        dfavg[I] +=
            -rho2 * DKW_DpsiC * gravity[I] * dV[eN * nPointsPerSimplex + k];
        df[eN * nPointsPerSimplex * nSpace + k * nSpace + I] =
            -rho2 * DKW_DpsiC * gravity[I];
        J = I;
        aavg[I][J] += rho * KW * dV[eN * nPointsPerSimplex + k];
        daavg[I][J] += -rho * DKW_DpsiC * dV[eN * nPointsPerSimplex + k];
        da[eN * nPointsPerSimplex * nSpace2 + k * nSpace2 + I * nSpace + I] =
            -rho * DKW_DpsiC;
      }
    }
    assert(vol > 0.0);
    for (k = 0; k < nPointsPerSimplex; k++) {
      mass[eN * nPointsPerSimplex + k] = mavg / vol;
      for (I = 0; I < nSpace; I++) {
        f[eN * nPointsPerSimplex * nSpace + k * nSpace + I] = favg[I] / vol;
        a[eN * nPointsPerSimplex * nSpace2 + k * nSpace2 + I * nSpace + I] =
            aavg[I][I] / vol;
      }
    }
  }
}


x86 assembly (clang, -O0):
<conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
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)
movsd  %xmm0,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x44(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0x180(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1030 <memset@plt>
lea    -0x1d0(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1030 <memset@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1b24 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x9e4>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12d0 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x190>
movslq -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x110(%rbp,%rax,8)
ff ff
movslq -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x130(%rbp,%rax,8)
ff ff
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12bd <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x17d>
movslq -0x38(%rbp),%rcx
lea    -0x180(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x38(%rbp),%rcx
lea    -0x1d0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1267 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x127>
jmp    12c2 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x182>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1234 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0xf4>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    19ff <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x8bf>
mov    0x30(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xcd2(%rip),%xmm1
divsd  (%rax,%rcx,8),%xmm1
movsd  0xcc5(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1687 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x547>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xc38(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xbfc(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0xe0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xb95(%rip),%xmm1
subsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x80(%rbp),%xmm1
divsd  -0x78(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xb44(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xad5(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0x18(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x80(%rbp),%xmm2
mov    0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    0x18(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x20(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
mov    0x20(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x9da(%rip),%xmm1
divsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm3
ff
movsd  0x9b2(%rip),%xmm2
mulsd  -0x88(%rbp),%xmm2
ff
mulsd  -0xa8(%rbp),%xmm2
ff
mulsd  -0xb8(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    16cb <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x58b>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x20(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xe8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xf0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mov    0x40(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    19ec <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x8ac>
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x38(%rbp),%rax
movsd  -0x110(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp,%rax,8)
ff ff
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x38(%rbp),%rax
movsd  -0x130(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp,%rax,8)
ff ff
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x38(%rbp),%rcx
lea    -0x180(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x38(%rbp),%rcx
lea    -0x1d0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mov    0x60(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
mov    -0x38(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    17bf <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x67f>
jmp    19f1 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x8b1>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12d7 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x197>
movsd  -0xf8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1b11 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x9d1>
movsd  -0xe8(%rbp),%xmm0
ff
divsd  -0xf8(%rbp),%xmm0
ff
mov    0x38(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1afe <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x9be>
movslq -0x38(%rbp),%rax
movsd  -0x110(%rbp,%rax,8),%xmm0
ff ff
divsd  -0xf8(%rbp),%xmm0
ff
mov    0x48(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x38(%rbp),%rcx
lea    -0x180(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0xf8(%rbp),%xmm0
ff
mov    0x58(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
mov    -0x38(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1a5d <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x91d>
jmp    1b03 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x9c3>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1a24 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x8e4>
jmp    1b16 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x9d6>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1200 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0xc0>
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x228,%rsp
mov    %r9,0x80(%rsp)
mov    %r8,0x128(%rsp)
mov    %rcx,0x60(%rsp)
mov    %esi,0xc(%rsp)
xorpd  %xmm1,%xmm1
movapd %xmm1,0xc0(%rsp)
movq   $0x0,0xd0(%rsp)
movapd %xmm1,0x130(%rsp)
movq   $0x0,0x140(%rsp)
movapd %xmm1,0x180(%rsp)
movapd %xmm1,0x170(%rsp)
movapd %xmm1,0x160(%rsp)
movapd %xmm1,0x150(%rsp)
movq   $0x0,0x190(%rsp)
movapd %xmm1,0x1d0(%rsp)
movapd %xmm1,0x1c0(%rsp)
movapd %xmm1,0x1b0(%rsp)
movapd %xmm1,0x1a0(%rsp)
movq   $0x0,0x1e0(%rsp)
test   %edi,%edi
jle    1a45 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x905>
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd 0xdf0(%rip),%xmm2
movapd %xmm0,%xmm3
xorpd  %xmm2,%xmm3
movapd %xmm1,0x210(%rsp)
xorpd  %xmm2,%xmm1
movapd %xmm1,0x200(%rsp)
mov    %edx,%eax
lea    0x0(,%rax,8),%rbp
mov    %edi,%ecx
mov    %rcx,0x108(%rsp)
lea    -0x1(%rax),%rcx
mov    %rcx,0x100(%rsp)
mov    %eax,%ecx
and    $0x3,%ecx
and    $0xfffffffc,%eax
mov    %rax,0xe0(%rsp)
mov    %rcx,0xf8(%rsp)
lea    0x0(,%rcx,8),%rax
lea    (%rax,%rax,2),%rax
mov    %rax,0xf0(%rsp)
mov    %edx,%eax
imul   %edx,%eax
mov    %eax,0x3c(%rsp)
mov    %eax,%ecx
mov    0xc(%rsp),%eax
imul   %eax,%ecx
mov    %ecx,0x6c(%rsp)
mov    %edx,%ecx
imul   %eax,%ecx
mov    %ecx,0x68(%rsp)
mov    0x278(%rsp),%r12
cltq
mov    %rax,0xe8(%rsp)
mov    %eax,%eax
mov    %rax,0x88(%rsp)
lea    0x1(%rdx),%r15d
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
mov    %rax,0x58(%rsp)
movapd %xmm0,0xa0(%rsp)
mov    %rdx,0x28(%rsp)
movapd %xmm3,0x90(%rsp)
jmp    1335 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x1f5>
nopl   0x0(%rax)
xor    %edi,%edi
xor    %eax,%eax
call   1040 <assert@plt>
mov    0x28(%rsp),%rdx
mov    0x58(%rsp),%rcx
add    $0x1,%rcx
mov    0x4(%rsp),%eax
add    0x6c(%rsp),%eax
mov    %eax,0x4(%rsp)
mov    0x8(%rsp),%eax
add    0x68(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    %rcx,%rax
mov    %rcx,0x58(%rsp)
cmp    0x108(%rsp),%rcx
je     1a45 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x905>
test   %edx,%edx
jle    14e8 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x3a8>
lea    0xc0(%rsp),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
lea    0x130(%rsp),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
cmpq   $0x3,0x100(%rsp)
jae    1380 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x240>
xor    %r14d,%r14d
jmp    146d <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x32d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %r13d,%r13d
xor    %r14d,%r14d
mov    0xe0(%rsp),%rbx
xchg   %ax,%ax
lea    (%rsp,%r13,1),%rdi
add    $0x150,%rdi
lea    (%rsp,%r13,1),%rax
add    $0x1a0,%rax
mov    %rax,0x10(%rsp)
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
mov    0x10(%rsp),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
lea    (%rsp,%r13,1),%rdi
add    $0x168,%rdi
lea    (%rsp,%r13,1),%rax
add    $0x1b8,%rax
mov    %rax,0x10(%rsp)
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
mov    0x10(%rsp),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
lea    (%rsp,%r13,1),%rdi
add    $0x180,%rdi
lea    (%rsp,%r13,1),%rax
add    $0x1d0,%rax
mov    %rax,0x10(%rsp)
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
mov    0x10(%rsp),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
lea    (%rsp,%r13,1),%rdi
add    $0x198,%rdi
lea    (%rsp,%r13,1),%rax
add    $0x1e8,%rax
mov    %rax,0x10(%rsp)
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
mov    0x10(%rsp),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
add    $0x4,%r14
add    $0x60,%r13
cmp    %r14,%rbx
jne    1390 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x250>
cmpq   $0x0,0xf8(%rsp)
mov    0xf0(%rsp),%rcx
je     14e8 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x3a8>
shl    $0x3,%r14
lea    (%r14,%r14,2),%rax
lea    (%rsp,%rax,1),%rdx
add    $0x1a0,%rdx
mov    %rdx,0x10(%rsp)
add    %rsp,%rax
add    $0x150,%rax
mov    %rax,0x50(%rsp)
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x50(%rsp),%rax
lea    (%rax,%rbx,1),%rdi
mov    0x10(%rsp),%rax
lea    (%rax,%rbx,1),%r13
xor    %esi,%esi
mov    %rbp,%rdx
mov    %rcx,%r14
call   1030 <memset@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
mov    %r14,%rcx
add    $0x18,%rbx
cmp    %rbx,%r14
jne    14b0 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x370>
cmpl   $0x0,0xc(%rsp)
jle    12f0 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x1b0>
mov    0x58(%rsp),%rax
imul   0xe8(%rsp),%rax
mov    %rax,0x50(%rsp)
xorpd  %xmm11,%xmm11
mov    0x8(%rsp),%r9d
mov    0x4(%rsp),%edi
xor    %r13d,%r13d
xorpd  %xmm12,%xmm12
mov    0x60(%rsp),%rsi
movapd 0xa0(%rsp),%xmm8
mov    0x28(%rsp),%r8
mov    0x2b0(%rsp),%rbx
movapd 0x90(%rsp),%xmm9
xorpd  %xmm10,%xmm10
jmp    157d <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x43d>
nopl   0x0(%rax)
addsd  %xmm0,%xmm11
mulsd  %xmm8,%xmm13
mulsd  %xmm0,%xmm13
addsd  %xmm13,%xmm12
add    $0x1,%r13
add    0x3c(%rsp),%edi
add    %r8d,%r9d
cmp    0x88(%rsp),%r13
je     1960 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x820>
mov    0x50(%rsp),%rax
lea    (%rax,%r13,1),%r14
mov    0x280(%rsp),%rax
movsd  (%rax,%r14,8),%xmm2
ucomisd %xmm2,%xmm10
jbe    16c0 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x580>
mov    %edi,0x34(%rsp)
mov    %r9d,0x38(%rsp)
movsd  %xmm12,0x40(%rsp)
movsd  %xmm11,0x48(%rsp)
mov    0x80(%rsp),%rax
movsd  (%rax,%r14,8),%xmm1
movapd 0xa34(%rip),%xmm0
xorpd  %xmm0,%xmm2
movsd  0xa38(%rip),%xmm3
divsd  %xmm1,%xmm3
movsd  0xa34(%rip),%xmm0
addsd  %xmm0,%xmm3
movapd %xmm3,0xb0(%rsp)
mov    0x128(%rsp),%rbx
mulsd  (%rbx,%r14,8),%xmm2
movapd %xmm2,0x10(%rsp)
addsd  0xa13(%rip),%xmm1
movapd %xmm2,%xmm0
call   1050 <pow@plt>
movsd  %xmm0,0x78(%rsp)
movapd 0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x70(%rsp)
mulsd  %xmm0,%xmm2
addsd  0x9e0(%rip),%xmm2
movapd 0xb0(%rsp),%xmm1
xorpd  0x9b7(%rip),%xmm1
movapd %xmm2,0x10(%rsp)
movapd %xmm2,%xmm0
call   1050 <pow@plt>
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm14
movsd  (%rbx,%r14,8),%xmm15
mov    0x80(%rsp),%rax
movsd  (%rax,%r14,8),%xmm0
mov    0x268(%rsp),%rax
movsd  (%rax,%r14,8),%xmm5
movapd %xmm5,%xmm13
mulsd  %xmm14,%xmm13
mov    0x260(%rsp),%rax
addsd  (%rax,%r14,8),%xmm13
ucomisd %xmm1,%xmm14
movsd  %xmm0,0xb0(%rsp)
jb     1700 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x5c0>
xorps  %xmm0,%xmm0
sqrtsd %xmm14,%xmm0
jmp    1758 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x618>
nopl   0x0(%rax,%rax,1)
mov    0x260(%rsp),%rax
movsd  (%rax,%r14,8),%xmm13
mov    0x268(%rsp),%rax
addsd  (%rax,%r14,8),%xmm13
mov    0x270(%rsp),%rax
movsd  (%rax,%r14,8),%xmm2
xorpd  %xmm5,%xmm5
xorpd  %xmm1,%xmm1
jmp    185d <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x71d>
nopw   0x0(%rax,%rax,1)
movapd %xmm14,%xmm0
movsd  %xmm13,0x120(%rsp)
movsd  %xmm5,0x118(%rsp)
movsd  %xmm14,0x110(%rsp)
movapd %xmm15,0x1f0(%rsp)
call   1060 <sqrt@plt>
movapd 0x1f0(%rsp),%xmm15
movsd  0x110(%rsp),%xmm14
movsd  0x118(%rsp),%xmm5
movsd  0x120(%rsp),%xmm13
mov    0x60(%rsp),%rsi
movapd 0xa0(%rsp),%xmm8
mov    0x28(%rsp),%r8
mov    0x2b0(%rsp),%rbx
movapd 0x90(%rsp),%xmm9
movsd  0x48(%rsp),%xmm11
movsd  0x40(%rsp),%xmm12
mov    0x38(%rsp),%r9d
mov    0x34(%rsp),%edi
movsd  0x78(%rsp),%xmm6
movsd  0x70(%rsp),%xmm7
movapd 0x10(%rsp),%xmm3
movsd  0x869(%rip),%xmm4
movapd %xmm4,%xmm1
movsd  0xb0(%rsp),%xmm10
subsd  %xmm10,%xmm1
mulsd  %xmm15,%xmm1
movapd %xmm14,%xmm2
divsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm7,%xmm2
mulsd  %xmm2,%xmm5
movsd  0x844(%rip),%xmm1
divsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm2,%xmm3
mulsd  %xmm7,%xmm3
mulsd  %xmm14,%xmm7
subsd  %xmm7,%xmm4
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm4,%xmm4
xorpd  0x7ea(%rip),%xmm15
addsd  0x7f1(%rip),%xmm10
mulsd  %xmm15,%xmm10
mulsd  %xmm10,%xmm6
mulsd  %xmm14,%xmm6
subsd  %xmm3,%xmm6
mov    0x270(%rsp),%rax
movsd  (%rax,%r14,8),%xmm3
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm2
mulsd  %xmm6,%xmm0
mulsd  %xmm4,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm1
xorpd  %xmm10,%xmm10
movsd  (%r12,%r14,8),%xmm0
mulsd  %xmm9,%xmm5
mov    0x290(%rsp),%rax
movsd  %xmm5,(%rax,%r14,8)
test   %r8d,%r8d
jle    1550 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x410>
movslq %r9d,%rax
mov    0x2a0(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
movapd 0x210(%rsp),%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm1,%xmm4
mulsd  0x200(%rsp),%xmm4
mulsd  %xmm8,%xmm2
mulsd  %xmm9,%xmm1
xor    %ecx,%ecx
mov    %edi,%edx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,1),%xmm5
movapd %xmm3,%xmm6
mulsd  %xmm5,%xmm6
movsd  (%r12,%r14,8),%xmm7
mulsd  %xmm7,%xmm6
addsd  0xc0(%rsp,%rcx,1),%xmm6
movsd  %xmm6,0xc0(%rsp,%rcx,1)
mulsd  %xmm4,%xmm5
mulsd  %xmm5,%xmm7
addsd  0x130(%rsp,%rcx,1),%xmm7
movsd  %xmm7,0x130(%rsp,%rcx,1)
movsd  %xmm5,(%rax,%rcx,1)
movsd  (%r12,%r14,8),%xmm5
movapd %xmm2,%xmm6
mulsd  %xmm5,%xmm6
addsd  0x150(%rsp,%rcx,4),%xmm6
movsd  %xmm6,0x150(%rsp,%rcx,4)
mulsd  %xmm1,%xmm5
addsd  0x1a0(%rsp,%rcx,4),%xmm5
movsd  %xmm5,0x1a0(%rsp,%rcx,4)
movslq %edx,%rdx
movsd  %xmm1,(%rbx,%rdx,8)
add    %r15d,%edx
add    $0x8,%rcx
cmp    %rcx,%rbp
jne    18c0 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x780>
jmp    1550 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x410>
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
ucomisd %xmm10,%xmm11
seta   %dil
xor    %eax,%eax
movsd  %xmm11,0x48(%rsp)
movsd  %xmm12,0x40(%rsp)
call   1040 <assert@plt>
movsd  0x40(%rsp),%xmm4
movsd  0x48(%rsp),%xmm2
mov    0x28(%rsp),%rdx
cmpl   $0x0,0xc(%rsp)
mov    0x2a8(%rsp),%rcx
mov    0x298(%rsp),%r10
mov    0x288(%rsp),%r11
jle    12fe <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x1be>
divsd  %xmm2,%xmm4
mov    0x8(%rsp),%r8d
mov    0x4(%rsp),%r9d
xor    %eax,%eax
jmp    19ea <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x8aa>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rax
add    0x3c(%rsp),%r9d
add    %edx,%r8d
cmp    0x88(%rsp),%rax
je     12fe <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x1be>
mov    0x50(%rsp),%rsi
add    %rax,%rsi
movsd  %xmm4,(%r11,%rsi,8)
test   %edx,%edx
jle    19d0 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x890>
movslq %r8d,%rsi
lea    (%r10,%rsi,8),%rsi
xor    %edi,%edi
mov    %r9d,%ebx
nopl   0x0(%rax,%rax,1)
movsd  0xc0(%rsp,%rdi,1),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rsi,%rdi,1)
movsd  0x150(%rsp,%rdi,4),%xmm1
divsd  %xmm2,%xmm1
movslq %ebx,%rbx
movsd  %xmm1,(%rcx,%rbx,8)
add    %r15d,%ebx
add    $0x8,%rdi
cmp    %rdi,%rbp
jne    1a10 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x8d0>
jmp    19d0 <conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate+0x890>
add    $0x228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @conservativeHeadRichardsL2projMualemVanGenuchtenHetEvaluate(i32 %0, i32 %1, i32 %2, double %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) {
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca double
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double*
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
%32 = alloca double*
%33 = alloca double*
%34 = alloca double*
%35 = alloca double*
%36 = alloca double*
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%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 [3 x double]
%65 = alloca [3 x double]
%66 = alloca [3 x [3 x double]]
%67 = alloca [3 x [3 x double]]
store i32 %0, i32* %19
store i32 %1, i32* %20
store i32 %2, i32* %21
store double %3, double* %22
store double* %4, double** %23
store double* %5, double** %24
store double* %6, double** %25
store double* %7, double** %26
store double* %8, double** %27
store double* %9, double** %28
store double* %10, double** %29
store double* %11, double** %30
store double* %12, double** %31
store double* %13, double** %32
store double* %14, double** %33
store double* %15, double** %34
store double* %16, double** %35
store double* %17, double** %36
%68 = load i32, i32* %21
%69 = load i32, i32* %21
%70 = mul nsw i32 %68, %69
store i32 %70, i32* %41
%71 = load double, double* %22
%72 = load double, double* %22
%73 = fmul double %71, %72
store double %73, double* %58
%74 = bitcast [3 x double]* %64 to i8*
%75 = bitcast [3 x double]* %65 to i8*
%76 = bitcast [3 x [3 x double]]* %66 to i8*
%77 = bitcast [3 x [3 x double]]* %67 to i8*
store i32 0, i32* %40
br label %78
78: ; preds = %624, %18
%79 = load i32, i32* %40
%80 = load i32, i32* %19
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %627
82: ; preds = %78
store double 0.000000e+00, double* %61
store double 0.000000e+00, double* %62
store double 0.000000e+00, double* %63
store i32 0, i32* %38
br label %83
83: ; preds = %115, %82
%84 = load i32, i32* %38
%85 = load i32, i32* %21
%86 = icmp slt i32 %84, %85
br i1 %86, label %87, label %118
87: ; preds = %83
%88 = load i32, i32* %38
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [3 x double], [3 x double]* %64, i64 0, i64 %89
store double 0.000000e+00, double* %90
%91 = load i32, i32* %38
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [3 x double], [3 x double]* %65, i64 0, i64 %92
store double 0.000000e+00, double* %93
store i32 0, i32* %39
br label %94
94: ; preds = %111, %87
%95 = load i32, i32* %39
%96 = load i32, i32* %21
%97 = icmp slt i32 %95, %96
br i1 %97, label %98, label %114
98: ; preds = %94
%99 = load i32, i32* %38
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %66, i64 0, i64 %100
%102 = load i32, i32* %39
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [3 x double], [3 x double]* %101, i64 0, i64 %103
store double 0.000000e+00, double* %104
%105 = load i32, i32* %38
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %67, i64 0, i64 %106
%108 = load i32, i32* %39
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [3 x double], [3 x double]* %107, i64 0, i64 %109
store double 0.000000e+00, double* %110
br label %111
111: ; preds = %98
%112 = load i32, i32* %39
%113 = add nsw i32 %112, 1
store i32 %113, i32* %39
br label %94
114: ; preds = %94
br label %115
115: ; preds = %114
%116 = load i32, i32* %38
%117 = add nsw i32 %116, 1
store i32 %117, i32* %38
br label %83
118: ; preds = %83
store i32 0, i32* %37
br label %119
119: ; preds = %540, %118
%120 = load i32, i32* %37
%121 = load i32, i32* %20
%122 = icmp slt i32 %120, %121
br i1 %122, label %123, label %543
123: ; preds = %119
%124 = load double*, double** %30
%125 = load i32, i32* %40
%126 = load i32, i32* %20
%127 = mul nsw i32 %125, %126
%128 = load i32, i32* %37
%129 = add nsw i32 %127, %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %124, i64 %130
%132 = load double, double* %131
%133 = fneg double %132
store double %133, double* %42
%134 = load double*, double** %25
%135 = load i32, i32* %40
%136 = load i32, i32* %20
%137 = mul nsw i32 %135, %136
%138 = load i32, i32* %37
%139 = add nsw i32 %137, %138
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %134, i64 %140
%142 = load double, double* %141
%143 = fdiv double 1.000000e+00, %142
%144 = fsub double 1.000000e+00, %143
store double %144, double* %60
%145 = load double*, double** %26
%146 = load i32, i32* %40
%147 = load i32, i32* %20
%148 = mul nsw i32 %146, %147
%149 = load i32, i32* %37
%150 = add nsw i32 %148, %149
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %145, i64 %151
%153 = load double, double* %152
%154 = load double*, double** %27
%155 = load i32, i32* %40
%156 = load i32, i32* %20
%157 = mul nsw i32 %155, %156
%158 = load i32, i32* %37
%159 = add nsw i32 %157, %158
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %154, i64 %160
%162 = load double, double* %161
%163 = fadd double %153, %162
store double %163, double* %59
%164 = load double, double* %42
%165 = fcmp ogt double %164, 0.000000e+00
br i1 %165, label %166, label %332
166: ; preds = %123
%167 = load double*, double** %24
%168 = load i32, i32* %40
%169 = load i32, i32* %20
%170 = mul nsw i32 %168, %169
%171 = load i32, i32* %37
%172 = add nsw i32 %170, %171
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %167, i64 %173
%175 = load double, double* %174
%176 = load double, double* %42
%177 = fmul double %175, %176
store double %177, double* %43
%178 = load double, double* %43
%179 = load double*, double** %25
%180 = load i32, i32* %40
%181 = load i32, i32* %20
%182 = mul nsw i32 %180, %181
%183 = load i32, i32* %37
%184 = add nsw i32 %182, %183
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %179, i64 %185
%187 = load double, double* %186
%188 = fsub double %187, 2.000000e+00
%189 = call double @pow(double %178, double %188)
store double %189, double* %46
%190 = load double, double* %46
%191 = load double, double* %43
%192 = fmul double %190, %191
store double %192, double* %45
%193 = load double, double* %45
%194 = load double, double* %43
%195 = fmul double %193, %194
store double %195, double* %44
%196 = load double, double* %44
%197 = fadd double 1.000000e+00, %196
store double %197, double* %47
%198 = load double, double* %47
%199 = load double, double* %60
%200 = fneg double %199
%201 = call double @pow(double %198, double %200)
store double %201, double* %48
%202 = load double*, double** %24
%203 = load i32, i32* %40
%204 = load i32, i32* %20
%205 = mul nsw i32 %203, %204
%206 = load i32, i32* %37
%207 = add nsw i32 %205, %206
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %202, i64 %208
%210 = load double, double* %209
%211 = load double*, double** %25
%212 = load i32, i32* %40
%213 = load i32, i32* %20
%214 = mul nsw i32 %212, %213
%215 = load i32, i32* %37
%216 = add nsw i32 %214, %215
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double, double* %211, i64 %217
%219 = load double, double* %218
%220 = fsub double 1.000000e+00, %219
%221 = fmul double %210, %220
%222 = load double, double* %48
%223 = load double, double* %47
%224 = fdiv double %222, %223
%225 = fmul double %221, %224
%226 = load double, double* %45
%227 = fmul double %225, %226
store double %227, double* %50
%228 = load double, double* %45
%229 = load double, double* %48
%230 = fneg double %228
%231 = call double @llvm.fmuladd.f64(double %230, double %229, double 1.000000e+00)
store double %231, double* %53
%232 = load double, double* %53
%233 = load double, double* %53
%234 = fmul double %232, %233
store double %234, double* %54
%235 = load double*, double** %24
%236 = load i32, i32* %40
%237 = load i32, i32* %20
%238 = mul nsw i32 %236, %237
%239 = load i32, i32* %37
%240 = add nsw i32 %238, %239
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double, double* %235, i64 %241
%243 = load double, double* %242
%244 = fneg double %243
%245 = load double*, double** %25
%246 = load i32, i32* %40
%247 = load i32, i32* %20
%248 = mul nsw i32 %246, %247
%249 = load i32, i32* %37
%250 = add nsw i32 %248, %249
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds double, double* %245, i64 %251
%253 = load double, double* %252
%254 = fsub double %253, 1.000000e+00
%255 = fmul double %244, %254
%256 = load double, double* %46
%257 = fmul double %255, %256
%258 = load double, double* %48
%259 = load double, double* %45
%260 = load double, double* %50
%261 = fmul double %259, %260
%262 = fneg double %261
%263 = call double @llvm.fmuladd.f64(double %257, double %258, double %262)
store double %263, double* %55
%264 = load double*, double** %27
%265 = load i32, i32* %40
%266 = load i32, i32* %20
%267 = mul nsw i32 %265, %266
%268 = load i32, i32* %37
%269 = add nsw i32 %267, %268
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds double, double* %264, i64 %270
%272 = load double, double* %271
%273 = load double, double* %48
%274 = load double*, double** %26
%275 = load i32, i32* %40
%276 = load i32, i32* %20
%277 = mul nsw i32 %275, %276
%278 = load i32, i32* %37
%279 = add nsw i32 %277, %278
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds double, double* %274, i64 %280
%282 = load double, double* %281
%283 = call double @llvm.fmuladd.f64(double %272, double %273, double %282)
store double %283, double* %51
%284 = load double*, double** %27
%285 = load i32, i32* %40
%286 = load i32, i32* %20
%287 = mul nsw i32 %285, %286
%288 = load i32, i32* %37
%289 = add nsw i32 %287, %288
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds double, double* %284, i64 %290
%292 = load double, double* %291
%293 = load double, double* %50
%294 = fmul double %292, %293
store double %294, double* %52
%295 = load double, double* %48
%296 = call double @sqrt(double %295)
store double %296, double* %49
%297 = load double*, double** %28
%298 = load i32, i32* %40
%299 = load i32, i32* %20
%300 = mul nsw i32 %298, %299
%301 = load i32, i32* %37
%302 = add nsw i32 %300, %301
%303 = sext i32 %302 to i64
%304 = getelementptr inbounds double, double* %297, i64 %303
%305 = load double, double* %304
%306 = load double, double* %49
%307 = fmul double %305, %306
%308 = load double, double* %54
%309 = fmul double %307, %308
store double %309, double* %56
%310 = load double*, double** %28
%311 = load i32, i32* %40
%312 = load i32, i32* %20
%313 = mul nsw i32 %311, %312
%314 = load i32, i32* %37
%315 = add nsw i32 %313, %314
%316 = sext i32 %315 to i64
%317 = getelementptr inbounds double, double* %310, i64 %316
%318 = load double, double* %317
%319 = load double, double* %49
%320 = fdiv double 5.000000e-01, %319
%321 = load double, double* %50
%322 = fmul double %320, %321
%323 = load double, double* %54
%324 = load double, double* %49
%325 = fmul double 2.000000e+00, %324
%326 = load double, double* %53
%327 = fmul double %325, %326
%328 = load double, double* %55
%329 = fmul double %327, %328
%330 = call double @llvm.fmuladd.f64(double %322, double %323, double %329)
%331 = fmul double %318, %330
store double %331, double* %57
br label %343
332: ; preds = %123
%333 = load double, double* %59
store double %333, double* %51
store double 0.000000e+00, double* %52
%334 = load double*, double** %28
%335 = load i32, i32* %40
%336 = load i32, i32* %20
%337 = mul nsw i32 %335, %336
%338 = load i32, i32* %37
%339 = add nsw i32 %337, %338
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds double, double* %334, i64 %340
%342 = load double, double* %341
store double %342, double* %56
store double 0.000000e+00, double* %57
br label %343
343: ; preds = %332, %166
%344 = load double*, double** %29
%345 = load i32, i32* %40
%346 = load i32, i32* %20
%347 = mul nsw i32 %345, %346
%348 = load i32, i32* %37
%349 = add nsw i32 %347, %348
%350 = sext i32 %349 to i64
%351 = getelementptr inbounds double, double* %344, i64 %350
%352 = load double, double* %351
%353 = load double, double* %63
%354 = fadd double %353, %352
store double %354, double* %63
%355 = load double, double* %22
%356 = load double, double* %51
%357 = fmul double %355, %356
%358 = load double*, double** %29
%359 = load i32, i32* %40
%360 = load i32, i32* %20
%361 = mul nsw i32 %359, %360
%362 = load i32, i32* %37
%363 = add nsw i32 %361, %362
%364 = sext i32 %363 to i64
%365 = getelementptr inbounds double, double* %358, i64 %364
%366 = load double, double* %365
%367 = load double, double* %61
%368 = call double @llvm.fmuladd.f64(double %357, double %366, double %367)
store double %368, double* %61
%369 = load double, double* %22
%370 = fneg double %369
%371 = load double, double* %52
%372 = fmul double %370, %371
%373 = load double*, double** %29
%374 = load i32, i32* %40
%375 = load i32, i32* %20
%376 = mul nsw i32 %374, %375
%377 = load i32, i32* %37
%378 = add nsw i32 %376, %377
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds double, double* %373, i64 %379
%381 = load double, double* %380
%382 = load double, double* %62
%383 = call double @llvm.fmuladd.f64(double %372, double %381, double %382)
store double %383, double* %62
%384 = load double, double* %22
%385 = fneg double %384
%386 = load double, double* %52
%387 = fmul double %385, %386
%388 = load double*, double** %32
%389 = load i32, i32* %40
%390 = load i32, i32* %20
%391 = mul nsw i32 %389, %390
%392 = load i32, i32* %37
%393 = add nsw i32 %391, %392
%394 = sext i32 %393 to i64
%395 = getelementptr inbounds double, double* %388, i64 %394
store double %387, double* %395
store i32 0, i32* %38
br label %396
396: ; preds = %536, %343
%397 = load i32, i32* %38
%398 = load i32, i32* %21
%399 = icmp slt i32 %397, %398
br i1 %399, label %400, label %539
400: ; preds = %396
%401 = load double, double* %58
%402 = load double, double* %56
%403 = fmul double %401, %402
%404 = load double*, double** %23
%405 = load i32, i32* %38
%406 = sext i32 %405 to i64
%407 = getelementptr inbounds double, double* %404, i64 %406
%408 = load double, double* %407
%409 = fmul double %403, %408
%410 = load double*, double** %29
%411 = load i32, i32* %40
%412 = load i32, i32* %20
%413 = mul nsw i32 %411, %412
%414 = load i32, i32* %37
%415 = add nsw i32 %413, %414
%416 = sext i32 %415 to i64
%417 = getelementptr inbounds double, double* %410, i64 %416
%418 = load double, double* %417
%419 = load i32, i32* %38
%420 = sext i32 %419 to i64
%421 = getelementptr inbounds [3 x double], [3 x double]* %64, i64 0, i64 %420
%422 = load double, double* %421
%423 = call double @llvm.fmuladd.f64(double %409, double %418, double %422)
store double %423, double* %421
%424 = load double, double* %58
%425 = fneg double %424
%426 = load double, double* %57
%427 = fmul double %425, %426
%428 = load double*, double** %23
%429 = load i32, i32* %38
%430 = sext i32 %429 to i64
%431 = getelementptr inbounds double, double* %428, i64 %430
%432 = load double, double* %431
%433 = fmul double %427, %432
%434 = load double*, double** %29
%435 = load i32, i32* %40
%436 = load i32, i32* %20
%437 = mul nsw i32 %435, %436
%438 = load i32, i32* %37
%439 = add nsw i32 %437, %438
%440 = sext i32 %439 to i64
%441 = getelementptr inbounds double, double* %434, i64 %440
%442 = load double, double* %441
%443 = load i32, i32* %38
%444 = sext i32 %443 to i64
%445 = getelementptr inbounds [3 x double], [3 x double]* %65, i64 0, i64 %444
%446 = load double, double* %445
%447 = call double @llvm.fmuladd.f64(double %433, double %442, double %446)
store double %447, double* %445
%448 = load double, double* %58
%449 = fneg double %448
%450 = load double, double* %57
%451 = fmul double %449, %450
%452 = load double*, double** %23
%453 = load i32, i32* %38
%454 = sext i32 %453 to i64
%455 = getelementptr inbounds double, double* %452, i64 %454
%456 = load double, double* %455
%457 = fmul double %451, %456
%458 = load double*, double** %34
%459 = load i32, i32* %40
%460 = load i32, i32* %20
%461 = mul nsw i32 %459, %460
%462 = load i32, i32* %21
%463 = mul nsw i32 %461, %462
%464 = load i32, i32* %37
%465 = load i32, i32* %21
%466 = mul nsw i32 %464, %465
%467 = add nsw i32 %463, %466
%468 = load i32, i32* %38
%469 = add nsw i32 %467, %468
%470 = sext i32 %469 to i64
%471 = getelementptr inbounds double, double* %458, i64 %470
store double %457, double* %471
%472 = load i32, i32* %38
store i32 %472, i32* %39
%473 = load double, double* %22
%474 = load double, double* %56
%475 = fmul double %473, %474
%476 = load double*, double** %29
%477 = load i32, i32* %40
%478 = load i32, i32* %20
%479 = mul nsw i32 %477, %478
%480 = load i32, i32* %37
%481 = add nsw i32 %479, %480
%482 = sext i32 %481 to i64
%483 = getelementptr inbounds double, double* %476, i64 %482
%484 = load double, double* %483
%485 = load i32, i32* %38
%486 = sext i32 %485 to i64
%487 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %66, i64 0, i64 %486
%488 = load i32, i32* %39
%489 = sext i32 %488 to i64
%490 = getelementptr inbounds [3 x double], [3 x double]* %487, i64 0, i64 %489
%491 = load double, double* %490
%492 = call double @llvm.fmuladd.f64(double %475, double %484, double %491)
store double %492, double* %490
%493 = load double, double* %22
%494 = fneg double %493
%495 = load double, double* %57
%496 = fmul double %494, %495
%497 = load double*, double** %29
%498 = load i32, i32* %40
%499 = load i32, i32* %20
%500 = mul nsw i32 %498, %499
%501 = load i32, i32* %37
%502 = add nsw i32 %500, %501
%503 = sext i32 %502 to i64
%504 = getelementptr inbounds double, double* %497, i64 %503
%505 = load double, double* %504
%506 = load i32, i32* %38
%507 = sext i32 %506 to i64
%508 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %67, i64 0, i64 %507
%509 = load i32, i32* %39
%510 = sext i32 %509 to i64
%511 = getelementptr inbounds [3 x double], [3 x double]* %508, i64 0, i64 %510
%512 = load double, double* %511
%513 = call double @llvm.fmuladd.f64(double %496, double %505, double %512)
store double %513, double* %511
%514 = load double, double* %22
%515 = fneg double %514
%516 = load double, double* %57
%517 = fmul double %515, %516
%518 = load double*, double** %36
%519 = load i32, i32* %40
%520 = load i32, i32* %20
%521 = mul nsw i32 %519, %520
%522 = load i32, i32* %41
%523 = mul nsw i32 %521, %522
%524 = load i32, i32* %37
%525 = load i32, i32* %41
%526 = mul nsw i32 %524, %525
%527 = add nsw i32 %523, %526
%528 = load i32, i32* %38
%529 = load i32, i32* %21
%530 = mul nsw i32 %528, %529
%531 = add nsw i32 %527, %530
%532 = load i32, i32* %38
%533 = add nsw i32 %531, %532
%534 = sext i32 %533 to i64
%535 = getelementptr inbounds double, double* %518, i64 %534
store double %517, double* %535
br label %536
536: ; preds = %400
%537 = load i32, i32* %38
%538 = add nsw i32 %537, 1
store i32 %538, i32* %38
br label %396
539: ; preds = %396
br label %540
540: ; preds = %539
%541 = load i32, i32* %37
%542 = add nsw i32 %541, 1
store i32 %542, i32* %37
br label %119
543: ; preds = %119
%544 = load double, double* %63
%545 = fcmp ogt double %544, 0.000000e+00
%546 = zext i1 %545 to i32
%547 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %546)
store i32 0, i32* %37
br label %548
548: ; preds = %620, %543
%549 = load i32, i32* %37
%550 = load i32, i32* %20
%551 = icmp slt i32 %549, %550
br i1 %551, label %552, label %623
552: ; preds = %548
%553 = load double, double* %61
%554 = load double, double* %63
%555 = fdiv double %553, %554
%556 = load double*, double** %31
%557 = load i32, i32* %40
%558 = load i32, i32* %20
%559 = mul nsw i32 %557, %558
%560 = load i32, i32* %37
%561 = add nsw i32 %559, %560
%562 = sext i32 %561 to i64
%563 = getelementptr inbounds double, double* %556, i64 %562
store double %555, double* %563
store i32 0, i32* %38
br label %564
564: ; preds = %616, %552
%565 = load i32, i32* %38
%566 = load i32, i32* %21
%567 = icmp slt i32 %565, %566
br i1 %567, label %568, label %619
568: ; preds = %564
%569 = load i32, i32* %38
%570 = sext i32 %569 to i64
%571 = getelementptr inbounds [3 x double], [3 x double]* %64, i64 0, i64 %570
%572 = load double, double* %571
%573 = load double, double* %63
%574 = fdiv double %572, %573
%575 = load double*, double** %33
%576 = load i32, i32* %40
%577 = load i32, i32* %20
%578 = mul nsw i32 %576, %577
%579 = load i32, i32* %21
%580 = mul nsw i32 %578, %579
%581 = load i32, i32* %37
%582 = load i32, i32* %21
%583 = mul nsw i32 %581, %582
%584 = add nsw i32 %580, %583
%585 = load i32, i32* %38
%586 = add nsw i32 %584, %585
%587 = sext i32 %586 to i64
%588 = getelementptr inbounds double, double* %575, i64 %587
store double %574, double* %588
%589 = load i32, i32* %38
%590 = sext i32 %589 to i64
%591 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %66, i64 0, i64 %590
%592 = load i32, i32* %38
%593 = sext i32 %592 to i64
%594 = getelementptr inbounds [3 x double], [3 x double]* %591, i64 0, i64 %593
%595 = load double, double* %594
%596 = load double, double* %63
%597 = fdiv double %595, %596
%598 = load double*, double** %35
%599 = load i32, i32* %40
%600 = load i32, i32* %20
%601 = mul nsw i32 %599, %600
%602 = load i32, i32* %41
%603 = mul nsw i32 %601, %602
%604 = load i32, i32* %37
%605 = load i32, i32* %41
%606 = mul nsw i32 %604, %605
%607 = add nsw i32 %603, %606
%608 = load i32, i32* %38
%609 = load i32, i32* %21
%610 = mul nsw i32 %608, %609
%611 = add nsw i32 %607, %610
%612 = load i32, i32* %38
%613 = add nsw i32 %611, %612
%614 = sext i32 %613 to i64
%615 = getelementptr inbounds double, double* %598, i64 %614
store double %597, double* %615
br label %616
616: ; preds = %568
%617 = load i32, i32* %38
%618 = add nsw i32 %617, 1
store i32 %618, i32* %38
br label %564
619: ; preds = %564
br label %620
620: ; preds = %619
%621 = load i32, i32* %37
%622 = add nsw i32 %621, 1
store i32 %622, i32* %37
br label %548
623: ; preds = %548
br label %624
624: ; preds = %623
%625 = load i32, i32* %40
%626 = add nsw i32 %625, 1
store i32 %626, i32* %40
br label %78
627: ; preds = %78
ret void
}

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