double cox_deboor_i(double x, unsigned int N, unsigned int p,
                    const double tau[N + 1], const double coeff[N + 1]) {
  if (0 == N)
    return coeff[0];
  double coeff2[N];
  cox_deboor_step(N, coeff2, x, p, tau, coeff);
  return cox_deboor_i(x, N - 1, p, tau, coeff2);
}


x86 assembly (clang, -O0):
<cox_deboor_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
jne    1158 <cox_deboor_i+0x38>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c0 <cox_deboor_i+0xa0>
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x40(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%al
call   1040 <cox_deboor_step@plt>
mov    -0x40(%rbp),%rcx
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
sub    $0x1,%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <cox_deboor_i@plt>
movsd  %xmm0,-0x8(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
movsd  -0x8(%rbp),%xmm0
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cox_deboor_i>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r8
test   %edi,%edi
je     1189 <cox_deboor_i+0x69>
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%ebx
mov    %rsp,%r13
mov    %edi,%eax
mov    %rsp,%r12
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    %r12,%rsi
movsd  %xmm0,-0x30(%rbp)
mov    %r15d,%edx
mov    %r14,%rcx
mov    $0x1,%al
call   1040 <cox_deboor_step@plt>
add    $0xffffffff,%ebx
movsd  -0x30(%rbp),%xmm0
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14,%rdx
mov    %r12,%rcx
call   1030 <cox_deboor_i@plt>
mov    %r13,%rsp
jmp    118e <cox_deboor_i+0x6e>
movsd  (%r8),%xmm0
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @cox_deboor_i(double %0, i32 %1, i32 %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca i8*
%13 = alloca i64
store double %0, double* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store double* %3, double** %10
store double* %4, double** %11
%14 = load i32, i32* %8
%15 = add i32 %14, 1
%16 = zext i32 %15 to i64
%17 = load i32, i32* %8
%18 = add i32 %17, 1
%19 = zext i32 %18 to i64
%20 = load i32, i32* %8
%21 = icmp eq i32 0, %20
br i1 %21, label %22, label %26
22: ; preds = %5
%23 = load double*, double** %11
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
store double %25, double* %6
br label %44
26: ; preds = %5
%27 = load i32, i32* %8
%28 = zext i32 %27 to i64
%29 = call i8* @llvm.stacksave()
store i8* %29, i8** %12
%30 = alloca double, i64 %28
store i64 %28, i64* %13
%31 = load i32, i32* %8
%32 = load double, double* %7
%33 = load i32, i32* %9
%34 = load double*, double** %10
%35 = load double*, double** %11
%36 = call i32 (i32, double*, double, i32, double*, double*, ...) bitcast (i32 (...)* @cox_deboor_step to i32 (i32, double*, double, i32, double*, double*, ...)*)(i32 %31, double* %30, double %32, i32 %33, double* %34, double* %35)
%37 = load double, double* %7
%38 = load i32, i32* %8
%39 = sub i32 %38, 1
%40 = load i32, i32* %9
%41 = load double*, double** %10
%42 = call double @cox_deboor_i(double %37, i32 %39, i32 %40, double* %41, double* %30)
store double %42, double* %6
%43 = load i8*, i8** %12
br label %44
44: ; preds = %26, %22
%45 = load double, double* %6
ret double %45
}

LLVM IR (-O2):
define double @cox_deboor_i(double %0, i32 %1, i32 %2, double* %3, double* %4) {
%6 = icmp eq i32 %1, 0
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = load double, double* %4
br label %16
9: ; preds = %5
%10 = zext i32 %1 to i64
%11 = tail call i8* @llvm.stacksave()
%12 = alloca double, i64 %10
%13 = call i32 (i32, double*, double, i32, double*, double*, ...) bitcast (i32 (...)* @cox_deboor_step to i32 (i32, double*, double, i32, double*, double*, ...)*)(i32 %1, double* %12, double %0, i32 %2, double* %3, double* %4)
%14 = add i32 %1, -1
%15 = call double @cox_deboor_i(double %0, i32 %14, i32 %2, double* %3, double* %12)
br label %16
16: ; preds = %9, %7
%17 = phi double [ %8, %7 ], [ %15, %9 ]
ret double %17
}