#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double log(double);
double sqrt(double);
void variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat(
    const int nSimplex, const int nPointsPerSimplex, const int nSpace,
    const double rho_w, const double rho_n, const double specificHeat_w,
    const double specificHeat_n, const int *materialTypes, const double *theta,
    const double *thetaS_types, const double *alpha_L_types,
    const double *alpha_T_types, const double *rho_s_types,
    const double *specificHeat_s_types, const double *lambda_sat_types,
    const double *lambda_dry_types, const double *lambda_aniso_types,
    const double *v, const double *u, double *m, double *dm, double *f,
    double *df, double *a) {
  int i, j, k, I, J, matID;
  const int nSpace2 = nSpace * nSpace;
  double norm_v, tmp, sw, Ke, lambda;
  for (i = 0; i < nSimplex; i++) {
    matID = materialTypes[i];
    for (j = 0; j < nPointsPerSimplex; j++) {
      k = i * nPointsPerSimplex + j;
      tmp = theta[k] * rho_w * specificHeat_w +
            (thetaS_types[matID] - theta[k]) * rho_n * specificHeat_n +
            (1.0 - thetaS_types[matID]) * rho_s_types[matID] *
                specificHeat_s_types[matID];
      m[k] = tmp * u[k];
      dm[k] = tmp;
      norm_v = 0.0;
      for (I = 0; I < nSpace; I++) {
        f[k * nSpace + I] = v[k * nSpace + I] * rho_w * specificHeat_w * u[k];
        df[k * nSpace + I] = v[k * nSpace + I] * rho_w * specificHeat_w;
        norm_v += v[k * nSpace + I] * v[k * nSpace + I];
      }
      norm_v = sqrt(norm_v);
      sw = theta[k] / thetaS_types[matID];
      if (norm_v > 0.0) {
        for (I = 0; I < nSpace; I++) {
          a[k * nSpace2 + I * nSpace + I] =
              rho_w * specificHeat_w * alpha_T_types[matID] * norm_v +
              rho_w * specificHeat_w *
                  (alpha_L_types[matID] - alpha_T_types[matID]) *
                  v[k * nSpace + I] * v[k * nSpace + I] / norm_v;
          for (J = I + 1; J < nSpace; J++) {
            a[k * nSpace2 + I * nSpace + J] =
                rho_w * specificHeat_w *
                (alpha_L_types[matID] - alpha_T_types[matID]) *
                v[k * nSpace + I] * v[k * nSpace + J] / norm_v;
            a[k * nSpace2 + J * nSpace + I] = a[k * nSpace2 + I * nSpace + J];
          }
        }
      }
      if (sw > 0.05)
        Ke = 0.7 * log(sw) + 1.0;
      lambda = (lambda_sat_types[matID] - lambda_dry_types[matID]) * Ke +
               lambda_dry_types[matID];
      for (I = 0; I < nSpace; I++) {
        a[k * nSpace2 + I * nSpace + I] +=
            lambda * lambda_aniso_types[matID * nSpace + I];
      }
    }
  }
}


x86 assembly (clang, -O0):
<variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1658 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x538>
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x60(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1645 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x525>
mov    -0x4c(%rbp),%eax
imul   -0x8(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
mov    -0x48(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x48(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  0xdd6(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x60(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1367 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x247>
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x68(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    0x70(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1296 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x176>
movsd  -0x70(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x60(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1547 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x427>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1542 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x422>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mov    0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
mov    0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm3
mulsd  %xmm3,%xmm1
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x78(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x64(%rbp),%ecx
mov    -0x58(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    152f <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x40f>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x70(%rbp),%xmm0
mov    0x78(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x64(%rbp),%ecx
mov    -0x58(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x78(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x64(%rbp),%ecx
mov    -0x58(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x78(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x64(%rbp),%ecx
mov    -0x5c(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    145f <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x33f>
jmp    1534 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x414>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    13ae <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x28e>
jmp    1547 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x427>
movsd  -0x80(%rbp),%xmm0
movsd  0xab4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1588 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x468>
movsd  -0x80(%rbp),%xmm0
call   1030 <log@plt>
movsd  0xaa0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xa84(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x30(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
movslq -0x60(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  -0x88(%rbp),%xmm2
ff
mov    0x38(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1632 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x512>
movsd  -0x90(%rbp),%xmm0
ff
mov    0x40(%rbp),%rax
mov    -0x60(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x78(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x64(%rbp),%ecx
mov    -0x58(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    15ce <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x4ae>
jmp    1637 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x517>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11be <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x9e>
jmp    164a <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x52a>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    119d <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x7d>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
mov    %r9,0xa0(%rsp)
mov    %r8,0x98(%rsp)
mov    %rcx,0xc8(%rsp)
movsd  %xmm3,0x120(%rsp)
movsd  %xmm1,0x118(%rsp)
mov    %esi,0x10(%rsp)
test   %edi,%edi
jle    1805 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x6e5>
movapd %xmm0,%xmm6
mov    %edx,%r12d
mov    0x1f8(%rsp),%rbp
mov    0x1f0(%rsp),%rax
mov    %rax,0x78(%rsp)
mov    0x1e8(%rsp),%rax
mov    %rax,0x70(%rsp)
mov    0x1d0(%rsp),%rcx
imul   %edx,%edx
movapd %xmm0,%xmm7
mulsd  %xmm2,%xmm7
movslq %r12d,%rsi
mov    0x10(%rsp),%ebx
movslq %ebx,%r10
mov    %edi,%edi
mov    %rdi,0xe0(%rsp)
mov    %esi,%r11d
mov    %r11d,%r9d
and    $0xfffffffe,%r9d
mov    %r9,0x110(%rsp)
mov    %rsi,%rax
imul   %r10,%rax
shl    $0x3,%rax
mov    %rax,0xd8(%rsp)
mov    %edx,%eax
imul   %ebx,%eax
mov    %eax,0x54(%rsp)
mov    %r10,%rax
imul   %rdx,%rax
shl    $0x3,%rax
mov    %rax,0xd0(%rsp)
xorpd  %xmm8,%xmm8
mov    0x1c8(%rsp),%r15
mov    0x1c0(%rsp),%rbx
mov    0x190(%rsp),%r14
mov    %r10,0xc0(%rsp)
mov    %r10d,%eax
mov    %rax,0x108(%rsp)
lea    0x0(,%rsi,8),%rax
mov    %rax,0x100(%rsp)
mov    %rdx,0x30(%rsp)
lea    0x0(,%rdx,8),%rax
mov    %rax,0xf8(%rsp)
lea    0x8(,%rsi,8),%rax
mov    %rax,0x150(%rsp)
lea    0x8(%rbx),%rax
mov    %rax,0xb8(%rsp)
lea    0x1(%rsi),%eax
mov    %rsi,0xb0(%rsp)
lea    (%rsi,%rsi,1),%edx
add    $0x2,%edx
mov    %edx,0x58(%rsp)
xor    %edx,%edx
mov    %rdx,0x28(%rsp)
mov    %eax,0x64(%rsp)
mov    %eax,0x18(%rsp)
mov    %rbp,0x20(%rsp)
mov    %r12d,0x14(%rsp)
mov    %r15,0x68(%rsp)
xor    %esi,%esi
movsd  %xmm2,0x90(%rsp)
movsd  %xmm0,0x88(%rsp)
movsd  %xmm7,0x80(%rsp)
mov    %r11,0x48(%rsp)
jmp    131b <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x1fb>
mov    0xe8(%rsp),%rsi
add    $0x1,%rsi
mov    0xd8(%rsp),%rax
add    %rax,0x68(%rsp)
add    %rax,0x70(%rsp)
add    %rax,0x78(%rsp)
mov    0x54(%rsp),%eax
add    %eax,0x14(%rsp)
mov    0x20(%rsp),%rdx
add    0xd0(%rsp),%rdx
mov    %rdx,0x20(%rsp)
add    %eax,0x18(%rsp)
mov    0x28(%rsp),%rdx
add    %eax,%edx
mov    %rdx,0x28(%rsp)
cmp    0xe0(%rsp),%rsi
je     1805 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x6e5>
cmpl   $0x0,0x10(%rsp)
mov    %rsi,0xe8(%rsp)
jle    12c0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x1a0>
mov    0xc8(%rsp),%rax
movslq (%rax,%rsi,4),%r13
imul   0xc0(%rsp),%rsi
mov    %rsi,0x130(%rsp)
mov    %r13d,%eax
imul   %r12d,%eax
movslq %eax,%rdx
mov    0xb8(%rsp),%rax
mov    %rdx,0xf0(%rsp)
lea    (%rax,%rdx,8),%rax
mov    %rax,0x128(%rsp)
mov    0x28(%rsp),%rax
mov    %eax,%r9d
mov    0x18(%rsp),%r10d
mov    0x20(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0x14(%rsp),%eax
mov    %eax,0x1c(%rsp)
mov    0x78(%rsp),%rdx
mov    0x70(%rsp),%rsi
mov    0x68(%rsp),%rdi
xor    %r8d,%r8d
jmp    140c <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x2ec>
mov    0x138(%rsp),%r8
add    $0x1,%r8
mov    0x100(%rsp),%rax
mov    0xa8(%rsp),%rdi
add    %rax,%rdi
mov    0x140(%rsp),%rsi
add    %rax,%rsi
mov    0x148(%rsp),%rdx
add    %rax,%rdx
mov    0x30(%rsp),%rax
add    %eax,0x1c(%rsp)
mov    0x38(%rsp),%rcx
add    0xf8(%rsp),%rcx
mov    %rcx,0x38(%rsp)
add    %eax,%r10d
add    %eax,%r9d
cmp    0x108(%rsp),%r8
mov    0x1d0(%rsp),%rcx
je     12c0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x1a0>
mov    0x130(%rsp),%rax
lea    (%r8,%rax,1),%rbx
mov    0x98(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
mov    0xa0(%rsp),%rax
movsd  (%rax,%r13,8),%xmm1
movsd  0xbc5(%rip),%xmm3
subsd  %xmm1,%xmm3
subsd  %xmm0,%xmm1
mulsd  %xmm6,%xmm0
mulsd  0x118(%rsp),%xmm1
mulsd  0x120(%rsp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x1a0(%rsp),%rax
mulsd  (%rax,%r13,8),%xmm3
mov    0x1a8(%rsp),%rax
mulsd  (%rax,%r13,8),%xmm3
addsd  %xmm0,%xmm3
movsd  (%rcx,%rbx,8),%xmm0
mulsd  %xmm3,%xmm0
mov    0x1d8(%rsp),%rax
movsd  %xmm0,(%rax,%rbx,8)
mov    0x1e0(%rsp),%rax
mov    %rbx,0x8(%rsp)
movsd  %xmm3,(%rax,%rbx,8)
mov    %r9d,%ebx
xorpd  %xmm0,%xmm0
test   %r12d,%r12d
jle    1500 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x3e0>
xor    %eax,%eax
mov    0x8(%rsp),%r9
nopl   0x0(%rax)
movsd  (%rdi,%rax,8),%xmm1
mulsd  %xmm6,%xmm1
mulsd  %xmm2,%xmm1
mulsd  (%rcx,%r9,8),%xmm1
movsd  %xmm1,(%rsi,%rax,8)
movsd  (%rdi,%rax,8),%xmm1
mulsd  %xmm6,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rdx,%rax,8)
movsd  (%rdi,%rax,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rax
cmp    %rax,%r11
jne    14c0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x3a0>
ucomisd %xmm8,%xmm0
mov    %ebx,0x60(%rsp)
mov    %r10d,0x5c(%rsp)
mov    %rdx,0x148(%rsp)
mov    %rsi,0x140(%rsp)
mov    %rdi,0xa8(%rsp)
mov    %r8,0x138(%rsp)
jb     1540 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x420>
sqrtsd %xmm0,%xmm0
jmp    1573 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x453>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm9,0x40(%rsp)
call   1040 <sqrt@plt>
movsd  0x40(%rsp),%xmm9
xorpd  %xmm8,%xmm8
movsd  0x80(%rsp),%xmm7
movsd  0x88(%rsp),%xmm6
movsd  0x90(%rsp),%xmm2
mov    0x8(%rsp),%rax
mov    0x98(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm1
mov    0xa0(%rsp),%rax
divsd  (%rax,%r13,8),%xmm1
ucomisd %xmm8,%xmm0
jbe    16c0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x5a0>
test   %r12d,%r12d
jle    16c0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x5a0>
mov    0x8(%rsp),%r11
mov    %r11,%rax
imul   0xb0(%rsp),%rax
mov    %rax,0x40(%rsp)
imul   0x30(%rsp),%r11
mov    0x48(%rsp),%rdx
mov    0xa8(%rsp),%rsi
mov    0x38(%rsp),%rdi
mov    0x1c(%rsp),%r10d
xor    %ecx,%ecx
jmp    1603 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x4e3>
xchg   %ax,%ax
add    0x64(%rsp),%r10d
add    0x150(%rsp),%rdi
add    $0x8,%rsi
add    $0xffffffffffffffff,%rdx
cmp    0x48(%rsp),%rcx
mov    %r8,%rbp
je     16c0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x5a0>
mov    0x198(%rsp),%r9
movsd  (%r9,%r13,8),%xmm5
movapd %xmm7,%xmm3
mulsd  %xmm5,%xmm3
movsd  (%r14,%r13,8),%xmm4
subsd  %xmm5,%xmm4
mulsd  %xmm7,%xmm4
mov    0x40(%rsp),%rax
lea    (%rcx,%rax,1),%rbx
movsd  (%r15,%rbx,8),%xmm5
mulsd  %xmm5,%xmm4
mulsd  %xmm5,%xmm4
divsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm3
addsd  %xmm4,%xmm3
mov    %ecx,%eax
imul   %r12d,%eax
cltq
add    %r11,%rax
add    %rcx,%rax
movsd  %xmm3,0x0(%rbp,%rax,8)
add    $0x1,%rcx
cmp    0xb0(%rsp),%rcx
mov    %rbp,%r8
jge    15e0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x4c0>
mov    $0x1,%ebp
mov    %r10d,%eax
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%r13,8),%xmm3
subsd  (%r9,%r13,8),%xmm3
mulsd  %xmm7,%xmm3
mulsd  (%r15,%rbx,8),%xmm3
mulsd  (%rsi,%rbp,8),%xmm3
divsd  %xmm0,%xmm3
movsd  %xmm3,(%rdi,%rbp,8)
cltq
movsd  %xmm3,(%r8,%rax,8)
add    %r12d,%eax
add    $0x1,%rbp
cmp    %rbp,%rdx
jne    1680 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x560>
jmp    15e0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x4c0>
nopl   (%rax)
ucomisd 0x940(%rip),%xmm1
jbe    170a <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x5ea>
movapd %xmm1,%xmm0
call   1030 <log@plt>
xorpd  %xmm8,%xmm8
movsd  0x80(%rsp),%xmm7
movsd  0x88(%rsp),%xmm6
movsd  0x90(%rsp),%xmm2
movapd %xmm0,%xmm9
mulsd  0x90f(%rip),%xmm9
addsd  0x8f6(%rip),%xmm9
test   %r12d,%r12d
mov    0x48(%rsp),%r11
mov    0x110(%rsp),%rsi
mov    0x58(%rsp),%ebx
mov    0x128(%rsp),%rdi
mov    0x60(%rsp),%r9d
mov    0x5c(%rsp),%r10d
jle    13a0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x280>
mov    0x1b0(%rsp),%rax
movsd  (%rax,%r13,8),%xmm0
mov    0x1b8(%rsp),%rax
movsd  (%rax,%r13,8),%xmm1
subsd  %xmm1,%xmm0
mulsd  %xmm9,%xmm0
addsd  %xmm1,%xmm0
cmp    $0x1,%r12d
jne    1770 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x650>
xor    %eax,%eax
jmp    17be <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x69e>
nopl   0x0(%rax)
mov    %r9d,%ecx
mov    %r10d,%edx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movslq %ecx,%rcx
movsd  -0x8(%rdi,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%rbp,%rcx,8),%xmm1
movsd  %xmm1,0x0(%rbp,%rcx,8)
movslq %edx,%rdx
movsd  (%rdi,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%rbp,%rdx,8),%xmm1
movsd  %xmm1,0x0(%rbp,%rdx,8)
add    $0x2,%rax
add    %ebx,%edx
add    %ebx,%ecx
cmp    %rax,%rsi
jne    1780 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x660>
test   $0x1,%r11b
je     13a0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x280>
mov    0x8(%rsp),%rdx
imul   0x30(%rsp),%edx
mov    0xf0(%rsp),%rcx
add    %rax,%rcx
add    %eax,%edx
imul   %r12d,%eax
add    %edx,%eax
mov    0x1c0(%rsp),%rdx
mulsd  (%rdx,%rcx,8),%xmm0
cltq
addsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
jmp    13a0 <variablySaturatedGroundwaterEnergyTransportCoefficientsEvaluate_hetMat+0x280>
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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