#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 fmax(double, int /*<<< orphan*/);
int /*<<< orphan*/ fmin(double, double const);
void TwophaseStokes_VOF_SO_3D_Evaluate(
    const int nPoints, const double eps, const double rho_0, const double nu_0,
    const double rho_1, const double nu_1, const double *g, const double *vof,
    const double *p, const double *grad_p, const double *u, const double *v,
    const double *w, double *mom_u_acc, double *dmom_u_acc_u, double *mom_v_acc,
    double *dmom_v_acc_v, double *mom_w_acc, double *dmom_w_acc_w,
    double *mass_adv, double *dmass_adv_u, double *dmass_adv_v,
    double *dmass_adv_w, double *mom_u_diff_ten, double *mom_v_diff_ten,
    double *mom_w_diff_ten, double *mom_u_source, double *mom_v_source,
    double *mom_w_source, double *mom_u_ham, double *dmom_u_ham_grad_p,
    double *mom_v_ham, double *dmom_v_ham_grad_p, double *mom_w_ham,
    double *dmom_w_ham_grad_p) {
  int k;
  double rho, nu, H;
  for (k = 0; k < nPoints; k++) {
    H = fmax(0.0, fmin(1.0, vof[k]));
    rho = rho_0 * (1.0 - H) + rho_1 * H;
    nu = nu_0 * (1.0 - H) + nu_1 * H;
    mom_u_acc[k] = u[k];
    dmom_u_acc_u[k] = 1.0;
    mom_v_acc[k] = v[k];
    dmom_v_acc_v[k] = 1.0;
    mom_w_acc[k] = w[k];
    dmom_w_acc_w[k] = 1.0;
    mass_adv[k * 3 + 0] = u[k];
    mass_adv[k * 3 + 1] = v[k];
    mass_adv[k * 3 + 2] = w[k];
    dmass_adv_u[k * 3 + 0] = 1.0;
    dmass_adv_v[k * 3 + 1] = 1.0;
    dmass_adv_w[k * 3 + 2] = 1.0;
    mom_u_diff_ten[k * 9 + 0] = nu;
    mom_u_diff_ten[k * 9 + 4] = nu;
    mom_u_diff_ten[k * 9 + 8] = nu;
    mom_v_diff_ten[k * 9 + 0] = nu;
    mom_v_diff_ten[k * 9 + 4] = nu;
    mom_v_diff_ten[k * 9 + 8] = nu;
    mom_w_diff_ten[k * 9 + 0] = nu;
    mom_w_diff_ten[k * 9 + 4] = nu;
    mom_w_diff_ten[k * 9 + 8] = nu;
    mom_u_source[k] = -g[0];
    mom_v_source[k] = -g[1];
    mom_w_source[k] = -g[2];
    mom_u_ham[k] = grad_p[k * 3 + 0] / rho;
    dmom_u_ham_grad_p[k * 3 + 0] = 1.0 / rho;
    mom_v_ham[k] = grad_p[k * 3 + 1] / rho;
    dmom_v_ham_grad_p[k * 3 + 1] = 1.0 / rho;
    mom_w_ham[k] = grad_p[k * 3 + 2] / rho;
    dmom_w_ham_grad_p[k * 3 + 2] = 1.0 / rho;
  }
}


x86 assembly (clang, -O0):
<TwophaseStokes_VOF_SO_3D_Evaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0xc8(%rbp),%rax
mov    0xc0(%rbp),%rax
mov    0xb8(%rbp),%rax
mov    0xb0(%rbp),%rax
mov    0xa8(%rbp),%rax
mov    0xa0(%rbp),%rax
mov    0x98(%rbp),%rax
mov    0x90(%rbp),%rax
mov    0x88(%rbp),%rax
mov    0x80(%rbp),%rax
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)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1604 <TwophaseStokes_VOF_SO_3D_Evaluate+0x4e4>
mov    -0x40(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xdff(%rip),%xmm0
call   1030 <fmin@plt>
mov    %eax,%edi
xorps  %xmm0,%xmm0
call   1040 <fmax@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdde(%rip),%xmm2
subsd  -0x78(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xdb5(%rip),%xmm2
subsd  -0x78(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd6f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x38(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd40(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x40(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd11(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x58(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xc96(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x60(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xc7b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x68(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xc60(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x70(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x70(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x70(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x78(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x78(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x78(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x80(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x80(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x80(%rbp),%rax
imul   $0x9,-0x5c(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x88(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x90(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x98(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xa0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xabb(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xa8(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xb0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xa70(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xb8(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xc0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xa25(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xc8(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    11e0 <TwophaseStokes_VOF_SO_3D_Evaluate+0xc0>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TwophaseStokes_VOF_SO_3D_Evaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
test   %edi,%edi
jle    13dc <TwophaseStokes_VOF_SO_3D_Evaluate+0x2bc>
mov    %r8,%r12
mov    %edi,%eax
shl    $0x3,%rax
mov    %rax,(%rsp)
xor    %r13d,%r13d
xor    %r15d,%r15d
xor    %r14d,%r14d
mov    %rdx,0x30(%rsp)
movsd  %xmm4,0x28(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
mov    %rsi,0x8(%rsp)
xchg   %ax,%ax
movsd  (%rdx,%r13,1),%xmm1
movsd  0xe82(%rip),%xmm0
mov    %r9,%rbx
call   1030 <fmin@plt>
xorpd  %xmm0,%xmm0
mov    %eax,%edi
call   1040 <fmax@plt>
movsd  0x10(%rsp),%xmm7
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x28(%rsp),%xmm4
mov    %rbx,%r9
movsd  0xe4b(%rip),%xmm8
movapd %xmm8,%xmm6
subsd  %xmm0,%xmm6
movapd %xmm0,%xmm5
mulsd  %xmm6,%xmm7
mulsd  %xmm4,%xmm0
mulsd  %xmm2,%xmm6
addsd  %xmm0,%xmm6
movsd  (%rbx,%r13,1),%xmm0
mov    0x80(%rsp),%rax
movsd  %xmm0,(%rax,%r13,1)
mov    0x88(%rsp),%rax
movabs $0x3ff0000000000000,%rbp
mov    %rbp,(%rax,%r13,1)
mov    0x70(%rsp),%rdi
movsd  (%rdi,%r13,1),%xmm0
mov    0x90(%rsp),%rax
movsd  %xmm0,(%rax,%r13,1)
mov    0x98(%rsp),%rax
mov    %rbp,(%rax,%r13,1)
mov    0x78(%rsp),%rdx
movsd  (%rdx,%r13,1),%xmm0
mov    0xa0(%rsp),%rax
movsd  %xmm0,(%rax,%r13,1)
mov    0xa8(%rsp),%rax
mov    %rbp,(%rax,%r13,1)
movsd  (%rbx,%r13,1),%xmm0
mov    %r15d,%eax
mov    0xb0(%rsp),%rsi
movsd  %xmm0,(%rsi,%rax,8)
movsd  (%rdi,%r13,1),%xmm0
lea    0x1(%r15),%ecx
movsd  %xmm0,(%rsi,%rcx,8)
movsd  (%rdx,%r13,1),%xmm0
lea    0x2(%r15),%edx
movsd  %xmm0,(%rsi,%rdx,8)
mov    0xb8(%rsp),%rsi
mov    %rbp,(%rsi,%rax,8)
mov    0xc0(%rsp),%rsi
mov    %rbp,(%rsi,%rcx,8)
mov    0xc8(%rsp),%rsi
mov    %rbp,(%rsi,%rdx,8)
mov    %r14d,%esi
mov    0xd0(%rsp),%rbp
movsd  %xmm6,0x0(%rbp,%rsi,8)
lea    0x4(%r14),%edi
movsd  %xmm6,0x0(%rbp,%rdi,8)
lea    0x8(%r14),%ebx
movsd  %xmm6,0x0(%rbp,%rbx,8)
mov    0xd8(%rsp),%rbp
movsd  %xmm6,0x0(%rbp,%rsi,8)
movsd  %xmm6,0x0(%rbp,%rdi,8)
movsd  %xmm6,0x0(%rbp,%rbx,8)
mov    0xe0(%rsp),%rbp
movsd  %xmm6,0x0(%rbp,%rsi,8)
mov    0x8(%rsp),%rsi
movsd  %xmm6,0x0(%rbp,%rdi,8)
movsd  %xmm6,0x0(%rbp,%rbx,8)
mulsd  %xmm3,%xmm5
addsd  %xmm5,%xmm7
movsd  (%rsi),%xmm0
movaps 0xd01(%rip),%xmm5
xorps  %xmm5,%xmm0
mov    0xe8(%rsp),%rdi
movlps %xmm0,(%rdi,%r13,1)
movsd  0x8(%rsi),%xmm0
xorps  %xmm5,%xmm0
mov    0xf0(%rsp),%rdi
movlps %xmm0,(%rdi,%r13,1)
movsd  0x10(%rsi),%xmm0
xorps  %xmm5,%xmm0
mov    0xf8(%rsp),%rdi
movlps %xmm0,(%rdi,%r13,1)
movsd  (%r12,%rax,8),%xmm0
divsd  %xmm7,%xmm0
mov    0x100(%rsp),%rdi
movsd  %xmm0,(%rdi,%r13,1)
movapd %xmm8,%xmm0
divsd  %xmm7,%xmm0
mov    0x108(%rsp),%rdi
movsd  %xmm0,(%rdi,%rax,8)
movsd  (%r12,%rcx,8),%xmm5
divsd  %xmm7,%xmm5
mov    0x110(%rsp),%rax
movsd  %xmm5,(%rax,%r13,1)
mov    0x118(%rsp),%rax
movsd  %xmm0,(%rax,%rcx,8)
movsd  (%r12,%rdx,8),%xmm5
divsd  %xmm7,%xmm5
mov    0x120(%rsp),%rax
movsd  %xmm5,(%rax,%r13,1)
mov    0x128(%rsp),%rax
movsd  %xmm0,(%rax,%rdx,8)
mov    0x30(%rsp),%rdx
add    $0x9,%r14d
add    $0x3,%r15d
add    $0x8,%r13
cmp    %r13,(%rsp)
jne    1170 <TwophaseStokes_VOF_SO_3D_Evaluate+0x50>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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