#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 const exp(double const);
double pow(double, double const);
void conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate(
    const int nPoints, const int nSpace, const double rho, const double beta,
    const double *gravity, const double lambda, const double pd,
    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, sBar, DsBar_DpsiC, thetaW, DthetaW_DpsiC, KW,
      DKW_DpsiC, rho2 = rho * rho, thetaS = thetaR + thetaSR, rhom, drhom;
  for (k = 0; k < nPoints; k++) {
    psiC = -u[k];
    if (psiC >= pd) {
      pcBar = psiC / pd;
      sBar = pow(pcBar, -lambda);
      DsBar_DpsiC = -lambda * sBar / psiC;
      KW = KWs * pow(sBar, (2.0 + 3.0 * lambda) / lambda);
      DKW_DpsiC =
          KWs * ((2.0 + 3.0 * lambda) / lambda *
                 pow(sBar, 2.0 / lambda * (1.0 + lambda)) * DsBar_DpsiC);
      thetaW = thetaSR * sBar + thetaR;
      DthetaW_DpsiC = thetaSR * DsBar_DpsiC;
    } else {
      thetaW = thetaS;
      DthetaW_DpsiC = 0.0;
      KW = KWs;
      DKW_DpsiC = 0.0;
    }
    rhom = rho * exp(beta * u[k]);
    drhom = beta * rhom;
    mass[k] = rhom * thetaW;
    dmass[k] = -rhom * DthetaW_DpsiC + drhom * thetaW;
    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):
<conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
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)
movsd  %xmm1,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
mov    %rcx,-0x50(%rbp)
mov    %r8,-0x58(%rbp)
mov    %r9,-0x60(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x6c(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1584 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x464>
mov    -0x50(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jb     1378 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x258>
movsd  -0x78(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x28(%rbp),%xmm1
movsd  0xd92(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd7e(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  -0x28(%rbp),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xd47(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd33(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xd12(%rip),%xmm1
divsd  -0x28(%rbp),%xmm1
movsd  0xcfd(%rip),%xmm2
addsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm1
call   1040 <pow@plt>
movsd  -0xe0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    13ab <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x28b>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x64(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm1
ff
mulsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1571 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x451>
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x68(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x68(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xb8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x68(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x64(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x68(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x10(%rbp),%xmm0
mulsd  -0xa8(%rbp),%xmm0
mov    0x20(%rbp),%rax
mov    -0x64(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
mov    -0x68(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
add    -0x68(%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  -0xb0(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
mov    -0x64(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
mov    -0x68(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
add    -0x68(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    146b <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x34b>
jmp    1576 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x456>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11a9 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x89>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %r9,0xa8(%rsp)
mov    %r8,0xa0(%rsp)
mov    %rcx,0x58(%rsp)
movsd  %xmm6,0x10(%rsp)
movsd  %xmm5,0x40(%rsp)
movsd  %xmm4,0x38(%rsp)
movsd  %xmm3,0x50(%rsp)
movsd  %xmm1,0x60(%rsp)
movapd %xmm0,0x70(%rsp)
mov    %esi,0xc(%rsp)
test   %edi,%edi
jle    147b <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x35b>
mov    %rdx,%rbx
mov    0x158(%rsp),%r15
mov    0x150(%rsp),%r13
movapd 0x70(%rsp),%xmm1
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movsd  0x38(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x98(%rsp)
movapd 0xe4c(%rip),%xmm4
movapd %xmm2,%xmm0
xorpd  %xmm4,%xmm0
movapd %xmm0,0xc0(%rsp)
movsd  0xe43(%rip),%xmm5
mulsd  %xmm2,%xmm5
movsd  0xe3f(%rip),%xmm0
addsd  %xmm0,%xmm5
divsd  %xmm2,%xmm5
movsd  %xmm5,0x48(%rsp)
divsd  %xmm2,%xmm0
addsd  0xe2d(%rip),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,0xd0(%rsp)
movapd %xmm3,0x100(%rsp)
xorpd  %xmm4,%xmm3
movapd %xmm3,0xe0(%rsp)
xorpd  %xmm1,%xmm4
movapd %xmm4,0xf0(%rsp)
movslq 0xc(%rsp),%rax
mov    %edi,%ecx
mov    %rcx,0x88(%rsp)
mov    %eax,%r12d
mov    %eax,%ecx
imul   %eax,%ecx
mov    %ecx,0x1c(%rsp)
lea    0x1(%rax),%ebp
shl    $0x3,%rax
mov    %rax,0x90(%rsp)
xor    %edi,%edi
xor    %r14d,%r14d
jmp    1284 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x164>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r14
add    0x1c(%rsp),%edi
mov    0x90(%rsp),%rax
add    %rax,%r13
add    %rax,%r15
cmp    0x88(%rsp),%r14
je     147b <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x35b>
mov    %rdi,0xb8(%rsp)
mov    0x58(%rsp),%rax
movsd  (%rax,%r14,8),%xmm0
movapd %xmm0,%xmm3
xorpd  0xd5d(%rip),%xmm3
xorpd  %xmm2,%xmm2
ucomisd 0x50(%rsp),%xmm3
movsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x68(%rsp)
xorps  %xmm1,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x98(%rsp),%xmm1
movsd  %xmm1,(%rsp)
jb     1383 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x263>
movapd %xmm3,%xmm0
divsd  0x50(%rsp),%xmm0
movaps 0xc0(%rsp),%xmm1
movapd %xmm3,0x20(%rsp)
call   1040 <pow@plt>
movsd  %xmm0,(%rsp)
movapd %xmm0,%xmm1
mulsd  0xc0(%rsp),%xmm1
divsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x48(%rsp),%xmm1
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x68(%rsp)
movsd  (%rsp),%xmm0
movaps 0xd0(%rsp),%xmm1
call   1040 <pow@plt>
movapd %xmm0,%xmm2
mulsd  0x48(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mulsd  %xmm3,%xmm2
mulsd  0x10(%rsp),%xmm2
movsd  0x40(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x38(%rsp),%xmm1
movsd  %xmm1,(%rsp)
mulsd  %xmm0,%xmm3
movsd  %xmm3,0x20(%rsp)
mov    0x58(%rsp),%rax
movsd  (%rax,%r14,8),%xmm0
movsd  %xmm2,0xb0(%rsp)
mulsd  0x60(%rsp),%xmm0
call   1030 <exp@plt>
movsd  0xb0(%rsp),%xmm4
mulsd  0x70(%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  0x60(%rsp),%xmm1
movsd  (%rsp),%xmm3
movapd %xmm3,%xmm2
mulsd  %xmm0,%xmm2
mov    0xa0(%rsp),%rax
movsd  %xmm2,(%rax,%r14,8)
mulsd  %xmm3,%xmm1
mulsd  0x20(%rsp),%xmm0
subsd  %xmm0,%xmm1
mov    0xa8(%rsp),%rax
movsd  %xmm1,(%rax,%r14,8)
cmpl   $0x0,0xc(%rsp)
mov    0x168(%rsp),%rdx
mov    0x160(%rsp),%rsi
mov    0xb8(%rsp),%rdi
movsd  0x68(%rsp),%xmm3
jle    1260 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x140>
movapd 0x100(%rsp),%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm4,%xmm1
mulsd  0xe0(%rsp),%xmm1
mulsd  0x70(%rsp),%xmm3
mulsd  0xf0(%rsp),%xmm4
mov    %edi,%eax
xor    %ecx,%ecx
nopl   (%rax)
movsd  (%rbx,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x0(%r13,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%r15,%rcx,8)
cltq
movsd  %xmm3,(%rsi,%rax,8)
movsd  %xmm4,(%rdx,%rax,8)
add    $0x1,%rcx
add    %ebp,%eax
cmp    %rcx,%r12
jne    1440 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x320>
jmp    1260 <conservativeHeadRichardsBrooksCoreyBurdineHomEvaluate+0x140>
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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