user: 下面的汇编指令对应的C源代码是什么：

```asm
<HC_to_polar>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    -0x50(%rbp),%rdx
  mov    %rax,(%rdx)
  movl   $0x1,-0x24(%rbp)
  jmp    L10
L28:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  sub    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x50(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L57
  cmpl   $0x0,-0x44(%rbp)
  jne    L2
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  movsd  -0x20(%rbp),%xmm0
  mov    -0x18(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <atan2@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  jmp    L53
L2:
  movsd  -0x18(%rbp),%xmm0
  movq   D4(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x58(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <atan2@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  jmp    L53
L57:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
L53:
  addl   $0x1,-0x24(%rbp)
L10:
  mov    -0x24(%rbp),%eax
  cltq
  mov    -0x38(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,%rcx
  shr    $0x3f,%rcx
  add    %rcx,%rdx
  sar    %rdx
  cmp    %rdx,%rax
  jl     L28
  mov    -0x38(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  jne    L52
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x38(%rbp),%rdx
  mov    %rdx,%rcx
  shr    $0x3f,%rcx
  add    %rcx,%rdx
  sar    %rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x50(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
L52:
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D4
datatype: f32[2]

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

assistant: ```c
void HC_to_polar(long len, const double *freq, int conj, double *amp, double *phs) {
  int i;
  double rl, im;
  phs[0] = 0.0;
  amp[0] = sqrt(freq[0] * freq[0]);
  for (i = 1; i < (len + 1) / 2; i++) {
    rl = freq[i];
    im = freq[len - i];
    amp[i] = sqrt(rl * rl + im * im);
    if (amp[i] > 0.0) {
      if (conj == 0)
        phs[i] = atan2(+im, rl);
      else
        phs[i] = atan2(-im, rl);
    } else {
      phs[i] = 0.0;
    }
  }
  if (len % 2 == 0) {
    phs[len / 2] = 0.0;
    amp[len / 2] = sqrt(freq[len / 2] * freq[len / 2]);
  }
}
```