void matrix_f_atimes(const double *x, double *y, double ex, double ey,
                     double ez, double xa, double ya) {
  double a1, a2;
  double exx, eyy, ezz, exy, eyz, exz;
  a1 = ya;
  a2 = xa - ya;
  exx = ex * ex;
  eyy = ey * ey;
  ezz = ez * ez;
  exy = ex * ey;
  eyz = ey * ez;
  exz = ez * ex;
  y[0] += x[0] * (a1 + a2 * exx);
  y[1] += x[1] * (a1 + a2 * eyy);
  y[2] += x[2] * (a1 + a2 * ezz);
  y[0] += x[1] * (a2 * exy);
  y[1] += x[0] * (a2 * exy);
  y[1] += x[2] * (a2 * eyz);
  y[2] += x[1] * (a2 * eyz);
  y[2] += x[0] * (a2 * exz);
  y[0] += x[2] * (a2 * exz);
}


x86 assembly (clang, -O0):
<matrix_f_atimes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x68(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x68(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x70(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x70(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x78(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x78(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_f_atimes>:
subsd  %xmm4,%xmm3
movapd %xmm0,%xmm7
mulsd  %xmm0,%xmm7
movapd %xmm1,%xmm6
mulsd  %xmm1,%xmm6
movapd %xmm2,%xmm8
mulsd  %xmm3,%xmm7
addsd  %xmm4,%xmm7
mulsd  (%rdi),%xmm7
mulsd  %xmm2,%xmm8
movapd %xmm0,%xmm5
addsd  (%rsi),%xmm7
movsd  %xmm7,(%rsi)
mulsd  %xmm3,%xmm6
addsd  %xmm4,%xmm6
mulsd  0x8(%rdi),%xmm6
mulsd  %xmm1,%xmm5
addsd  0x8(%rsi),%xmm6
movsd  %xmm6,0x8(%rsi)
mulsd  %xmm3,%xmm8
addsd  %xmm4,%xmm8
mulsd  0x10(%rdi),%xmm8
mulsd  %xmm2,%xmm1
addsd  0x10(%rsi),%xmm8
movsd  %xmm8,0x10(%rsi)
mulsd  %xmm3,%xmm5
movsd  0x8(%rdi),%xmm4
mulsd  %xmm5,%xmm4
addsd  %xmm7,%xmm4
movsd  %xmm4,(%rsi)
mulsd  (%rdi),%xmm5
addsd  %xmm6,%xmm5
movsd  %xmm5,0x8(%rsi)
mulsd  %xmm3,%xmm1
movsd  0x10(%rdi),%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm5,%xmm6
movsd  %xmm6,0x8(%rsi)
mulsd  0x8(%rdi),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm8,%xmm1
movsd  %xmm1,0x10(%rsi)
mulsd  %xmm3,%xmm0
movsd  (%rdi),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsi)
mulsd  0x10(%rdi),%xmm0
addsd  %xmm4,%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @matrix_f_atimes(double* %0, double* %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca double
%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
store double* %0, double** %8
store double* %1, double** %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%23 = load double, double* %14
store double %23, double* %15
%24 = load double, double* %13
%25 = load double, double* %14
%26 = fsub double %24, %25
store double %26, double* %16
%27 = load double, double* %10
%28 = load double, double* %10
%29 = fmul double %27, %28
store double %29, double* %17
%30 = load double, double* %11
%31 = load double, double* %11
%32 = fmul double %30, %31
store double %32, double* %18
%33 = load double, double* %12
%34 = load double, double* %12
%35 = fmul double %33, %34
store double %35, double* %19
%36 = load double, double* %10
%37 = load double, double* %11
%38 = fmul double %36, %37
store double %38, double* %20
%39 = load double, double* %11
%40 = load double, double* %12
%41 = fmul double %39, %40
store double %41, double* %21
%42 = load double, double* %12
%43 = load double, double* %10
%44 = fmul double %42, %43
store double %44, double* %22
%45 = load double*, double** %8
%46 = getelementptr inbounds double, double* %45, i64 0
%47 = load double, double* %46
%48 = load double, double* %15
%49 = load double, double* %16
%50 = load double, double* %17
%51 = call double @llvm.fmuladd.f64(double %49, double %50, double %48)
%52 = load double*, double** %9
%53 = getelementptr inbounds double, double* %52, i64 0
%54 = load double, double* %53
%55 = call double @llvm.fmuladd.f64(double %47, double %51, double %54)
store double %55, double* %53
%56 = load double*, double** %8
%57 = getelementptr inbounds double, double* %56, i64 1
%58 = load double, double* %57
%59 = load double, double* %15
%60 = load double, double* %16
%61 = load double, double* %18
%62 = call double @llvm.fmuladd.f64(double %60, double %61, double %59)
%63 = load double*, double** %9
%64 = getelementptr inbounds double, double* %63, i64 1
%65 = load double, double* %64
%66 = call double @llvm.fmuladd.f64(double %58, double %62, double %65)
store double %66, double* %64
%67 = load double*, double** %8
%68 = getelementptr inbounds double, double* %67, i64 2
%69 = load double, double* %68
%70 = load double, double* %15
%71 = load double, double* %16
%72 = load double, double* %19
%73 = call double @llvm.fmuladd.f64(double %71, double %72, double %70)
%74 = load double*, double** %9
%75 = getelementptr inbounds double, double* %74, i64 2
%76 = load double, double* %75
%77 = call double @llvm.fmuladd.f64(double %69, double %73, double %76)
store double %77, double* %75
%78 = load double*, double** %8
%79 = getelementptr inbounds double, double* %78, i64 1
%80 = load double, double* %79
%81 = load double, double* %16
%82 = load double, double* %20
%83 = fmul double %81, %82
%84 = load double*, double** %9
%85 = getelementptr inbounds double, double* %84, i64 0
%86 = load double, double* %85
%87 = call double @llvm.fmuladd.f64(double %80, double %83, double %86)
store double %87, double* %85
%88 = load double*, double** %8
%89 = getelementptr inbounds double, double* %88, i64 0
%90 = load double, double* %89
%91 = load double, double* %16
%92 = load double, double* %20
%93 = fmul double %91, %92
%94 = load double*, double** %9
%95 = getelementptr inbounds double, double* %94, i64 1
%96 = load double, double* %95
%97 = call double @llvm.fmuladd.f64(double %90, double %93, double %96)
store double %97, double* %95
%98 = load double*, double** %8
%99 = getelementptr inbounds double, double* %98, i64 2
%100 = load double, double* %99
%101 = load double, double* %16
%102 = load double, double* %21
%103 = fmul double %101, %102
%104 = load double*, double** %9
%105 = getelementptr inbounds double, double* %104, i64 1
%106 = load double, double* %105
%107 = call double @llvm.fmuladd.f64(double %100, double %103, double %106)
store double %107, double* %105
%108 = load double*, double** %8
%109 = getelementptr inbounds double, double* %108, i64 1
%110 = load double, double* %109
%111 = load double, double* %16
%112 = load double, double* %21
%113 = fmul double %111, %112
%114 = load double*, double** %9
%115 = getelementptr inbounds double, double* %114, i64 2
%116 = load double, double* %115
%117 = call double @llvm.fmuladd.f64(double %110, double %113, double %116)
store double %117, double* %115
%118 = load double*, double** %8
%119 = getelementptr inbounds double, double* %118, i64 0
%120 = load double, double* %119
%121 = load double, double* %16
%122 = load double, double* %22
%123 = fmul double %121, %122
%124 = load double*, double** %9
%125 = getelementptr inbounds double, double* %124, i64 2
%126 = load double, double* %125
%127 = call double @llvm.fmuladd.f64(double %120, double %123, double %126)
store double %127, double* %125
%128 = load double*, double** %8
%129 = getelementptr inbounds double, double* %128, i64 2
%130 = load double, double* %129
%131 = load double, double* %16
%132 = load double, double* %22
%133 = fmul double %131, %132
%134 = load double*, double** %9
%135 = getelementptr inbounds double, double* %134, i64 0
%136 = load double, double* %135
%137 = call double @llvm.fmuladd.f64(double %130, double %133, double %136)
store double %137, double* %135
ret void
}

LLVM IR (-O2):
define void @matrix_f_atimes(double* nocapture %0, double* nocapture %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fsub double %5, %6
%9 = fmul double %2, %2
%10 = fmul double %3, %3
%11 = fmul double %4, %4
%12 = fmul double %2, %3
%13 = fmul double %3, %4
%14 = fmul double %2, %4
%15 = load double, double* %0
%16 = tail call double @llvm.fmuladd.f64(double %8, double %9, double %6)
%17 = load double, double* %1
%18 = tail call double @llvm.fmuladd.f64(double %15, double %16, double %17)
store double %18, double* %1
%19 = getelementptr inbounds double, double* %0, i64 1
%20 = load double, double* %19
%21 = tail call double @llvm.fmuladd.f64(double %8, double %10, double %6)
%22 = getelementptr inbounds double, double* %1, i64 1
%23 = load double, double* %22
%24 = tail call double @llvm.fmuladd.f64(double %20, double %21, double %23)
store double %24, double* %22
%25 = getelementptr inbounds double, double* %0, i64 2
%26 = load double, double* %25
%27 = tail call double @llvm.fmuladd.f64(double %8, double %11, double %6)
%28 = getelementptr inbounds double, double* %1, i64 2
%29 = load double, double* %28
%30 = tail call double @llvm.fmuladd.f64(double %26, double %27, double %29)
store double %30, double* %28
%31 = load double, double* %19
%32 = fmul double %12, %8
%33 = tail call double @llvm.fmuladd.f64(double %31, double %32, double %18)
store double %33, double* %1
%34 = load double, double* %0
%35 = tail call double @llvm.fmuladd.f64(double %34, double %32, double %24)
store double %35, double* %22
%36 = load double, double* %25
%37 = fmul double %13, %8
%38 = tail call double @llvm.fmuladd.f64(double %36, double %37, double %35)
store double %38, double* %22
%39 = load double, double* %19
%40 = tail call double @llvm.fmuladd.f64(double %39, double %37, double %30)
store double %40, double* %28
%41 = load double, double* %0
%42 = fmul double %14, %8
%43 = tail call double @llvm.fmuladd.f64(double %41, double %42, double %40)
store double %43, double* %28
%44 = load double, double* %25
%45 = tail call double @llvm.fmuladd.f64(double %44, double %42, double %33)
store double %45, double* %1
ret void
}