void eddyViscosity_3D_Update(const int nPoints, const double *nu_t,
                             double *mom_u_diff_ten, double *mom_v_diff_ten,
                             double *mom_w_diff_ten, double *mom_uv_diff_ten,
                             double *mom_uw_diff_ten, double *mom_vu_diff_ten,
                             double *mom_vw_diff_ten, double *mom_wu_diff_ten,
                             double *mom_wv_diff_ten) {
  int k;
  for (k = 0; k < nPoints; k++) {
    mom_u_diff_ten[k * 9 + 0] = 2.0 * nu_t[k];
    mom_u_diff_ten[k * 9 + 4] = nu_t[k];
    mom_u_diff_ten[k * 9 + 8] = nu_t[k];
    mom_uv_diff_ten[k * 9 + 3] = nu_t[k];
    mom_uw_diff_ten[k * 9 + 6] = nu_t[k];
    mom_v_diff_ten[k * 9 + 0] = nu_t[k];
    mom_v_diff_ten[k * 9 + 4] = 2.0 * nu_t[k];
    mom_v_diff_ten[k * 9 + 8] = nu_t[k];
    mom_vu_diff_ten[k * 9 + 1] = nu_t[k];
    mom_vw_diff_ten[k * 9 + 7] = nu_t[k];
    mom_w_diff_ten[k * 9 + 0] = nu_t[k];
    mom_w_diff_ten[k * 9 + 4] = nu_t[k];
    mom_w_diff_ten[k * 9 + 8] = 2.0 * nu_t[k];
    mom_wu_diff_ten[k * 9 + 2] = nu_t[k];
    mom_wv_diff_ten[k * 9 + 5] = nu_t[k];
  }
}


x86 assembly (clang, -O0):
<eddyViscosity_3D_Update>:
push   %rbp
mov    %rsp,%rbp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1348 <eddyViscosity_3D_Update+0x248>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xeae(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xde6(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xd1e(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
imul   $0x9,-0x34(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1136 <eddyViscosity_3D_Update+0x36>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eddyViscosity_3D_Update>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    11f8 <eddyViscosity_3D_Update+0xf8>
mov    0x40(%rsp),%r10
mov    0x38(%rsp),%r11
mov    0x30(%rsp),%r14
mov    0x28(%rsp),%r15
mov    0x20(%rsp),%rax
mov    %edi,%edi
shl    $0x3,%rdi
lea    (%rdi,%rdi,8),%rdi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rsi),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,(%rdx,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x20(%rdx,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x40(%rdx,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x18(%r9,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x30(%rax,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rcx,%rbx,1)
movsd  (%rsi),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rcx,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x40(%rcx,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x8(%r15,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x38(%r14,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,(%r8,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x20(%r8,%rbx,1)
movsd  (%rsi),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x40(%r8,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x10(%r11,%rbx,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x28(%r10,%rbx,1)
add    $0x48,%rbx
add    $0x8,%rsi
cmp    %rbx,%rdi
jne    1140 <eddyViscosity_3D_Update+0x40>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @eddyViscosity_3D_Update(i32 %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10) {
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca i32
store i32 %0, i32* %12
store double* %1, double** %13
store double* %2, double** %14
store double* %3, double** %15
store double* %4, double** %16
store double* %5, double** %17
store double* %6, double** %18
store double* %7, double** %19
store double* %8, double** %20
store double* %9, double** %21
store double* %10, double** %22
store i32 0, i32* %23
br label %24
24: ; preds = %197, %11
%25 = load i32, i32* %23
%26 = load i32, i32* %12
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %200
28: ; preds = %24
%29 = load double*, double** %13
%30 = load i32, i32* %23
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %29, i64 %31
%33 = load double, double* %32
%34 = fmul double 2.000000e+00, %33
%35 = load double*, double** %14
%36 = load i32, i32* %23
%37 = mul nsw i32 %36, 9
%38 = add nsw i32 %37, 0
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %35, i64 %39
store double %34, double* %40
%41 = load double*, double** %13
%42 = load i32, i32* %23
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %41, i64 %43
%45 = load double, double* %44
%46 = load double*, double** %14
%47 = load i32, i32* %23
%48 = mul nsw i32 %47, 9
%49 = add nsw i32 %48, 4
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %46, i64 %50
store double %45, double* %51
%52 = load double*, double** %13
%53 = load i32, i32* %23
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
%56 = load double, double* %55
%57 = load double*, double** %14
%58 = load i32, i32* %23
%59 = mul nsw i32 %58, 9
%60 = add nsw i32 %59, 8
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %57, i64 %61
store double %56, double* %62
%63 = load double*, double** %13
%64 = load i32, i32* %23
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
%67 = load double, double* %66
%68 = load double*, double** %17
%69 = load i32, i32* %23
%70 = mul nsw i32 %69, 9
%71 = add nsw i32 %70, 3
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %68, i64 %72
store double %67, double* %73
%74 = load double*, double** %13
%75 = load i32, i32* %23
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %74, i64 %76
%78 = load double, double* %77
%79 = load double*, double** %18
%80 = load i32, i32* %23
%81 = mul nsw i32 %80, 9
%82 = add nsw i32 %81, 6
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %79, i64 %83
store double %78, double* %84
%85 = load double*, double** %13
%86 = load i32, i32* %23
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %85, i64 %87
%89 = load double, double* %88
%90 = load double*, double** %15
%91 = load i32, i32* %23
%92 = mul nsw i32 %91, 9
%93 = add nsw i32 %92, 0
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds double, double* %90, i64 %94
store double %89, double* %95
%96 = load double*, double** %13
%97 = load i32, i32* %23
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %96, i64 %98
%100 = load double, double* %99
%101 = fmul double 2.000000e+00, %100
%102 = load double*, double** %15
%103 = load i32, i32* %23
%104 = mul nsw i32 %103, 9
%105 = add nsw i32 %104, 4
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %102, i64 %106
store double %101, double* %107
%108 = load double*, double** %13
%109 = load i32, i32* %23
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %108, i64 %110
%112 = load double, double* %111
%113 = load double*, double** %15
%114 = load i32, i32* %23
%115 = mul nsw i32 %114, 9
%116 = add nsw i32 %115, 8
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %113, i64 %117
store double %112, double* %118
%119 = load double*, double** %13
%120 = load i32, i32* %23
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %119, i64 %121
%123 = load double, double* %122
%124 = load double*, double** %19
%125 = load i32, i32* %23
%126 = mul nsw i32 %125, 9
%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** %13
%131 = load i32, i32* %23
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %130, i64 %132
%134 = load double, double* %133
%135 = load double*, double** %20
%136 = load i32, i32* %23
%137 = mul nsw i32 %136, 9
%138 = add nsw i32 %137, 7
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %135, i64 %139
store double %134, double* %140
%141 = load double*, double** %13
%142 = load i32, i32* %23
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %141, i64 %143
%145 = load double, double* %144
%146 = load double*, double** %16
%147 = load i32, i32* %23
%148 = mul nsw i32 %147, 9
%149 = add nsw i32 %148, 0
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %146, i64 %150
store double %145, double* %151
%152 = load double*, double** %13
%153 = load i32, i32* %23
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %152, i64 %154
%156 = load double, double* %155
%157 = load double*, double** %16
%158 = load i32, i32* %23
%159 = mul nsw i32 %158, 9
%160 = add nsw i32 %159, 4
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %157, i64 %161
store double %156, double* %162
%163 = load double*, double** %13
%164 = load i32, i32* %23
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double, double* %163, i64 %165
%167 = load double, double* %166
%168 = fmul double 2.000000e+00, %167
%169 = load double*, double** %16
%170 = load i32, i32* %23
%171 = mul nsw i32 %170, 9
%172 = add nsw i32 %171, 8
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %169, i64 %173
store double %168, double* %174
%175 = load double*, double** %13
%176 = load i32, i32* %23
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double, double* %175, i64 %177
%179 = load double, double* %178
%180 = load double*, double** %21
%181 = load i32, i32* %23
%182 = mul nsw i32 %181, 9
%183 = add nsw i32 %182, 2
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds double, double* %180, i64 %184
store double %179, double* %185
%186 = load double*, double** %13
%187 = load i32, i32* %23
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double, double* %186, i64 %188
%190 = load double, double* %189
%191 = load double*, double** %22
%192 = load i32, i32* %23
%193 = mul nsw i32 %192, 9
%194 = add nsw i32 %193, 5
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds double, double* %191, i64 %195
store double %190, double* %196
br label %197
197: ; preds = %28
%198 = load i32, i32* %23
%199 = add nsw i32 %198, 1
store i32 %199, i32* %23
br label %24
200: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @eddyViscosity_3D_Update(i32 %0, double* nocapture %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture writeonly %5, double* nocapture writeonly %6, double* nocapture writeonly %7, double* nocapture writeonly %8, double* nocapture writeonly %9, double* nocapture writeonly %10) {
%12 = icmp sgt i32 %0, 0
br i1 %12, label %13, label %62
13: ; preds = %11
%14 = zext i32 %0 to i64
br label %15
15: ; preds = %13, %15
%16 = phi i64 [ 0, %13 ], [ %60, %15 ]
%17 = getelementptr inbounds double, double* %1, i64 %16
%18 = load double, double* %17
%19 = fmul double %18, 2.000000e+00
%20 = mul nuw nsw i64 %16, 9
%21 = getelementptr inbounds double, double* %2, i64 %20
store double %19, double* %21
%22 = load double, double* %17
%23 = add nuw nsw i64 %20, 4
%24 = getelementptr inbounds double, double* %2, i64 %23
store double %22, double* %24
%25 = load double, double* %17
%26 = add nuw nsw i64 %20, 8
%27 = getelementptr inbounds double, double* %2, i64 %26
store double %25, double* %27
%28 = load double, double* %17
%29 = add nuw nsw i64 %20, 3
%30 = getelementptr inbounds double, double* %5, i64 %29
store double %28, double* %30
%31 = load double, double* %17
%32 = add nuw nsw i64 %20, 6
%33 = getelementptr inbounds double, double* %6, i64 %32
store double %31, double* %33
%34 = load double, double* %17
%35 = getelementptr inbounds double, double* %3, i64 %20
store double %34, double* %35
%36 = load double, double* %17
%37 = fmul double %36, 2.000000e+00
%38 = getelementptr inbounds double, double* %3, i64 %23
store double %37, double* %38
%39 = load double, double* %17
%40 = getelementptr inbounds double, double* %3, i64 %26
store double %39, double* %40
%41 = load double, double* %17
%42 = add nuw nsw i64 %20, 1
%43 = getelementptr inbounds double, double* %7, i64 %42
store double %41, double* %43
%44 = load double, double* %17
%45 = add nuw nsw i64 %20, 7
%46 = getelementptr inbounds double, double* %8, i64 %45
store double %44, double* %46
%47 = load double, double* %17
%48 = getelementptr inbounds double, double* %4, i64 %20
store double %47, double* %48
%49 = load double, double* %17
%50 = getelementptr inbounds double, double* %4, i64 %23
store double %49, double* %50
%51 = load double, double* %17
%52 = fmul double %51, 2.000000e+00
%53 = getelementptr inbounds double, double* %4, i64 %26
store double %52, double* %53
%54 = load double, double* %17
%55 = add nuw nsw i64 %20, 2
%56 = getelementptr inbounds double, double* %9, i64 %55
store double %54, double* %56
%57 = load double, double* %17
%58 = add nuw nsw i64 %20, 5
%59 = getelementptr inbounds double, double* %10, i64 %58
store double %57, double* %59
%60 = add nuw nsw i64 %16, 1
%61 = icmp eq i64 %60, %14
br i1 %61, label %62, label %15
62: ; preds = %15, %11
ret void
}