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

```asm
<mgclsp2sp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x78,%rsp
  movsd  %xmm0,-0x48(%rbp)
  movsd  %xmm1,-0x50(%rbp)
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %ecx,-0x60(%rbp)
  mov    %r8d,-0x6c(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L35
L11:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x34(%rbp),%xmm1
  mov    -0x60(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  D84(%rip),%xmm0
  divsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <mel_conv@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x5c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L20
  movl   $0x0,-0x38(%rbp)
  jmp    L25
L109:
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rbx
  mov    -0x38(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  mov    %rax,%rdi
  call   <log_conv@plt>
  addsd  %xmm0,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rbx
  mov    -0x38(%rbp),%eax
  add    %eax,%eax
  lea    0x1(%rax),%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  mov    %rax,%rdi
  call   <log_conv@plt>
  addsd  %xmm0,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x38(%rbp)
L25:
  mov    -0x5c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x38(%rbp)
  jl     L109
  movsd  -0x18(%rbp),%xmm0
  movsd  D51(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rdi
  call   <log_conv@plt>
  addsd  %xmm0,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  D51(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mov    %rax,%rdi
  call   <log_conv@plt>
  addsd  %xmm0,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    D51(%rip),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  imul   -0x5c(%rbp),%eax
  mov    %eax,%ebx
  movsd  -0x28(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <log_add@plt>
  add    %ebx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L69
L20:
  movl   $0x0,-0x38(%rbp)
  jmp    L43
L48:
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rbx
  mov    -0x38(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  mov    %rax,%rdi
  call   <log_conv@plt>
  addsd  %xmm0,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x38(%rbp)
L43:
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x38(%rbp)
  jl     L48
  movl   $0x0,-0x38(%rbp)
  jmp    L66
L22:
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rbx
  mov    -0x38(%rbp),%eax
  add    %eax,%eax
  lea    0x1(%rax),%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  mov    %rax,%rdi
  call   <log_conv@plt>
  addsd  %xmm0,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x38(%rbp)
L66:
  mov    -0x5c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x38(%rbp)
  jl     L22
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mov    %rax,%rdi
  call   <log_conv@plt>
  addsd  %xmm0,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  movsd  D46(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  mov    D51(%rip),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movapd %xmm0,%xmm4
  mulsd  -0x78(%rbp),%xmm4
  movsd  %xmm4,-0x78(%rbp)
  movsd  -0x28(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <log_add@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L69:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x20(%rbp),%xmm1
  movsd  D20(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D46(%rip),%xmm0
  divsd  -0x50(%rbp),%xmm0
  movq   D29(%rip),%xmm2
  xorpd  %xmm2,%xmm0
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x6c(%rbp)
  jne    L54
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L54:
  addl   $0x1,-0x34(%rbp)
L35:
  mov    -0x34(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jl     L11
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D84
type_guessed: f64
name: unpack_data
arguments: data_label: D51
type_guessed: f64
name: unpack_data
arguments: data_label: D46
type_guessed: f64
name: unpack_data
arguments: data_label: D20
type_guessed: f32[2]
name: unpack_data
arguments: data_label: D29
type_guessed: f32[2]

tool: D84: 3.141592653589793

tool: D51: 2

tool: D46: 1

tool: {"D20": [0.0,-1.75]}

tool: {"D29": [0.0,-0.0]}

assistant: ```c
void mgclsp2sp(double a, double g, double *lsp, const int m, double *x, const int l, const int gain) {
  int i, p;
  double w, eq1, eq2, ap = 0.0;
  for (p = 0; p < l; p++) {
    eq1 = 0.0;
    eq2 = 0.0;
    w = mel_conv(a, p * (3.1415926535897932384626433832795 / (l - 1)));
    if (m % 2 == 0) {
      for (i = 0; i < m / 2; i++) {
        eq1 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + gain]));
        eq2 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + 1 + gain]));
      }
      eq1 += 2.0 * log_conv(cos(w / 2.0));
      eq2 += 2.0 * log_conv(sin(w / 2.0));
      ap = m * log(2.0) + log_add(eq1, eq2);
    } else {
      for (i = 0; i < (m + 1) / 2; i++)
        eq1 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + gain]));
      for (i = 0; i < (m - 1) / 2; i++)
        eq2 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + 1 + gain]));
      eq2 += 2.0 * log_conv(sin(w));
      ap = (m - 1.0) * log(2.0) + log_add(eq1, eq2);
    }
    x[p] = -0.5 * ap;
    x[p] *= -(1.0 / g);
    if (gain == 1)
      x[p] += lsp[0];
  }
}
```