double M0(double a[3], double b[3], double c[3]) {
  enum { X, Y, Z };
  return (+a[X] * (b[Y] * c[Z] - b[Z] * c[Y]) -
          a[Y] * (b[X] * c[Z] - b[Z] * c[X]) +
          a[Z] * (b[X] * c[Y] - b[Y] * c[X]));
}


x86 assembly (clang, -O0):
<M0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm5
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm4
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm4
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @M0(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = load double*, double** %6
%14 = getelementptr inbounds double, double* %13, i64 2
%15 = load double, double* %14
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 2
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fmul double %18, %21
%23 = fneg double %22
%24 = call double @llvm.fmuladd.f64(double %12, double %15, double %23)
%25 = load double*, double** %4
%26 = getelementptr inbounds double, double* %25, i64 1
%27 = load double, double* %26
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 0
%30 = load double, double* %29
%31 = load double*, double** %6
%32 = getelementptr inbounds double, double* %31, i64 2
%33 = load double, double* %32
%34 = load double*, double** %5
%35 = getelementptr inbounds double, double* %34, i64 2
%36 = load double, double* %35
%37 = load double*, double** %6
%38 = getelementptr inbounds double, double* %37, i64 0
%39 = load double, double* %38
%40 = fmul double %36, %39
%41 = fneg double %40
%42 = call double @llvm.fmuladd.f64(double %30, double %33, double %41)
%43 = fmul double %27, %42
%44 = fneg double %43
%45 = call double @llvm.fmuladd.f64(double %9, double %24, double %44)
%46 = load double*, double** %4
%47 = getelementptr inbounds double, double* %46, i64 2
%48 = load double, double* %47
%49 = load double*, double** %5
%50 = getelementptr inbounds double, double* %49, i64 0
%51 = load double, double* %50
%52 = load double*, double** %6
%53 = getelementptr inbounds double, double* %52, i64 1
%54 = load double, double* %53
%55 = load double*, double** %5
%56 = getelementptr inbounds double, double* %55, i64 1
%57 = load double, double* %56
%58 = load double*, double** %6
%59 = getelementptr inbounds double, double* %58, i64 0
%60 = load double, double* %59
%61 = fmul double %57, %60
%62 = fneg double %61
%63 = call double @llvm.fmuladd.f64(double %51, double %54, double %62)
%64 = call double @llvm.fmuladd.f64(double %48, double %63, double %45)
ret double %64
}

LLVM IR (-O2):
define double @M0(double* nocapture %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %2, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %2, i64 1
%12 = load double, double* %11
%13 = fneg double %10
%14 = fmul double %12, %13
%15 = tail call double @llvm.fmuladd.f64(double %6, double %8, double %14)
%16 = getelementptr inbounds double, double* %0, i64 1
%17 = load double, double* %16
%18 = load double, double* %1
%19 = load double, double* %2
%20 = fmul double %19, %13
%21 = tail call double @llvm.fmuladd.f64(double %18, double %8, double %20)
%22 = fneg double %17
%23 = fmul double %21, %22
%24 = tail call double @llvm.fmuladd.f64(double %4, double %15, double %23)
%25 = getelementptr inbounds double, double* %0, i64 2
%26 = load double, double* %25
%27 = fneg double %6
%28 = fmul double %19, %27
%29 = tail call double @llvm.fmuladd.f64(double %18, double %12, double %28)
%30 = tail call double @llvm.fmuladd.f64(double %26, double %29, double %24)
ret double %30
}