double paw_Derivative5_5(int i, double f[]) {
  double tmp;
  tmp = 4.16666666667e-2 * (6.0 * f[i - 4] - 32.0 * f[i - 3] + 72.0 * f[i - 2] -
                            96.0 * f[i - 1] + 50.0 * f[i]);
  return tmp;
}


x86 assembly (clang, -O0):
<paw_Derivative5_5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  0xef6(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xeca(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xea0(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xe76(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xe51(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe39(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<paw_Derivative5_5>:
movslq %edi,%rax
movsd  -0x20(%rsi,%rax,8),%xmm0
movsd  -0x18(%rsi,%rax,8),%xmm1
mulsd  0xee9(%rip),%xmm1
mulsd  0xee9(%rip),%xmm0
movsd  -0x10(%rsi,%rax,8),%xmm2
mulsd  0xee3(%rip),%xmm2
addsd  %xmm1,%xmm0
movsd  -0x8(%rsi,%rax,8),%xmm1
mulsd  0xed9(%rip),%xmm1
addsd  %xmm0,%xmm2
movsd  (%rsi,%rax,8),%xmm0
mulsd  0xed0(%rip),%xmm0
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mulsd  0xec8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @paw_Derivative5_5(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca double
store i32 %0, i32* %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds double, double* %6, i64 %9
%11 = load double, double* %10
%12 = load double*, double** %4
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %12, i64 %15
%17 = load double, double* %16
%18 = fmul double 3.200000e+01, %17
%19 = fneg double %18
%20 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %11, double %19)
%21 = load double*, double** %4
%22 = load i32, i32* %3
%23 = sub nsw i32 %22, 2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %21, i64 %24
%26 = load double, double* %25
%27 = call double @llvm.fmuladd.f64(double 7.200000e+01, double %26, double %20)
%28 = load double*, double** %4
%29 = load i32, i32* %3
%30 = sub nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %28, i64 %31
%33 = load double, double* %32
%34 = call double @llvm.fmuladd.f64(double -9.600000e+01, double %33, double %27)
%35 = load double*, double** %4
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %35, i64 %37
%39 = load double, double* %38
%40 = call double @llvm.fmuladd.f64(double 5.000000e+01, double %39, double %34)
%41 = fmul double 0x3FA5555555556819, %40
store double %41, double* %5
%42 = load double, double* %5
ret double %42
}

LLVM IR (-O2):
define double @paw_Derivative5_5(i32 %0, double* nocapture %1) {
%3 = add nsw i32 %0, -4
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds double, double* %1, i64 %4
%6 = load double, double* %5
%7 = add nsw i32 %0, -3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds double, double* %1, i64 %8
%10 = load double, double* %9
%11 = fmul double %10, -3.200000e+01
%12 = tail call double @llvm.fmuladd.f64(double %6, double 6.000000e+00, double %11)
%13 = add nsw i32 %0, -2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %1, i64 %14
%16 = load double, double* %15
%17 = tail call double @llvm.fmuladd.f64(double %16, double 7.200000e+01, double %12)
%18 = add nsw i32 %0, -1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %1, i64 %19
%21 = load double, double* %20
%22 = tail call double @llvm.fmuladd.f64(double %21, double -9.600000e+01, double %17)
%23 = sext i32 %0 to i64
%24 = getelementptr inbounds double, double* %1, i64 %23
%25 = load double, double* %24
%26 = tail call double @llvm.fmuladd.f64(double %25, double 5.000000e+01, double %22)
%27 = fmul double %26, 0x3FA5555555556819
ret double %27
}