user: Please show me the C implementation that matches the assembly code listed below:

```asm
<agbnp3_test_cspline>:
  endbr64
  push   %r15
  mov    $0x190,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x24(%rsp),%r13
  call   <malloc@plt>
  mov    $0x190,%edi
  mov    %rax,%rbp
  call   <malloc@plt>
  pxor   %xmm3,%xmm3
  mov    %rax,%r12
  jmp    L13
  nopl   0x0(%rax)
L22:
  addss  D34(%rip),%xmm3
  cmp    $0x63,%rbx
  je     L4
L34:
  add    $0x1,%rbx
L13:
  movss  D19(%rip),%xmm2
  movaps %xmm3,%xmm0
  mov    %r13,%rdi
  movss  %xmm3,0x8(%rsp)
  movss  D21(%rip),%xmm1
  call   <agbnp3_i4@plt>
  test   %rbx,%rbx
  movss  0x8(%rsp),%xmm3
  movss  %xmm0,0x0(%rbp,%rbx,4)
  jne    L22
  addss  D34(%rip),%xmm3
  mov    0x24(%rsp),%r14d
  jmp    L34
L4:
  movss  D34(%rip),%xmm0
  mov    %r12,%rdx
  mov    %rbp,%rsi
  xor    %ebx,%ebx
  movd   %r14d,%xmm1
  pxor   %xmm2,%xmm2
  mov    $0x64,%edi
  call   <agbnp3_cspline_setup@plt>
  lea    0x20(%rsp),%r14
  pxor   %xmm0,%xmm0
  lea    0x1c(%rsp),%r13
  lea    D0(%rip),%r15
  nopl   0x0(%rax,%rax,1)
L45:
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  movss  D34(%rip),%xmm1
  mov    $0x64,%edi
  add    $0x1,%ebx
  movss  %xmm0,0x8(%rsp)
  call   <agbnp3_cspline_interpolate@plt>
  cmp    $0x1,%ebx
  movss  0x8(%rsp),%xmm0
  jne    L1
  movss  0x1c(%rsp),%xmm4
  addss  D1(%rip),%xmm0
  movss  %xmm4,0xc(%rsp)
  jmp    L45
  nopl   0x0(%rax,%rax,1)
L1:
  movss  0x1c(%rsp),%xmm1
  movss  D1(%rip),%xmm3
  mov    %r15,%rdi
  mulss  0x20(%rsp),%xmm3
  movaps %xmm1,%xmm2
  subss  0xc(%rsp),%xmm2
  call   <printf@plt>
  movss  0x1c(%rsp),%xmm6
  movss  0x8(%rsp),%xmm0
  addss  D1(%rip),%xmm0
  movss  %xmm6,0xc(%rsp)
  cmp    $0x3e8,%ebx
  jne    L45
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L61:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D34
type_guessed: f32
name: extract_symbolic_data
arguments: label: D19
type_guessed: f32
name: extract_symbolic_data
arguments: label: D21
type_guessed: f32
name: extract_symbolic_data
arguments: label: D0
type_guessed: string
name: extract_symbolic_data
arguments: label: D1
type_guessed: f32

tool: D34: 0.2

tool: D19: 2

tool: D21: 1

tool: D0: csp: %f %f %f %f


tool: D1: 0.02

assistant: ```c
void agbnp3_test_cspline(void) {
  float x, dx = 0.2;
  int n = 100;
  float dxi = 0.02;
  int ni = 1000;
  float *y = malloc(n * sizeof(float));
  float *y2 = malloc(n * sizeof(float));
  float yp1, ypn = 0.0;
  float f, fp;
  int i;
  float Rj = 2.0, Ri = 1.0, dq;
  float q;
  float fold, xold;
  x = 0.0;
  for (i = 0; i < n; i++) {
    y[i] = agbnp3_i4(x, Ri, Rj, &dq);
    if (i == 0)
      yp1 = dq;
    x += dx;
  }
  agbnp3_cspline_setup(dx, n, y, yp1, ypn, y2);
  x = 0.0;
  for (i = 0; i < ni; i++) {
    agbnp3_cspline_interpolate(x, dx, n, y, y2, &f, &fp);
    if (i > 0) {
      printf("csp: %f %f %f %f\n", x, f, f - fold, fp * dxi);
    }
    fold = f;
    xold = x;
    x += dxi;
  }
  free(y);
  free(y2);
}
```