user: 请从给定的汇编指令推导出C源代码:

```asm
<melweights>:
  endbr64
  mov    %esi,%eax
  pxor   %xmm6,%xmm6
  push   %r15
  mov    %r8,%r15
  shr    $0x1f,%eax
  push   %r14
  add    %esi,%eax
  push   %r13
  sar    %eax
  push   %r12
  mov    %edi,%r12d
  cvtsi2ss %eax,%xmm6
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  movss  %xmm0,0x24(%rsp)
  movaps %xmm6,%xmm0
  mov    %rdx,0x18(%rsp)
  mov    %rcx,(%rsp)
  movss  %xmm6,0x8(%rsp)
  call   <hz2mel@plt>
  mov    (%r15),%eax
  lea    0x0(,%r12,4),%edi
  movaps %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  sub    $0x1,%eax
  cvtsi2ss %eax,%xmm0
  movslq %r12d,%rax
  mov    %rax,0x28(%rsp)
  divss  %xmm0,%xmm1
  movss  %xmm1,0x20(%rsp)
  call   <MALLOC@plt>
  mov    %rax,0x10(%rsp)
  test   %r12d,%r12d
  jle    L40
  lea    -0x1(%r12),%eax
  pxor   %xmm7,%xmm7
  mov    0x10(%rsp),%rbp
  xor    %ebx,%ebx
  cvtsi2ss %eax,%xmm7
  movss  %xmm7,0xc(%rsp)
  nopw   0x0(%rax,%rax,1)
L42:
  pxor   %xmm0,%xmm0
  add    $0x4,%rbp
  cvtsi2ss %ebx,%xmm0
  mulss  0x8(%rsp),%xmm0
  add    $0x1,%ebx
  divss  0xc(%rsp),%xmm0
  call   <hz2mel@plt>
  movss  %xmm0,-0x4(%rbp)
  cmp    %ebx,%r12d
  jne    L42
L40:
  mov    (%r15),%edx
  test   %edx,%edx
  jle    L2
  mov    0x10(%rsp),%rsi
  movl   $0x0,0xc(%rsp)
  lea    -0x1(%r12),%eax
  xor    %r13d,%r13d
  lea    0x4(%rsi,%rax,4),%rbp
  nop
L21:
  pxor   %xmm0,%xmm0
  cvtsi2ss %r13d,%xmm0
  mulss  0x20(%rsp),%xmm0
  movss  %xmm0,0x8(%rsp)
  test   %r12d,%r12d
  jle    L8
  movslq 0xc(%rsp),%rax
  mov    0x18(%rsp),%rsi
  mov    0x10(%rsp),%r14
  lea    (%rsi,%rax,4),%rbx
  sub    %r14,%rbx
L74:
  movss  (%r14),%xmm0
  subss  0x8(%rsp),%xmm0
  cvttss2si %xmm0,%edi
  movss  D33(%rip),%xmm0
  call   <pow@plt>
  mulsd  D0(%rip),%xmm0
  call   <exp@plt>
  movss  %xmm0,(%rbx,%r14,1)
  add    $0x4,%r14
  cmp    %r14,%rbp
  jne    L74
L8:
  add    %r12d,0xc(%rsp)
  add    $0x1,%r13d
  cmp    %r13d,(%r15)
  jg     L21
L2:
  mov    $0xa,%edi
  movss  0x24(%rsp),%xmm0
  xorps  D2(%rip),%xmm0
  divss  D13(%rip),%xmm0
  call   <pow@plt>
  mov    (%r15),%eax
  cvtsd2ss %xmm0,%xmm0
  test   %eax,%eax
  jle    L49
  mov    0x28(%rsp),%r8
  lea    -0x1(%r12),%esi
  mov    0x18(%rsp),%rdx
  xor    %edi,%edi
  movslq %esi,%rsi
  shl    $0x2,%r8
  nopl   0x0(%rax,%rax,1)
L36:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L48:
  mov    %eax,%ecx
  add    $0x1,%rax
  comiss -0x4(%rdx,%rax,4),%xmm0
  ja     L48
  mov    (%rsp),%rax
  mov    %ecx,(%rax,%rdi,8)
  mov    %rsi,%rax
  nop
L3:
  mov    %eax,%ecx
  sub    $0x1,%rax
  comiss 0x4(%rdx,%rax,4),%xmm0
  ja     L3
  mov    (%rsp),%rax
  add    %r8,%rdx
  mov    %ecx,0x4(%rax,%rdi,8)
  add    $0x1,%rdi
  cmp    %edi,(%r15)
  jg     L36
L49:
  mov    0x10(%rsp),%rdi
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <FREE@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D33
data_type: f32
name: retrieve_data
arguments: data_label: D0
data_type: byte[8]
name: retrieve_data
arguments: data_label: D2
data_type: byte[16]
name: retrieve_data
arguments: data_label: D13
data_type: f32

tool: D33: 2

tool: {"D0": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf]}

tool: {"D2": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D13: 20

assistant: ```c
void melweights(int nfreqs, int Fs, float dB, float *wts, int *indices, int *nbands) {
  float nyqmel = hz2mel(Fs / 2);
  float step_mels = nyqmel / (*nbands - 1);
  float *binmels = (float *)MALLOC(nfreqs * sizeof(float));
  for (int i = 0; i < nfreqs; i++) {
    binmels[i] = hz2mel(((float)i * (Fs / 2)) / (nfreqs - 1));
  }
  for (int i = 0; i < *nbands; i++) {
    float f_mel_mid = i * step_mels;
    for (int j = 0; j < nfreqs; j++) {
      wts[i * nfreqs + j] = exp(-0.5 * pow(binmels[j] - f_mel_mid, 2));
    }
  }
  float lin = pow(10, -dB / 20);
  for (int i = 0; i < *nbands; i++) {
    int j = 0;
    while (wts[i * nfreqs + (j++)] < lin)
      ;
    indices[i * 2] = j - 1;
    j = nfreqs - 1;
    while (wts[i * nfreqs + (j--)] < lin)
      ;
    indices[i * 2 + 1] = j + 1;
  }
  FREE(binmels);
}
```