void ThreephaseNavierStokes_ST_LS_SO_2D_EvaluateOrig(
    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 rho_s,
    const double nu_s, const double *g, const double *phi, const double *n,
    const double *kappa, const double *phi_s, const double *n_s,
    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 *dmom_u_source_u, double *dmom_u_source_v, double *mom_v_source,
    double *dmom_v_source_u, double *dmom_v_source_v, 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, H_rho_s, d_rho_s, H_mu_s,
      d_mu_s, norm_n, norm_n_s;
  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;
    rho = rho_0;
    nu = nu_0;
    mu = rho_0 * nu_0;
    mom_u_acc[k] = rho * u[k];
    dmom_u_acc_u[k] = rho;
    mom_v_acc[k] = rho * v[k];
    dmom_v_acc_v[k] = rho;
    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] = rho * u[k] * u[k];
    mom_u_adv[k * 2 + 1] = rho * u[k] * v[k];
    dmom_u_adv_u[k * 2 + 0] = 2.0 * rho * u[k];
    dmom_u_adv_u[k * 2 + 1] = rho * v[k];
    dmom_u_adv_v[k * 2 + 1] = rho * u[k];
    mom_v_adv[k * 2 + 0] = rho * v[k] * u[k];
    mom_v_adv[k * 2 + 1] = rho * v[k] * v[k];
    dmom_v_adv_u[k * 2 + 0] = rho * v[k];
    dmom_v_adv_v[k * 2 + 0] = rho * u[k];
    dmom_v_adv_v[k * 2 + 1] = 2.0 * rho * v[k];
    mom_u_diff_ten[k * 4 + 0] = 2.0 * mu;
    mom_u_diff_ten[k * 4 + 3] = mu;
    mom_uv_diff_ten[k * 4 + 2] = mu;
    mom_v_diff_ten[k * 4 + 0] = mu;
    mom_v_diff_ten[k * 4 + 3] = 2.0 * mu;
    mom_vu_diff_ten[k * 4 + 1] = mu;
    norm_n = sqrt(n[k * 2 + 0] * n[k * 2 + 0] + n[k * 2 + 1] * n[k * 2 + 1]);
    norm_n_s =
        sqrt(n_s[k * 2 + 0] * n_s[k * 2 + 0] + n_s[k * 2 + 1] * n_s[k * 2 + 1]);
    mom_u_source[k] = -rho * g[0];
    dmom_u_source_u[k] = 0.0;
    dmom_u_source_v[k] = 0.0;
    mom_v_source[k] = -rho * g[1];
    dmom_v_source_u[k] = 0.0;
    dmom_v_source_v[k] = 0.0;
    mom_u_ham[k] = grad_p[k * 2 + 0];
    dmom_u_ham_grad_p[k * 2 + 0] = 1.0;
    mom_v_ham[k] = grad_p[k * 2 + 1];
    dmom_v_ham_grad_p[k * 2 + 1] = 1.0;
  }
}


x86 assembly (clang, -O0):
<ThreephaseNavierStokes_ST_LS_SO_2D_EvaluateOrig>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0x110(%rbp),%rax
mov    0x108(%rbp),%rax
mov    0x100(%rbp),%rax
mov    0xf8(%rbp),%rax
mov    0xf0(%rbp),%rax
mov    0xe8(%rbp),%rax
mov    0xe0(%rbp),%rax
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
movsd  0x10(%rbp),%xmm8
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)
movsd  %xmm7,-0x48(%rbp)
mov    %rsi,-0x50(%rbp)
mov    %rdx,-0x58(%rbp)
mov    %rcx,-0x60(%rbp)
mov    %r8,-0x68(%rbp)
mov    %r9,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1957 <ThreephaseNavierStokes_ST_LS_SO_2D_EvaluateOrig+0x827>
movsd  -0x10(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1050 <smoothedHeaviside@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1040 <smoothedDirac@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1050 <smoothedHeaviside@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0x2,%al
call   1040 <smoothedDirac@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xd13(%rip),%xmm2
subsd  -0x98(%rbp),%xmm2
ff
movsd  -0x38(%rbp),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xce4(%rip),%xmm2
subsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xcad(%rip),%xmm2
subsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x38(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x48(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xb9c(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xb7f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x78(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x78(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xb12(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x80(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x80(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x88(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x90(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x90(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x98(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0xa0(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x9ca(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0xa0(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x998(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mov    0xa8(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mov    0xa8(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mov    0xb8(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mov    0xb0(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x910(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mov    0xb0(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mov    0xc0(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x60(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x60(%rbp),%rax
mov    -0x74(%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,-0xd8(%rbp)
ff
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x18(%rbp),%rax
mov    -0x74(%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,-0xe0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x50(%rbp),%rax
mulsd  (%rax),%xmm0
mov    0xc8(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0xd0(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0xd8(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x50(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    0xe0(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0xe8(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0xf0(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0xf8(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x100(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0x701(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x108(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x110(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x6bc(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1240 <ThreephaseNavierStokes_ST_LS_SO_2D_EvaluateOrig+0x110>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ThreephaseNavierStokes_ST_LS_SO_2D_EvaluateOrig>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movapd %xmm3,0x30(%rsp)
movsd  %xmm1,0x10(%rsp)
test   %edi,%edi
jle    14b2 <ThreephaseNavierStokes_ST_LS_SO_2D_EvaluateOrig+0x392>
mov    %rdx,%rbx
mov    %rsi,%r14
movapd 0x30(%rsp),%xmm1
mulsd  %xmm1,%xmm4
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,0x50(%rsp)
movsd  %xmm4,0x28(%rsp)
addsd  %xmm4,%xmm4
movsd  %xmm4,0x20(%rsp)
movapd 0xe88(%rip),%xmm2
xorpd  %xmm1,%xmm2
movapd %xmm2,0x40(%rsp)
mov    %edi,%eax
shl    $0x2,%rax
mov    %rax,0x18(%rsp)
mov    0xc8(%rsp),%r12
mov    0xc0(%rsp),%rbp
xor    %r15d,%r15d
movabs $0x3ff0000000000000,%r13
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx,%r15,2),%xmm1
mov    $0x2,%al
call   1040 <smoothedHeaviside@plt>
movsd  (%rbx,%r15,2),%xmm1
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1030 <smoothedDirac@plt>
movsd  (%rbx,%r15,2),%xmm1
movsd  0x10(%rsp),%xmm0
mov    $0x2,%al
call   1040 <smoothedHeaviside@plt>
movsd  (%rbx,%r15,2),%xmm1
movsd  0x10(%rsp),%xmm0
mov    $0x2,%al
call   1030 <smoothedDirac@plt>
movsd  0x0(%rbp,%r15,2),%xmm0
movapd 0x30(%rsp),%xmm2
mulsd  %xmm2,%xmm0
mov    0xd0(%rsp),%rax
movsd  %xmm0,(%rax,%r15,2)
mov    0xd8(%rsp),%rax
movsd  %xmm2,(%rax,%r15,2)
movsd  (%r12,%r15,2),%xmm0
mulsd  %xmm2,%xmm0
mov    0xe0(%rsp),%rax
movsd  %xmm0,(%rax,%r15,2)
mov    0xe8(%rsp),%rax
movsd  %xmm2,(%rax,%r15,2)
movsd  0x0(%rbp,%r15,2),%xmm0
mov    0xf0(%rsp),%rax
movsd  %xmm0,(%rax,%r15,4)
movsd  (%r12,%r15,2),%xmm0
movsd  %xmm0,0x8(%rax,%r15,4)
mov    0xf8(%rsp),%rax
mov    %r13,(%rax,%r15,4)
mov    0x100(%rsp),%rax
mov    %r13,0x8(%rax,%r15,4)
movsd  0x0(%rbp,%r15,2),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
mov    0x108(%rsp),%rax
movsd  %xmm1,(%rax,%r15,4)
movsd  0x0(%rbp,%r15,2),%xmm0
mulsd  %xmm2,%xmm0
mulsd  (%r12,%r15,2),%xmm0
movsd  %xmm0,0x8(%rax,%r15,4)
movsd  0x0(%rbp,%r15,2),%xmm0
movapd 0x50(%rsp),%xmm3
mulsd  %xmm3,%xmm0
mov    0x110(%rsp),%rax
movsd  %xmm0,(%rax,%r15,4)
movsd  (%r12,%r15,2),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rax,%r15,4)
movsd  0x0(%rbp,%r15,2),%xmm0
mulsd  %xmm2,%xmm0
mov    0x118(%rsp),%rax
movsd  %xmm0,0x8(%rax,%r15,4)
movsd  (%r12,%r15,2),%xmm0
mulsd  %xmm2,%xmm0
mulsd  0x0(%rbp,%r15,2),%xmm0
mov    0x120(%rsp),%rax
movsd  %xmm0,(%rax,%r15,4)
movsd  (%r12,%r15,2),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rax,%r15,4)
movsd  (%r12,%r15,2),%xmm0
mulsd  %xmm2,%xmm0
mov    0x128(%rsp),%rax
movsd  %xmm0,(%rax,%r15,4)
movsd  0x0(%rbp,%r15,2),%xmm1
mulsd  %xmm2,%xmm1
movsd  0x8(%rsp),%xmm0
mov    0x130(%rsp),%rax
movsd  %xmm1,(%rax,%r15,4)
movsd  (%r12,%r15,2),%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x8(%rax,%r15,4)
mov    %r15d,%eax
shl    $0x3,%rax
mov    0x138(%rsp),%rdx
movsd  0x20(%rsp),%xmm2
movsd  %xmm2,(%rdx,%rax,1)
lea    0x3(%r15),%ecx
movsd  0x28(%rsp),%xmm1
movsd  %xmm1,(%rdx,%rcx,8)
lea    0x2(%r15),%edx
mov    0x148(%rsp),%rsi
movsd  %xmm1,(%rsi,%rdx,8)
mov    0x140(%rsp),%rdx
movsd  %xmm1,(%rdx,%rax,1)
movsd  %xmm2,(%rdx,%rcx,8)
lea    0x1(%r15),%eax
mov    0x150(%rsp),%rcx
movsd  %xmm1,(%rcx,%rax,8)
movsd  (%r14),%xmm1
movapd 0x40(%rsp),%xmm2
mulsd  %xmm2,%xmm1
mov    0x158(%rsp),%rax
movsd  %xmm1,(%rax,%r15,2)
mov    0x160(%rsp),%rax
movq   $0x0,(%rax,%r15,2)
mov    0x168(%rsp),%rax
movq   $0x0,(%rax,%r15,2)
movsd  0x8(%r14),%xmm1
mulsd  %xmm2,%xmm1
mov    0x170(%rsp),%rax
movsd  %xmm1,(%rax,%r15,2)
mov    0x178(%rsp),%rax
movq   $0x0,(%rax,%r15,2)
mov    0x180(%rsp),%rax
movq   $0x0,(%rax,%r15,2)
mov    0xb8(%rsp),%rcx
movsd  (%rcx,%r15,4),%xmm1
mov    0x188(%rsp),%rax
movsd  %xmm1,(%rax,%r15,2)
mov    0x190(%rsp),%rax
mov    %r13,(%rax,%r15,4)
movsd  0x8(%rcx,%r15,4),%xmm1
mov    0x198(%rsp),%rax
movsd  %xmm1,(%rax,%r15,2)
mov    0x1a0(%rsp),%rax
mov    %r13,0x8(%rax,%r15,4)
add    $0x4,%r15
cmp    %r15,0x18(%rsp)
jne    11b0 <ThreephaseNavierStokes_ST_LS_SO_2D_EvaluateOrig+0x90>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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