double cubic_interpolation_cell(double v[4], double x) {
  return v[1] + 0.5 * x *
                    (v[2] - v[0] +
                     x * (2.0 * v[0] - 5.0 * v[1] + 4.0 * v[2] - v[3] +
                          x * (3.0 * (v[1] - v[2]) + v[3] - v[0])));
}


x86 assembly (clang, -O0):
<cubic_interpolation_cell>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xefa(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm3
movsd  -0x10(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x8(%rbp),%rax
movsd  0xec3(%rip),%xmm5
mulsd  0x8(%rax),%xmm5
movq   %xmm5,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm5
addsd  %xmm4,%xmm4
addsd  %xmm5,%xmm4
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm5
movsd  0xe86(%rip),%xmm6
mulsd  %xmm6,%xmm5
addsd  %xmm4,%xmm5
mov    -0x8(%rbp),%rax
subsd  0x18(%rax),%xmm5
movsd  -0x10(%rbp),%xmm4
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm6
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm6
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm7
movsd  0xe44(%rip),%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubic_interpolation_cell>:
movsd  (%rdi),%xmm2
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm3
movapd %xmm3,%xmm4
subsd  %xmm2,%xmm4
movsd  0xeea(%rip),%xmm5
mulsd  %xmm1,%xmm5
movapd %xmm1,%xmm6
subsd  %xmm3,%xmm6
movsd  0x18(%rdi),%xmm7
mulsd  0xee1(%rip),%xmm6
addsd  %xmm7,%xmm6
subsd  %xmm2,%xmm6
addsd  %xmm2,%xmm2
addsd  %xmm5,%xmm2
movsd  0xeb1(%rip),%xmm5
mulsd  %xmm0,%xmm5
mulsd  0xeb5(%rip),%xmm3
addsd  %xmm2,%xmm3
subsd  %xmm7,%xmm3
mulsd  %xmm0,%xmm6
addsd  %xmm3,%xmm6
mulsd  %xmm6,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cubic_interpolation_cell(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 1
%7 = load double, double* %6
%8 = load double, double* %4
%9 = fmul double 5.000000e-01, %8
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 2
%12 = load double, double* %11
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = fsub double %12, %15
%17 = load double, double* %4
%18 = load double*, double** %3
%19 = getelementptr inbounds double, double* %18, i64 0
%20 = load double, double* %19
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
%24 = fmul double 5.000000e+00, %23
%25 = fneg double %24
%26 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %20, double %25)
%27 = load double*, double** %3
%28 = getelementptr inbounds double, double* %27, i64 2
%29 = load double, double* %28
%30 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %29, double %26)
%31 = load double*, double** %3
%32 = getelementptr inbounds double, double* %31, i64 3
%33 = load double, double* %32
%34 = fsub double %30, %33
%35 = load double, double* %4
%36 = load double*, double** %3
%37 = getelementptr inbounds double, double* %36, i64 1
%38 = load double, double* %37
%39 = load double*, double** %3
%40 = getelementptr inbounds double, double* %39, i64 2
%41 = load double, double* %40
%42 = fsub double %38, %41
%43 = load double*, double** %3
%44 = getelementptr inbounds double, double* %43, i64 3
%45 = load double, double* %44
%46 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %42, double %45)
%47 = load double*, double** %3
%48 = getelementptr inbounds double, double* %47, i64 0
%49 = load double, double* %48
%50 = fsub double %46, %49
%51 = call double @llvm.fmuladd.f64(double %35, double %50, double %34)
%52 = call double @llvm.fmuladd.f64(double %17, double %51, double %16)
%53 = call double @llvm.fmuladd.f64(double %9, double %52, double %7)
ret double %53
}

LLVM IR (-O2):
define double @cubic_interpolation_cell(double* nocapture %0, double %1) {
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %1, 5.000000e-01
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = load double, double* %0
%9 = fsub double %7, %8
%10 = fmul double %4, -5.000000e+00
%11 = tail call double @llvm.fmuladd.f64(double %8, double 2.000000e+00, double %10)
%12 = tail call double @llvm.fmuladd.f64(double %7, double 4.000000e+00, double %11)
%13 = getelementptr inbounds double, double* %0, i64 3
%14 = load double, double* %13
%15 = fsub double %12, %14
%16 = fsub double %4, %7
%17 = tail call double @llvm.fmuladd.f64(double %16, double 3.000000e+00, double %14)
%18 = fsub double %17, %8
%19 = tail call double @llvm.fmuladd.f64(double %1, double %18, double %15)
%20 = tail call double @llvm.fmuladd.f64(double %1, double %19, double %9)
%21 = tail call double @llvm.fmuladd.f64(double %5, double %20, double %4)
ret double %21
}