double HermiteInterpolate(double y0, double y1, double y2, double y3, double mu,
                          double tension, double bias) {
  double m0, m1, mu2, mu3;
  double a0, a1, a2, a3;
  mu2 = mu * mu;
  mu3 = mu2 * mu;
  m0 = (y1 - y0) * (1 + bias) * (1 - tension) / 2;
  m0 += (y2 - y1) * (1 - bias) * (1 - tension) / 2;
  m1 = (y2 - y1) * (1 + bias) * (1 - tension) / 2;
  m1 += (y3 - y2) * (1 - bias) * (1 - tension) / 2;
  a0 = 2 * mu3 - 3 * mu2 + 1;
  a1 = mu3 - 2 * mu2 + mu;
  a2 = mu3 - mu2;
  a3 = -2 * mu3 + 3 * mu2;
  return (a0 * y1 + a1 * m0 + a2 * m1 + a3 * y2);
}


x86 assembly (clang, -O0):
<HermiteInterpolate>:
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  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xeb1(%rip),%xmm1
addsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe97(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xe74(%rip),%xmm1
subsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe63(%rip),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe5a(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xe32(%rip),%xmm1
addsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe21(%rip),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe18(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xdf5(%rip),%xmm1
subsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde4(%rip),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xddb(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xdb0(%rip),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd8c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  0xd43(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<HermiteInterpolate>:
movapd %xmm4,%xmm9
mulsd  %xmm4,%xmm9
movapd %xmm9,%xmm8
mulsd  %xmm4,%xmm8
movsd  0xee3(%rip),%xmm10
movapd %xmm1,%xmm11
movsd  0xedd(%rip),%xmm12
mulsd  %xmm9,%xmm12
movapd %xmm8,%xmm13
addsd  %xmm8,%xmm13
movapd %xmm13,%xmm7
subsd  %xmm12,%xmm7
addsd  %xmm10,%xmm7
mulsd  %xmm1,%xmm7
subsd  %xmm0,%xmm1
movapd %xmm6,%xmm14
unpcklpd %xmm6,%xmm14
movapd 0xead(%rip),%xmm0
subpd  %xmm14,%xmm0
addsd  %xmm10,%xmm6
movsd  %xmm6,%xmm0
subsd  %xmm5,%xmm10
unpcklpd %xmm2,%xmm11
subsd  %xmm13,%xmm12
mulsd  %xmm2,%xmm12
unpcklpd %xmm3,%xmm2
subpd  %xmm11,%xmm2
unpcklpd %xmm2,%xmm1
mulpd  %xmm0,%xmm1
unpcklpd %xmm10,%xmm10
mulpd  %xmm10,%xmm1
movapd 0xe78(%rip),%xmm3
mulpd  %xmm3,%xmm1
movapd %xmm1,%xmm5
unpckhpd %xmm1,%xmm5
addsd  %xmm1,%xmm5
mulpd  %xmm0,%xmm2
mulpd  %xmm10,%xmm2
mulpd  %xmm3,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
addsd  %xmm2,%xmm0
movapd %xmm8,%xmm1
subsd  %xmm9,%xmm8
addsd  %xmm9,%xmm9
subsd  %xmm9,%xmm1
addsd  %xmm4,%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm0,%xmm8
addsd  %xmm1,%xmm7
addsd  %xmm8,%xmm7
addsd  %xmm7,%xmm12
movapd %xmm12,%xmm0
ret

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

LLVM IR (-O2):
define double @HermiteInterpolate(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fmul double %4, %4
%9 = fmul double %8, %4
%10 = fsub double %1, %0
%11 = insertelement <2 x double> poison, double %6, i64 0
%12 = shufflevector <2 x double> %11, <2 x double> poison, <2 x i32> zeroinitializer
%13 = fadd <2 x double> %12, <double 1.000000e+00, double poison>
%14 = fsub <2 x double> <double poison, double 1.000000e+00>, %12
%15 = shufflevector <2 x double> %13, <2 x double> %14, <2 x i32> <i32 0, i32 3>
%16 = fsub double 1.000000e+00, %5
%17 = insertelement <2 x double> poison, double %2, i64 0
%18 = insertelement <2 x double> %17, double %3, i64 1
%19 = insertelement <2 x double> poison, double %1, i64 0
%20 = insertelement <2 x double> %19, double %2, i64 1
%21 = fsub <2 x double> %18, %20
%22 = insertelement <2 x double> poison, double %10, i64 0
%23 = shufflevector <2 x double> %22, <2 x double> %21, <2 x i32> <i32 0, i32 2>
%24 = fmul <2 x double> %23, %15
%25 = insertelement <2 x double> poison, double %16, i64 0
%26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
%27 = fmul <2 x double> %26, %24
%28 = fmul <2 x double> %27, <double 5.000000e-01, double 5.000000e-01>
%29 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%30 = fadd <2 x double> %28, %29
%31 = extractelement <2 x double> %30, i64 0
%32 = fmul <2 x double> %21, %15
%33 = fmul <2 x double> %26, %32
%34 = fmul <2 x double> %33, <double 5.000000e-01, double 5.000000e-01>
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%36 = fadd <2 x double> %34, %35
%37 = extractelement <2 x double> %36, i64 0
%38 = fmul double %8, 3.000000e+00
%39 = fneg double %38
%40 = tail call double @llvm.fmuladd.f64(double %9, double 2.000000e+00, double %39)
%41 = fadd double %40, 1.000000e+00
%42 = tail call double @llvm.fmuladd.f64(double %8, double -2.000000e+00, double %9)
%43 = fadd double %42, %4
%44 = fsub double %9, %8
%45 = tail call double @llvm.fmuladd.f64(double %9, double -2.000000e+00, double %38)
%46 = fmul double %43, %31
%47 = tail call double @llvm.fmuladd.f64(double %41, double %1, double %46)
%48 = tail call double @llvm.fmuladd.f64(double %44, double %37, double %47)
%49 = tail call double @llvm.fmuladd.f64(double %45, double %2, double %48)
ret double %49
}