void Stokes_3D_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,
    const double *w, double *mom_u_acc, double *dmom_u_acc_u, double *mom_v_acc,
    double *dmom_v_acc_v, double *mom_w_acc, double *dmom_w_acc_w,
    double *mass_adv, double *dmass_adv_u, double *dmass_adv_v,
    double *dmass_adv_w, double *mom_u_diff_ten, double *mom_v_diff_ten,
    double *mom_w_diff_ten, double *mom_u_source, double *mom_v_source,
    double *mom_w_source, double *mom_u_ham, double *dmom_u_ham_grad_p,
    double *mom_v_ham, double *dmom_v_ham_grad_p, double *mom_w_ham,
    double *dmom_w_ham_grad_p) {
  int k;
  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;
    mom_w_acc[k] = w[k];
    dmom_w_acc_w[k] = 1.0;
    mass_adv[k * 3 + 0] = u[k];
    mass_adv[k * 3 + 1] = v[k];
    mass_adv[k * 3 + 2] = w[k];
    dmass_adv_u[k * 3 + 0] = 1.0;
    dmass_adv_v[k * 3 + 1] = 1.0;
    dmass_adv_w[k * 3 + 2] = 1.0;
    mom_u_diff_ten[k * 9 + 0] = nu;
    mom_u_diff_ten[k * 9 + 4] = nu;
    mom_u_diff_ten[k * 9 + 8] = nu;
    mom_v_diff_ten[k * 9 + 0] = nu;
    mom_v_diff_ten[k * 9 + 4] = nu;
    mom_v_diff_ten[k * 9 + 8] = nu;
    mom_w_diff_ten[k * 9 + 0] = nu;
    mom_w_diff_ten[k * 9 + 4] = nu;
    mom_w_diff_ten[k * 9 + 8] = nu;
    mom_u_source[k] = -g[0];
    mom_v_source[k] = -g[1];
    mom_w_source[k] = -g[2];
    mom_u_ham[k] = grad_p[k * 3 + 0] / rho;
    dmom_u_ham_grad_p[k * 3 + 0] = 1.0 / rho;
    mom_v_ham[k] = grad_p[k * 3 + 1] / rho;
    dmom_v_ham_grad_p[k * 3 + 1] = 1.0 / rho;
    mom_w_ham[k] = grad_p[k * 3 + 2] / rho;
    dmom_w_ham_grad_p[k * 3 + 2] = 1.0 / rho;
  }
}


x86 assembly (clang, -O0):
<Stokes_3D_Evaluate>:
push   %rbp
mov    %rsp,%rbp
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)
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    1543 <Stokes_3D_Evaluate+0x443>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xe27(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xdf8(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xdc9(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
imul   $0x3,-0x44(%rbp),%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    0x48(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x50(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xd4e(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x58(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xd33(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x60(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xd18(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x68(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x68(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x68(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x70(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x70(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x70(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x78(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x78(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x78(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x8,%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    0x80(%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    0x88(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movsd  0x10(%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
imul   $0x3,-0x44(%rbp),%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  0xb7c(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0xa0(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
imul   $0x3,-0x44(%rbp),%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  0xb31(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0xb0(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0xb8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xae6(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0xc0(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11a3 <Stokes_3D_Evaluate+0xa3>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Stokes_3D_Evaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edi,%edi
jle    1309 <Stokes_3D_Evaluate+0x209>
mov    %edi,%eax
mov    0x98(%rsp),%r10
mov    0x90(%rsp),%rdi
movsd  0xed4(%rip),%xmm2
divsd  %xmm0,%xmm2
mov    %eax,%eax
shl    $0x3,%rax
mov    %rax,-0x8(%rsp)
movaps 0xece(%rip),%xmm3
mov    0x70(%rsp),%r13
xor    %ebx,%ebx
movabs $0x3ff0000000000000,%rax
xor    %r11d,%r11d
xor    %r14d,%r14d
nopl   0x0(%rax)
movsd  (%r8,%rbx,1),%xmm4
mov    0x40(%rsp),%rdx
movsd  %xmm4,(%rdx,%rbx,1)
mov    0x48(%rsp),%rdx
mov    %rax,(%rdx,%rbx,1)
movsd  (%r9,%rbx,1),%xmm4
mov    0x50(%rsp),%rdx
movsd  %xmm4,(%rdx,%rbx,1)
mov    0x58(%rsp),%rdx
mov    %rax,(%rdx,%rbx,1)
mov    0x38(%rsp),%rbp
movsd  0x0(%rbp,%rbx,1),%xmm4
mov    0x60(%rsp),%rdx
movsd  %xmm4,(%rdx,%rbx,1)
mov    0x68(%rsp),%rdx
mov    %rax,(%rdx,%rbx,1)
movsd  (%r8,%rbx,1),%xmm4
movsd  %xmm4,0x0(%r13,%r11,1)
movsd  (%r9,%rbx,1),%xmm4
movsd  %xmm4,0x8(%r13,%r11,1)
movsd  0x0(%rbp,%rbx,1),%xmm4
movsd  %xmm4,0x10(%r13,%r11,1)
mov    0x78(%rsp),%rdx
mov    %rax,(%rdx,%r11,1)
mov    0x80(%rsp),%rdx
mov    %rax,0x8(%rdx,%r11,1)
mov    0x88(%rsp),%rdx
mov    %rax,0x10(%rdx,%r11,1)
mov    %r14d,%r12d
movsd  %xmm1,(%rdi,%r12,8)
lea    0x4(%r14),%r15d
movsd  %xmm1,(%rdi,%r15,8)
lea    0x8(%r14),%edx
movsd  %xmm1,(%rdi,%rdx,8)
movsd  %xmm1,(%r10,%r12,8)
movsd  %xmm1,(%r10,%r15,8)
movsd  %xmm1,(%r10,%rdx,8)
mov    0xa0(%rsp),%rbp
movsd  %xmm1,0x0(%rbp,%r12,8)
movsd  %xmm1,0x0(%rbp,%r15,8)
movsd  %xmm1,0x0(%rbp,%rdx,8)
movsd  (%rsi),%xmm4
xorps  %xmm3,%xmm4
mov    0xa8(%rsp),%rdx
movlps %xmm4,(%rdx,%rbx,1)
movsd  0x8(%rsi),%xmm4
xorps  %xmm3,%xmm4
mov    0xb0(%rsp),%rdx
movlps %xmm4,(%rdx,%rbx,1)
movsd  0x10(%rsi),%xmm4
xorps  %xmm3,%xmm4
mov    0xb8(%rsp),%rdx
movlps %xmm4,(%rdx,%rbx,1)
movsd  (%rcx,%r11,1),%xmm4
divsd  %xmm0,%xmm4
mov    0xc0(%rsp),%rdx
movsd  %xmm4,(%rdx,%rbx,1)
mov    0xc8(%rsp),%rdx
movsd  %xmm2,(%rdx,%r11,1)
movsd  0x8(%rcx,%r11,1),%xmm4
divsd  %xmm0,%xmm4
mov    0xd0(%rsp),%rdx
movsd  %xmm4,(%rdx,%rbx,1)
mov    0xd8(%rsp),%rdx
movsd  %xmm2,0x8(%rdx,%r11,1)
movsd  0x10(%rcx,%r11,1),%xmm4
divsd  %xmm0,%xmm4
mov    0xe0(%rsp),%rdx
movsd  %xmm4,(%rdx,%rbx,1)
mov    0xe8(%rsp),%rdx
movsd  %xmm2,0x10(%rdx,%r11,1)
add    $0x9,%r14d
add    $0x18,%r11
add    $0x8,%rbx
cmp    %rbx,-0x8(%rsp)
jne    1160 <Stokes_3D_Evaluate+0x60>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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