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

```asm
<Interpolate>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x38,%rsp
  mov    0x90(%rsp),%r14d
  mov    0x70(%rsp),%r11
  mov    0x78(%rsp),%ecx
  mov    0x80(%rsp),%eax
  mov    0x88(%rsp),%r10
  mov    0x98(%rsp),%esi
  cmp    $0x1,%r14d
  je     L162
  cmp    $0x1,%esi
  jne    L48
L162:
  cmp    $0x1,%edx
  je     L238
  cmp    $0x1,%r13d
  jne    L48
L238:
  movsd  D1(%rip),%xmm4
  movsd  D47(%rip),%xmm3
  mov    %edx,%edi
  mov    %r8d,%edx
  movsd  D66(%rip),%xmm5
L47:
  cmp    $0x1,%r14d
  cmovle %esi,%r14d
  cmp    $0x1,%r13d
  jle    L50
  cmp    %r13d,%r14d
  jne    L52
L97:
  xor    %esi,%esi
  mov    $0x1,%r12d
  xor    %ebp,%ebp
  jmp    L147
  nopl   0x0(%rax)
L206:
  cvttsd2si %xmm0,%edi
  add    $0x1,%rsi
  imul   %edi,%r12d
  add    %edi,%ebp
  cmp    %esi,%r13d
  jle    L26
L147:
  movsd  (%rbx,%rsi,8),%xmm0
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm2
  andpd  %xmm3,%xmm1
  ucomisd %xmm1,%xmm4
  jbe    L87
  cvttsd2si %xmm0,%rdi
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdi,%xmm1
  movapd %xmm1,%xmm2
  cmpnlesd %xmm0,%xmm2
  andpd  %xmm5,%xmm2
  subsd  %xmm2,%xmm1
  movapd %xmm3,%xmm2
  andnpd %xmm0,%xmm2
  orpd   %xmm1,%xmm2
L87:
  ucomisd %xmm2,%xmm0
  jp     L174
  je     L206
L174:
  lea    D75(%rip),%rdi
L91:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <DymosimError@plt>
  nopl   0x0(%rax,%rax,1)
L50:
  cmp    %edi,%r14d
  jne    L52
  mov    %r14d,%r13d
  mov    $0x1,%r12d
  xor    %ebp,%ebp
  test   %r14d,%r14d
  jg     L97
  nopl   (%rax)
L26:
  imul   %edx,%r9d
  cmp    %r9d,%ebp
  jne    L108
  imul   %ecx,%eax
  cmp    %eax,%r12d
  jne    L216
  movsd  (%r10),%xmm0
  cmp    $0x1,%r13d
  jle    L149
  cvttsd2si (%rbx),%esi
  sub    $0x1,%r14d
  lea    0x8(%r10),%r9
  sub    $0x1,%r13d
  movsd  (%r15),%xmm1
  lea    0x8(%rbx),%r8
  movslq %esi,%rdi
  shl    $0x3,%rdi
  comisd %xmm0,%xmm1
  jae    L220
  comisd -0x8(%r15,%rdi,1),%xmm0
  jb     L123
  mov    %r12d,%eax
  add    %rdi,%r15
  cltd
  idiv   %esi
  mov    %eax,%ecx
  lea    -0x1(%rsi),%eax
  imul   %r12d,%eax
  cltd
  idiv   %esi
  mov    %ebp,%edx
  sub    %esi,%edx
  cltq
  lea    (%r11,%rax,8),%r11
L199:
  mov    %r9,%r10
  mov    %r8,%rbx
  mov    $0x1,%eax
  mov    $0x1,%edi
  mov    $0x1,%r9d
  mov    $0x1,%esi
  jmp    L47
  nopw   0x0(%rax,%rax,1)
L220:
  mov    %r12d,%eax
  add    %rdi,%r15
  cltd
  idiv   %esi
  mov    %ebp,%edx
  sub    %esi,%edx
  mov    %eax,%ecx
  jmp    L199
L48:
  lea    D50(%rip),%rdi
  jmp    L91
L52:
  lea    D38(%rip),%rdi
  jmp    L91
L149:
  add    $0x38,%rsp
  mov    %r12d,%r8d
  mov    %ebp,%esi
  mov    %r15,%rdi
  pop    %rbx
  mov    $0x1,%r9d
  pop    %rbp
  mov    %r11,%rcx
  pop    %r12
  mov    $0x1,%edx
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <Interpolate1@plt>
L216:
  lea    D68(%rip),%rdi
  jmp    L91
L108:
  lea    D15(%rip),%rdi
  jmp    L91
L123:
  mov    %r15,%rdi
  mov    %r10,0x28(%rsp)
  mov    %r9,(%rsp)
  mov    %r8,0x8(%rsp)
  mov    %r11,0x18(%rsp)
  call   <SearchGrid@plt>
  cvttsd2si (%rbx),%ecx
  mov    $0x1,%r9d
  mov    %eax,0x14(%rsp)
  imul   %r12d,%eax
  push   $0x1
  push   %r14
  mov    %eax,%edi
  movslq %ecx,%rax
  push   0x10(%rsp)
  lea    (%r15,%rax,8),%rsi
  mov    %r12d,%eax
  push   $0x1
  cltd
  idiv   %ecx
  push   %rax
  mov    %edi,%eax
  mov    0x40(%rsp),%r11
  cltd
  idiv   %ecx
  mov    %edi,0x38(%rsp)
  mov    %r11,0x48(%rsp)
  mov    %ebp,%edx
  sub    %ecx,%edx
  mov    %rsi,%rcx
  mov    %r13d,%esi
  mov    %edx,%r8d
  mov    $0x1,%edx
  cltq
  lea    (%r11,%rax,8),%rax
  push   %rax
  mov    0x38(%rsp),%rdi
  call   <Interpolate>
  cvttsd2si (%rbx),%esi
  mov    %ebp,%r8d
  mov    $0x1,%r9d
  movsd  %xmm0,0x48(%rsp)
  add    $0x30,%rsp
  push   $0x1
  push   %r14
  movslq %esi,%rax
  push   0x10(%rsp)
  sub    %esi,%r8d
  lea    (%r15,%rax,8),%rcx
  mov    %r12d,%eax
  push   $0x1
  cltd
  idiv   %esi
  push   %rax
  mov    0x38(%rsp),%edx
  mov    0x48(%rsp),%r11
  lea    (%rdx,%r12,1),%eax
  cltd
  idiv   %esi
  mov    %r13d,%esi
  mov    $0x1,%edx
  cltq
  lea    (%r11,%rax,8),%rax
  push   %rax
  mov    0x38(%rsp),%rdi
  call   <Interpolate>
  movslq 0x44(%rsp),%rax
  mov    0x58(%rsp),%r10
  movsd  0x48(%rsp),%xmm1
  movapd %xmm0,%xmm2
  movsd  (%r15,%rax,8),%xmm3
  movsd  (%r10),%xmm0
  subsd  %xmm1,%xmm2
  subsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm0
  movsd  0x8(%r15,%rax,8),%xmm2
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  subsd  %xmm3,%xmm2
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D1
type_guessed: byte[8]
name: retrieve_data
arguments: data_label: D47
type_guessed: byte[8]
name: retrieve_data
arguments: data_label: D66
type_guessed: byte[8]
name: retrieve_data
arguments: data_label: D75
type_guessed: string
name: retrieve_data
arguments: data_label: D50
type_guessed: string
name: retrieve_data
arguments: data_label: D38
type_guessed: string
name: retrieve_data
arguments: data_label: D68
type_guessed: string
name: retrieve_data
arguments: data_label: D15
type_guessed: string

tool: {"D1": [0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x43]}

tool: {"D47": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: {"D66": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D75: The dimension vector of a table must only contain integers.

tool: D50: Arguments to Interpolate must be vectors.

tool: D38: The size of the argument vector is not the same as
  the dimension vector of a table.

tool: D68: The size of the table value vector is not
  consistent with information in the dimension vector.

tool: D15: The size of the grid vector is not consistent with
  information in the dimension vector of a table.

assistant: ```c
double Interpolate(const double dim[], int Mdim, int Ndim, const double xval[], int Mxval, int Nxval, const double yval[], int Myval, int Nyval, const double x[], int Mx, int Nx) {
  int below;
  double ybelow, yabove;
  int i, dimsum, dimprod;
  int Kx, Kdim, Kxval, Kyval;
  if ((Mx != 1 && Nx != 1) || (Mdim != 1 && Ndim != 1)) {
    return DymosimError("Arguments to Interpolate must be vectors.");
  }
  Kx = Mx > 1 ? Mx : Nx;
  Kdim = Mdim > 1 ? Mdim : Ndim;
  Kxval = Mxval * Nxval;
  Kyval = Myval * Nyval;
  if (Kx != Kdim) {
    return DymosimError("The size of the argument vector is not the same as\n"
                        "  the dimension vector of a table.");
  }
  dimsum = 0;
  dimprod = 1;
  for (i = 0; i < Kdim; i++) {
    if (dim[i] != floor(dim[i])) {
      return DymosimError("The dimension vector of a table must only contain "
                          "integers.");
    }
    dimsum = dimsum + (int)dim[i];
    dimprod = dimprod * (int)dim[i];
  }
  if (Kxval != dimsum) {
    return DymosimError("The size of the grid vector is not consistent with\n"
                        "  information in the dimension vector of a table.");
  }
  if (Kyval != dimprod) {
    return DymosimError("The size of the table value vector is not\n"
                        "  consistent with information in the dimension vector.");
  }
  if (Kdim <= 1)
    return Interpolate1(x[0], xval, Kxval, 1, yval, Kyval, 1);
  else if (x[0] <= xval[0]) {
    below = 0;
    return Interpolate(&dim[1], Kdim - 1, 1, &xval[(int)dim[0]], Kxval - (int)dim[0], 1, &yval[below * dimprod / (int)dim[0]], Kyval / (int)dim[0], 1, &x[1], Kx - 1, 1);
  } else if (x[0] >= xval[(int)dim[0] - 1]) {
    below = (int)dim[0] - 1;
    return Interpolate(&dim[1], Kdim - 1, 1, &xval[(int)dim[0]], Kxval - (int)dim[0], 1, &yval[below * dimprod / (int)dim[0]], Kyval / (int)dim[0], 1, &x[1], Kx - 1, 1);
  } else {
    below = SearchGrid(x[0], xval, (int)dim[0]);
    ybelow = Interpolate(&dim[1], Kdim - 1, 1, &xval[(int)dim[0]], Kxval - (int)dim[0], 1, &yval[below * dimprod / (int)dim[0]], Kyval / (int)dim[0], 1, &x[1], Kx - 1, 1);
    yabove = Interpolate(&dim[1], Kdim - 1, 1, &xval[(int)dim[0]], Kxval - (int)dim[0], 1, &yval[(below + 1) * dimprod / (int)dim[0]], Kyval / (int)dim[0], 1, &x[1], Kx - 1, 1);
    return (ybelow + (yabove - ybelow) * (x[0] - xval[below]) / (xval[below + 1] - xval[below]));
  }
}
```