user: 请将以下的汇编代码转换成C语言代码:

```asm
<splint>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  movss  %xmm0,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  movl   $0x1,-0x18(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L17
L38:
  mov    -0x14(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x40(%rbp),%xmm0
  jbe    L18
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L17
L18:
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x18(%rbp)
L17:
  mov    -0x14(%rbp),%eax
  sub    -0x18(%rbp),%eax
  cmp    $0x1,%eax
  jg     L38
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  ucomiss -0x10(%rbp),%xmm0
  jp     L57
  pxor   %xmm0,%xmm0
  ucomiss -0x10(%rbp),%xmm0
  jne    L57
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <nrerror@plt>
L57:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  subss  -0x40(%rbp),%xmm0
  divss  -0x10(%rbp),%xmm0
  movss  %xmm0,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x40(%rbp),%xmm0
  subss  %xmm1,%xmm0
  divss  -0x10(%rbp),%xmm0
  movss  %xmm0,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0x8(%rbp),%xmm0
  addss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movss  -0xc(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  mulss  -0xc(%rbp),%xmm0
  movaps %xmm0,%xmm2
  subss  -0xc(%rbp),%xmm2
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm2
  movss  -0x8(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  mulss  -0x8(%rbp),%xmm0
  movaps %xmm0,%xmm3
  subss  -0x8(%rbp),%xmm3
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm3,%xmm0
  addss  %xmm0,%xmm2
  movss  -0x10(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  mulss  %xmm2,%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  D10(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    -0x48(%rbp),%rax
  movss  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D9
type: string
name: unpack_data
arguments: data_label: D10
type: f64

tool: D9: Bad xa input to routine splint

tool: D10: 6

assistant: ```c
void splint(float xa[], float ya[], float y2a[], int n, float x, float *y) {
  void nrerror(char error_text[]);
  int klo, khi, k;
  float h, b, a;
  klo = 1;
  khi = n;
  while (khi - klo > 1) {
    k = (khi + klo) >> 1;
    if (xa[k] > x)
      khi = k;
    else
      klo = k;
  }
  h = xa[khi] - xa[klo];
  if (h == 0.0)
    nrerror("Bad xa input to routine splint");
  a = (xa[khi] - x) / h;
  b = (x - xa[klo]) / h;
  *y = a * ya[klo] + b * ya[khi] + ((a * a * a - a) * y2a[klo] + (b * b * b - b) * y2a[khi]) * (h * h) / 6.0;
}
```