#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 smoothedHeaviside(double const, double const);
void TwophaseNavierStokes_LS_SO_2D_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 *phi,
    const double *p, const double *grad_p, const double *u, const double *v,
    double *mom_u_acc, double *dmom_u_acc_u, double *mom_v_acc,
    double *dmom_v_acc_v, double *mass_adv, double *dmass_adv_u,
    double *dmass_adv_v, double *mom_u_adv, double *dmom_u_adv_u,
    double *dmom_u_adv_v, double *mom_v_adv, double *dmom_v_adv_u,
    double *dmom_v_adv_v, double *mom_u_diff_ten, double *mom_v_diff_ten,
    double *mom_u_source, double *mom_v_source, double *mom_u_ham,
    double *dmom_u_ham_grad_p, double *mom_v_ham, double *dmom_v_ham_grad_p) {
  int k;
  double rho, nu, H;
  for (k = 0; k < nPoints; k++) {
    H = smoothedHeaviside(eps, phi[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;
    mass_adv[k * 2 + 0] = u[k];
    mass_adv[k * 2 + 1] = v[k];
    dmass_adv_u[k * 2 + 0] = 1.0;
    dmass_adv_v[k * 2 + 1] = 1.0;
    mom_u_adv[k * 2 + 0] = u[k] * u[k];
    mom_u_adv[k * 2 + 1] = u[k] * v[k];
    dmom_u_adv_u[k * 2 + 0] = 2.0 * u[k];
    dmom_u_adv_u[k * 2 + 1] = v[k];
    dmom_u_adv_v[k * 2 + 1] = u[k];
    mom_v_adv[k * 2 + 0] = v[k] * u[k];
    mom_v_adv[k * 2 + 1] = v[k] * v[k];
    dmom_v_adv_u[k * 2 + 0] = v[k];
    dmom_v_adv_v[k * 2 + 0] = u[k];
    dmom_v_adv_v[k * 2 + 1] = 2.0 * v[k];
    mom_u_diff_ten[k * 4 + 0] = nu;
    mom_u_diff_ten[k * 4 + 3] = nu;
    mom_v_diff_ten[k * 4 + 0] = nu;
    mom_v_diff_ten[k * 4 + 3] = nu;
    mom_u_source[k] = -g[0];
    mom_v_source[k] = -g[1];
    mom_u_ham[k] = grad_p[k * 2 + 0] / rho;
    dmom_u_ham_grad_p[k * 2 + 0] = 1.0 / rho;
    mom_v_ham[k] = grad_p[k * 2 + 1] / rho;
    dmom_v_ham_grad_p[k * 2 + 1] = 1.0 / rho;
  }
}


x86 assembly (clang, -O0):
<TwophaseNavierStokes_LS_SO_2D_Evaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
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    162f <TwophaseNavierStokes_LS_SO_2D_Evaluate+0x51f>
movsd  -0x10(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <smoothedHeaviside@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe09(%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  0xde0(%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    0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd9a(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd6b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%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    0x38(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x40(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xd0a(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xced(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xc82(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    0x58(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%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    0x58(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x68(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%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    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x68(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x70(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x78(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xb72(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    0x78(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x80(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x80(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x88(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x88(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%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    0x90(%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    0x98(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%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  0xa4b(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xa8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%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  0x9fc(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0xb8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    11c2 <TwophaseNavierStokes_LS_SO_2D_Evaluate+0xb2>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TwophaseNavierStokes_LS_SO_2D_Evaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
test   %edi,%edi
jle    13bb <TwophaseNavierStokes_LS_SO_2D_Evaluate+0x2ab>
mov    %r9,%rbx
mov    %r8,%r12
mov    %rdx,%r14
mov    %rsi,%r13
mov    %edi,%eax
shl    $0x2,%rax
mov    %rax,0x8(%rsp)
mov    0x70(%rsp),%r15
xor    %ebp,%ebp
movsd  %xmm4,0x30(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r14,%rbp,2),%xmm1
movsd  0x10(%rsp),%xmm0
call   1030 <smoothedHeaviside@plt>
movsd  0x18(%rsp),%xmm7
movsd  0x20(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
movsd  0xe5e(%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,%rbp,2),%xmm0
mov    0x78(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,2)
mov    0x80(%rsp),%rax
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rax,%rbp,2)
movsd  (%r15,%rbp,2),%xmm0
mov    0x88(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,2)
mov    0x90(%rsp),%rax
mov    %rcx,(%rax,%rbp,2)
movsd  (%rbx,%rbp,2),%xmm0
mov    0x98(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,4)
movsd  (%r15,%rbp,2),%xmm0
movsd  %xmm0,0x8(%rax,%rbp,4)
mov    0xa0(%rsp),%rax
mov    %rcx,(%rax,%rbp,4)
mov    0xa8(%rsp),%rax
mov    %rcx,0x8(%rax,%rbp,4)
movsd  (%rbx,%rbp,2),%xmm0
mulsd  %xmm0,%xmm0
mov    0xb0(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,4)
movsd  (%rbx,%rbp,2),%xmm0
mulsd  (%r15,%rbp,2),%xmm0
movsd  %xmm0,0x8(%rax,%rbp,4)
movsd  (%rbx,%rbp,2),%xmm0
addsd  %xmm0,%xmm0
mov    0xb8(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,4)
movsd  (%r15,%rbp,2),%xmm0
movsd  %xmm0,0x8(%rax,%rbp,4)
movsd  (%rbx,%rbp,2),%xmm0
mov    0xc0(%rsp),%rax
movsd  %xmm0,0x8(%rax,%rbp,4)
movsd  (%r15,%rbp,2),%xmm0
mulsd  (%rbx,%rbp,2),%xmm0
mov    0xc8(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,4)
movsd  (%r15,%rbp,2),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax,%rbp,4)
movsd  (%r15,%rbp,2),%xmm0
mov    0xd0(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,4)
movsd  (%rbx,%rbp,2),%xmm0
mov    0xd8(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,4)
movsd  (%r15,%rbp,2),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax,%rbp,4)
mov    %ebp,%eax
shl    $0x3,%rax
mov    0xe0(%rsp),%rdi
movsd  %xmm6,(%rdi,%rax,1)
lea    0x3(%rbp),%ecx
movsd  %xmm6,(%rdi,%rcx,8)
mov    0xe8(%rsp),%rdi
movsd  %xmm6,(%rdi,%rax,1)
movsd  %xmm6,(%rdi,%rcx,8)
mulsd  %xmm3,%xmm5
addsd  %xmm5,%xmm7
movsd  0x0(%r13),%xmm0
movaps 0xcdb(%rip),%xmm5
xorps  %xmm5,%xmm0
mov    0xf0(%rsp),%rax
movlps %xmm0,(%rax,%rbp,2)
movsd  0x8(%r13),%xmm0
xorps  %xmm5,%xmm0
mov    0xf8(%rsp),%rax
movlps %xmm0,(%rax,%rbp,2)
movsd  (%r12,%rbp,4),%xmm0
divsd  %xmm7,%xmm0
mov    0x100(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,2)
movapd %xmm8,%xmm0
divsd  %xmm7,%xmm0
mov    0x108(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,4)
movsd  0x8(%r12,%rbp,4),%xmm5
divsd  %xmm7,%xmm5
mov    0x110(%rsp),%rax
movsd  %xmm5,(%rax,%rbp,2)
mov    0x118(%rsp),%rax
movsd  %xmm0,0x8(%rax,%rbp,4)
add    $0x4,%rbp
cmp    %rbp,0x8(%rsp)
jne    1170 <TwophaseNavierStokes_LS_SO_2D_Evaluate+0x60>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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