void dv3_3point_cross(double *output, double *origo, double *a, double *b) {
  output[0] = (a[1] - origo[1]) * (b[2] - origo[2]) -
              (a[2] - origo[2]) * (b[1] - origo[1]);
  output[1] = (a[2] - origo[2]) * (b[0] - origo[0]) -
              (a[0] - origo[0]) * (b[2] - origo[2]);
  output[2] = (a[0] - origo[0]) * (b[1] - origo[1]) -
              (a[1] - origo[1]) * (b[0] - origo[0]);
}


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

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

LLVM IR (-O0):
define void @dv3_3point_cross(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %7
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %6
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fsub double %11, %14
%16 = load double*, double** %8
%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 2
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %7
%24 = getelementptr inbounds double, double* %23, i64 2
%25 = load double, double* %24
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 2
%28 = load double, double* %27
%29 = fsub double %25, %28
%30 = load double*, double** %8
%31 = getelementptr inbounds double, double* %30, i64 1
%32 = load double, double* %31
%33 = load double*, double** %6
%34 = getelementptr inbounds double, double* %33, i64 1
%35 = load double, double* %34
%36 = fsub double %32, %35
%37 = fmul double %29, %36
%38 = fneg double %37
%39 = call double @llvm.fmuladd.f64(double %15, double %22, double %38)
%40 = load double*, double** %5
%41 = getelementptr inbounds double, double* %40, i64 0
store double %39, double* %41
%42 = load double*, double** %7
%43 = getelementptr inbounds double, double* %42, i64 2
%44 = load double, double* %43
%45 = load double*, double** %6
%46 = getelementptr inbounds double, double* %45, i64 2
%47 = load double, double* %46
%48 = fsub double %44, %47
%49 = load double*, double** %8
%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 0
%54 = load double, double* %53
%55 = fsub double %51, %54
%56 = load double*, double** %7
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
%59 = load double*, double** %6
%60 = getelementptr inbounds double, double* %59, i64 0
%61 = load double, double* %60
%62 = fsub double %58, %61
%63 = load double*, double** %8
%64 = getelementptr inbounds double, double* %63, i64 2
%65 = load double, double* %64
%66 = load double*, double** %6
%67 = getelementptr inbounds double, double* %66, i64 2
%68 = load double, double* %67
%69 = fsub double %65, %68
%70 = fmul double %62, %69
%71 = fneg double %70
%72 = call double @llvm.fmuladd.f64(double %48, double %55, double %71)
%73 = load double*, double** %5
%74 = getelementptr inbounds double, double* %73, i64 1
store double %72, double* %74
%75 = load double*, double** %7
%76 = getelementptr inbounds double, double* %75, i64 0
%77 = load double, double* %76
%78 = load double*, double** %6
%79 = getelementptr inbounds double, double* %78, i64 0
%80 = load double, double* %79
%81 = fsub double %77, %80
%82 = load double*, double** %8
%83 = getelementptr inbounds double, double* %82, i64 1
%84 = load double, double* %83
%85 = load double*, double** %6
%86 = getelementptr inbounds double, double* %85, i64 1
%87 = load double, double* %86
%88 = fsub double %84, %87
%89 = load double*, double** %7
%90 = getelementptr inbounds double, double* %89, i64 1
%91 = load double, double* %90
%92 = load double*, double** %6
%93 = getelementptr inbounds double, double* %92, i64 1
%94 = load double, double* %93
%95 = fsub double %91, %94
%96 = load double*, double** %8
%97 = getelementptr inbounds double, double* %96, i64 0
%98 = load double, double* %97
%99 = load double*, double** %6
%100 = getelementptr inbounds double, double* %99, i64 0
%101 = load double, double* %100
%102 = fsub double %98, %101
%103 = fmul double %95, %102
%104 = fneg double %103
%105 = call double @llvm.fmuladd.f64(double %81, double %88, double %104)
%106 = load double*, double** %5
%107 = getelementptr inbounds double, double* %106, i64 2
store double %105, double* %107
ret void
}

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