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    %rcx,0x18(%rsp)
  movss  %xmm0,0x10(%rsp)
  movss  %xmm1,0x14(%rsp)
  test   %edx,%edx
  js     L19
  mov    %rdi,%r14
  mov    %rsi,%r13
  mov    %edx,%r12d
  mov    $0x0,%ebx
  jmp    L101
L25:
  movss  0x4(%r14),%xmm6
  movss  %xmm6,0x8(%rsp)
  pxor   %xmm7,%xmm7
  movss  %xmm7,0x4(%rsp)
L97:
  cltq
  lea    0x0(%r13,%rax,4),%r15
  movss  0x4(%rsp),%xmm1
  movss  0x8(%rsp),%xmm0
  call   <hypot@plt>
  movss  %xmm0,(%r15)
  pxor   %xmm5,%xmm5
  ucomiss %xmm5,%xmm0
  jp     L80
  movaps %xmm5,%xmm1
  jne    L80
L71:
  movslq %ebp,%rbp
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0xc(%rsp),%xmm0
  mulss  0x10(%rsp),%xmm0
  mulss  0x14(%rsp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,0x0(%r13,%rbp,4)
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jl     L19
L101:
  mov    %ebx,0xc(%rsp)
  lea    (%rbx,%rbx,1),%eax
  lea    0x1(%rax),%ebp
  cmp    %ebx,%r12d
  je     L25
  movslq %eax,%rdx
  movss  (%r14,%rdx,4),%xmm4
  movss  %xmm4,0x8(%rsp)
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x4(%rsp)
  test   %ebx,%ebx
  je     L97
  movslq %ebp,%rdx
  movss  (%r14,%rdx,4),%xmm5
  movss  %xmm5,0x4(%rsp)
  jmp    L97
L80:
  movss  0x8(%rsp),%xmm1
  movss  0x4(%rsp),%xmm0
  call   <atan2@plt>
  xorps  D14(%rip),%xmm0
  mov    0x18(%rsp),%rax
  movaps %xmm0,%xmm1
  subss  (%rax,%rbx,4),%xmm1
  movss  %xmm0,(%rax,%rbx,4)
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  movsd  D47(%rip),%xmm3
  movsd  D22(%rip),%xmm2
  comisd %xmm2,%xmm0
  jbe    L57
L119:
  subsd  %xmm3,%xmm0
  pxor   %xmm1,%xmm1
  cvtsd2ss %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  comisd %xmm2,%xmm0
  ja     L119
L57:
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  movsd  D47(%rip),%xmm3
  movsd  D30(%rip),%xmm2
  comisd %xmm0,%xmm2
  jbe    L71
L69:
  addsd  %xmm3,%xmm0
  pxor   %xmm1,%xmm1
  cvtsd2ss %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  comisd %xmm0,%xmm2
  ja     L69
  jmp    L71
L19:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: label: D14
type: byte[16]
name: retrieve_data
arguments: label: D47
type: f64
name: retrieve_data
arguments: label: D22
type: f64
name: retrieve_data
arguments: label: D30
type: byte[8]

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

tool: D47: 6.2831853072

tool: D22: 3.14159265358979

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