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

```asm
<agbnp3_cspline_interpolate>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movss  %xmm0,-0x34(%rbp)
  movss  %xmm1,-0x38(%rbp)
  mov    %edi,-0x3c(%rbp)
  mov    %rsi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  movss  D38(%rip),%xmm0
  divss  -0x38(%rbp),%xmm0
  movss  %xmm0,-0x28(%rbp)
  movss  -0x38(%rbp),%xmm0
  movss  D34(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x24(%rbp)
  movss  -0x38(%rbp),%xmm0
  mulss  -0x24(%rbp),%xmm0
  movss  %xmm0,-0x20(%rbp)
  movss  -0x34(%rbp),%xmm0
  mulss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x1c(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x18(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x18(%rbp)
  jl     L3
  mov    -0x58(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  jmp    L18
L3:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x14(%rbp),%xmm1
  movsd  D55(%rip),%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd -0x1c(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x10(%rbp)
  movss  -0x10(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  movss  %xmm0,-0xc(%rbp)
  movss  -0x1c(%rbp),%xmm0
  subss  -0x14(%rbp),%xmm0
  movss  %xmm0,-0x8(%rbp)
  movss  -0x8(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x10(%rbp),%xmm1
  mov    -0x18(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0x8(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0xc(%rbp),%xmm0
  mulss  -0x10(%rbp),%xmm0
  movaps %xmm0,%xmm2
  subss  -0x10(%rbp),%xmm2
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm2
  movss  -0x4(%rbp),%xmm0
  mulss  -0x8(%rbp),%xmm0
  movaps %xmm0,%xmm3
  subss  -0x8(%rbp),%xmm3
  mov    -0x18(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm3,%xmm0
  addss  %xmm2,%xmm0
  mulss  -0x20(%rbp),%xmm0
  addss  %xmm1,%xmm0
  mov    -0x58(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  subss  %xmm1,%xmm0
  mulss  -0x28(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd -0xc(%rbp),%xmm2
  movsd  D56(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  D55(%rip),%xmm3
  movapd %xmm1,%xmm2
  subsd  %xmm3,%xmm2
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  cvtss2sd %xmm1,%xmm1
  mulsd  %xmm1,%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd -0x4(%rbp),%xmm3
  movsd  D56(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  movsd  D55(%rip),%xmm4
  movapd %xmm1,%xmm3
  subsd  %xmm4,%xmm3
  mov    -0x18(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  cvtss2sd %xmm1,%xmm1
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd -0x24(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    -0x60(%rbp),%rax
  movss  %xmm0,(%rax)
L18:
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: label: D38
type: f32
name: read_data
arguments: label: D34
type: f32
name: read_data
arguments: label: D55
type: f32[2]
name: read_data
arguments: label: D56
type: f64

tool: D38: 1

tool: D34: 6

tool: {"D55": [0.0,1.875]}

tool: D56: 3

assistant: ```c
void agbnp3_cspline_interpolate(float x, float dx, int n, float *y, float *y2, float *f, float *fp) {
  int k;
  float xh, b, a, a2, b2, kf, dp1, dp2, dxinv = 1. / dx;
  dp1 = dx / 6.0;
  dp2 = dx * dp1;
  xh = x * dxinv;
  k = xh;
  kf = k;
  if (k > n - 2) {
    *f = 0.0;
    *fp = 0.0;
    return;
  }
  a = (kf + 1.0) - xh;
  a2 = a * a;
  b = xh - kf;
  b2 = b * b;
  *f = a * y[k] + b * y[k + 1] + ((a2 * a - a) * y2[k] + (b2 * b - b) * y2[k + 1]) * dp2;
  *fp = (y[k + 1] - y[k]) * dxinv - ((3. * a2 - 1.) * y2[k] + (3. * b2 - 1.) * y2[k + 1]) * dp1;
}
```