void eddyViscosity_3D_Update_sd(
    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 * 3 + 0] += 2.0 * nu_t[k];
    mom_u_diff_ten[k * 3 + 1] += nu_t[k];
    mom_u_diff_ten[k * 3 + 2] += nu_t[k];
    mom_uv_diff_ten[k] += nu_t[k];
    mom_uw_diff_ten[k] += nu_t[k];
    mom_v_diff_ten[k * 3 + 0] += nu_t[k];
    mom_v_diff_ten[k * 3 + 1] += 2.0 * nu_t[k];
    mom_v_diff_ten[k * 3 + 2] += nu_t[k];
    mom_vu_diff_ten[k] += nu_t[k];
    mom_vw_diff_ten[k] += nu_t[k];
    mom_w_diff_ten[k * 3 + 0] += nu_t[k];
    mom_w_diff_ten[k * 3 + 1] += nu_t[k];
    mom_w_diff_ten[k * 3 + 2] += 2.0 * nu_t[k];
    mom_wu_diff_ten[k] += nu_t[k];
    mom_wv_diff_ten[k] += nu_t[k];
  }
}


x86 assembly (clang, -O0):
<eddyViscosity_3D_Update_sd>:
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    136f <eddyViscosity_3D_Update_sd+0x26f>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1136 <eddyViscosity_3D_Update_sd+0x36>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eddyViscosity_3D_Update_sd>:
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edi,%edi
jle    125c <eddyViscosity_3D_Update_sd+0x15c>
mov    0x48(%rsp),%r10
mov    0x40(%rsp),%r11
mov    0x38(%rsp),%r14
mov    0x30(%rsp),%r15
mov    0x28(%rsp),%r12
mov    %edi,%edi
shl    $0x3,%rdi
mov    $0x2,%ebx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsi,%rax,1),%xmm0
addsd  %xmm0,%xmm0
addsd  -0x10(%rdx,%rbx,8),%xmm0
movsd  %xmm0,-0x10(%rdx,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  -0x8(%rdx,%rbx,8),%xmm0
movsd  %xmm0,-0x8(%rdx,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%rdx,%rbx,8),%xmm0
movsd  %xmm0,(%rdx,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%r9,%rax,1),%xmm0
movsd  %xmm0,(%r9,%rax,1)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%r12,%rax,1),%xmm0
movsd  %xmm0,(%r12,%rax,1)
movsd  (%rsi,%rax,1),%xmm0
addsd  -0x10(%rcx,%rbx,8),%xmm0
movsd  %xmm0,-0x10(%rcx,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  %xmm0,%xmm0
addsd  -0x8(%rcx,%rbx,8),%xmm0
movsd  %xmm0,-0x8(%rcx,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%rcx,%rbx,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%r15,%rax,1),%xmm0
movsd  %xmm0,(%r15,%rax,1)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%r14,%rax,1),%xmm0
movsd  %xmm0,(%r14,%rax,1)
movsd  (%rsi,%rax,1),%xmm0
addsd  -0x10(%r8,%rbx,8),%xmm0
movsd  %xmm0,-0x10(%r8,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  -0x8(%r8,%rbx,8),%xmm0
movsd  %xmm0,-0x8(%r8,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  %xmm0,%xmm0
addsd  (%r8,%rbx,8),%xmm0
movsd  %xmm0,(%r8,%rbx,8)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%r11,%rax,1),%xmm0
movsd  %xmm0,(%r11,%rax,1)
movsd  (%rsi,%rax,1),%xmm0
addsd  (%r10,%rax,1),%xmm0
movsd  %xmm0,(%r10,%rax,1)
add    $0x3,%rbx
add    $0x8,%rax
cmp    %rax,%rdi
jne    1140 <eddyViscosity_3D_Update_sd+0x40>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @eddyViscosity_3D_Update_sd(i32 %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8, double* nocapture %9, double* nocapture %10) {
%12 = icmp sgt i32 %0, 0
br i1 %12, label %13, label %83
13: ; preds = %11
%14 = zext i32 %0 to i64
br label %15
15: ; preds = %13, %15
%16 = phi i64 [ 0, %13 ], [ %81, %15 ]
%17 = getelementptr inbounds double, double* %1, i64 %16
%18 = load double, double* %17
%19 = mul nuw nsw i64 %16, 3
%20 = getelementptr inbounds double, double* %2, i64 %19
%21 = load double, double* %20
%22 = tail call double @llvm.fmuladd.f64(double %18, double 2.000000e+00, double %21)
store double %22, double* %20
%23 = load double, double* %17
%24 = add nuw nsw i64 %19, 1
%25 = getelementptr inbounds double, double* %2, i64 %24
%26 = load double, double* %25
%27 = fadd double %23, %26
store double %27, double* %25
%28 = load double, double* %17
%29 = add nuw nsw i64 %19, 2
%30 = getelementptr inbounds double, double* %2, i64 %29
%31 = load double, double* %30
%32 = fadd double %28, %31
store double %32, double* %30
%33 = load double, double* %17
%34 = getelementptr inbounds double, double* %5, i64 %16
%35 = load double, double* %34
%36 = fadd double %33, %35
store double %36, double* %34
%37 = load double, double* %17
%38 = getelementptr inbounds double, double* %6, i64 %16
%39 = load double, double* %38
%40 = fadd double %37, %39
store double %40, double* %38
%41 = load double, double* %17
%42 = getelementptr inbounds double, double* %3, i64 %19
%43 = load double, double* %42
%44 = fadd double %41, %43
store double %44, double* %42
%45 = load double, double* %17
%46 = getelementptr inbounds double, double* %3, i64 %24
%47 = load double, double* %46
%48 = tail call double @llvm.fmuladd.f64(double %45, double 2.000000e+00, double %47)
store double %48, double* %46
%49 = load double, double* %17
%50 = getelementptr inbounds double, double* %3, i64 %29
%51 = load double, double* %50
%52 = fadd double %49, %51
store double %52, double* %50
%53 = load double, double* %17
%54 = getelementptr inbounds double, double* %7, i64 %16
%55 = load double, double* %54
%56 = fadd double %53, %55
store double %56, double* %54
%57 = load double, double* %17
%58 = getelementptr inbounds double, double* %8, i64 %16
%59 = load double, double* %58
%60 = fadd double %57, %59
store double %60, double* %58
%61 = load double, double* %17
%62 = getelementptr inbounds double, double* %4, i64 %19
%63 = load double, double* %62
%64 = fadd double %61, %63
store double %64, double* %62
%65 = load double, double* %17
%66 = getelementptr inbounds double, double* %4, i64 %24
%67 = load double, double* %66
%68 = fadd double %65, %67
store double %68, double* %66
%69 = load double, double* %17
%70 = getelementptr inbounds double, double* %4, i64 %29
%71 = load double, double* %70
%72 = tail call double @llvm.fmuladd.f64(double %69, double 2.000000e+00, double %71)
store double %72, double* %70
%73 = load double, double* %17
%74 = getelementptr inbounds double, double* %9, i64 %16
%75 = load double, double* %74
%76 = fadd double %73, %75
store double %76, double* %74
%77 = load double, double* %17
%78 = getelementptr inbounds double, double* %10, i64 %16
%79 = load double, double* %78
%80 = fadd double %77, %79
store double %80, double* %78
%81 = add nuw nsw i64 %16, 1
%82 = icmp eq i64 %81, %14
br i1 %82, label %83, label %15
83: ; preds = %15, %11
ret void
}