user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<spline>:
  endbr64
  push   %r14
  mov    %rcx,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %edx,%rbx
  lea    0x0(,%rbx,8),%edi
  sub    $0x10,%rsp
  movsd  %xmm1,(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <malloc@plt>
  movsd  (%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  test   %rax,%rax
  je     L54
  movsd  D51(%rip),%xmm8
  mov    %rbx,%r13
  mov    %rax,%rdi
  comisd %xmm8,%xmm2
  ja     L30
  mov    D8(%rip),%rax
  mov    %rax,(%r14)
  movsd  0x8(%rbp),%xmm3
  movsd  0x8(%r12),%xmm0
  subsd  0x0(%rbp),%xmm3
  subsd  (%r12),%xmm0
  divsd  %xmm3,%xmm0
  subsd  %xmm2,%xmm0
  movsd  D26(%rip),%xmm2
  divsd  %xmm3,%xmm2
  mulsd  %xmm2,%xmm0
L71:
  movsd  %xmm0,(%rdi)
  cmp    $0x2,%r13d
  jle    L89
  movsd  D19(%rip),%xmm7
  movsd  D79(%rip),%xmm5
  mov    %rbp,%rdx
  xor    %eax,%eax
  movsd  D67(%rip),%xmm6
  lea    -0x3(%r13),%ecx
  nopl   0x0(%rax)
L85:
  movsd  (%rdx),%xmm3
  movsd  0x8(%rdx),%xmm2
  mov    %rax,%rsi
  add    $0x8,%rdx
  movsd  0x8(%rdx),%xmm0
  movsd  (%r14,%rax,8),%xmm4
  subsd  %xmm3,%xmm2
  subsd  %xmm3,%xmm0
  divsd  %xmm0,%xmm2
  mulsd  %xmm2,%xmm4
  movapd %xmm2,%xmm0
  subsd  %xmm5,%xmm0
  addsd  %xmm7,%xmm4
  divsd  %xmm4,%xmm0
  movsd  %xmm0,0x8(%r14,%rax,8)
  movsd  0x8(%rdx),%xmm9
  movsd  0x8(%r12,%rax,8),%xmm3
  movsd  (%rdx),%xmm11
  movsd  -0x8(%rdx),%xmm10
  movsd  0x10(%r12,%rax,8),%xmm0
  mulsd  (%rdi,%rax,8),%xmm2
  movapd %xmm9,%xmm12
  subsd  %xmm11,%xmm12
  subsd  %xmm10,%xmm11
  subsd  %xmm3,%xmm0
  subsd  (%r12,%rax,8),%xmm3
  subsd  %xmm10,%xmm9
  divsd  %xmm12,%xmm0
  divsd  %xmm11,%xmm3
  subsd  %xmm3,%xmm0
  mulsd  %xmm6,%xmm0
  divsd  %xmm9,%xmm0
  subsd  %xmm2,%xmm0
  divsd  %xmm4,%xmm0
  movsd  %xmm0,0x8(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %rsi,%rcx
  jne    L85
L3:
  shl    $0x3,%rbx
  comisd %xmm8,%xmm1
  jbe    L65
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
L91:
  movsd  -0x10(%rdi,%rbx,1),%xmm2
  sub    $0x2,%r13d
  movslq %r13d,%r13
  mulsd  %xmm0,%xmm2
  mulsd  -0x10(%r14,%rbx,1),%xmm0
  subsd  %xmm2,%xmm1
  addsd  %xmm5,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%r14,%rbx,1)
  js     L36
  cs nopw 0x0(%rax,%rax,1)
L79:
  mulsd  (%r14,%r13,8),%xmm1
  addsd  (%rdi,%r13,8),%xmm1
  movsd  %xmm1,(%r14,%r13,8)
  sub    $0x1,%r13
  test   %r13d,%r13d
  jns    L79
L36:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1070 <free@plt>
  nopl   0x0(%rax)
L30:
  movq   $0x0,(%r14)
  pxor   %xmm0,%xmm0
  jmp    L71
L65:
  movsd  -0x8(%rbp,%rbx,1),%xmm2
  movsd  -0x8(%r12,%rbx,1),%xmm0
  subsd  -0x10(%rbp,%rbx,1),%xmm2
  subsd  -0x10(%r12,%rbx,1),%xmm0
  divsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  movsd  D26(%rip),%xmm0
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D92(%rip),%xmm0
  jmp    L91
  nop
L89:
  movsd  D79(%rip),%xmm5
  jmp    L3
  nopl   (%rax)
L54:
  add    $0x10,%rsp
  lea    D52(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1080 <printf@plt>
```

tool_calls: name: retrieve_data
arguments: label: D51
type_infered: f64
name: retrieve_data
arguments: label: D8
type_infered: byte[8]
name: retrieve_data
arguments: label: D26
type_infered: f64
name: retrieve_data
arguments: label: D19
type_infered: f64
name: retrieve_data
arguments: label: D79
type_infered: f64
name: retrieve_data
arguments: label: D67
type_infered: f64
name: retrieve_data
arguments: label: D92
type_infered: f64
name: retrieve_data
arguments: label: D52
type_infered: string

tool: D51: 9.9e+29

tool: {"D8": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf]}

tool: D26: 3

tool: D19: 2

tool: D79: 1

tool: D67: 6

tool: D92: 0.5

tool: D52: Out Of Memory in spline - ERROR

assistant: ```c
void spline(double *x, double *y, int n, double yp1, double ypn, double *y2) {
  double *u;
  double sig, p, qn, un;
  int i, k;
  u = malloc(sizeof(double) * n);
  if (u == NULL) {
    printf("Out Of Memory in spline - ERROR");
    return;
  }
  if (yp1 > 0.99E30) {
    y2[0] = 0;
    u[0] = 0;
  } else {
    y2[0] = -0.5;
    u[0] = (3.0 / (x[1] - x[0])) * ((y[1] - y[0]) / (x[1] - x[0]) - yp1);
  }
  for (i = 1; i < (n - 1); i++) {
    sig = (x[i] - x[i - 1]) / (x[i + 1] - x[i - 1]);
    p = sig * y2[i - 1] + 2.0;
    y2[i] = (sig - 1.0) / p;
    u[i] = (6.0 * ((y[i + 1] - y[i]) / (x[i + 1] - x[i]) - (y[i] - y[i - 1]) / (x[i] - x[i - 1])) / (x[i + 1] - x[i - 1]) - sig * u[i - 1]) / p;
  }
  if (ypn > 0.99E30) {
    qn = 0;
    un = 0;
  } else {
    qn = 0.5;
    un = (3.0 / (x[n - 1] - x[n - 2])) * (ypn - (y[n - 1] - y[n - 2]) / (x[n - 1] - x[n - 2]));
  }
  y2[n - 1] = (un - qn * u[n - 2]) / (qn * y2[n - 2] + 1.0);
  for (k = n - 2; k >= 0; k--)
    y2[k] = y2[k] * y2[k + 1] + u[k];
  free(u);
}
```