user: What is the c source code of the assembly code below?

```asm
<SplineInterp>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x40000,%edi
  sub    $0x58,%rsp
  call   <MemAlloc@plt>
  lea    0x8(%rbx),%rdx
  movslq %eax,%rdi
  mov    %rdi,0x38(%rsp)
  cmp    %rdx,%rdi
  je     L25
  mov    %rbx,%rdx
  mov    %rdi,%rax
  lea    0x40000(%rdi),%rcx
  sub    %rdi,%rdx
  cs nopw 0x0(%rax,%rax,1)
L13:
  movupd (%rax,%rdx,1),%xmm3
  add    $0x10,%rax
  movups %xmm3,-0x10(%rax)
  cmp    %rcx,%rax
  jne    L13
L99:
  mov    $0x40010,%edi
  xor    %eax,%eax
  call   <MemAlloc@plt>
  mov    $0x20008,%edi
  movslq %eax,%rbp
  xor    %eax,%eax
  call   <MemAlloc@plt>
  mov    $0x1,%ecx
  pxor   %xmm1,%xmm1
  movslq %eax,%r15
  xor    %eax,%eax
  movl   $0x0,(%r15)
  movq   $0x0,0x0(%rbp)
  nopw   0x0(%rax,%rax,1)
L85:
  movsd  (%rbx,%rax,8),%xmm0
  mov    %eax,%esi
  ucomisd %xmm1,%xmm0
  jp     L45
  je     L55
L45:
  movslq %ecx,%rdx
  add    $0x1,%ecx
  movsd  %xmm0,0x0(%rbp,%rdx,8)
  mov    %esi,(%r15,%rdx,4)
L55:
  add    $0x1,%rax
  cmp    $0x8000,%rax
  jne    L85
  movslq %ecx,%rax
  movq   $0x0,0x0(%rbp,%rax,8)
  movl   $0x0,(%r15,%rax,4)
  cmp    $0x2,%ecx
  jle    L46
  lea    -0x3(%rcx),%eax
  lea    0x8(%rbp),%rcx
  mov    %rbp,0x40(%rsp)
  mov    %rbp,%rdx
  lea    (%rcx,%rax,8),%rax
  mov    %r15,0x48(%rsp)
  lea    0x4(%r15),%r14
  movapd D221(%rip),%xmm11
  mov    %rax,0x30(%rsp)
  mov    0x38(%rsp),%r15
  nopw   0x0(%rax,%rax,1)
L178:
  mov    (%r14),%edi
  mov    0x4(%r14),%ebx
  add    $0x4,%r14
  lea    0x1(%rdi),%esi
  cmp    %ebx,%esi
  jge    L23
  movslq %edi,%rbp
  pxor   %xmm4,%xmm4
  lea    0x10(%rdx),%r9
  mov    %ebx,%r8d
  shl    $0x3,%rbp
  sub    %edi,%r8d
  lea    0x18(%rdx),%r10
  lea    (%r15,%rbp,1),%r13
  lea    -0x1(%r8),%r12d
  cvtsi2sd %r8d,%xmm4
  lea    0x8(%r13),%rax
  mov    %r12,%r11
  lea    (%rax,%r12,8),%r12
  cmp    %r12,%rdx
  lea    0x20(%rdx),%r12
  setae  (%rsp)
  cmp    %r12,%rax
  setae  %r12b
  or     (%rsp),%r12b
  movsd  %xmm4,0x28(%rsp)
  je     L146
  lea    -0x2(%r8),%r12d
  cmp    $0x2,%r12d
  jbe    L146
  mov    %r11d,%r8d
  movd   %edi,%xmm3
  movsd  (%rdx),%xmm15
  movdqa D86(%rip),%xmm10
  shr    $0x2,%r8d
  pshufd $0x0,%xmm3,%xmm5
  movsd  (%rcx),%xmm14
  movsd  (%r9),%xmm13
  movsd  (%r10),%xmm12
  movapd %xmm4,%xmm3
  sub    $0x1,%r8d
  movaps %xmm5,0x10(%rsp)
  unpcklpd %xmm3,%xmm3
  shl    $0x5,%r8
  paddd  %xmm5,%xmm10
  unpcklpd %xmm15,%xmm15
  movaps %xmm3,(%rsp)
  unpcklpd %xmm14,%xmm14
  unpcklpd %xmm13,%xmm13
  unpcklpd %xmm12,%xmm12
  lea    0x28(%r13,%r8,1),%r8
  nopl   0x0(%rax,%rax,1)
L70:
  movapd (%rsp),%xmm6
  movdqa %xmm10,%xmm0
  add    $0x20,%rax
  psubd  0x10(%rsp),%xmm0
  movapd D207(%rip),%xmm2
  movapd D102(%rip),%xmm4
  paddd  D112(%rip),%xmm10
  cvtdq2pd %xmm0,%xmm3
  divpd  %xmm6,%xmm3
  pshufd $0xee,%xmm0,%xmm0
  cvtdq2pd %xmm0,%xmm0
  divpd  %xmm6,%xmm0
  movapd D102(%rip),%xmm6
  movapd %xmm3,%xmm7
  mulpd  %xmm3,%xmm7
  mulpd  %xmm7,%xmm2
  movapd %xmm7,%xmm9
  mulpd  %xmm3,%xmm9
  mulpd  %xmm11,%xmm3
  mulpd  %xmm9,%xmm6
  mulpd  D0(%rip),%xmm9
  movapd %xmm6,%xmm1
  xorpd  D65(%rip),%xmm6
  addpd  %xmm7,%xmm1
  addpd  %xmm9,%xmm2
  addpd  D180(%rip),%xmm2
  movapd %xmm0,%xmm5
  subpd  %xmm3,%xmm1
  mulpd  %xmm0,%xmm5
  mulpd  %xmm14,%xmm2
  mulpd  %xmm15,%xmm1
  movapd %xmm5,%xmm8
  mulpd  %xmm0,%xmm8
  mulpd  %xmm11,%xmm0
  addpd  %xmm1,%xmm2
  movapd %xmm7,%xmm1
  addpd  %xmm7,%xmm1
  mulpd  %xmm11,%xmm7
  mulpd  %xmm8,%xmm4
  mulpd  D0(%rip),%xmm8
  subpd  %xmm9,%xmm1
  subpd  %xmm7,%xmm6
  addpd  %xmm3,%xmm1
  mulpd  %xmm12,%xmm6
  mulpd  %xmm13,%xmm1
  addpd  %xmm2,%xmm1
  movapd %xmm4,%xmm2
  xorpd  D65(%rip),%xmm4
  addpd  %xmm5,%xmm2
  addpd  %xmm6,%xmm1
  subpd  %xmm0,%xmm2
  movups %xmm1,-0x20(%rax)
  movapd D207(%rip),%xmm1
  mulpd  %xmm15,%xmm2
  mulpd  %xmm5,%xmm1
  addpd  %xmm8,%xmm1
  addpd  D180(%rip),%xmm1
  mulpd  %xmm14,%xmm1
  addpd  %xmm2,%xmm1
  movapd %xmm5,%xmm2
  addpd  %xmm5,%xmm2
  mulpd  %xmm11,%xmm5
  subpd  %xmm8,%xmm2
  subpd  %xmm5,%xmm4
  addpd  %xmm2,%xmm0
  mulpd  %xmm12,%xmm4
  mulpd  %xmm13,%xmm0
  addpd  %xmm0,%xmm1
  addpd  %xmm4,%xmm1
  movups %xmm1,-0x10(%rax)
  cmp    %rax,%r8
  jne    L70
  mov    %r11d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%esi
  cmp    %r11d,%eax
  je     L23
  mov    %esi,%eax
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm13
  movsd  D102(%rip),%xmm4
  sub    %edi,%eax
  movsd  D0(%rip),%xmm7
  movsd  D207(%rip),%xmm3
  cvtsi2sd %eax,%xmm1
  movsd  D221(%rip),%xmm5
  movslq %esi,%rax
  movsd  D180(%rip),%xmm6
  divsd  %xmm13,%xmm1
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm9
  mulsd  %xmm1,%xmm8
  mulsd  %xmm5,%xmm1
  mulsd  %xmm8,%xmm9
  movapd %xmm8,%xmm0
  movapd %xmm8,%xmm10
  mulsd  %xmm3,%xmm0
  movapd %xmm9,%xmm2
  mulsd  %xmm4,%xmm2
  mulsd  %xmm7,%xmm9
  addsd  %xmm2,%xmm10
  xorpd  D251(%rip),%xmm2
  addsd  %xmm9,%xmm0
  subsd  %xmm1,%xmm10
  mulsd  (%rdx),%xmm10
  addsd  %xmm6,%xmm0
  mulsd  (%rcx),%xmm0
  addsd  %xmm10,%xmm0
  movapd %xmm8,%xmm10
  addsd  %xmm8,%xmm10
  mulsd  %xmm5,%xmm8
  subsd  %xmm9,%xmm10
  subsd  %xmm8,%xmm2
  mulsd  (%r10),%xmm2
  addsd  %xmm10,%xmm1
  mulsd  (%r9),%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  lea    0x1(%rsi),%eax
  cmp    %ebx,%eax
  jge    L23
  mov    %eax,%r8d
  pxor   %xmm1,%xmm1
  cltq
  add    $0x2,%esi
  sub    %edi,%r8d
  cvtsi2sd %r8d,%xmm1
  lea    0x0(,%rax,8),%r8
  divsd  %xmm13,%xmm1
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm9
  mulsd  %xmm1,%xmm8
  mulsd  %xmm5,%xmm1
  mulsd  %xmm8,%xmm9
  movapd %xmm8,%xmm0
  movapd %xmm8,%xmm10
  mulsd  %xmm3,%xmm0
  movapd %xmm9,%xmm2
  mulsd  %xmm4,%xmm2
  mulsd  %xmm7,%xmm9
  addsd  %xmm2,%xmm10
  xorpd  D251(%rip),%xmm2
  addsd  %xmm9,%xmm0
  subsd  %xmm1,%xmm10
  mulsd  (%rdx),%xmm10
  addsd  %xmm6,%xmm0
  mulsd  (%rcx),%xmm0
  addsd  %xmm10,%xmm0
  movapd %xmm8,%xmm10
  addsd  %xmm8,%xmm10
  mulsd  %xmm5,%xmm8
  subsd  %xmm9,%xmm10
  subsd  %xmm8,%xmm2
  mulsd  (%r10),%xmm2
  addsd  %xmm10,%xmm1
  mulsd  (%r9),%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  cmp    %esi,%ebx
  jle    L23
  sub    %edi,%esi
  pxor   %xmm0,%xmm0
  cvtsi2sd %esi,%xmm0
  divsd  %xmm13,%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  %xmm1,%xmm3
  movapd %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  mulsd  %xmm5,%xmm0
  mulsd  %xmm2,%xmm4
  mulsd  %xmm2,%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm3,%xmm0
  movapd %xmm4,%xmm2
  xorpd  D251(%rip),%xmm4
  addsd  %xmm1,%xmm2
  addsd  %xmm7,%xmm0
  subsd  %xmm8,%xmm2
  addsd  %xmm6,%xmm0
  mulsd  (%rdx),%xmm2
  mulsd  (%rcx),%xmm0
  addsd  %xmm2,%xmm0
  movapd %xmm1,%xmm2
  addsd  %xmm1,%xmm2
  mulsd  %xmm5,%xmm1
  subsd  %xmm7,%xmm2
  subsd  %xmm1,%xmm4
  mulsd  (%r10),%xmm4
  addsd  %xmm8,%xmm2
  mulsd  (%r9),%xmm2
  addsd  %xmm2,%xmm0
  addsd  %xmm4,%xmm0
  movsd  %xmm0,0x8(%r15,%r8,1)
L23:
  mov    %rcx,%rdx
  cmp    %rcx,0x30(%rsp)
  je     L10
L61:
  add    $0x8,%rcx
  jmp    L178
  nopl   0x0(%rax,%rax,1)
L146:
  movsd  D102(%rip),%xmm4
  movsd  D221(%rip),%xmm5
  lea    0x8(%r15,%rbp,1),%rsi
  mov    $0x1,%eax
  movsd  D0(%rip),%xmm7
  movsd  D207(%rip),%xmm3
  movsd  D180(%rip),%xmm6
  movsd  0x28(%rsp),%xmm8
  nopl   0x0(%rax)
L4:
  pxor   %xmm1,%xmm1
  add    $0x8,%rsi
  cvtsi2sd %eax,%xmm1
  add    $0x1,%eax
  divsd  %xmm8,%xmm1
  movapd %xmm1,%xmm9
  mulsd  %xmm1,%xmm9
  movapd %xmm9,%xmm10
  movapd %xmm9,%xmm0
  mulsd  %xmm1,%xmm10
  mulsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm1
  movapd %xmm10,%xmm2
  mulsd  %xmm4,%xmm2
  mulsd  %xmm7,%xmm10
  movapd %xmm2,%xmm12
  xorpd  D251(%rip),%xmm2
  addsd  %xmm9,%xmm12
  addsd  %xmm10,%xmm0
  subsd  %xmm1,%xmm12
  addsd  %xmm6,%xmm0
  mulsd  (%rdx),%xmm12
  mulsd  (%rcx),%xmm0
  addsd  %xmm12,%xmm0
  movapd %xmm9,%xmm12
  addsd  %xmm9,%xmm12
  mulsd  %xmm5,%xmm9
  subsd  %xmm10,%xmm12
  subsd  %xmm9,%xmm2
  mulsd  (%r10),%xmm2
  addsd  %xmm12,%xmm1
  mulsd  (%r9),%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,-0x8(%rsi)
  cmp    %eax,%r8d
  jne    L4
  mov    %rcx,%rdx
  cmp    %rcx,0x30(%rsp)
  jne    L61
L10:
  mov    0x40(%rsp),%rbp
  mov    0x48(%rsp),%r15
L46:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <MemFree@plt>
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <MemFree@plt>
  mov    0x38(%rsp),%rax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L25:
  mov    %rbx,%rdx
  lea    0x40008(%rbx),%rcx
  mov    %rdi,%rax
  sub    %rdi,%rdx
  nopw   0x0(%rax,%rax,1)
L140:
  movsd  (%rdx,%rax,1),%xmm0
  add    $0x8,%rax
  movsd  %xmm0,-0x8(%rax)
  cmp    %rcx,%rax
  jne    L140
  jmp    L99
```

tool_calls: name: read_data
arguments: label: D221
data_type: f64[2]
name: read_data
arguments: label: D86
data_type: byte[16]
name: read_data
arguments: label: D207
data_type: f32[4]
name: read_data
arguments: label: D102
data_type: f32[4]
name: read_data
arguments: label: D112
data_type: byte[16]
name: read_data
arguments: label: D0
data_type: f32[4]
name: read_data
arguments: label: D65
data_type: f32[4]
name: read_data
arguments: label: D180
data_type: f32[4]
name: read_data
arguments: label: D251
data_type: f32[4]

tool: {"D221": [0.5,0.5]}

tool: {"D86": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

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

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

tool: {"D112": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

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

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

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

tool: {"D251": [0.0,-0.0,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;
}
```