double appolonius(double x1, double x2, double x3, double x4, double x5,
                  double x6, double x7, double x8) {
  return x1 * x1 - x3 * x3 * x3 - x4 * x4 - 2 * x7 * (x1 - x3) + 2 * x4 * x8;
}


x86 assembly (clang, -O0):
<appolonius>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe6b(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe35(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<appolonius>:
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm1,%xmm4
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
subsd  %xmm1,%xmm4
subsd  %xmm2,%xmm0
mulsd  0xed0(%rip),%xmm6
mulsd  %xmm6,%xmm0
addsd  %xmm4,%xmm0
addsd  %xmm3,%xmm3
mulsd  %xmm7,%xmm3
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @appolonius(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%17 = load double, double* %9
%18 = load double, double* %9
%19 = load double, double* %11
%20 = load double, double* %11
%21 = fmul double %19, %20
%22 = load double, double* %11
%23 = fmul double %21, %22
%24 = fneg double %23
%25 = call double @llvm.fmuladd.f64(double %17, double %18, double %24)
%26 = load double, double* %12
%27 = load double, double* %12
%28 = fneg double %26
%29 = call double @llvm.fmuladd.f64(double %28, double %27, double %25)
%30 = load double, double* %15
%31 = fmul double 2.000000e+00, %30
%32 = load double, double* %9
%33 = load double, double* %11
%34 = fsub double %32, %33
%35 = fneg double %31
%36 = call double @llvm.fmuladd.f64(double %35, double %34, double %29)
%37 = load double, double* %12
%38 = fmul double 2.000000e+00, %37
%39 = load double, double* %16
%40 = call double @llvm.fmuladd.f64(double %38, double %39, double %36)
ret double %40
}

LLVM IR (-O2):
define double @appolonius(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fneg double %2
%10 = fmul double %9, %2
%11 = fmul double %10, %2
%12 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %11)
%13 = fneg double %3
%14 = tail call double @llvm.fmuladd.f64(double %13, double %3, double %12)
%15 = fsub double %0, %2
%16 = fmul double %6, -2.000000e+00
%17 = tail call double @llvm.fmuladd.f64(double %16, double %15, double %14)
%18 = fmul double %3, 2.000000e+00
%19 = tail call double @llvm.fmuladd.f64(double %18, double %7, double %17)
ret double %19
}