void StokesP_3D_Evaluate(
    const int nPoints, const double rho, const double nu, const double *g,
    const double *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_adv, double *dmom_u_adv_p,
    double *mom_v_adv, double *dmom_v_adv_p, double *mom_w_adv,
    double *dmom_w_adv_p, 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) {
  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_adv[k * 3 + 0] = p[k] / rho;
    dmom_u_adv_p[k * 3 + 0] = 1.0 / rho;
    mom_v_adv[k * 3 + 1] = p[k] / rho;
    dmom_v_adv_p[k * 3 + 1] = 1.0 / rho;
    mom_w_adv[k * 3 + 2] = p[k] / rho;
    dmom_w_adv_p[k * 3 + 2] = 1.0 / rho;
    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];
  }
}


x86 assembly (clang, -O0):
<StokesP_3D_Evaluate>:
push   %rbp
mov    %rsp,%rbp
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    154b <StokesP_3D_Evaluate+0x44b>
mov    -0x30(%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  0xe2e(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%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  0xdff(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xdd0(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x40(%rbp),%rax
imul   $0x3,-0x44(%rbp),%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
imul   $0x3,-0x44(%rbp),%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    0x40(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xd55(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x50(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xd3a(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x58(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xd1f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x60(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xced(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x68(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x70(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xca8(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x78(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x80(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xc60(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x88(%rbp),%rax
imul   $0x3,-0x44(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x90(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x90(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x90(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x98(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x98(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0x98(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0xa0(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0xa0(%rbp),%rax
imul   $0x9,-0x44(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    0xa0(%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    0xa8(%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    0xb0(%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    0xb8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    119c <StokesP_3D_Evaluate+0x9c>
pop    %rbp
ret

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

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

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