double ellipse2tr(double x, double y, double AA, double BB, double CC,
                  double DD, double EE, double FF) {
  return (AA * x * x + BB * x * y + CC * y * y + DD * x + EE * y + FF);
}


x86 assembly (clang, -O0):
<ellipse2tr>:
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  -0x18(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x40(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ellipse2tr>:
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
mulsd  %xmm5,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm1,%xmm6
addsd  %xmm6,%xmm0
addsd  %xmm7,%xmm0
ret

LLVM IR (-O0):
define double @ellipse2tr(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* %11
%18 = load double, double* %9
%19 = fmul double %17, %18
%20 = load double, double* %9
%21 = load double, double* %12
%22 = load double, double* %9
%23 = fmul double %21, %22
%24 = load double, double* %10
%25 = fmul double %23, %24
%26 = call double @llvm.fmuladd.f64(double %19, double %20, double %25)
%27 = load double, double* %13
%28 = load double, double* %10
%29 = fmul double %27, %28
%30 = load double, double* %10
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double %26)
%32 = load double, double* %14
%33 = load double, double* %9
%34 = call double @llvm.fmuladd.f64(double %32, double %33, double %31)
%35 = load double, double* %15
%36 = load double, double* %10
%37 = call double @llvm.fmuladd.f64(double %35, double %36, double %34)
%38 = load double, double* %16
%39 = fadd double %37, %38
ret double %39
}

LLVM IR (-O2):
define double @ellipse2tr(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fmul double %0, %2
%10 = fmul double %0, %3
%11 = fmul double %10, %1
%12 = tail call double @llvm.fmuladd.f64(double %9, double %0, double %11)
%13 = fmul double %1, %4
%14 = tail call double @llvm.fmuladd.f64(double %13, double %1, double %12)
%15 = tail call double @llvm.fmuladd.f64(double %5, double %0, double %14)
%16 = tail call double @llvm.fmuladd.f64(double %6, double %1, double %15)
%17 = fadd double %16, %7
ret double %17
}