user: Please show me the C implementation that matches the assembly code listed below:

```asm
<spread>:
  endbr64
  mov    $0x1,%eax
  cmp    $0xa,%edx
  jg     L36
  cvttsd2si %xmm1,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  ucomisd %xmm1,%xmm2
  jp     L95
  jne    L95
  cltq
  lea    -0x8(%rdi,%rax,8),%rax
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  xor    %eax,%eax
  ret
  nopl   0x0(%rax)
L36:
  ret
  nopl   0x0(%rax)
L95:
  pxor   %xmm2,%xmm2
  movapd %xmm1,%xmm4
  sub    %edx,%esi
  cvtsi2sd %edx,%xmm2
  mulsd  D16(%rip),%xmm2
  lea    0x1(%rsi),%r8d
  subsd  %xmm2,%xmm4
  movsd  D10(%rip),%xmm2
  addsd  %xmm2,%xmm4
  comisd %xmm2,%xmm4
  jbe    L73
  pxor   %xmm3,%xmm3
  lea    0x2(%rsi),%ecx
  cvtsi2sd %r8d,%xmm3
  comisd %xmm4,%xmm3
  jbe    L105
  cvttsd2si %xmm4,%r8d
  pxor   %xmm3,%xmm3
  cvtsi2sd %r8d,%xmm3
  lea    0x1(%r8),%ecx
L105:
  lea    (%r8,%rdx,1),%esi
  lea    D21(%rip),%rax
  movapd %xmm1,%xmm2
  movslq %edx,%rdx
  lea    -0x1(%rsi),%r9d
  subsd  %xmm3,%xmm2
  mov    (%rax,%rdx,4),%eax
  cmp    %ecx,%r9d
  jl     L37
  nopw   0x0(%rax,%rax,1)
L115:
  pxor   %xmm4,%xmm4
  movapd %xmm1,%xmm3
  cvtsi2sd %ecx,%xmm4
  add    $0x1,%ecx
  subsd  %xmm4,%xmm3
  mulsd  %xmm3,%xmm2
  cmp    %ecx,%esi
  jne    L115
L37:
  mulsd  %xmm2,%xmm0
  pxor   %xmm2,%xmm2
  movapd %xmm1,%xmm3
  movslq %r9d,%rdx
  cvtsi2sd %r9d,%xmm2
  lea    -0x8(%rdi,%rdx,8),%rdx
  mov    $0x1,%r9d
  mov    %r9d,%r10d
  sub    %esi,%r9d
  sub    %r8d,%r10d
  subsd  %xmm2,%xmm3
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  mulsd  %xmm2,%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  addsd  (%rdx),%xmm2
  movsd  %xmm2,(%rdx)
  lea    -0x2(%rsi),%edx
  movslq %edx,%rcx
  cmp    %edx,%r8d
  jg     L67
  xchg   %ax,%ax
L30:
  lea    (%r10,%rcx,1),%esi
  pxor   %xmm2,%xmm2
  movapd %xmm1,%xmm3
  cltd
  idiv   %esi
  cvtsi2sd %ecx,%xmm2
  lea    (%r9,%rcx,1),%edx
  subsd  %xmm2,%xmm3
  pxor   %xmm2,%xmm2
  imul   %edx,%eax
  cvtsi2sd %eax,%xmm2
  mulsd  %xmm2,%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  addsd  -0x8(%rdi,%rcx,8),%xmm2
  movsd  %xmm2,-0x8(%rdi,%rcx,8)
  sub    $0x1,%rcx
  cmp    %ecx,%r8d
  jle    L30
L67:
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L73:
  cmp    $0x1,%r8d
  jg     L103
  pxor   %xmm3,%xmm3
  lea    0x2(%rsi),%ecx
  cvtsi2sd %r8d,%xmm3
  jmp    L105
  nopw   0x0(%rax,%rax,1)
L103:
  mov    $0x2,%ecx
  movapd %xmm2,%xmm3
  mov    $0x1,%r8d
  jmp    L105
```

tool_calls: name: read_data
arguments: tag: D16
type_guessed: f64
name: read_data
arguments: tag: D10
type_guessed: f64
name: read_data
arguments: tag: D21
type_guessed: string

tool: D16: 0.5

tool: D10: 1

tool: 

assistant: ```c
int spread(double y, double *yy, int n, double x, int m) {
  int ihi, ilo, ix, j, nden;
  static int nfac[11] = {0, 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880};
  double fac;
  if (m > 10)
    return (1);
  ix = (int)x;
  if (x == (double)ix)
    yy[ix - 1] += y;
  else {
    ilo = (((((x - 0.5 * m + 1.0)) > (1) ? ((x - 0.5 * m + 1.0)) : (1))) < (n - m + 1) ? ((((x - 0.5 * m + 1.0)) > (1) ? ((x - 0.5 * m + 1.0)) : (1))) : (n - m + 1));
    ihi = ilo + m - 1;
    nden = nfac[m];
    fac = x - ilo;
    for (j = ilo + 1; j <= ihi; j++)
      fac *= (x - j);
    yy[ihi - 1] += y * fac / (nden * (x - ihi));
    for (j = ihi - 1; j >= ilo; j--) {
      nden = (nden / (j + 1 - ilo)) * (j - ihi);
      yy[j - 1] += y * fac / (nden * (x - j));
    }
  }
  return (0);
}
```