user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<convert>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    %rcx,-0x60(%rbp)
  movss  %xmm0,-0x58(%rbp)
  movss  %xmm1,-0x64(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L105
L101:
  mov    -0x30(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x30(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jne    L40
  mov    -0x48(%rbp),%rax
  movss  0x4(%rax),%xmm0
  jmp    L35
L40:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
L35:
  movss  %xmm0,-0x1c(%rbp)
  cmpl   $0x0,-0x30(%rbp)
  je     L100
  mov    -0x30(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  je     L100
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  jmp    L68
L100:
  pxor   %xmm0,%xmm0
L68:
  movss  %xmm0,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  movss  -0x18(%rbp),%xmm0
  mov    -0x1c(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <hypot@plt>
  movd   %xmm0,%eax
  mov    %eax,(%rbx)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jp     L131
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jne    L131
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x34(%rbp)
  jmp    L92
L131:
  movss  -0x1c(%rbp),%xmm0
  mov    -0x18(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <atan2@plt>
  movd   %xmm0,%eax
  movss  D24(%rip),%xmm0
  movd   %eax,%xmm2
  xorps  %xmm0,%xmm2
  movaps %xmm2,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x14(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x34(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
  jmp    L31
L29:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x34(%rbp),%xmm0
  movsd  D41(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x34(%rbp)
L31:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x34(%rbp),%xmm0
  comisd D46(%rip),%xmm0
  ja     L29
  jmp    L51
L126:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x34(%rbp),%xmm1
  movsd  D41(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x34(%rbp)
L51:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x34(%rbp),%xmm1
  movsd  D31(%rip),%xmm0
  comisd %xmm1,%xmm0
  ja     L126
L92:
  movss  -0x34(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x64(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x30(%rbp),%xmm0
  mulss  -0x58(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L105:
  mov    -0x30(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jle    L101
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D24
data_type: byte[4]
name: extract_symbolic_data
arguments: data_tag: D41
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D46
data_type: f64[2]
name: extract_symbolic_data
arguments: data_tag: D31
data_type: byte[8]

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

tool: D41: 6.2831853072

tool: {"D46": [3.14159265358979,-3.14159265358979]}

tool: {"D31": [0x11,0x2d,0x44,0x54,0xfb,0x21,0x09,0xc0]}

assistant: ```c
void convert(float *S, float *C, int N2, float *lastphase, float fundamental, float factor) {
  float phase, phasediff;
  int real, imag, amp, freq;
  float a, b;
  int i;
  for (i = 0; i <= N2; i++) {
    imag = freq = (real = amp = i << 1) + 1;
    a = (i == N2 ? S[1] : S[real]);
    b = (i == 0 || i == N2 ? 0. : S[imag]);
    C[amp] = hypot(a, b);
    if (C[amp] == 0.)
      phasediff = 0.;
    else {
      phasediff = (phase = -atan2(b, a)) - lastphase[i];
      lastphase[i] = phase;
      while (phasediff > 3.14159265358979)
        phasediff -= 6.2831853072;
      while (phasediff < -3.14159265358979)
        phasediff += 6.2831853072;
    }
    C[freq] = phasediff * factor + i * fundamental;
  }
}
```