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

```asm
<SplineInterp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    $0x40000,%edi
  mov    $0x0,%eax
  call   <MemAlloc@plt>
  cltq
  mov    %rax,-0x38(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L37
L30:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x44(%rbp)
L37:
  cmpl   $0x7fff,-0x44(%rbp)
  jle    L30
  mov    $0x40010,%edi
  mov    $0x0,%eax
  call   <MemAlloc@plt>
  cltq
  mov    %rax,-0x30(%rbp)
  mov    $0x20008,%edi
  mov    $0x0,%eax
  call   <MemAlloc@plt>
  cltq
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x3c(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L86
L36:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L95
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L59
L95:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x44(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x3c(%rbp)
L59:
  addl   $0x1,-0x44(%rbp)
L86:
  cmpl   $0x7fff,-0x44(%rbp)
  jle    L36
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x3c(%rbp)
  movsd  D30(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x1,-0x44(%rbp)
  jmp    L58
L44:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    %eax,-0x40(%rbp)
  jmp    L56
L41:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%eax
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x20(%rbp),%xmm0
  movq   D69(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  mulsd  -0x18(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mulsd  %xmm0,%xmm2
  movapd %xmm2,%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  D47(%rip),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm3
  mulsd  -0x8(%rbp),%xmm3
  movsd  -0x20(%rbp),%xmm0
  movsd  D56(%rip),%xmm4
  subsd  %xmm4,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  %xmm0,%xmm3
  movsd  D68(%rip),%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x20(%rbp),%xmm0
  movsd  D47(%rip),%xmm3
  subsd  %xmm3,%xmm0
  movapd %xmm0,%xmm3
  mulsd  -0x8(%rbp),%xmm3
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm4
  addsd  %xmm0,%xmm4
  movsd  D56(%rip),%xmm0
  subsd  %xmm4,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  %xmm0,%xmm3
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm0
  movapd %xmm1,%xmm2
  addsd  %xmm0,%xmm2
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm1
  mulsd  -0x10(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x40(%rbp)
L56:
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x40(%rbp)
  jl     L41
  addl   $0x1,-0x44(%rbp)
L58:
  mov    -0x3c(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x44(%rbp)
  jl     L44
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <MemFree@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <MemFree@plt>
  mov    -0x38(%rbp),%rax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D30
data_type: f64
name: extract_symbolic_data
arguments: label: D69
data_type: f32[2]
name: extract_symbolic_data
arguments: label: D47
data_type: f32[2]
name: extract_symbolic_data
arguments: label: D56
data_type: f32[2]
name: extract_symbolic_data
arguments: label: D68
data_type: f32[2]

tool: D30: 0.5

tool: {"D69": [0.0,-0.0]}

tool: {"D47": [0.0,2.0]}

tool: {"D56": [0.0,2.125]}

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

assistant: ```c
double *SplineInterp(double *h16) {
  double *d;
  double *t1;
  int i, j, n;
  double u, u3, u2, s;
  int *t2;
  d = (double *)MemAlloc(sizeof(double) * 32768);
  for (i = 0; i < 32768; i++)
    d[i] = h16[i];
  t1 = (double *)MemAlloc(sizeof(double) * 32770);
  t2 = (int *)MemAlloc(sizeof(int) * 32770);
  t2[0] = 0;
  t1[0] = 0.0;
  n = 1;
  for (i = 0; i < 32768; i++)
    if (h16[i] != 0.0) {
      t1[n] = h16[i];
      t2[n] = i;
      ++n;
    }
  t1[n] = 0.0;
  t2[n] = 0;
  n++;
  s = 0.5;
  for (i = 1; i <= n - 3; i++) {
    for (j = t2[i] + 1; j < t2[i + 1]; j++) {
      u = ((double)(j - t2[i])) / ((double)(t2[i + 1] - t2[i]));
      u2 = u * u;
      u3 = u2 * u;
      d[j] = t1[i - 1] * (-s * u3 + 2 * s * u2 - s * u) + t1[i] * ((2 - s) * u3 + (s - 3) * u2 + 1) + t1[i + 1] * ((s - 2) * u3 + (3 - 2 * s) * u2 + s * u) + t1[i + 2] * (s * u3 - s * u2);
    }
  }
  MemFree(t1);
  MemFree(t2);
  return d;
}
```