user: Translate the below assembly code into C programming language:

```asm
<convert>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rcx,0x18(%rsp)
  movss  %xmm0,0x10(%rsp)
  movss  %xmm1,0x14(%rsp)
  test   %edx,%edx
  js     L59
  mov    %rsi,%rbp
  mov    %edx,%ebx
  pxor   %xmm2,%xmm2
  xor    %r14d,%r14d
  jmp    L29
  xchg   %ax,%ax
L126:
  movss  (%rax,%rcx,4),%xmm4
  movaps %xmm2,%xmm3
  test   %r14d,%r14d
  je     L93
  movss  (%rax,%r13,4),%xmm3
L93:
  movaps %xmm3,%xmm1
  movaps %xmm4,%xmm0
  movss  %xmm3,0x4(%rsp)
  add    %rbp,%r15
  movss  %xmm4,(%rsp)
  call   <hypot@plt>
  pxor   %xmm2,%xmm2
  movss  (%rsp),%xmm4
  movss  0x4(%rsp),%xmm3
  ucomiss %xmm2,%xmm0
  movss  %xmm0,(%r15)
  jp     L55
  movaps %xmm2,%xmm1
  jne    L55
L100:
  mulss  0x14(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  add    $0x1,%r14
  cvtsi2ss %r12d,%xmm0
  mulss  0x10(%rsp),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,0x0(%rbp,%r13,4)
  cmp    %r14d,%ebx
  jl     L59
L29:
  lea    (%r14,%r14,1),%eax
  mov    %r14d,%r12d
  movslq %eax,%rcx
  add    $0x1,%eax
  movslq %eax,%r13
  lea    0x0(,%rcx,4),%r15
  mov    0x8(%rsp),%rax
  cmp    %r14d,%ebx
  jne    L126
  movss  0x4(%rax),%xmm4
  movaps %xmm2,%xmm3
  jmp    L93
  nopw   0x0(%rax,%rax,1)
L55:
  movaps %xmm4,%xmm1
  movaps %xmm3,%xmm0
  call   <atan2@plt>
  mov    0x18(%rsp),%rax
  xorps  D6(%rip),%xmm0
  pxor   %xmm2,%xmm2
  movaps %xmm0,%xmm1
  subss  (%rax,%r14,4),%xmm1
  movss  %xmm0,(%rax,%r14,4)
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  comisd D63(%rip),%xmm0
  jbe    L62
  nopl   0x0(%rax)
L10:
  subsd  D59(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsd2ss %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  comisd D63(%rip),%xmm0
  ja     L10
L62:
  movsd  D62(%rip),%xmm6
  movsd  D59(%rip),%xmm3
  comisd %xmm0,%xmm6
  jbe    L100
  nopl   0x0(%rax)
L78:
  addsd  %xmm3,%xmm0
  movsd  D62(%rip),%xmm5
  pxor   %xmm1,%xmm1
  cvtsd2ss %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  comisd %xmm0,%xmm5
  ja     L78
  jmp    L100
  nopw   0x0(%rax,%rax,1)
L59:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D6
type: byte[16]
name: parse_data
arguments: data_tag: D63
type: f64[2]
name: parse_data
arguments: data_tag: D59
type: f64
name: parse_data
arguments: data_tag: D62
type: byte[8]

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

tool: {"D63": [3.14159265358979,6.2831853072]}

tool: D59: 6.2831853072

tool: {"D62": [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;
  }
}
```