double tab_interp(xlo, h, x, y, n, i)
double h, x, xlo, *y;
int n, i;
{
  double a, b, c, d;
  double ym, y0, y1, y2;
  double tt;
  ym = y[i - 1];
  y0 = y[i];
  y1 = y[i + 1];
  y2 = y[i + 2];
  d = y0;
  b = .5 * (y1 + ym - 2 * y0);
  a = (3 * (y0 - y1) + y2 - ym) / 6;
  c = (6 * y1 - y2 - 3 * y0 - 2 * ym) / 6;
  tt = (x - xlo) / h - i;
  return d + tt * (c + tt * (b + tt * a));
}


x86 assembly (clang, -O0):
<tab_interp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
mov    %edx,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm1
addsd  -0x50(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm1
movsd  0xe7b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x58(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  0xe53(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  0xe2e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xdfc(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  0xdef(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  0xdca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x28(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm3
movsd  -0x70(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm5
movsd  -0x70(%rbp),%xmm4
movsd  -0x30(%rbp),%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):
<tab_interp>:
movslq %edx,%rax
movsd  -0x8(%rdi,%rax,8),%xmm6
movsd  (%rdi,%rax,8),%xmm4
movsd  0x8(%rdi,%rax,8),%xmm7
movapd %xmm6,%xmm5
addsd  %xmm7,%xmm5
movapd %xmm4,%xmm3
addsd  %xmm4,%xmm3
subsd  %xmm3,%xmm5
mulsd  0xed0(%rip),%xmm5
movapd %xmm0,%xmm8
movapd %xmm4,%xmm0
subsd  %xmm7,%xmm0
mulsd  0xec3(%rip),%xmm0
movsd  0x10(%rdi,%rax,8),%xmm3
addsd  %xmm3,%xmm0
subsd  %xmm6,%xmm0
movsd  0xeb4(%rip),%xmm9
divsd  %xmm9,%xmm0
mulsd  %xmm9,%xmm7
subsd  %xmm3,%xmm7
movsd  0xea6(%rip),%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm7,%xmm3
addsd  %xmm6,%xmm6
subsd  %xmm6,%xmm3
divsd  %xmm9,%xmm3
subsd  %xmm8,%xmm2
xorps  %xmm6,%xmm6
cvtsi2sd %eax,%xmm6
divsd  %xmm1,%xmm2
subsd  %xmm6,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm5,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm4,%xmm0
ret

LLVM IR (-O0):
define double @tab_interp(double %0, double %1, double %2, double* %3, i32 %4, i32 %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%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
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double* %3, double** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%22 = load double*, double** %10
%23 = load i32, i32* %12
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %22, i64 %25
%27 = load double, double* %26
store double %27, double* %17
%28 = load double*, double** %10
%29 = load i32, i32* %12
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
%32 = load double, double* %31
store double %32, double* %18
%33 = load double*, double** %10
%34 = load i32, i32* %12
%35 = add nsw i32 %34, 1
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %33, i64 %36
%38 = load double, double* %37
store double %38, double* %19
%39 = load double*, double** %10
%40 = load i32, i32* %12
%41 = add nsw i32 %40, 2
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %39, i64 %42
%44 = load double, double* %43
store double %44, double* %20
%45 = load double, double* %18
store double %45, double* %16
%46 = load double, double* %19
%47 = load double, double* %17
%48 = fadd double %46, %47
%49 = load double, double* %18
%50 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %49, double %48)
%51 = fmul double 5.000000e-01, %50
store double %51, double* %14
%52 = load double, double* %18
%53 = load double, double* %19
%54 = fsub double %52, %53
%55 = load double, double* %20
%56 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %54, double %55)
%57 = load double, double* %17
%58 = fsub double %56, %57
%59 = fdiv double %58, 6.000000e+00
store double %59, double* %13
%60 = load double, double* %19
%61 = load double, double* %20
%62 = fneg double %61
%63 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %60, double %62)
%64 = load double, double* %18
%65 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %64, double %63)
%66 = load double, double* %17
%67 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %66, double %65)
%68 = fdiv double %67, 6.000000e+00
store double %68, double* %15
%69 = load double, double* %9
%70 = load double, double* %7
%71 = fsub double %69, %70
%72 = load double, double* %8
%73 = fdiv double %71, %72
%74 = load i32, i32* %12
%75 = sitofp i32 %74 to double
%76 = fsub double %73, %75
store double %76, double* %21
%77 = load double, double* %16
%78 = load double, double* %21
%79 = load double, double* %15
%80 = load double, double* %21
%81 = load double, double* %14
%82 = load double, double* %21
%83 = load double, double* %13
%84 = call double @llvm.fmuladd.f64(double %82, double %83, double %81)
%85 = call double @llvm.fmuladd.f64(double %80, double %84, double %79)
%86 = call double @llvm.fmuladd.f64(double %78, double %85, double %77)
ret double %86
}

LLVM IR (-O2):
define double @tab_interp(double %0, double %1, double %2, double* nocapture %3, i32 %4, i32 %5) {
%7 = add nsw i32 %5, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds double, double* %3, i64 %8
%10 = load double, double* %9
%11 = sext i32 %5 to i64
%12 = getelementptr inbounds double, double* %3, i64 %11
%13 = load double, double* %12
%14 = add nsw i32 %5, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %3, i64 %15
%17 = load double, double* %16
%18 = add nsw i32 %5, 2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %3, i64 %19
%21 = load double, double* %20
%22 = fadd double %10, %17
%23 = tail call double @llvm.fmuladd.f64(double %13, double -2.000000e+00, double %22)
%24 = fmul double %23, 5.000000e-01
%25 = fsub double %13, %17
%26 = tail call double @llvm.fmuladd.f64(double %25, double 3.000000e+00, double %21)
%27 = fsub double %26, %10
%28 = fdiv double %27, 6.000000e+00
%29 = fneg double %21
%30 = tail call double @llvm.fmuladd.f64(double %17, double 6.000000e+00, double %29)
%31 = tail call double @llvm.fmuladd.f64(double %13, double -3.000000e+00, double %30)
%32 = tail call double @llvm.fmuladd.f64(double %10, double -2.000000e+00, double %31)
%33 = fdiv double %32, 6.000000e+00
%34 = fsub double %2, %0
%35 = fdiv double %34, %1
%36 = sitofp i32 %5 to double
%37 = fsub double %35, %36
%38 = tail call double @llvm.fmuladd.f64(double %37, double %28, double %24)
%39 = tail call double @llvm.fmuladd.f64(double %37, double %38, double %33)
%40 = tail call double @llvm.fmuladd.f64(double %37, double %39, double %13)
ret double %40
}