user: 请将以下的汇编代码转换成C语言代码:

```asm
<linweights>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  movss  %xmm0,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x24(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm1,%xmm2
  movsd  D26(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  movd   %xmm3,%eax
  movd   %eax,%xmm0
  call   <roundf@plt>
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  movss  D14(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  call   <roundf@plt>
  cvttss2si %xmm0,%eax
  mov    %eax,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x24(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x8(%rbp),%xmm1
  subss  %xmm1,%xmm0
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  divss  %xmm1,%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm0,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <ceil@plt>
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    -0x38(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    -0x40(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x48(%rbp),%rax
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  movl   $0x0,-0x14(%rbp)
  jmp    L65
L17:
  movl   $0x0,-0x10(%rbp)
  jmp    L66
L48:
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  D21(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x10(%rbp)
L66:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L48
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x14(%rbp)
L65:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L17
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x24(%rbp)
  jge    L42
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x2,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L69
L42:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x24(%rbp)
  jle    L69
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
L69:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D26
type: f64
name: disassemble_data
arguments: data_tag: D14
type: f32
name: disassemble_data
arguments: data_tag: D21
type: f32

tool: D26: 3.5

tool: D14: 2.5

tool: D21: 1

assistant: ```c
void linweights(int nfreqs, int Fs, float dB, float **wts, int **indices, int *nbands) {
  int whop = (int)roundf((float)nfreqs / ((float)(*nbands) + 3.5));
  int wlen = (int)roundf(2.5 * (float)whop);
  int reqbands = ceil(((float)nfreqs - wlen) / (whop + 1));
  *wts = (float *)realloc(*wts, reqbands * nfreqs * sizeof(float));
  *indices = (int *)realloc(*indices, reqbands * 2 * sizeof(int));
  *nbands = reqbands;
  for (int i = 0; i < *nbands; i++) {
    for (int j = 0; j < nfreqs; j++) {
      (*wts)[i * nfreqs + j] = 1.;
    }
    (*indices)[i * 2] = i * whop;
    (*indices)[i * 2 + 1] = i * whop + wlen;
  }
  if ((*indices)[(*nbands - 1) * 2 + 1] > nfreqs) {
    (*indices)[(*nbands - 2) * 2 + 1] = nfreqs;
    (*indices)[(*nbands - 1) * 2] = 0;
    (*indices)[(*nbands - 1) * 2 + 1] = 0;
    *nbands = *nbands - 1;
  } else if ((*indices)[(*nbands - 1) * 2 + 1] < nfreqs) {
    (*indices)[(*nbands - 1) * 2 + 1] = nfreqs;
  }
}
```