#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 pow(double, double const);
double sqrt(double);
void conservativeHeadRichardsMualemVanGenuchtenHetEvaluate(
    const int nPoints, const int nSpace, const double rho,
    const double *gravity, const double *alpha, const double *n,
    const double *thetaR, const double *thetaSR, const double *KWs, double *u,
    double *mass, double *dmass, double *f, double *df, double *a, double *da) {
  int k, I;
  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, m;
  for (k = 0; k < nPoints; k++) {
    psiC = -u[k];
    m = 1.0 - 1.0 / n[k];
    thetaS = thetaR[k] + thetaSR[k];
    if (psiC > 0.0) {
      pcBar = alpha[k] * psiC;
      pcBar_nM2 = pow(pcBar, n[k] - 2);
      pcBar_nM1 = pcBar_nM2 * pcBar;
      pcBar_n = pcBar_nM1 * pcBar;
      onePlus_pcBar_n = 1.0 + pcBar_n;
      sBar = pow(onePlus_pcBar_n, -m);
      DsBar_DpsiC =
          alpha[k] * (1.0 - n[k]) * (sBar / onePlus_pcBar_n) * pcBar_nM1;
      vBar = 1.0 - pcBar_nM1 * sBar;
      vBar2 = vBar * vBar;
      DvBar_DpsiC =
          -alpha[k] * (n[k] - 1.0) * pcBar_nM2 * sBar - pcBar_nM1 * DsBar_DpsiC;
      thetaW = thetaSR[k] * sBar + thetaR[k];
      DthetaW_DpsiC = thetaSR[k] * DsBar_DpsiC;
      sqrt_sBar = sqrt(sBar);
      KW = KWs[k] * sqrt_sBar * vBar2;
      DKW_DpsiC = KWs[k] * ((0.5 / sqrt_sBar) * DsBar_DpsiC * vBar2 +
                            2.0 * sqrt_sBar * vBar * DvBar_DpsiC);
    } else {
      thetaW = thetaS;
      DthetaW_DpsiC = 0.0;
      KW = KWs[k];
      DKW_DpsiC = 0.0;
    }
    mass[k] = rho * thetaW;
    dmass[k] = -rho * DthetaW_DpsiC;
    for (I = 0; I < nSpace; I++) {
      f[k * nSpace + I] = rho2 * KW * gravity[I];
      df[k * nSpace + I] = -rho2 * DKW_DpsiC * gravity[I];
      a[k * nSpace2 + I * nSpace + I] = rho * KW;
      da[k * nSpace2 + I * nSpace + I] = -rho * DKW_DpsiC;
    }
  }
}


x86 assembly (clang, -O0):
<conservativeHeadRichardsMualemVanGenuchtenHetEvaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
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)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1650 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x530>
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xe2e(%rip),%xmm1
divsd  (%rax,%rcx,8),%xmm1
movsd  0xe21(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    14aa <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x38a>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xdb8(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd7c(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0xd8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xd27(%rip),%xmm1
subsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x78(%rbp),%xmm1
divsd  -0x70(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xcd6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xc79(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x78(%rbp),%xmm2
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x80(%rbp)
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xbb1(%rip),%xmm1
divsd  -0x80(%rbp),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm3
ff
movsd  0xb8c(%rip),%xmm2
mulsd  -0x80(%rbp),%xmm2
mulsd  -0xa0(%rbp),%xmm2
ff
mulsd  -0xb0(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    14e5 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x3c5>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    163d <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x51d>
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x40(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x10(%rbp),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
mov    0x48(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
mov    0x50(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1537 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x417>
jmp    1642 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x522>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    118d <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x6d>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conservativeHeadRichardsMualemVanGenuchtenHetEvaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r9,0x48(%rsp)
mov    %r8,0x40(%rsp)
mov    %rcx,0x90(%rsp)
test   %edi,%edi
jle    157c <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x45c>
mov    %rdx,%rbx
movapd %xmm0,%xmm9
mov    0x170(%rsp),%rdx
mov    0x168(%rsp),%rbp
mov    0x160(%rsp),%r15
mov    0x158(%rsp),%r12
mov    0x150(%rsp),%r8
mov    0x148(%rsp),%r9
mov    0x140(%rsp),%r10
mov    0x138(%rsp),%r11
mulsd  %xmm9,%xmm0
movapd 0xe60(%rip),%xmm1
movapd %xmm9,%xmm10
xorpd  %xmm1,%xmm10
movapd %xmm0,0xe0(%rsp)
xorpd  %xmm1,%xmm0
movapd %xmm0,0xd0(%rsp)
movslq %esi,%rax
mov    %edi,%ecx
mov    %rcx,0x98(%rsp)
mov    %rax,%rdi
mov    %edi,%r13d
imul   %eax,%eax
mov    %eax,0x24(%rsp)
lea    0x1(%rdi),%r14d
shl    $0x3,%rdi
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xorpd  %xmm8,%xmm8
movsd  0xe19(%rip),%xmm11
xor    %ecx,%ecx
movapd %xmm9,0xb0(%rsp)
mov    %esi,0xc(%rsp)
movapd %xmm10,0xa0(%rsp)
mov    %rdi,0x28(%rsp)
jmp    124b <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x12b>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rcx
add    $0x1,%rcx
mov    0x10(%rsp),%rax
add    0x24(%rsp),%eax
mov    %rax,0x10(%rsp)
add    %rdi,%r12
add    %rdi,%r15
cmp    0x98(%rsp),%rcx
je     157c <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x45c>
movsd  (%r10,%rcx,8),%xmm2
ucomisd %xmm2,%xmm8
mov    %rcx,0x18(%rsp)
jbe    1350 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x230>
mov    0x40(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm1
movapd 0xd8d(%rip),%xmm0
xorpd  %xmm0,%xmm2
divsd  %xmm1,%xmm11
movsd  0xd94(%rip),%xmm0
addsd  %xmm0,%xmm11
movapd %xmm11,0x60(%rsp)
mov    0x90(%rsp),%rbp
mulsd  0x0(%rbp,%rcx,8),%xmm2
movapd %xmm2,0x50(%rsp)
addsd  0xd74(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
movsd  %xmm0,0x38(%rsp)
movapd 0x50(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x30(%rsp)
mulsd  %xmm0,%xmm2
addsd  0xd41(%rip),%xmm2
movaps 0x60(%rsp),%xmm1
xorps  0xd1d(%rip),%xmm1
movapd %xmm2,0x50(%rsp)
movapd %xmm2,%xmm0
call   1030 <pow@plt>
mov    0x18(%rsp),%rcx
xorpd  %xmm8,%xmm8
movapd %xmm0,%xmm13
movsd  0x0(%rbp,%rcx,8),%xmm14
mov    0x40(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm15
mov    0x130(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm12
movapd %xmm12,%xmm5
mulsd  %xmm0,%xmm5
mov    0x48(%rsp),%rax
addsd  (%rax,%rcx,8),%xmm5
ucomisd %xmm8,%xmm0
jb     1380 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x260>
xorps  %xmm0,%xmm0
sqrtsd %xmm13,%xmm0
jmp    13ea <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x2ca>
nopl   0x0(%rax,%rax,1)
mov    0x48(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm5
mov    0x130(%rsp),%rax
addsd  (%rax,%rcx,8),%xmm5
movsd  (%r11,%rcx,8),%xmm2
xorpd  %xmm12,%xmm12
xorpd  %xmm1,%xmm1
jmp    14ee <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x3ce>
nopl   0x0(%rax,%rax,1)
movapd %xmm13,%xmm0
movsd  %xmm12,0x60(%rsp)
movsd  %xmm5,0x88(%rsp)
movsd  %xmm13,0x80(%rsp)
movapd %xmm14,0xc0(%rsp)
movsd  %xmm15,0x78(%rsp)
call   1040 <sqrt@plt>
movsd  0x78(%rsp),%xmm15
movapd 0xc0(%rsp),%xmm14
movsd  0x80(%rsp),%xmm13
movsd  0x88(%rsp),%xmm5
movsd  0x60(%rsp),%xmm12
mov    0x18(%rsp),%rcx
xorpd  %xmm8,%xmm8
movapd 0xb0(%rsp),%xmm9
mov    0xc(%rsp),%esi
mov    0x170(%rsp),%rdx
mov    0x168(%rsp),%rbp
mov    0x150(%rsp),%r8
mov    0x148(%rsp),%r9
mov    0x140(%rsp),%r10
mov    0x138(%rsp),%r11
movapd 0xa0(%rsp),%xmm10
mov    0x28(%rsp),%rdi
movsd  0xbd0(%rip),%xmm11
movsd  0x38(%rsp),%xmm7
movsd  0x30(%rsp),%xmm6
movapd 0x50(%rsp),%xmm3
movsd  0xbbe(%rip),%xmm4
movapd %xmm4,%xmm1
subsd  %xmm15,%xmm1
mulsd  %xmm14,%xmm1
movapd %xmm13,%xmm2
divsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm6,%xmm2
mulsd  %xmm2,%xmm12
movsd  0xba2(%rip),%xmm1
divsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm2,%xmm3
mulsd  %xmm6,%xmm3
mulsd  %xmm13,%xmm6
subsd  %xmm6,%xmm4
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm4,%xmm4
xorpd  0xb48(%rip),%xmm14
addsd  %xmm11,%xmm15
mulsd  %xmm14,%xmm15
mulsd  %xmm15,%xmm7
mulsd  %xmm13,%xmm7
subsd  %xmm3,%xmm7
movsd  (%r11,%rcx,8),%xmm3
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm2
mulsd  %xmm7,%xmm0
mulsd  %xmm4,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm9,%xmm5
movsd  %xmm5,(%r9,%rcx,8)
mulsd  %xmm10,%xmm12
movsd  %xmm12,(%r8,%rcx,8)
test   %esi,%esi
jle    1220 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x100>
movapd 0xe0(%rsp),%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm1,%xmm3
mulsd  0xd0(%rsp),%xmm3
mulsd  %xmm9,%xmm2
mulsd  %xmm10,%xmm1
mov    0x10(%rsp),%rax
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm4
mulsd  %xmm0,%xmm4
movsd  %xmm4,(%r12,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm4
mulsd  %xmm3,%xmm4
movsd  %xmm4,(%r15,%rcx,8)
cltq
movsd  %xmm2,0x0(%rbp,%rax,8)
movsd  %xmm1,(%rdx,%rax,8)
add    $0x1,%rcx
add    %r14d,%eax
cmp    %rcx,%r13
jne    1540 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x420>
jmp    1220 <conservativeHeadRichardsMualemVanGenuchtenHetEvaluate+0x100>
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @conservativeHeadRichardsMualemVanGenuchtenHetEvaluate(i32 %0, i32 %1, double %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8, double* nocapture %9, double* nocapture writeonly %10, double* nocapture writeonly %11, double* nocapture writeonly %12, double* nocapture writeonly %13, double* nocapture writeonly %14, double* nocapture writeonly %15) {
%17 = fmul double %2, %2
%18 = icmp sgt i32 %0, 0
br i1 %18, label %19, label %127
19: ; preds = %16
%20 = fneg double %2
%21 = icmp sgt i32 %1, 0
%22 = fneg double %17
%23 = sext i32 %1 to i64
%24 = zext i32 %0 to i64
%25 = zext i32 %1 to i64
br label %26
26: ; preds = %19, %124
%27 = phi i64 [ 0, %19 ], [ %125, %124 ]
%28 = getelementptr inbounds double, double* %9, i64 %27
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %5, i64 %27
%31 = load double, double* %30
%32 = getelementptr inbounds double, double* %6, i64 %27
%33 = getelementptr inbounds double, double* %7, i64 %27
%34 = fcmp olt double %29, 0.000000e+00
br i1 %34, label %35, label %81
35: ; preds = %26
%36 = fneg double %29
%37 = fdiv double 1.000000e+00, %31
%38 = fsub double 1.000000e+00, %37
%39 = getelementptr inbounds double, double* %4, i64 %27
%40 = load double, double* %39
%41 = fmul double %40, %36
%42 = fadd double %31, -2.000000e+00
%43 = tail call double @pow(double %41, double %42)
%44 = fmul double %43, %41
%45 = fmul double %41, %44
%46 = fadd double %45, 1.000000e+00
%47 = fneg double %38
%48 = tail call double @pow(double %46, double %47)
%49 = load double, double* %39
%50 = load double, double* %30
%51 = fsub double 1.000000e+00, %50
%52 = fmul double %49, %51
%53 = fdiv double %48, %46
%54 = fmul double %53, %52
%55 = fmul double %44, %54
%56 = fneg double %44
%57 = tail call double @llvm.fmuladd.f64(double %56, double %48, double 1.000000e+00)
%58 = fmul double %57, %57
%59 = fneg double %49
%60 = fadd double %50, -1.000000e+00
%61 = fmul double %60, %59
%62 = fmul double %43, %61
%63 = fmul double %55, %56
%64 = tail call double @llvm.fmuladd.f64(double %62, double %48, double %63)
%65 = load double, double* %33
%66 = load double, double* %32
%67 = tail call double @llvm.fmuladd.f64(double %65, double %48, double %66)
%68 = fmul double %65, %55
%69 = tail call double @sqrt(double %48)
%70 = getelementptr inbounds double, double* %8, i64 %27
%71 = load double, double* %70
%72 = fmul double %69, %71
%73 = fmul double %58, %72
%74 = fdiv double 5.000000e-01, %69
%75 = fmul double %74, %55
%76 = fmul double %69, 2.000000e+00
%77 = fmul double %57, %76
%78 = fmul double %77, %64
%79 = tail call double @llvm.fmuladd.f64(double %75, double %58, double %78)
%80 = fmul double %71, %79
br label %87
81: ; preds = %26
%82 = load double, double* %32
%83 = load double, double* %33
%84 = fadd double %82, %83
%85 = getelementptr inbounds double, double* %8, i64 %27
%86 = load double, double* %85
br label %87
87: ; preds = %81, %35
%88 = phi double [ %68, %35 ], [ 0.000000e+00, %81 ]
%89 = phi double [ %73, %35 ], [ %86, %81 ]
%90 = phi double [ %80, %35 ], [ 0.000000e+00, %81 ]
%91 = phi double [ %67, %35 ], [ %84, %81 ]
%92 = fmul double %91, %2
%93 = getelementptr inbounds double, double* %10, i64 %27
store double %92, double* %93
%94 = fmul double %88, %20
%95 = getelementptr inbounds double, double* %11, i64 %27
store double %94, double* %95
br i1 %21, label %96, label %124
96: ; preds = %87
%97 = fmul double %17, %89
%98 = mul nsw i64 %27, %23
%99 = fmul double %90, %22
%100 = fmul double %89, %2
%101 = trunc i64 %27 to i32
%102 = mul i32 %101, %1
%103 = fmul double %90, %20
br label %104
104: ; preds = %96, %104
%105 = phi i64 [ 0, %96 ], [ %122, %104 ]
%106 = getelementptr inbounds double, double* %3, i64 %105
%107 = load double, double* %106
%108 = fmul double %97, %107
%109 = add nsw i64 %105, %98
%110 = getelementptr inbounds double, double* %12, i64 %109
store double %108, double* %110
%111 = load double, double* %106
%112 = fmul double %99, %111
%113 = getelementptr inbounds double, double* %13, i64 %109
store double %112, double* %113
%114 = trunc i64 %105 to i32
%115 = add i32 %102, %114
%116 = mul i32 %115, %1
%117 = trunc i64 %105 to i32
%118 = add i32 %116, %117
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %14, i64 %119
store double %100, double* %120
%121 = getelementptr inbounds double, double* %15, i64 %119
store double %103, double* %121
%122 = add nuw nsw i64 %105, 1
%123 = icmp eq i64 %122, %25
br i1 %123, label %124, label %104
124: ; preds = %104, %87
%125 = add nuw nsw i64 %27, 1
%126 = icmp eq i64 %125, %24
br i1 %126, label %127, label %26
127: ; preds = %124, %16
ret void
}