double p_orient3dfast(pa, pb, pc, pd)
double *pa;
double *pb;
double *pc;
double *pd;
{
  double adx, bdx, cdx;
  double ady, bdy, cdy;
  double adz, bdz, cdz;
  adx = pa[0] - pd[0];
  bdx = pb[0] - pd[0];
  cdx = pc[0] - pd[0];
  ady = pa[1] - pd[1];
  bdy = pb[1] - pd[1];
  cdy = pc[1] - pd[1];
  adz = pa[2] - pd[2];
  bdz = pb[2] - pd[2];
  cdz = pc[2] - pd[2];
  return adx * (bdy * cdz - bdz * cdy) + bdx * (cdy * adz - cdz * ady) +
         cdx * (ady * bdz - adz * bdy);
}


x86 assembly (clang, -O0):
<p_orient3dfast>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm5
movsd  -0x68(%rbp),%xmm4
mulsd  -0x40(%rbp),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm4
movsd  -0x58(%rbp),%xmm3
mulsd  -0x48(%rbp),%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):
<p_orient3dfast>:
movsd  (%rdi),%xmm8
movsd  0x8(%rdi),%xmm1
movsd  (%rcx),%xmm0
movsd  0x8(%rcx),%xmm7
subsd  %xmm0,%xmm8
movsd  (%rsi),%xmm9
movsd  0x8(%rsi),%xmm6
subsd  %xmm0,%xmm9
movsd  (%rdx),%xmm5
movsd  0x8(%rdx),%xmm4
subsd  %xmm0,%xmm5
subsd  %xmm7,%xmm1
subsd  %xmm7,%xmm6
subsd  %xmm7,%xmm4
movsd  0x10(%rdi),%xmm7
movsd  0x10(%rcx),%xmm2
subsd  %xmm2,%xmm7
movsd  0x10(%rsi),%xmm0
subsd  %xmm2,%xmm0
movsd  0x10(%rdx),%xmm3
subsd  %xmm2,%xmm3
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm7,%xmm4
mulsd  %xmm6,%xmm7
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm8,%xmm6
mulsd  %xmm1,%xmm3
subsd  %xmm3,%xmm4
mulsd  %xmm9,%xmm4
addsd  %xmm6,%xmm4
mulsd  %xmm1,%xmm0
subsd  %xmm7,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm4,%xmm0
ret

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

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