void NavierStokes_2D_Evaluate(
    const int nPoints, const double rho, const double nu, const double *g,
    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;
  for (k = 0; k < nPoints; k++) {
    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):
<NavierStokes_2D_Evaluate>:
push   %rbp
mov    %rsp,%rbp
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)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    158e <NavierStokes_2D_Evaluate+0x48e>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xe35(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xe06(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xda5(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xd88(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xd1d(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x58(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x60(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x68(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x70(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xc0d(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    0x70(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x78(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x78(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x80(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x80(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x88(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x90(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x98(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xaec(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0xa0(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0xa8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xa9d(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0xb0(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1195 <NavierStokes_2D_Evaluate+0x95>
pop    %rbp
ret

x86 assembly (clang, -O2):
<NavierStokes_2D_Evaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edi,%edi
jle    131e <NavierStokes_2D_Evaluate+0x21e>
mov    0x98(%rsp),%rax
mov    0x88(%rsp),%r10
mov    0x78(%rsp),%r11
mov    0x70(%rsp),%r14
movsd  0xecc(%rip),%xmm2
divsd  %xmm0,%xmm2
mov    %edi,%r15d
shl    $0x2,%r15
movaps 0xeca(%rip),%xmm3
mov    0x58(%rsp),%rbp
xor    %r12d,%r12d
movabs $0x3ff0000000000000,%r13
nopl   0x0(%rax,%rax,1)
movsd  (%r8,%r12,2),%xmm4
mov    0x38(%rsp),%rdx
movsd  %xmm4,(%rdx,%r12,2)
mov    0x40(%rsp),%rdx
mov    %r13,(%rdx,%r12,2)
movsd  (%r9,%r12,2),%xmm4
mov    0x48(%rsp),%rdx
movsd  %xmm4,(%rdx,%r12,2)
mov    0x50(%rsp),%rdx
mov    %r13,(%rdx,%r12,2)
movsd  (%r8,%r12,2),%xmm4
movsd  %xmm4,0x0(%rbp,%r12,4)
movsd  (%r9,%r12,2),%xmm4
movsd  %xmm4,0x8(%rbp,%r12,4)
mov    0x60(%rsp),%rdx
mov    %r13,(%rdx,%r12,4)
mov    0x68(%rsp),%rdx
mov    %r13,0x8(%rdx,%r12,4)
movsd  (%r8,%r12,2),%xmm4
mulsd  %xmm4,%xmm4
movsd  %xmm4,(%r14,%r12,4)
movsd  (%r8,%r12,2),%xmm4
mulsd  (%r9,%r12,2),%xmm4
movsd  %xmm4,0x8(%r14,%r12,4)
movsd  (%r8,%r12,2),%xmm4
addsd  %xmm4,%xmm4
movsd  %xmm4,(%r11,%r12,4)
movsd  (%r9,%r12,2),%xmm4
movsd  %xmm4,0x8(%r11,%r12,4)
movsd  (%r8,%r12,2),%xmm4
mov    0x80(%rsp),%rdx
movsd  %xmm4,0x8(%rdx,%r12,4)
movsd  (%r9,%r12,2),%xmm4
mulsd  (%r8,%r12,2),%xmm4
movsd  %xmm4,(%r10,%r12,4)
movsd  (%r9,%r12,2),%xmm4
mulsd  %xmm4,%xmm4
movsd  %xmm4,0x8(%r10,%r12,4)
movsd  (%r9,%r12,2),%xmm4
mov    0x90(%rsp),%rdx
movsd  %xmm4,(%rdx,%r12,4)
movsd  (%r8,%r12,2),%xmm4
movsd  %xmm4,(%rax,%r12,4)
movsd  (%r9,%r12,2),%xmm4
addsd  %xmm4,%xmm4
movsd  %xmm4,0x8(%rax,%r12,4)
mov    %r12d,%edi
shl    $0x3,%rdi
mov    0xa0(%rsp),%rbx
movsd  %xmm1,(%rbx,%rdi,1)
lea    0x3(%r12),%edx
movsd  %xmm1,(%rbx,%rdx,8)
mov    0xa8(%rsp),%rbx
movsd  %xmm1,(%rbx,%rdi,1)
movsd  %xmm1,(%rbx,%rdx,8)
movsd  (%rsi),%xmm4
xorps  %xmm3,%xmm4
mov    0xb0(%rsp),%rdx
movlps %xmm4,(%rdx,%r12,2)
movsd  0x8(%rsi),%xmm4
xorps  %xmm3,%xmm4
mov    0xb8(%rsp),%rdx
movlps %xmm4,(%rdx,%r12,2)
movsd  (%rcx,%r12,4),%xmm4
divsd  %xmm0,%xmm4
mov    0xc0(%rsp),%rdx
movsd  %xmm4,(%rdx,%r12,2)
mov    0xc8(%rsp),%rdx
movsd  %xmm2,(%rdx,%r12,4)
movsd  0x8(%rcx,%r12,4),%xmm4
divsd  %xmm0,%xmm4
mov    0xd0(%rsp),%rdx
movsd  %xmm4,(%rdx,%r12,2)
mov    0xd8(%rsp),%rdx
movsd  %xmm2,0x8(%rdx,%r12,4)
add    $0x4,%r12
cmp    %r12,%r15
jne    1160 <NavierStokes_2D_Evaluate+0x60>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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