double mitchellFilter(double t) {
  double B = (1.0 / 3.0);
  double C = (1.0 / 3.0);
  double tt;
  tt = t * t;
  if (t < 0.0)
    t = -t;
  if (t < 1.0) {
    t = (((12.0 - 9.0 * B - 6.0 * C) * (t * tt)) +
         ((-18.0 + 12.0 * B + 6.0 * C) * tt) + (6.0 - 2.0 * B));
    return (t / 6.0);
  } else if (t < 2.0) {
    t = (((-1.0 * B - 6.0 * C) * (t * tt)) + ((6.0 * B + 30.0 * C) * tt) +
         ((-12.0 * B - 48.0 * C) * t) + (8.0 * B + 24.0 * C));
    return (t / 6.0);
  }
  return 0.0;
}


x86 assembly (clang, -O0):
<mitchellFilter>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1161 <mitchellFilter+0x61>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9f(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1228 <mitchellFilter+0x128>
movsd  -0x18(%rbp),%xmm1
movsd  0xedf(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xebb(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xeba(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  -0x28(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  0xe8b(%rip),%xmm1
mulsd  %xmm1,%xmm3
movsd  0xe87(%rip),%xmm1
addsd  %xmm1,%xmm3
movsd  -0x20(%rbp),%xmm1
movsd  0xe3e(%rip),%xmm4
mulsd  %xmm4,%xmm1
addsd  %xmm3,%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xe18(%rip),%xmm1
subsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xdfe(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    133a <mitchellFilter+0x23a>
movsd  0xde0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    132d <mitchellFilter+0x22d>
movsd  -0x18(%rbp),%xmm0
movsd  0xdd0(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
subsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm2
mulsd  -0x28(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm0
movsd  0xdc1(%rip),%xmm3
mulsd  -0x20(%rbp),%xmm3
movsd  0xd8c(%rip),%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xd8a(%rip),%xmm2
mulsd  -0x20(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  0xd5e(%rip),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xd34(%rip),%xmm2
mulsd  -0x20(%rbp),%xmm2
movsd  0xd1f(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xcf9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    133a <mitchellFilter+0x23a>
jmp    1332 <mitchellFilter+0x232>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mitchellFilter>:
movapd %xmm0,%xmm1
movapd 0xef4(%rip),%xmm3
xorpd  %xmm0,%xmm3
xorpd  %xmm0,%xmm0
movapd %xmm1,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm3
andnpd %xmm1,%xmm2
mulsd  %xmm1,%xmm1
orpd   %xmm3,%xmm2
movsd  0xedb(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    1161 <mitchellFilter+0x61>
movapd %xmm1,%xmm0
mulsd  0xf01(%rip),%xmm1
mulsd  %xmm2,%xmm0
mulsd  0xefd(%rip),%xmm0
addsd  %xmm1,%xmm0
addsd  0xef9(%rip),%xmm0
jmp    11a3 <mitchellFilter+0xa3>
movsd  0xeaf(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    11ab <mitchellFilter+0xab>
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  0xea1(%rip),%xmm1
mulsd  0xea1(%rip),%xmm3
addsd  %xmm1,%xmm3
movsd  0xe9d(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
addsd  0xe95(%rip),%xmm0
divsd  0xe95(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @mitchellFilter(double %0) {
%2 = fmul double %0, %0
%3 = fcmp olt double %0, 0.000000e+00
%4 = fneg double %0
%5 = select i1 %3, double %4, double %0
%6 = fcmp olt double %5, 1.000000e+00
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = fmul double %2, %5
%9 = fmul double %2, -1.200000e+01
%10 = tail call double @llvm.fmuladd.f64(double %8, double 7.000000e+00, double %9)
%11 = fadd double %10, 0x4015555555555555
%12 = fdiv double %11, 6.000000e+00
br label %22
13: ; preds = %1
%14 = fcmp olt double %5, 2.000000e+00
br i1 %14, label %15, label %22
15: ; preds = %13
%16 = fmul double %2, %5
%17 = fmul double %2, 1.200000e+01
%18 = tail call double @llvm.fmuladd.f64(double %16, double 0xC002AAAAAAAAAAAB, double %17)
%19 = tail call double @llvm.fmuladd.f64(double %5, double -2.000000e+01, double %18)
%20 = fadd double %19, 0x4025555555555555
%21 = fdiv double %20, 6.000000e+00
br label %22
22: ; preds = %13, %15, %7
%23 = phi double [ %12, %7 ], [ %21, %15 ], [ 0.000000e+00, %13 ]
ret double %23
}