void TwophaseNavierStokes_ST_LS_SO_2D_Evaluate(
    const int nPoints, const double eps_rho, const double eps_mu,
    const double sigma, const double rho_0, const double nu_0,
    const double rho_1, const double nu_1, const double *g, const double *phi,
    const double *n, const double *kappa, 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_uv_diff_ten, double *mom_vu_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, mu, H_rho, d_rho, H_mu, d_mu, norm_n;
  for (k = 0; k < nPoints; k++) {
    H_rho = smoothedHeaviside(eps_rho, phi[k]);
    d_rho = smoothedDirac(eps_rho, phi[k]);
    H_mu = smoothedHeaviside(eps_mu, phi[k]);
    d_mu = smoothedDirac(eps_mu, phi[k]);
    rho = rho_0 * (1.0 - H_rho) + rho_1 * H_rho;
    nu = nu_0 * (1.0 - H_mu) + nu_1 * H_mu;
    mu = rho_0 * nu_0 * (1.0 - H_mu) + rho_1 * nu_1 * H_mu;
    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] = 2.0 * nu;
    mom_u_diff_ten[k * 4 + 3] = nu;
    mom_uv_diff_ten[k * 4 + 2] = nu;
    mom_v_diff_ten[k * 4 + 0] = nu;
    mom_v_diff_ten[k * 4 + 3] = 2.0 * nu;
    mom_vu_diff_ten[k * 4 + 1] = nu;
    norm_n = sqrt(n[k * 2 + 0] * n[k * 2 + 0] + n[k * 2 + 1] * n[k * 2 + 1]);
    mom_u_source[k] = -g[0] - d_mu * sigma * kappa[k] * n[k * 2 + 0] /
                                  (rho * (norm_n + 1.0e-8));
    mom_v_source[k] = -g[1] - d_mu * sigma * kappa[k] * n[k * 2 + 1] /
                                  (rho * (norm_n + 1.0e-8));
    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_ST_LS_SO_2D_Evaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0xd8(%rbp),%rax
mov    0xd0(%rbp),%rax
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)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
mov    %rsi,-0x48(%rbp)
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x58(%rbp)
mov    %r8,-0x60(%rbp)
mov    %r9,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1891 <TwophaseNavierStokes_ST_LS_SO_2D_Evaluate+0x761>
movsd  -0x10(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1050 <smoothedHeaviside@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1040 <smoothedDirac@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1050 <smoothedHeaviside@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1040 <smoothedDirac@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xd4b(%rip),%xmm2
subsd  -0x90(%rbp),%xmm2
ff
movsd  -0x38(%rbp),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xd1c(%rip),%xmm2
subsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm1
mulsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xce8(%rip),%xmm2
subsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x38(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0xc94(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x40(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0xc65(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x50(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xc04(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xbe7(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0xb84(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    0x68(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x68(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x70(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x78(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x78(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x80(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x88(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0xa6e(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    0x88(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xa49(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    0x90(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x90(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0xa0(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x98(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x9cd(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    0x98(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0xa8(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x20(%rbp),%xmm1
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  0x8c7(%rip),%xmm3
addsd  -0xb0(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    0xb0(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x20(%rbp),%xmm1
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  0x847(%rip),%xmm3
addsd  -0xb0(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    0xb8(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0xc0(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x7e9(%rip),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0xc8(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0xd0(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x79a(%rip),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0xd8(%rbp),%rax
mov    -0x6c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1208 <TwophaseNavierStokes_ST_LS_SO_2D_Evaluate+0xd8>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TwophaseNavierStokes_ST_LS_SO_2D_Evaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r8,0x58(%rsp)
mov    %rsi,0x50(%rsp)
movsd  %xmm6,0x48(%rsp)
movsd  %xmm5,0x40(%rsp)
movsd  %xmm4,0x38(%rsp)
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x10(%rsp)
test   %edi,%edi
jle    1527 <TwophaseNavierStokes_ST_LS_SO_2D_Evaluate+0x3f7>
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %edi,%eax
shl    $0x2,%rax
mov    %rax,0x20(%rsp)
mov    0xb0(%rsp),%r14
mov    0xa8(%rsp),%r12
xor    %r13d,%r13d
jmp    12cc <TwophaseNavierStokes_ST_LS_SO_2D_Evaluate+0x19c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <sqrt@plt>
movsd  0xe43(%rip),%xmm5
mov    0xc(%rsp),%eax
cvtsi2sd %eax,%xmm3
cvtsi2sd %ebp,%xmm2
movapd %xmm5,%xmm1
subsd  %xmm3,%xmm1
mulsd  0x40(%rsp),%xmm3
mulsd  0x30(%rsp),%xmm1
addsd  %xmm3,%xmm1
mov    0x50(%rsp),%rcx
movsd  (%rcx),%xmm3
movapd 0xe2e(%rip),%xmm6
xorpd  %xmm6,%xmm3
mulsd  0x28(%rsp),%xmm2
mov    0x58(%rsp),%rax
movsd  (%rax,%r13,2),%xmm4
mulsd  %xmm2,%xmm4
mulsd  (%r15,%r13,4),%xmm4
addsd  0xdef(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  %xmm0,%xmm4
subsd  %xmm4,%xmm3
mov    0x140(%rsp),%rdx
movsd  %xmm3,(%rdx,%r13,2)
movsd  0x8(%rcx),%xmm3
xorpd  %xmm6,%xmm3
mulsd  (%rax,%r13,2),%xmm2
mulsd  0x8(%r15,%r13,4),%xmm2
divsd  %xmm0,%xmm2
subsd  %xmm2,%xmm3
mov    0x148(%rsp),%rax
movsd  %xmm3,(%rax,%r13,2)
mov    0xa0(%rsp),%rcx
movsd  (%rcx,%r13,4),%xmm0
divsd  %xmm1,%xmm0
mov    0x150(%rsp),%rax
movsd  %xmm0,(%rax,%r13,2)
movapd %xmm5,%xmm0
divsd  %xmm1,%xmm0
mov    0x158(%rsp),%rax
movsd  %xmm0,(%rax,%r13,4)
movsd  0x8(%rcx,%r13,4),%xmm2
divsd  %xmm1,%xmm2
mov    0x160(%rsp),%rax
movsd  %xmm2,(%rax,%r13,2)
mov    0x168(%rsp),%rax
movsd  %xmm0,0x8(%rax,%r13,4)
add    $0x4,%r13
cmp    %r13,0x20(%rsp)
je     1527 <TwophaseNavierStokes_ST_LS_SO_2D_Evaluate+0x3f7>
movsd  (%rbx,%r13,2),%xmm1
movsd  0x10(%rsp),%xmm0
mov    $0x2,%al
call   1050 <smoothedHeaviside@plt>
mov    %eax,0xc(%rsp)
movsd  (%rbx,%r13,2),%xmm1
movsd  0x10(%rsp),%xmm0
mov    $0x2,%al
call   1040 <smoothedDirac@plt>
movsd  (%rbx,%r13,2),%xmm1
movsd  0x18(%rsp),%xmm0
mov    $0x2,%al
call   1050 <smoothedHeaviside@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  (%rbx,%r13,2),%xmm1
movsd  0x18(%rsp),%xmm0
mov    $0x2,%al
call   1040 <smoothedDirac@plt>
movsd  0xccf(%rip),%xmm5
mov    %eax,%ebp
movapd %xmm5,%xmm0
movsd  0x60(%rsp),%xmm1
subsd  %xmm1,%xmm0
mulsd  0x48(%rsp),%xmm1
mulsd  0x38(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  (%r12,%r13,2),%xmm1
mov    0xb8(%rsp),%rax
movsd  %xmm1,(%rax,%r13,2)
mov    0xc0(%rsp),%rax
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rax,%r13,2)
movsd  (%r14,%r13,2),%xmm1
mov    0xc8(%rsp),%rax
movsd  %xmm1,(%rax,%r13,2)
mov    0xd0(%rsp),%rax
mov    %rcx,(%rax,%r13,2)
movsd  (%r12,%r13,2),%xmm1
mov    0xd8(%rsp),%rax
movsd  %xmm1,(%rax,%r13,4)
movsd  (%r14,%r13,2),%xmm1
movsd  %xmm1,0x8(%rax,%r13,4)
mov    0xe0(%rsp),%rax
mov    %rcx,(%rax,%r13,4)
mov    0xe8(%rsp),%rax
mov    %rcx,0x8(%rax,%r13,4)
movsd  (%r12,%r13,2),%xmm1
mulsd  %xmm1,%xmm1
mov    0xf0(%rsp),%rax
movsd  %xmm1,(%rax,%r13,4)
movsd  (%r12,%r13,2),%xmm1
mulsd  (%r14,%r13,2),%xmm1
movsd  %xmm1,0x8(%rax,%r13,4)
movsd  (%r12,%r13,2),%xmm1
addsd  %xmm1,%xmm1
mov    0xf8(%rsp),%rax
movsd  %xmm1,(%rax,%r13,4)
movsd  (%r14,%r13,2),%xmm1
movsd  %xmm1,0x8(%rax,%r13,4)
movsd  (%r12,%r13,2),%xmm1
mov    0x100(%rsp),%rax
movsd  %xmm1,0x8(%rax,%r13,4)
movsd  (%r14,%r13,2),%xmm1
mulsd  (%r12,%r13,2),%xmm1
mov    0x108(%rsp),%rax
movsd  %xmm1,(%rax,%r13,4)
movsd  (%r14,%r13,2),%xmm1
mulsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rax,%r13,4)
movsd  (%r14,%r13,2),%xmm1
mov    0x110(%rsp),%rax
movsd  %xmm1,(%rax,%r13,4)
movsd  (%r12,%r13,2),%xmm1
mov    0x118(%rsp),%rax
movsd  %xmm1,(%rax,%r13,4)
movsd  (%r14,%r13,2),%xmm1
addsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rax,%r13,4)
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mov    %r13d,%eax
shl    $0x3,%rax
mov    0x120(%rsp),%rdx
movsd  %xmm1,(%rdx,%rax,1)
lea    0x3(%r13),%ecx
movsd  %xmm0,(%rdx,%rcx,8)
lea    0x2(%r13),%edx
mov    0x130(%rsp),%rsi
movsd  %xmm0,(%rsi,%rdx,8)
mov    0x128(%rsp),%rdx
movsd  %xmm0,(%rdx,%rax,1)
movsd  %xmm1,(%rdx,%rcx,8)
lea    0x1(%r13),%eax
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
movsd  (%r15,%r13,4),%xmm0
movsd  0x8(%r15,%r13,4),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd 0xaf8(%rip),%xmm0
jb     11b0 <TwophaseNavierStokes_ST_LS_SO_2D_Evaluate+0x80>
sqrtsd %xmm0,%xmm0
jmp    11bd <TwophaseNavierStokes_ST_LS_SO_2D_Evaluate+0x8d>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @TwophaseNavierStokes_ST_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, double* %33, double* %34, double* %35, double* %36, double* %37, double* %38) {
%40 = alloca i32
%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 double*
%72 = alloca double*
%73 = alloca double*
%74 = alloca double*
%75 = alloca double*
%76 = alloca double*
%77 = alloca double*
%78 = alloca double*
%79 = alloca i32
%80 = alloca double
%81 = alloca double
%82 = alloca double
%83 = alloca double
%84 = alloca double
%85 = alloca double
%86 = alloca double
%87 = alloca double
store i32 %0, i32* %40
store double %1, double* %41
store double %2, double* %42
store double %3, double* %43
store double %4, double* %44
store double %5, double* %45
store double %6, double* %46
store double %7, double* %47
store double* %8, double** %48
store double* %9, double** %49
store double* %10, double** %50
store double* %11, double** %51
store double* %12, double** %52
store double* %13, double** %53
store double* %14, double** %54
store double* %15, double** %55
store double* %16, double** %56
store double* %17, double** %57
store double* %18, double** %58
store double* %19, double** %59
store double* %20, double** %60
store double* %21, double** %61
store double* %22, double** %62
store double* %23, double** %63
store double* %24, double** %64
store double* %25, double** %65
store double* %26, double** %66
store double* %27, double** %67
store double* %28, double** %68
store double* %29, double** %69
store double* %30, double** %70
store double* %31, double** %71
store double* %32, double** %72
store double* %33, double** %73
store double* %34, double** %74
store double* %35, double** %75
store double* %36, double** %76
store double* %37, double** %77
store double* %38, double** %78
store i32 0, i32* %79
br label %88
88: ; preds = %525, %39
%89 = load i32, i32* %79
%90 = load i32, i32* %40
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %528
92: ; preds = %88
%93 = load double, double* %41
%94 = load double*, double** %49
%95 = load i32, i32* %79
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = call i32 (double, double, ...) bitcast (i32 (...)* @smoothedHeaviside to i32 (double, double, ...)*)(double %93, double %98)
%100 = sitofp i32 %99 to double
store double %100, double* %83
%101 = load double, double* %41
%102 = load double*, double** %49
%103 = load i32, i32* %79
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %102, i64 %104
%106 = load double, double* %105
%107 = call i32 (double, double, ...) bitcast (i32 (...)* @smoothedDirac to i32 (double, double, ...)*)(double %101, double %106)
%108 = sitofp i32 %107 to double
store double %108, double* %84
%109 = load double, double* %42
%110 = load double*, double** %49
%111 = load i32, i32* %79
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double, double* %110, i64 %112
%114 = load double, double* %113
%115 = call i32 (double, double, ...) bitcast (i32 (...)* @smoothedHeaviside to i32 (double, double, ...)*)(double %109, double %114)
%116 = sitofp i32 %115 to double
store double %116, double* %85
%117 = load double, double* %42
%118 = load double*, double** %49
%119 = load i32, i32* %79
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double, double* %118, i64 %120
%122 = load double, double* %121
%123 = call i32 (double, double, ...) bitcast (i32 (...)* @smoothedDirac to i32 (double, double, ...)*)(double %117, double %122)
%124 = sitofp i32 %123 to double
store double %124, double* %86
%125 = load double, double* %44
%126 = load double, double* %83
%127 = fsub double 1.000000e+00, %126
%128 = load double, double* %46
%129 = load double, double* %83
%130 = fmul double %128, %129
%131 = call double @llvm.fmuladd.f64(double %125, double %127, double %130)
store double %131, double* %80
%132 = load double, double* %45
%133 = load double, double* %85
%134 = fsub double 1.000000e+00, %133
%135 = load double, double* %47
%136 = load double, double* %85
%137 = fmul double %135, %136
%138 = call double @llvm.fmuladd.f64(double %132, double %134, double %137)
store double %138, double* %81
%139 = load double, double* %44
%140 = load double, double* %45
%141 = fmul double %139, %140
%142 = load double, double* %85
%143 = fsub double 1.000000e+00, %142
%144 = load double, double* %46
%145 = load double, double* %47
%146 = fmul double %144, %145
%147 = load double, double* %85
%148 = fmul double %146, %147
%149 = call double @llvm.fmuladd.f64(double %141, double %143, double %148)
store double %149, double* %82
%150 = load double*, double** %54
%151 = load i32, i32* %79
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %150, i64 %152
%154 = load double, double* %153
%155 = load double*, double** %56
%156 = load i32, i32* %79
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %155, i64 %157
store double %154, double* %158
%159 = load double*, double** %57
%160 = load i32, i32* %79
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %159, i64 %161
store double 1.000000e+00, double* %162
%163 = load double*, double** %55
%164 = load i32, i32* %79
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double, double* %163, i64 %165
%167 = load double, double* %166
%168 = load double*, double** %58
%169 = load i32, i32* %79
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds double, double* %168, i64 %170
store double %167, double* %171
%172 = load double*, double** %59
%173 = load i32, i32* %79
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds double, double* %172, i64 %174
store double 1.000000e+00, double* %175
%176 = load double*, double** %54
%177 = load i32, i32* %79
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double, double* %176, i64 %178
%180 = load double, double* %179
%181 = load double*, double** %60
%182 = load i32, i32* %79
%183 = mul nsw i32 %182, 2
%184 = add nsw i32 %183, 0
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %181, i64 %185
store double %180, double* %186
%187 = load double*, double** %55
%188 = load i32, i32* %79
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds double, double* %187, i64 %189
%191 = load double, double* %190
%192 = load double*, double** %60
%193 = load i32, i32* %79
%194 = mul nsw i32 %193, 2
%195 = add nsw i32 %194, 1
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds double, double* %192, i64 %196
store double %191, double* %197
%198 = load double*, double** %61
%199 = load i32, i32* %79
%200 = mul nsw i32 %199, 2
%201 = add nsw i32 %200, 0
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %198, i64 %202
store double 1.000000e+00, double* %203
%204 = load double*, double** %62
%205 = load i32, i32* %79
%206 = mul nsw i32 %205, 2
%207 = add nsw i32 %206, 1
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %204, i64 %208
store double 1.000000e+00, double* %209
%210 = load double*, double** %54
%211 = load i32, i32* %79
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds double, double* %210, i64 %212
%214 = load double, double* %213
%215 = load double*, double** %54
%216 = load i32, i32* %79
%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** %63
%222 = load i32, i32* %79
%223 = mul nsw i32 %222, 2
%224 = add nsw i32 %223, 0
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double, double* %221, i64 %225
store double %220, double* %226
%227 = load double*, double** %54
%228 = load i32, i32* %79
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %227, i64 %229
%231 = load double, double* %230
%232 = load double*, double** %55
%233 = load i32, i32* %79
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %232, i64 %234
%236 = load double, double* %235
%237 = fmul double %231, %236
%238 = load double*, double** %63
%239 = load i32, i32* %79
%240 = mul nsw i32 %239, 2
%241 = add nsw i32 %240, 1
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds double, double* %238, i64 %242
store double %237, double* %243
%244 = load double*, double** %54
%245 = load i32, i32* %79
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds double, double* %244, i64 %246
%248 = load double, double* %247
%249 = fmul double 2.000000e+00, %248
%250 = load double*, double** %64
%251 = load i32, i32* %79
%252 = mul nsw i32 %251, 2
%253 = add nsw i32 %252, 0
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double, double* %250, i64 %254
store double %249, double* %255
%256 = load double*, double** %55
%257 = load i32, i32* %79
%258 = sext i32 %257 to i64
%259 = getelementptr inbounds double, double* %256, i64 %258
%260 = load double, double* %259
%261 = load double*, double** %64
%262 = load i32, i32* %79
%263 = mul nsw i32 %262, 2
%264 = add nsw i32 %263, 1
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds double, double* %261, i64 %265
store double %260, double* %266
%267 = load double*, double** %54
%268 = load i32, i32* %79
%269 = sext i32 %268 to i64
%270 = getelementptr inbounds double, double* %267, i64 %269
%271 = load double, double* %270
%272 = load double*, double** %65
%273 = load i32, i32* %79
%274 = mul nsw i32 %273, 2
%275 = add nsw i32 %274, 1
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds double, double* %272, i64 %276
store double %271, double* %277
%278 = load double*, double** %55
%279 = load i32, i32* %79
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds double, double* %278, i64 %280
%282 = load double, double* %281
%283 = load double*, double** %54
%284 = load i32, i32* %79
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds double, double* %283, i64 %285
%287 = load double, double* %286
%288 = fmul double %282, %287
%289 = load double*, double** %66
%290 = load i32, i32* %79
%291 = mul nsw i32 %290, 2
%292 = add nsw i32 %291, 0
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds double, double* %289, i64 %293
store double %288, double* %294
%295 = load double*, double** %55
%296 = load i32, i32* %79
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds double, double* %295, i64 %297
%299 = load double, double* %298
%300 = load double*, double** %55
%301 = load i32, i32* %79
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds double, double* %300, i64 %302
%304 = load double, double* %303
%305 = fmul double %299, %304
%306 = load double*, double** %66
%307 = load i32, i32* %79
%308 = mul nsw i32 %307, 2
%309 = add nsw i32 %308, 1
%310 = sext i32 %309 to i64
%311 = getelementptr inbounds double, double* %306, i64 %310
store double %305, double* %311
%312 = load double*, double** %55
%313 = load i32, i32* %79
%314 = sext i32 %313 to i64
%315 = getelementptr inbounds double, double* %312, i64 %314
%316 = load double, double* %315
%317 = load double*, double** %67
%318 = load i32, i32* %79
%319 = mul nsw i32 %318, 2
%320 = add nsw i32 %319, 0
%321 = sext i32 %320 to i64
%322 = getelementptr inbounds double, double* %317, i64 %321
store double %316, double* %322
%323 = load double*, double** %54
%324 = load i32, i32* %79
%325 = sext i32 %324 to i64
%326 = getelementptr inbounds double, double* %323, i64 %325
%327 = load double, double* %326
%328 = load double*, double** %68
%329 = load i32, i32* %79
%330 = mul nsw i32 %329, 2
%331 = add nsw i32 %330, 0
%332 = sext i32 %331 to i64
%333 = getelementptr inbounds double, double* %328, i64 %332
store double %327, double* %333
%334 = load double*, double** %55
%335 = load i32, i32* %79
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds double, double* %334, i64 %336
%338 = load double, double* %337
%339 = fmul double 2.000000e+00, %338
%340 = load double*, double** %68
%341 = load i32, i32* %79
%342 = mul nsw i32 %341, 2
%343 = add nsw i32 %342, 1
%344 = sext i32 %343 to i64
%345 = getelementptr inbounds double, double* %340, i64 %344
store double %339, double* %345
%346 = load double, double* %81
%347 = fmul double 2.000000e+00, %346
%348 = load double*, double** %69
%349 = load i32, i32* %79
%350 = mul nsw i32 %349, 4
%351 = add nsw i32 %350, 0
%352 = sext i32 %351 to i64
%353 = getelementptr inbounds double, double* %348, i64 %352
store double %347, double* %353
%354 = load double, double* %81
%355 = load double*, double** %69
%356 = load i32, i32* %79
%357 = mul nsw i32 %356, 4
%358 = add nsw i32 %357, 3
%359 = sext i32 %358 to i64
%360 = getelementptr inbounds double, double* %355, i64 %359
store double %354, double* %360
%361 = load double, double* %81
%362 = load double*, double** %71
%363 = load i32, i32* %79
%364 = mul nsw i32 %363, 4
%365 = add nsw i32 %364, 2
%366 = sext i32 %365 to i64
%367 = getelementptr inbounds double, double* %362, i64 %366
store double %361, double* %367
%368 = load double, double* %81
%369 = load double*, double** %70
%370 = load i32, i32* %79
%371 = mul nsw i32 %370, 4
%372 = add nsw i32 %371, 0
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds double, double* %369, i64 %373
store double %368, double* %374
%375 = load double, double* %81
%376 = fmul double 2.000000e+00, %375
%377 = load double*, double** %70
%378 = load i32, i32* %79
%379 = mul nsw i32 %378, 4
%380 = add nsw i32 %379, 3
%381 = sext i32 %380 to i64
%382 = getelementptr inbounds double, double* %377, i64 %381
store double %376, double* %382
%383 = load double, double* %81
%384 = load double*, double** %72
%385 = load i32, i32* %79
%386 = mul nsw i32 %385, 4
%387 = add nsw i32 %386, 1
%388 = sext i32 %387 to i64
%389 = getelementptr inbounds double, double* %384, i64 %388
store double %383, double* %389
%390 = load double*, double** %50
%391 = load i32, i32* %79
%392 = mul nsw i32 %391, 2
%393 = add nsw i32 %392, 0
%394 = sext i32 %393 to i64
%395 = getelementptr inbounds double, double* %390, i64 %394
%396 = load double, double* %395
%397 = load double*, double** %50
%398 = load i32, i32* %79
%399 = mul nsw i32 %398, 2
%400 = add nsw i32 %399, 0
%401 = sext i32 %400 to i64
%402 = getelementptr inbounds double, double* %397, i64 %401
%403 = load double, double* %402
%404 = load double*, double** %50
%405 = load i32, i32* %79
%406 = mul nsw i32 %405, 2
%407 = add nsw i32 %406, 1
%408 = sext i32 %407 to i64
%409 = getelementptr inbounds double, double* %404, i64 %408
%410 = load double, double* %409
%411 = load double*, double** %50
%412 = load i32, i32* %79
%413 = mul nsw i32 %412, 2
%414 = add nsw i32 %413, 1
%415 = sext i32 %414 to i64
%416 = getelementptr inbounds double, double* %411, i64 %415
%417 = load double, double* %416
%418 = fmul double %410, %417
%419 = call double @llvm.fmuladd.f64(double %396, double %403, double %418)
%420 = call double @sqrt(double %419)
store double %420, double* %87
%421 = load double*, double** %48
%422 = getelementptr inbounds double, double* %421, i64 0
%423 = load double, double* %422
%424 = fneg double %423
%425 = load double, double* %86
%426 = load double, double* %43
%427 = fmul double %425, %426
%428 = load double*, double** %51
%429 = load i32, i32* %79
%430 = sext i32 %429 to i64
%431 = getelementptr inbounds double, double* %428, i64 %430
%432 = load double, double* %431
%433 = fmul double %427, %432
%434 = load double*, double** %50
%435 = load i32, i32* %79
%436 = mul nsw i32 %435, 2
%437 = add nsw i32 %436, 0
%438 = sext i32 %437 to i64
%439 = getelementptr inbounds double, double* %434, i64 %438
%440 = load double, double* %439
%441 = fmul double %433, %440
%442 = load double, double* %80
%443 = load double, double* %87
%444 = fadd double %443, 1.000000e-08
%445 = fmul double %442, %444
%446 = fdiv double %441, %445
%447 = fsub double %424, %446
%448 = load double*, double** %73
%449 = load i32, i32* %79
%450 = sext i32 %449 to i64
%451 = getelementptr inbounds double, double* %448, i64 %450
store double %447, double* %451
%452 = load double*, double** %48
%453 = getelementptr inbounds double, double* %452, i64 1
%454 = load double, double* %453
%455 = fneg double %454
%456 = load double, double* %86
%457 = load double, double* %43
%458 = fmul double %456, %457
%459 = load double*, double** %51
%460 = load i32, i32* %79
%461 = sext i32 %460 to i64
%462 = getelementptr inbounds double, double* %459, i64 %461
%463 = load double, double* %462
%464 = fmul double %458, %463
%465 = load double*, double** %50
%466 = load i32, i32* %79
%467 = mul nsw i32 %466, 2
%468 = add nsw i32 %467, 1
%469 = sext i32 %468 to i64
%470 = getelementptr inbounds double, double* %465, i64 %469
%471 = load double, double* %470
%472 = fmul double %464, %471
%473 = load double, double* %80
%474 = load double, double* %87
%475 = fadd double %474, 1.000000e-08
%476 = fmul double %473, %475
%477 = fdiv double %472, %476
%478 = fsub double %455, %477
%479 = load double*, double** %74
%480 = load i32, i32* %79
%481 = sext i32 %480 to i64
%482 = getelementptr inbounds double, double* %479, i64 %481
store double %478, double* %482
%483 = load double*, double** %53
%484 = load i32, i32* %79
%485 = mul nsw i32 %484, 2
%486 = add nsw i32 %485, 0
%487 = sext i32 %486 to i64
%488 = getelementptr inbounds double, double* %483, i64 %487
%489 = load double, double* %488
%490 = load double, double* %80
%491 = fdiv double %489, %490
%492 = load double*, double** %75
%493 = load i32, i32* %79
%494 = sext i32 %493 to i64
%495 = getelementptr inbounds double, double* %492, i64 %494
store double %491, double* %495
%496 = load double, double* %80
%497 = fdiv double 1.000000e+00, %496
%498 = load double*, double** %76
%499 = load i32, i32* %79
%500 = mul nsw i32 %499, 2
%501 = add nsw i32 %500, 0
%502 = sext i32 %501 to i64
%503 = getelementptr inbounds double, double* %498, i64 %502
store double %497, double* %503
%504 = load double*, double** %53
%505 = load i32, i32* %79
%506 = mul nsw i32 %505, 2
%507 = add nsw i32 %506, 1
%508 = sext i32 %507 to i64
%509 = getelementptr inbounds double, double* %504, i64 %508
%510 = load double, double* %509
%511 = load double, double* %80
%512 = fdiv double %510, %511
%513 = load double*, double** %77
%514 = load i32, i32* %79
%515 = sext i32 %514 to i64
%516 = getelementptr inbounds double, double* %513, i64 %515
store double %512, double* %516
%517 = load double, double* %80
%518 = fdiv double 1.000000e+00, %517
%519 = load double*, double** %78
%520 = load i32, i32* %79
%521 = mul nsw i32 %520, 2
%522 = add nsw i32 %521, 1
%523 = sext i32 %522 to i64
%524 = getelementptr inbounds double, double* %519, i64 %523
store double %518, double* %524
br label %525
525: ; preds = %92
%526 = load i32, i32* %79
%527 = add nsw i32 %526, 1
store i32 %527, i32* %79
br label %88
528: ; preds = %88
ret void
}

LLVM IR (-O2):
define void @TwophaseNavierStokes_ST_LS_SO_2D_Evaluate(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double* nocapture %8, double* nocapture %9, double* nocapture %10, double* nocapture %11, double* nocapture readnone %12, double* nocapture %13, double* nocapture %14, double* nocapture %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, double* nocapture writeonly %35, double* nocapture writeonly %36, double* nocapture writeonly %37, double* nocapture writeonly %38) {
%40 = icmp sgt i32 %0, 0
br i1 %40, label %41, label %166
41: ; preds = %39
%42 = getelementptr inbounds double, double* %8, i64 1
%43 = zext i32 %0 to i64
br label %44
44: ; preds = %41, %44
%45 = phi i64 [ 0, %41 ], [ %164, %44 ]
%46 = getelementptr inbounds double, double* %9, i64 %45
%47 = load double, double* %46
%48 = tail call i32 (double, double, ...) bitcast (i32 (...)* @smoothedHeaviside to i32 (double, double, ...)*)(double %1, double %47)
%49 = sitofp i32 %48 to double
%50 = load double, double* %46
%51 = tail call i32 (double, double, ...) bitcast (i32 (...)* @smoothedDirac to i32 (double, double, ...)*)(double %1, double %50)
%52 = load double, double* %46
%53 = tail call i32 (double, double, ...) bitcast (i32 (...)* @smoothedHeaviside to i32 (double, double, ...)*)(double %2, double %52)
%54 = sitofp i32 %53 to double
%55 = load double, double* %46
%56 = tail call i32 (double, double, ...) bitcast (i32 (...)* @smoothedDirac to i32 (double, double, ...)*)(double %2, double %55)
%57 = sitofp i32 %56 to double
%58 = fsub double 1.000000e+00, %49
%59 = fmul double %49, %6
%60 = tail call double @llvm.fmuladd.f64(double %4, double %58, double %59)
%61 = fsub double 1.000000e+00, %54
%62 = fmul double %54, %7
%63 = tail call double @llvm.fmuladd.f64(double %5, double %61, double %62)
%64 = getelementptr inbounds double, double* %14, i64 %45
%65 = load double, double* %64
%66 = getelementptr inbounds double, double* %16, i64 %45
store double %65, double* %66
%67 = getelementptr inbounds double, double* %17, i64 %45
store double 1.000000e+00, double* %67
%68 = getelementptr inbounds double, double* %15, i64 %45
%69 = load double, double* %68
%70 = getelementptr inbounds double, double* %18, i64 %45
store double %69, double* %70
%71 = getelementptr inbounds double, double* %19, i64 %45
store double 1.000000e+00, double* %71
%72 = load double, double* %64
%73 = shl nuw nsw i64 %45, 1
%74 = getelementptr inbounds double, double* %20, i64 %73
store double %72, double* %74
%75 = load double, double* %68
%76 = or i64 %73, 1
%77 = getelementptr inbounds double, double* %20, i64 %76
store double %75, double* %77
%78 = getelementptr inbounds double, double* %21, i64 %73
store double 1.000000e+00, double* %78
%79 = getelementptr inbounds double, double* %22, i64 %76
store double 1.000000e+00, double* %79
%80 = load double, double* %64
%81 = fmul double %80, %80
%82 = getelementptr inbounds double, double* %23, i64 %73
store double %81, double* %82
%83 = load double, double* %64
%84 = load double, double* %68
%85 = fmul double %83, %84
%86 = getelementptr inbounds double, double* %23, i64 %76
store double %85, double* %86
%87 = load double, double* %64
%88 = fmul double %87, 2.000000e+00
%89 = getelementptr inbounds double, double* %24, i64 %73
store double %88, double* %89
%90 = load double, double* %68
%91 = getelementptr inbounds double, double* %24, i64 %76
store double %90, double* %91
%92 = load double, double* %64
%93 = getelementptr inbounds double, double* %25, i64 %76
store double %92, double* %93
%94 = load double, double* %68
%95 = load double, double* %64
%96 = fmul double %94, %95
%97 = getelementptr inbounds double, double* %26, i64 %73
store double %96, double* %97
%98 = load double, double* %68
%99 = fmul double %98, %98
%100 = getelementptr inbounds double, double* %26, i64 %76
store double %99, double* %100
%101 = load double, double* %68
%102 = getelementptr inbounds double, double* %27, i64 %73
store double %101, double* %102
%103 = load double, double* %64
%104 = getelementptr inbounds double, double* %28, i64 %73
store double %103, double* %104
%105 = load double, double* %68
%106 = fmul double %105, 2.000000e+00
%107 = getelementptr inbounds double, double* %28, i64 %76
store double %106, double* %107
%108 = fmul double %63, 2.000000e+00
%109 = trunc i64 %45 to i32
%110 = shl nsw i32 %109, 2
%111 = zext i32 %110 to i64
%112 = getelementptr inbounds double, double* %29, i64 %111
store double %108, double* %112
%113 = or i32 %110, 3
%114 = zext i32 %113 to i64
%115 = getelementptr inbounds double, double* %29, i64 %114
store double %63, double* %115
%116 = or i32 %110, 2
%117 = zext i32 %116 to i64
%118 = getelementptr inbounds double, double* %31, i64 %117
store double %63, double* %118
%119 = getelementptr inbounds double, double* %30, i64 %111
store double %63, double* %119
%120 = getelementptr inbounds double, double* %30, i64 %114
store double %108, double* %120
%121 = or i32 %110, 1
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds double, double* %32, i64 %122
store double %63, double* %123
%124 = getelementptr inbounds double, double* %10, i64 %73
%125 = load double, double* %124
%126 = getelementptr inbounds double, double* %10, i64 %76
%127 = load double, double* %126
%128 = fmul double %127, %127
%129 = tail call double @llvm.fmuladd.f64(double %125, double %125, double %128)
%130 = tail call double @sqrt(double %129)
%131 = load double, double* %8
%132 = fneg double %131
%133 = fmul double %57, %3
%134 = getelementptr inbounds double, double* %11, i64 %45
%135 = load double, double* %134
%136 = fmul double %133, %135
%137 = load double, double* %124
%138 = fmul double %136, %137
%139 = fadd double %130, 1.000000e-08
%140 = fmul double %60, %139
%141 = fdiv double %138, %140
%142 = fsub double %132, %141
%143 = getelementptr inbounds double, double* %33, i64 %45
store double %142, double* %143
%144 = load double, double* %42
%145 = fneg double %144
%146 = load double, double* %134
%147 = fmul double %133, %146
%148 = load double, double* %126
%149 = fmul double %147, %148
%150 = fdiv double %149, %140
%151 = fsub double %145, %150
%152 = getelementptr inbounds double, double* %34, i64 %45
store double %151, double* %152
%153 = getelementptr inbounds double, double* %13, i64 %73
%154 = load double, double* %153
%155 = fdiv double %154, %60
%156 = getelementptr inbounds double, double* %35, i64 %45
store double %155, double* %156
%157 = fdiv double 1.000000e+00, %60
%158 = getelementptr inbounds double, double* %36, i64 %73
store double %157, double* %158
%159 = getelementptr inbounds double, double* %13, i64 %76
%160 = load double, double* %159
%161 = fdiv double %160, %60
%162 = getelementptr inbounds double, double* %37, i64 %45
store double %161, double* %162
%163 = getelementptr inbounds double, double* %38, i64 %76
store double %157, double* %163
%164 = add nuw nsw i64 %45, 1
%165 = icmp eq i64 %164, %43
br i1 %165, label %166, label %44
166: ; preds = %44, %39
ret void
}