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


x86 assembly (clang, -O0):
<conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
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    %ecx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  %xmm4,-0x40(%rbp)
movsd  %xmm5,-0x48(%rbp)
movsd  %xmm6,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1030 <memset@plt>
lea    -0x1f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1030 <memset@plt>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1baf <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa6f>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1b9c <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa5c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1302 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x1c2>
movslq -0x60(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x130(%rbp,%rax,8)
ff ff
movslq -0x60(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x150(%rbp,%rax,8)
ff ff
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12ef <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x1af>
movslq -0x60(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x64(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x60(%rbp),%rcx
lea    -0x1f0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x64(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1299 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x159>
jmp    12f4 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x1b4>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1266 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x126>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    19cc <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x88c>
mov    0x10(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    15db <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x49b>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xc79(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xc46(%rip),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xbf8(%rip),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
divsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xb98(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xb4b(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1060 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  0xa7e(%rip),%xmm1
divsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm3
ff
movsd  0xa56(%rip),%xmm2
mulsd  -0xb0(%rbp),%xmm2
ff
mulsd  -0xd0(%rbp),%xmm2
ff
mulsd  -0xe0(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
jmp    160e <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x4ce>
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x110(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mov    0x20(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    19b9 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x879>
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0xe8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x60(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x60(%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  -0xf8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xf0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x60(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x60(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp,%rax,8)
ff ff
mov    -0x60(%rbp),%eax
mov    %eax,-0x64(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0xe8(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x60(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x64(%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  -0xf0(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x60(%rbp),%rcx
lea    -0x1f0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xf8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xf0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x60(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%ecx
mov    -0x5c(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xf0(%rbp),%xmm0
ff
mov    0x40(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   -0x70(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
imul   -0x70(%rbp),%edx
add    %edx,%ecx
mov    -0x5c(%rbp),%edx
imul   -0x70(%rbp),%edx
add    %edx,%ecx
mov    -0x60(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%ecx
add    -0x64(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1736 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x5f6>
jmp    19be <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x87e>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1309 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x1c9>
movsd  -0x118(%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,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1b89 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa49>
movsd  -0x108(%rbp),%xmm0
ff
divsd  -0x118(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1b76 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa36>
movslq -0x60(%rbp),%rax
movsd  -0x130(%rbp,%rax,8),%xmm0
ff ff
divsd  -0x118(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%ecx
mov    -0x5c(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1b63 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa23>
mov    -0x64(%rbp),%eax
cmp    -0x60(%rbp),%eax
jne    1b10 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x9d0>
movslq -0x60(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x118(%rbp),%xmm0
ff
mov    0x38(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   -0x70(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
imul   -0x70(%rbp),%edx
add    %edx,%ecx
mov    -0x5c(%rbp),%edx
imul   -0x70(%rbp),%edx
add    %edx,%ecx
mov    -0x60(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%ecx
add    -0x64(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1b50 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa10>
mov    0x38(%rbp),%rax
mov    -0x68(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   -0x70(%rbp),%ecx
mov    -0x6c(%rbp),%edx
imul   -0xc(%rbp),%edx
imul   -0x70(%rbp),%edx
add    %edx,%ecx
mov    -0x5c(%rbp),%edx
imul   -0x70(%rbp),%edx
add    %edx,%ecx
mov    -0x60(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%ecx
add    -0x64(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1b55 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa15>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1a93 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x953>
jmp    1b68 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa28>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1a37 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x8f7>
jmp    1b7b <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa3b>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    19f1 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x8b1>
jmp    1b8e <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa4e>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1232 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xf2>
jmp    1ba1 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xa61>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    121f <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0xdf>
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x278,%rsp
mov    %r9,0x68(%rsp)
movsd  %xmm6,0x70(%rsp)
movsd  %xmm5,0xa0(%rsp)
movsd  %xmm4,0x98(%rsp)
movapd %xmm3,0xd0(%rsp)
movapd %xmm1,0x190(%rsp)
mov    %r8,0x60(%rsp)
movapd %xmm0,0xc0(%rsp)
mov    %ecx,(%rsp)
mov    %esi,0x8(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0xf0(%rsp)
movq   $0x0,0x100(%rsp)
movapd %xmm0,0x170(%rsp)
movq   $0x0,0x180(%rsp)
movapd %xmm0,0x1e0(%rsp)
movapd %xmm0,0x1d0(%rsp)
movapd %xmm0,0x1c0(%rsp)
movapd %xmm0,0x1b0(%rsp)
movq   $0x0,0x1f0(%rsp)
movapd %xmm0,0x230(%rsp)
movapd %xmm0,0x220(%rsp)
movapd %xmm0,0x210(%rsp)
movapd %xmm0,0x200(%rsp)
movq   $0x0,0x240(%rsp)
mov    %edi,0x84(%rsp)
test   %edi,%edi
jle    1b16 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x9d6>
mov    %edx,%r12d
mov    0x2d8(%rsp),%r15
mov    (%rsp),%ecx
mov    %ecx,%edx
imul   %ecx,%edx
movapd 0xc0(%rsp),%xmm1
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movsd  0x98(%rsp),%xmm0
addsd  0xa0(%rsp),%xmm0
movsd  %xmm0,0x158(%rsp)
movsd  0xd87(%rip),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x140(%rsp)
movapd 0xda2(%rip),%xmm4
movapd 0xd0(%rsp),%xmm0
xorpd  %xmm4,%xmm0
movapd %xmm0,0xd0(%rsp)
movsd  0xd5c(%rip),%xmm5
subsd  %xmm2,%xmm5
movapd 0x190(%rsp),%xmm0
mulsd  %xmm0,%xmm5
movsd  %xmm5,0x138(%rsp)
xorpd  %xmm4,%xmm0
addsd  0xd3e(%rip),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x148(%rsp)
xorpd  %xmm4,%xmm1
movapd %xmm3,0x260(%rsp)
xorpd  %xmm3,%xmm4
movapd %xmm4,0x250(%rsp)
mov    %ecx,%ebp
mov    %ebp,%eax
and    $0x3,%eax
mov    %ebp,%esi
and    $0xfffffffc,%esi
mov    %rsi,0x130(%rsp)
mov    %rax,0x118(%rsp)
lea    0x0(,%rax,8),%rax
lea    (%rax,%rax,2),%rax
mov    %rax,0x150(%rsp)
mov    %edx,0x1c(%rsp)
imul   %r12d,%edx
mov    %edx,0x8c(%rsp)
mov    0x8(%rsp),%eax
imul   %eax,%edx
mov    %edx,0x80(%rsp)
mov    %ecx,%edx
imul   %r12d,%edx
mov    %edx,0x88(%rsp)
imul   %eax,%edx
mov    %edx,0x7c(%rsp)
lea    0x0(,%rbp,8),%r13
movslq %ecx,%rcx
mov    %eax,%eax
mov    %rax,0x120(%rsp)
mov    %r12d,%eax
mov    %rax,0xb8(%rsp)
lea    -0x1(%rbp),%rax
mov    %rax,0x110(%rsp)
lea    0x1(%rcx),%r14d
mov    %rcx,0x168(%rsp)
lea    0x0(,%rcx,8),%rax
mov    %rax,0x160(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
mov    %r12d,0x44(%rsp)
movapd %xmm1,0xe0(%rsp)
jmp    1403 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x2c3>
nopw   0x0(%rax,%rax,1)
mov    0xc(%rsp),%ecx
add    $0x1,%ecx
mov    0x10(%rsp),%eax
add    0x80(%rsp),%eax
mov    %eax,0x10(%rsp)
mov    0x14(%rsp),%eax
add    0x7c(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    %ecx,0xc(%rsp)
cmp    0x84(%rsp),%ecx
je     1b16 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x9d6>
cmpl   $0x0,0x8(%rsp)
jle    13d0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x290>
mov    0xc(%rsp),%eax
imul   0x8(%rsp),%eax
mov    %rax,0x90(%rsp)
mov    0x14(%rsp),%eax
mov    %eax,0x18(%rsp)
mov    0x10(%rsp),%eax
mov    %eax,0x4(%rsp)
xor    %eax,%eax
mov    %rax,0x50(%rsp)
jmp    1486 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x346>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
xor    %eax,%eax
call   1040 <assert@plt>
mov    0x50(%rsp),%rcx
add    $0x1,%rcx
mov    0x4(%rsp),%eax
add    0x8c(%rsp),%eax
mov    %eax,0x4(%rsp)
mov    0x18(%rsp),%eax
add    0x88(%rsp),%eax
mov    %eax,0x18(%rsp)
mov    %rcx,%rax
mov    %rcx,0x50(%rsp)
cmp    0x120(%rsp),%rcx
je     13d0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x290>
cmpl   $0x0,(%rsp)
jle    1637 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x4f7>
lea    0xf0(%rsp),%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
lea    0x170(%rsp),%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
cmpq   $0x3,0x110(%rsp)
jae    14d0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x390>
xor    %ebx,%ebx
jmp    15c2 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x482>
cs nopw 0x0(%rax,%rax,1)
xor    %r12d,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rsp,%r12,1),%rdi
add    $0x1b0,%rdi
lea    (%rsp,%r12,1),%rax
add    $0x200,%rax
mov    %rax,0x20(%rsp)
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
mov    0x20(%rsp),%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
lea    (%rsp,%r12,1),%rdi
add    $0x1c8,%rdi
lea    (%rsp,%r12,1),%rax
add    $0x218,%rax
mov    %rax,0x20(%rsp)
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
mov    0x20(%rsp),%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
lea    (%rsp,%r12,1),%rdi
add    $0x1e0,%rdi
lea    (%rsp,%r12,1),%rax
add    $0x230,%rax
mov    %rax,0x20(%rsp)
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
mov    0x20(%rsp),%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
lea    (%rsp,%r12,1),%rdi
add    $0x1f8,%rdi
lea    (%rsp,%r12,1),%rax
add    $0x248,%rax
mov    %rax,0x20(%rsp)
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
mov    0x20(%rsp),%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
add    $0x4,%rbx
add    $0x60,%r12
cmp    %rbx,0x130(%rsp)
jne    14e0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x3a0>
cmpq   $0x0,0x118(%rsp)
je     1637 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x4f7>
shl    $0x3,%rbx
lea    (%rbx,%rbx,2),%rax
lea    (%rsp,%rax,1),%rcx
add    $0x200,%rcx
mov    %rcx,0x20(%rsp)
add    %rsp,%rax
add    $0x1b0,%rax
mov    %rax,0x38(%rsp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x38(%rsp),%rax
lea    (%rax,%rbx,1),%rdi
mov    0x20(%rsp),%rax
lea    (%rax,%rbx,1),%r12
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1030 <memset@plt>
add    $0x18,%rbx
cmp    %rbx,0x150(%rsp)
jne    1600 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x4c0>
mov    0x44(%rsp),%r12d
test   %r12d,%r12d
movsd  0x70(%rsp),%xmm9
movapd 0xc0(%rsp),%xmm10
jle    1440 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x300>
mov    0x90(%rsp),%rax
mov    0x50(%rsp),%rcx
add    %ecx,%eax
imul   %r12d,%eax
movslq %eax,%r9
xorpd  %xmm14,%xmm14
mov    0x18(%rsp),%r10d
mov    0x4(%rsp),%r11d
xor    %r12d,%r12d
xorpd  %xmm12,%xmm12
xorpd  %xmm13,%xmm13
mov    0x68(%rsp),%rsi
mov    0x60(%rsp),%r8
mov    0x2e0(%rsp),%rdi
movapd 0xe0(%rsp),%xmm11
mov    %r9,0xa8(%rsp)
jmp    16df <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x59f>
xchg   %ax,%ax
addsd  %xmm8,%xmm12
mulsd  %xmm10,%xmm15
mulsd  %xmm8,%xmm15
addsd  %xmm15,%xmm13
add    $0x1,%r12
add    0x1c(%rsp),%r11d
add    (%rsp),%r10d
cmp    0xb8(%rsp),%r12
je     19d0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x890>
lea    (%r12,%r9,1),%rbx
mov    0x2b0(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
ucomisd %xmm0,%xmm14
movsd  0x158(%rsp),%xmm15
xorpd  %xmm3,%xmm3
movapd %xmm9,%xmm1
xorpd  %xmm2,%xmm2
jbe    18cf <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x78f>
mov    %r11d,0x48(%rsp)
mov    %r10d,0x4c(%rsp)
movsd  %xmm13,0x58(%rsp)
movsd  %xmm12,0x38(%rsp)
xorpd  0x8fe(%rip),%xmm0
mulsd  0x190(%rsp),%xmm0
movapd %xmm0,0x20(%rsp)
movsd  0x140(%rsp),%xmm1
call   1050 <pow@plt>
movapd 0x20(%rsp),%xmm2
movapd %xmm2,%xmm1
movsd  %xmm0,0xb0(%rsp)
mulsd  %xmm0,%xmm1
movapd %xmm1,0x1a0(%rsp)
mulsd  %xmm1,%xmm2
addsd  0x88d(%rip),%xmm2
movapd %xmm2,0x20(%rsp)
movapd %xmm2,%xmm0
movaps 0xd0(%rsp),%xmm1
call   1050 <pow@plt>
movapd %xmm0,%xmm15
ucomisd 0x881(%rip),%xmm0
jb     17b0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x670>
xorps  %xmm0,%xmm0
sqrtsd %xmm15,%xmm0
jmp    17ce <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x68e>
nopl   0x0(%rax,%rax,1)
movapd %xmm15,%xmm0
movsd  %xmm15,0x128(%rsp)
call   1060 <sqrt@plt>
movsd  0x128(%rsp),%xmm15
mov    0x68(%rsp),%rsi
movsd  0x70(%rsp),%xmm9
mov    0x60(%rsp),%r8
movapd 0xc0(%rsp),%xmm10
mov    0x2e0(%rsp),%rdi
movapd 0xe0(%rsp),%xmm11
movsd  0x38(%rsp),%xmm12
movsd  0x58(%rsp),%xmm13
mov    0xa8(%rsp),%r9
xorpd  %xmm14,%xmm14
mov    0x4c(%rsp),%r10d
mov    0x48(%rsp),%r11d
movsd  0xb0(%rsp),%xmm6
movapd 0x20(%rsp),%xmm1
movapd 0x1a0(%rsp),%xmm2
movapd %xmm15,%xmm3
divsd  %xmm1,%xmm3
mulsd  0x138(%rsp),%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm3,%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm15,%xmm2
movsd  0x7a5(%rip),%xmm5
subsd  %xmm2,%xmm5
movapd %xmm0,%xmm1
movsd  0x7a5(%rip),%xmm2
divsd  %xmm0,%xmm2
addsd  %xmm0,%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm5
mulsd  0x148(%rsp),%xmm6
mulsd  %xmm15,%xmm6
subsd  %xmm4,%xmm6
movsd  0xa0(%rsp),%xmm4
mulsd  %xmm4,%xmm15
addsd  0x98(%rsp),%xmm15
mulsd  %xmm9,%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm3
mulsd  %xmm6,%xmm0
mulsd  %xmm5,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm9,%xmm2
movsd  (%rsi,%rbx,8),%xmm8
mulsd  %xmm11,%xmm3
mov    0x2c0(%rsp),%rax
movsd  %xmm3,(%rax,%rbx,8)
cmpl   $0x0,(%rsp)
jle    16b0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x570>
movslq %r10d,%rax
mov    0x2d0(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
movapd 0x260(%rsp),%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm2,%xmm4
mulsd  0x250(%rsp),%xmm4
mulsd  %xmm10,%xmm1
mulsd  %xmm11,%xmm2
xor    %ecx,%ecx
mov    %r11d,%edx
nopl   0x0(%rax)
movsd  (%r8,%rcx,1),%xmm0
movapd %xmm3,%xmm6
mulsd  %xmm0,%xmm6
movsd  (%rsi,%rbx,8),%xmm7
mulsd  %xmm7,%xmm6
addsd  0xf0(%rsp,%rcx,1),%xmm6
mulsd  %xmm4,%xmm0
movapd %xmm0,%xmm5
mulsd  %xmm7,%xmm5
addsd  0x170(%rsp,%rcx,1),%xmm5
movsd  %xmm6,0xf0(%rsp,%rcx,1)
movapd %xmm1,%xmm6
mulsd  %xmm7,%xmm6
addsd  0x1b0(%rsp,%rcx,4),%xmm6
movsd  %xmm5,0x170(%rsp,%rcx,1)
mulsd  %xmm2,%xmm7
addsd  0x200(%rsp,%rcx,4),%xmm7
movsd  %xmm6,0x1b0(%rsp,%rcx,4)
movsd  %xmm7,0x200(%rsp,%rcx,4)
movsd  %xmm0,(%rax,%rcx,1)
movslq %edx,%rdx
movsd  %xmm2,(%rdi,%rdx,8)
add    %r14d,%edx
add    $0x8,%rcx
cmp    %rcx,%r13
jne    1930 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x7f0>
jmp    16b0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x570>
nopl   0x0(%rax)
xor    %edi,%edi
ucomisd 0x645(%rip),%xmm12
seta   %dil
xor    %eax,%eax
movsd  %xmm12,0x38(%rsp)
movsd  %xmm13,0x58(%rsp)
call   1040 <assert@plt>
movsd  0x58(%rsp),%xmm3
movsd  0x38(%rsp),%xmm2
mov    0x44(%rsp),%r12d
test   %r12d,%r12d
jle    1449 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x309>
divsd  %xmm2,%xmm3
mov    0x90(%rsp),%rax
mov    0x50(%rsp),%rcx
add    %ecx,%eax
imul   %r12d,%eax
movslq %eax,%r8
mov    0x4(%rsp),%r9d
xor    %r10d,%r10d
jmp    1a57 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x917>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r10
add    0x1c(%rsp),%r9d
cmp    0xb8(%rsp),%r10
je     1449 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x309>
lea    (%r10,%r8,1),%rax
mov    0x2b8(%rsp),%rcx
movsd  %xmm3,(%rcx,%rax,8)
cmpl   $0x0,(%rsp)
jle    1a40 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x900>
movslq %r9d,%rcx
lea    (%r15,%rcx,8),%rsi
mov    0x1c(%rsp),%ecx
imul   %eax,%ecx
imul   (%rsp),%eax
movslq %ecx,%r11
movslq %eax,%rbx
xor    %eax,%eax
jmp    1aa1 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x961>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
add    0x160(%rsp),%rsi
cmp    %rbp,%rax
je     1a40 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x900>
movsd  0xf0(%rsp,%rax,8),%xmm0
divsd  %xmm2,%xmm0
lea    (%rax,%rbx,1),%rcx
mov    0x2c8(%rsp),%rdx
movsd  %xmm0,(%rdx,%rcx,8)
mov    %rax,%rcx
imul   0x168(%rsp),%rcx
add    %r11,%rcx
lea    (%rax,%rax,2),%rdx
lea    (%rsp,%rdx,8),%rdx
add    $0x1b0,%rdx
lea    (%rdx,%rax,8),%rdx
add    %rax,%rcx
xor    %edi,%edi
jmp    1b01 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x9c1>
nopl   0x0(%rax,%rax,1)
movq   $0x0,(%rsi,%rdi,8)
add    $0x1,%rdi
cmp    %rdi,%rbp
je     1a90 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x950>
cmp    %rdi,%rax
jne    1af0 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x9b0>
movsd  (%rdx),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,(%r15,%rcx,8)
jmp    1af8 <conservativeHeadRichardsL2projBndMualemVanGenuchtenHomEvaluate+0x9b8>
add    $0x278,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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