user: What would the C source look like for the assembly code provided here:

```asm
<SplineInterp>:
  endbr64
  push   %r13
  xor    %eax,%eax
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x40000,%edi
  sub    $0x8,%rsp
  call   <MemAlloc@plt>
  mov    %rbx,%rdx
  movslq %eax,%r13
  lea    0x40000(%r13),%rcx
  mov    %r13,%rax
  sub    %r13,%rdx
L57:
  movsd  (%rdx,%rax,1),%xmm0
  add    $0x8,%rax
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rcx
  jne    L57
  mov    $0x40010,%edi
  xor    %eax,%eax
  call   <MemAlloc@plt>
  mov    $0x20008,%edi
  movslq %eax,%rbp
  xor    %eax,%eax
  call   <MemAlloc@plt>
  mov    $0x1,%edx
  pxor   %xmm1,%xmm1
  movslq %eax,%r12
  xor    %eax,%eax
  movl   $0x0,(%r12)
  movq   $0x0,0x0(%rbp)
  nopl   0x0(%rax)
L72:
  movsd  (%rbx,%rax,8),%xmm0
  mov    %eax,%esi
  ucomisd %xmm1,%xmm0
  jp     L29
  je     L30
L29:
  movslq %edx,%rcx
  add    $0x1,%edx
  movsd  %xmm0,0x0(%rbp,%rcx,8)
  mov    %esi,(%r12,%rcx,4)
L30:
  add    $0x1,%rax
  cmp    $0x8000,%rax
  jne    L72
  movslq %edx,%rax
  movq   $0x0,0x0(%rbp,%rax,8)
  movl   $0x0,(%r12,%rax,4)
  cmp    $0x2,%edx
  jle    L63
  lea    -0x3(%rdx),%eax
  lea    0x8(%rbp),%rsi
  movsd  D54(%rip),%xmm9
  movsd  D18(%rip),%xmm3
  movsd  D49(%rip),%xmm8
  lea    0x4(%r12),%r10
  mov    %rbp,%rdi
  movsd  D37(%rip),%xmm7
  movsd  D44(%rip),%xmm6
  movq   D39(%rip),%xmm5
  lea    (%rsi,%rax,8),%r11
  nopl   (%rax)
L53:
  mov    (%r10),%edx
  mov    0x4(%r10),%ecx
  add    $0x4,%r10
  lea    0x1(%rdx),%eax
  cmp    %ecx,%eax
  jge    L40
  sub    %edx,%ecx
  pxor   %xmm4,%xmm4
  lea    0x10(%rdi),%r9
  cltq
  cvtsi2sd %ecx,%xmm4
  lea    0x0(%r13,%rax,8),%rdx
  mov    $0x1,%eax
  lea    0x18(%rdi),%r8
  nopl   0x0(%rax)
L44:
  pxor   %xmm1,%xmm1
  add    $0x8,%rdx
  cvtsi2sd %eax,%xmm1
  add    $0x1,%eax
  divsd  %xmm4,%xmm1
  movapd %xmm1,%xmm10
  movapd %xmm1,%xmm11
  mulsd  %xmm1,%xmm10
  mulsd  %xmm3,%xmm1
  mulsd  %xmm10,%xmm11
  movapd %xmm10,%xmm0
  mulsd  %xmm7,%xmm0
  movapd %xmm11,%xmm2
  mulsd  %xmm9,%xmm2
  mulsd  %xmm8,%xmm11
  movapd %xmm2,%xmm12
  xorpd  %xmm5,%xmm2
  addsd  %xmm10,%xmm12
  addsd  %xmm11,%xmm0
  subsd  %xmm1,%xmm12
  addsd  %xmm6,%xmm0
  mulsd  (%rdi),%xmm12
  mulsd  (%rsi),%xmm0
  addsd  %xmm12,%xmm0
  movapd %xmm10,%xmm12
  addsd  %xmm10,%xmm12
  mulsd  %xmm3,%xmm10
  subsd  %xmm11,%xmm12
  subsd  %xmm10,%xmm2
  mulsd  (%r8),%xmm2
  addsd  %xmm12,%xmm1
  mulsd  (%r9),%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,-0x8(%rdx)
  cmp    %eax,%ecx
  jne    L44
L40:
  mov    %rsi,%rdi
  cmp    %rsi,%r11
  je     L63
  add    $0x8,%rsi
  jmp    L53
L63:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <MemFree@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <MemFree@plt>
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: unpack_data
arguments: label: D54
type: f32[2]
name: unpack_data
arguments: label: D18
type: f64
name: unpack_data
arguments: label: D49
type: f32[2]
name: unpack_data
arguments: label: D37
type: f32[2]
name: unpack_data
arguments: label: D44
type: f32[2]
name: unpack_data
arguments: label: D39
type: f32[2]

tool: {"D54": [0.0,-1.75]}

tool: D18: 0.5

tool: {"D49": [0.0,1.9375]}

tool: {"D37": [0.0,-2.0625]}

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

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

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;
}
```