#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);
void conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate(
    const int nPoints, const int nSpace, const double rho,
    const double *gravity, const double *lambda, const double *pd,
    const double *thetaR, const double *thetaS, 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, sBar, DsBar_DpsiC, thetaW, DthetaW_DpsiC, KW,
      DKW_DpsiC, rho2 = rho * rho, thetaSR;
  for (k = 0; k < nPoints; k++) {
    psiC = -u[k];
    if (psiC >= pd[k]) {
      pcBar = psiC / pd[k];
      sBar = pow(pcBar, -lambda[k]);
      DsBar_DpsiC = -lambda[k] * sBar / (pcBar * pd[k]);
      KW = KWs[k] * pow(sBar, (2.0 + 3.0 * lambda[k]) / lambda[k]);
      DKW_DpsiC = KWs[k] * ((2.0 + 3.0 * lambda[k]) / lambda[k] *
                            pow(sBar, 2.0 / lambda[k] * (1.0 + lambda[k])) *
                            DsBar_DpsiC);
      thetaSR = thetaS[k] - thetaR[k];
      thetaW = thetaSR * sBar + thetaR[k];
      DthetaW_DpsiC = thetaSR * DsBar_DpsiC;
    } else {
      thetaW = thetaS[k];
      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):
<conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%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,-0x88(%rbp)
ff
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1556 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x446>
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)
movsd  -0x48(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     13c9 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x2b9>
movsd  -0x48(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x58(%rbp)
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
mulsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xd89(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd75(%rip),%xmm2
addsd  %xmm2,%xmm1
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xd29(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd15(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xce7(%rip),%xmm1
divsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xcca(%rip),%xmm2
addsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm1
call   1030 <pow@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    13fd <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x2ed>
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
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  -0x70(%rbp),%xmm0
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    1543 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x433>
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x78(%rbp),%xmm0
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  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x80(%rbp),%xmm0
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  -0x78(%rbp),%xmm0
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  -0x80(%rbp),%xmm0
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    1449 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x339>
jmp    1548 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x438>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    117d <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x6d>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9,0x68(%rsp)
mov    %rcx,0x60(%rsp)
test   %edi,%edi
jle    14bd <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x3ad>
mov    %rdx,%rbx
movapd %xmm0,%xmm4
mov    0x140(%rsp),%rdx
mov    0x138(%rsp),%rbp
mov    0x130(%rsp),%r13
mov    0x128(%rsp),%r15
mov    0x120(%rsp),%r9
mov    0x118(%rsp),%r10
mov    0x110(%rsp),%r11
mulsd  %xmm4,%xmm0
movapd 0xe82(%rip),%xmm1
movapd %xmm4,%xmm5
xorpd  %xmm1,%xmm5
movapd %xmm0,0xb0(%rsp)
xorpd  %xmm1,%xmm0
movapd %xmm0,0xa0(%rsp)
movslq %esi,%rax
mov    %edi,%ecx
mov    %rcx,0x78(%rsp)
mov    %rax,%rdi
mov    %edi,%r12d
imul   %eax,%eax
mov    %eax,0x1c(%rsp)
lea    0x1(%rdi),%r14d
shl    $0x3,%rdi
xor    %eax,%eax
mov    %rax,0x10(%rsp)
movapd 0xe35(%rip),%xmm8
xor    %ecx,%ecx
mov    %r8,0x20(%rsp)
movapd %xmm4,0x90(%rsp)
mov    %esi,0x18(%rsp)
movapd %xmm5,0x80(%rsp)
mov    %rdi,0x58(%rsp)
jmp    1217 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x107>
nop
mov    (%rsp),%rcx
add    $0x1,%rcx
mov    0x10(%rsp),%rax
add    0x1c(%rsp),%eax
mov    %rax,0x10(%rsp)
add    %rdi,%r15
add    %rdi,%r13
cmp    0x78(%rsp),%rcx
je     14bd <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x3ad>
movsd  (%r11,%rcx,8),%xmm2
xorpd  %xmm8,%xmm2
movsd  (%r8,%rcx,8),%xmm0
ucomisd %xmm0,%xmm2
mov    %rcx,(%rsp)
jae    1260 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x150>
mov    0x100(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm2
mov    0x108(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm7
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
jmp    142e <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x31e>
nopl   0x0(%rax)
divsd  %xmm0,%xmm2
mov    0x60(%rsp),%rbp
movapd %xmm2,0x40(%rsp)
movsd  0x0(%rbp,%rcx,8),%xmm1
movaps 0xd84(%rip),%xmm0
xorps  %xmm0,%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
mov    (%rsp),%rax
movsd  0x0(%rbp,%rax,8),%xmm3
movapd %xmm3,%xmm1
movsd  0xd72(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd6e(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm3,%xmm1
xorpd  0xd46(%rip),%xmm3
movsd  %xmm0,0x28(%rsp)
mulsd  %xmm0,%xmm3
movapd %xmm3,0x30(%rsp)
mov    0x20(%rsp),%rax
mov    (%rsp),%rcx
movapd 0x40(%rsp),%xmm2
mulsd  (%rax,%rcx,8),%xmm2
movapd %xmm2,0x40(%rsp)
mov    0x108(%rsp),%rcx
mov    (%rsp),%rax
movsd  (%rcx,%rax,8),%xmm2
movsd  %xmm2,0x8(%rsp)
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x70(%rsp)
mov    (%rsp),%rax
mov    0x108(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    (%rsp),%rax
movsd  0x0(%rbp,%rax,8),%xmm1
movapd %xmm1,%xmm0
mulsd  0xcd7(%rip),%xmm0
movsd  0xcd7(%rip),%xmm3
addsd  %xmm3,%xmm0
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd 0x40(%rsp),%xmm0
unpcklpd %xmm1,%xmm0
divpd  %xmm0,%xmm2
movapd %xmm2,0x30(%rsp)
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
addsd  0xcad(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x28(%rsp),%xmm0
call   1030 <pow@plt>
movsd  0x70(%rsp),%xmm7
mov    (%rsp),%rcx
movapd 0xc6b(%rip),%xmm8
mov    0x58(%rsp),%rdi
movapd 0x80(%rsp),%xmm5
mov    0x110(%rsp),%r11
mov    0x118(%rsp),%r10
mov    0x120(%rsp),%r9
mov    0x138(%rsp),%rbp
mov    0x140(%rsp),%rdx
mov    0x18(%rsp),%esi
movapd 0x90(%rsp),%xmm4
mov    0x20(%rsp),%r8
movapd 0x30(%rsp),%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm2,%xmm6
mulsd  0x8(%rsp),%xmm1
mov    0x100(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    0x68(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm2
subsd  %xmm2,%xmm0
movsd  0x28(%rsp),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movapd %xmm3,%xmm2
mulsd  %xmm6,%xmm0
mulsd  %xmm4,%xmm2
movsd  %xmm2,(%r10,%rcx,8)
mulsd  %xmm5,%xmm0
movsd  %xmm0,(%r9,%rcx,8)
test   %esi,%esi
jle    11f0 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0xe0>
movapd 0xb0(%rsp),%xmm0
mulsd  %xmm7,%xmm0
movapd %xmm1,%xmm2
mulsd  0xa0(%rsp),%xmm2
mulsd  %xmm4,%xmm7
mulsd  %xmm5,%xmm1
mov    0x10(%rsp),%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rbx,%rcx,8),%xmm3
mulsd  %xmm0,%xmm3
movsd  %xmm3,(%r15,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm3
mulsd  %xmm2,%xmm3
movsd  %xmm3,0x0(%r13,%rcx,8)
cltq
movsd  %xmm7,0x0(%rbp,%rax,8)
movsd  %xmm1,(%rdx,%rax,8)
add    $0x1,%rcx
add    %r14d,%eax
cmp    %rcx,%r12
jne    1480 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0x370>
jmp    11f0 <conservativeHeadRichardsBrooksCoreyBurdineHetEvaluate+0xe0>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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