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

```asm
<fornberg_weights>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,0x48(%rsp)
  mov    %esi,%ebx
  mov    %esi,0x8(%rsp)
  mov    %rdx,%r14
  mov    %rdx,0x58(%rsp)
  mov    %rcx,%r15
  movl   $0x3f800000,(%rcx)
  mov    %rcx,%r8
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %ebx,%edi
  call   <get_weight@plt>
  mov    %eax,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  lea    D2(%rip),%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  jle    L35
  lea    0x1(%rbx),%eax
  mov    %eax,0x74(%rsp)
  mov    %eax,%ecx
  imul   %eax,%ecx
  mov    %ecx,%edi
  mov    %ecx,0x10(%rsp)
  add    %eax,%ecx
  mov    %ecx,0x78(%rsp)
  lea    0x2(%rbx),%esi
  mov    %esi,0x7c(%rsp)
  lea    0x4(%r14),%rdx
  mov    %rdx,0x30(%rsp)
  mov    %esi,0x70(%rsp)
  mov    %esi,0x6c(%rsp)
  mov    %edi,0x68(%rsp)
  mov    %eax,0x54(%rsp)
  mov    %eax,0x50(%rsp)
  movq   $0x1,0x38(%rsp)
  movq   $0x0,0x60(%rsp)
  movss  D24(%rip),%xmm7
  movss  %xmm7,0x4c(%rsp)
  jmp    L110
L93:
  cmpl   $0x0,0xc(%rsp)
  jns    L103
L18:
  addq   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%rax
  cmp    0x38(%rsp),%rax
  je     L32
L113:
  mov    0x20(%rsp),%rcx
  mov    %ecx,%r12d
  mov    %ecx,%r13d
  mov    0x30(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    (%rax),%eax
  mov    0x58(%rsp),%rdi
  sub    (%rdi,%rcx,4),%eax
  pxor   %xmm4,%xmm4
  cvtsi2ss %eax,%xmm4
  movss  %xmm4,0x14(%rsp)
  movss  0x40(%rsp),%xmm5
  mulss  %xmm4,%xmm5
  movss  %xmm5,0x40(%rsp)
  mov    0x44(%rsp),%edi
  cmp    %edi,0x48(%rsp)
  jl     L93
  mov    0x68(%rsp),%eax
  add    %ecx,%eax
  cltq
  movl   $0x0,(%r15,%rax,4)
L103:
  mov    0x54(%rsp),%eax
  add    %r12d,%eax
  cltq
  lea    (%r15,%rax,4),%rax
  mov    %rax,0x28(%rsp)
  add    0x50(%rsp),%r12d
  mov    $0x0,%ebx
  jmp    L112
L40:
  mov    0x18(%rsp),%rax
  mov    (%rax),%ebp
  mov    %r15,%r8
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    $0x0,%esi
  mov    0x8(%rsp),%edi
  call   <get_weight@plt>
  imul   %eax,%ebp
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  divss  0x14(%rsp),%xmm0
  mov    0x28(%rsp),%rax
  movss  %xmm0,(%rax)
L56:
  add    $0x1,%ebx
  add    0x10(%rsp),%r12d
  cmp    %ebx,0xc(%rsp)
  jl     L18
L112:
  test   %ebx,%ebx
  je     L40
  mov    0x18(%rsp),%rax
  mov    (%rax),%ebp
  mov    %r15,%r8
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %ebx,%esi
  mov    0x8(%rsp),%edi
  call   <get_weight@plt>
  imul   %eax,%ebp
  lea    -0x1(%rbx),%esi
  mov    %r15,%r8
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    0x8(%rsp),%edi
  call   <get_weight@plt>
  movslq %r12d,%rdx
  imul   %ebx,%eax
  sub    %eax,%ebp
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  divss  0x14(%rsp),%xmm0
  movss  %xmm0,(%r15,%rdx,4)
  jmp    L56
L36:
  mov    0x30(%rsp),%rax
  mov    -0x4(%rax),%eax
  mov    %eax,0x14(%rsp)
  mov    %eax,%ebp
  neg    %ebp
  mov    %r15,%r8
  mov    %r13d,%ecx
  mov    %r13d,%edx
  mov    $0x0,%esi
  mov    0x8(%rsp),%edi
  call   <get_weight@plt>
  imul   %eax,%ebp
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  movss  0x4c(%rsp),%xmm1
  divss  0x40(%rsp),%xmm1
  mulss  %xmm1,%xmm0
  mov    0x18(%rsp),%rax
  movss  %xmm0,(%rax)
L118:
  add    $0x1,%ebx
  add    0x10(%rsp),%r14d
  cmp    0xc(%rsp),%ebx
  jg     L11
L19:
  test   %ebx,%ebx
  je     L36
  lea    -0x1(%rbx),%esi
  mov    %r15,%r8
  mov    %r13d,%ecx
  mov    %r13d,%edx
  mov    0x8(%rsp),%edi
  call   <get_weight@plt>
  imul   %ebx,%eax
  mov    %eax,%ebp
  mov    0x30(%rsp),%rax
  mov    -0x4(%rax),%r12d
  mov    %r15,%r8
  mov    %r13d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    0x8(%rsp),%edi
  call   <get_weight@plt>
  mov    %eax,%edx
  movslq %r14d,%rax
  imul   %edx,%r12d
  sub    %r12d,%ebp
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  movss  0x4c(%rsp),%xmm1
  divss  0x40(%rsp),%xmm1
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%r15,%rax,4)
  jmp    L118
L11:
  addq   $0x1,0x60(%rsp)
  addq   $0x1,0x38(%rsp)
  mov    0x38(%rsp),%rax
  mov    0x74(%rsp),%ecx
  add    %ecx,0x50(%rsp)
  add    %ecx,0x54(%rsp)
  mov    0x78(%rsp),%edx
  add    %edx,0x68(%rsp)
  mov    0x7c(%rsp),%ecx
  add    %ecx,0x6c(%rsp)
  add    %ecx,0x70(%rsp)
  addq   $0x4,0x30(%rsp)
  cmp    %eax,0x8(%rsp)
  jl     L35
  movss  0x40(%rsp),%xmm7
  movss  %xmm7,0x4c(%rsp)
L110:
  mov    0x38(%rsp),%rax
  mov    %eax,0x44(%rsp)
  test   %eax,%eax
  jle    L16
  mov    0x38(%rsp),%eax
  mov    0x48(%rsp),%edi
  cmp    %eax,%edi
  cmovle %edi,%eax
  mov    %eax,0xc(%rsp)
  movq   $0x0,0x20(%rsp)
  movss  D24(%rip),%xmm7
  movss  %xmm7,0x40(%rsp)
  mov    0x60(%rsp),%r14d
  jmp    L113
L16:
  movss  D24(%rip),%xmm7
  movss  %xmm7,0x40(%rsp)
L32:
  cmpl   $0x0,0xc(%rsp)
  js     L11
  movslq 0x70(%rsp),%rax
  lea    (%r15,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  mov    0x6c(%rsp),%r14d
  mov    $0x0,%ebx
  mov    0x60(%rsp),%r13d
  jmp    L19
L35:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: tag: D2
datatype: string
name: unpack_data
arguments: tag: D24
datatype: byte[4]

tool: D2: delta %d %d %d=%f


tool: {"D24": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void fornberg_weights(int M, int p, int *alpha, float *delta) {
  int N = p;
  float c1, c2, c3;
  int min;
  int i, j, n, v, m;
  delta[(N + 1) * (N + 1) * 0 + (N + 1) * 0 + 0] = 1;
  c1 = 1;
  printf("delta %d %d %d=%f\n", 0, 0, 0, get_weight(N, 0, 0, 0, delta));
  for (n = 1; n <= N; n++) {
    c2 = 1;
    for (v = 0; v <= n - 1; v++) {
      c3 = alpha[n] - alpha[v];
      c2 = c2 * c3;
      if (n <= M) {
        delta[(N + 1) * (N + 1) * n + (N + 1) * (n - 1) + v] = 0;
      }
      if (n < M)
        min = n;
      else
        min = M;
      for (m = 0; m <= min; m++) {
        if (m == 0)
          delta[(N + 1) * (N + 1) * m + (N + 1) * n + v] = (alpha[n] * get_weight(N, m, n - 1, v, delta)) / c3;
        else
          delta[(N + 1) * (N + 1) * m + (N + 1) * n + v] = (alpha[n] * get_weight(N, m, n - 1, v, delta) - m * get_weight(N, m - 1, n - 1, v, delta)) / c3;
      }
    }
    for (m = 0; m <= min; m++) {
      if (m == 0)
        delta[(N + 1) * (N + 1) * m + (N + 1) * n + n] = (c1 / c2) * (-1 * alpha[n - 1] * get_weight(N, m, n - 1, n - 1, delta));
      else
        delta[(N + 1) * (N + 1) * m + (N + 1) * n + n] = (c1 / c2) * (m * get_weight(N, m - 1, n - 1, n - 1, delta) - alpha[n - 1] * get_weight(N, m, n - 1, n - 1, delta));
    }
    c1 = c2;
  }
}
```