double _libtcas_filter_MitchellNetravali(double x, double b, double c) {
  double p0, p2, p3, q0, q1, q2, q3;
  p0 = (6 - 2 * b) / 6.0;
  p2 = (-18 + 12 * b + 6 * c) / 6.0;
  p3 = (12 - 9 * b - 6 * c) / 6.0;
  q0 = (8 * b + 24 * c) / 6.0;
  q1 = (-12 * b - 48 * c) / 6.0;
  q2 = (6 * b + 30 * c) / 6.0;
  q3 = (-b - 6 * c) / 6.0;
  if (x < 0)
    x = -x;
  if (x < 1)
    return p0 + (p2 + p3 * x) * x * x;
  else if (x < 2)
    return q0 + (q1 + (q2 + q3 * x) * x) * x;
  else
    return 0;
}


x86 assembly (clang, -O0):
<_libtcas_filter_MitchellNetravali>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xedc(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xefa(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xef6(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xeab(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xe62(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe4a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe64(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xe4f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe17(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe21(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xdf5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdcd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdc7(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xdaa(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd9a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xd70(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd58(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    12e0 <_libtcas_filter_MitchellNetravali+0x1e0>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xd68(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    132b <_libtcas_filter_MitchellNetravali+0x22b>
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    138b <_libtcas_filter_MitchellNetravali+0x28b>
movsd  0xd25(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1383 <_libtcas_filter_MitchellNetravali+0x283>
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
movsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    138b <_libtcas_filter_MitchellNetravali+0x28b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_libtcas_filter_MitchellNetravali>:
movapd %xmm0,%xmm3
movsd  0xf04(%rip),%xmm5
movsd  0xf1c(%rip),%xmm0
mulsd  %xmm2,%xmm0
movapd 0xf40(%rip),%xmm6
xorpd  %xmm3,%xmm6
xorpd  %xmm7,%xmm7
movapd %xmm3,%xmm4
cmpltsd %xmm7,%xmm4
andpd  %xmm4,%xmm6
andnpd %xmm3,%xmm4
orpd   %xmm6,%xmm4
movsd  0xef3(%rip),%xmm3
ucomisd %xmm4,%xmm3
jbe    11a1 <_libtcas_filter_MitchellNetravali+0xa1>
movsd  0xef5(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xef1(%rip),%xmm6
addsd  %xmm6,%xmm3
addsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm6
addsd  0xee5(%rip),%xmm6
divsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm2
addsd  %xmm6,%xmm2
divsd  %xmm5,%xmm2
addsd  %xmm1,%xmm1
movapd %xmm5,%xmm3
subsd  %xmm1,%xmm3
divsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
jmp    121b <_libtcas_filter_MitchellNetravali+0x11b>
movsd  0xe97(%rip),%xmm3
ucomisd %xmm4,%xmm3
jbe    1224 <_libtcas_filter_MitchellNetravali+0x124>
movsd  0xe49(%rip),%xmm6
mulsd  %xmm2,%xmm6
movsd  0xe45(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm6,%xmm3
divsd  %xmm5,%xmm3
movsd  0xe41(%rip),%xmm6
mulsd  %xmm2,%xmm6
movsd  0xe3d(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  %xmm6,%xmm7
mulsd  0xe35(%rip),%xmm2
divsd  %xmm5,%xmm7
subsd  %xmm1,%xmm0
mulsd  %xmm5,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm5,%xmm1
divsd  %xmm5,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm7,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
ret
xorpd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @_libtcas_filter_MitchellNetravali(double %0, double %1, double %2) {
%4 = alloca double
%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
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%15 = load double, double* %6
%16 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %15, double 6.000000e+00)
%17 = fdiv double %16, 6.000000e+00
store double %17, double* %8
%18 = load double, double* %6
%19 = call double @llvm.fmuladd.f64(double 1.200000e+01, double %18, double -1.800000e+01)
%20 = load double, double* %7
%21 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %20, double %19)
%22 = fdiv double %21, 6.000000e+00
store double %22, double* %9
%23 = load double, double* %6
%24 = call double @llvm.fmuladd.f64(double -9.000000e+00, double %23, double 1.200000e+01)
%25 = load double, double* %7
%26 = call double @llvm.fmuladd.f64(double -6.000000e+00, double %25, double %24)
%27 = fdiv double %26, 6.000000e+00
store double %27, double* %10
%28 = load double, double* %6
%29 = load double, double* %7
%30 = fmul double 2.400000e+01, %29
%31 = call double @llvm.fmuladd.f64(double 8.000000e+00, double %28, double %30)
%32 = fdiv double %31, 6.000000e+00
store double %32, double* %11
%33 = load double, double* %6
%34 = load double, double* %7
%35 = fmul double 4.800000e+01, %34
%36 = fneg double %35
%37 = call double @llvm.fmuladd.f64(double -1.200000e+01, double %33, double %36)
%38 = fdiv double %37, 6.000000e+00
store double %38, double* %12
%39 = load double, double* %6
%40 = load double, double* %7
%41 = fmul double 3.000000e+01, %40
%42 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %39, double %41)
%43 = fdiv double %42, 6.000000e+00
store double %43, double* %13
%44 = load double, double* %6
%45 = fneg double %44
%46 = load double, double* %7
%47 = call double @llvm.fmuladd.f64(double -6.000000e+00, double %46, double %45)
%48 = fdiv double %47, 6.000000e+00
store double %48, double* %14
%49 = load double, double* %5
%50 = fcmp olt double %49, 0.000000e+00
br i1 %50, label %51, label %54
51: ; preds = %3
%52 = load double, double* %5
%53 = fneg double %52
store double %53, double* %5
br label %54
54: ; preds = %51, %3
%55 = load double, double* %5
%56 = fcmp olt double %55, 1.000000e+00
br i1 %56, label %57, label %67
57: ; preds = %54
%58 = load double, double* %8
%59 = load double, double* %9
%60 = load double, double* %10
%61 = load double, double* %5
%62 = call double @llvm.fmuladd.f64(double %60, double %61, double %59)
%63 = load double, double* %5
%64 = fmul double %62, %63
%65 = load double, double* %5
%66 = call double @llvm.fmuladd.f64(double %64, double %65, double %58)
store double %66, double* %4
br label %82
67: ; preds = %54
%68 = load double, double* %5
%69 = fcmp olt double %68, 2.000000e+00
br i1 %69, label %70, label %81
70: ; preds = %67
%71 = load double, double* %11
%72 = load double, double* %12
%73 = load double, double* %13
%74 = load double, double* %14
%75 = load double, double* %5
%76 = call double @llvm.fmuladd.f64(double %74, double %75, double %73)
%77 = load double, double* %5
%78 = call double @llvm.fmuladd.f64(double %76, double %77, double %72)
%79 = load double, double* %5
%80 = call double @llvm.fmuladd.f64(double %78, double %79, double %71)
store double %80, double* %4
br label %82
81: ; preds = %67
store double 0.000000e+00, double* %4
br label %82
82: ; preds = %81, %70, %57
%83 = load double, double* %4
ret double %83
}

LLVM IR (-O2):
define double @_libtcas_filter_MitchellNetravali(double %0, double %1, double %2) {
%4 = fmul double %2, 2.400000e+01
%5 = tail call double @llvm.fmuladd.f64(double %1, double 8.000000e+00, double %4)
%6 = fdiv double %5, 6.000000e+00
%7 = fmul double %2, -4.800000e+01
%8 = tail call double @llvm.fmuladd.f64(double %1, double -1.200000e+01, double %7)
%9 = fdiv double %8, 6.000000e+00
%10 = fmul double %2, 3.000000e+01
%11 = tail call double @llvm.fmuladd.f64(double %1, double 6.000000e+00, double %10)
%12 = fdiv double %11, 6.000000e+00
%13 = fneg double %1
%14 = tail call double @llvm.fmuladd.f64(double %2, double -6.000000e+00, double %13)
%15 = fdiv double %14, 6.000000e+00
%16 = fcmp olt double %0, 0.000000e+00
%17 = fneg double %0
%18 = select i1 %16, double %17, double %0
%19 = fcmp olt double %18, 1.000000e+00
br i1 %19, label %20, label %32
20: ; preds = %3
%21 = tail call double @llvm.fmuladd.f64(double %1, double -9.000000e+00, double 1.200000e+01)
%22 = tail call double @llvm.fmuladd.f64(double %2, double -6.000000e+00, double %21)
%23 = fdiv double %22, 6.000000e+00
%24 = tail call double @llvm.fmuladd.f64(double %1, double 1.200000e+01, double -1.800000e+01)
%25 = tail call double @llvm.fmuladd.f64(double %2, double 6.000000e+00, double %24)
%26 = fdiv double %25, 6.000000e+00
%27 = tail call double @llvm.fmuladd.f64(double %1, double -2.000000e+00, double 6.000000e+00)
%28 = fdiv double %27, 6.000000e+00
%29 = tail call double @llvm.fmuladd.f64(double %23, double %18, double %26)
%30 = fmul double %18, %29
%31 = tail call double @llvm.fmuladd.f64(double %30, double %18, double %28)
br label %38
32: ; preds = %3
%33 = fcmp olt double %18, 2.000000e+00
br i1 %33, label %34, label %38
34: ; preds = %32
%35 = tail call double @llvm.fmuladd.f64(double %15, double %18, double %12)
%36 = tail call double @llvm.fmuladd.f64(double %35, double %18, double %9)
%37 = tail call double @llvm.fmuladd.f64(double %36, double %18, double %6)
br label %38
38: ; preds = %32, %34, %20
%39 = phi double [ %31, %20 ], [ %37, %34 ], [ 0.000000e+00, %32 ]
ret double %39
}