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

```asm
<resfft>:
  endbr64
  mov    %esi,%r8d
  push   %r15
  mov    %edx,%r10d
  mov    %esi,%r15d
  push   %r14
  shr    $0x1f,%r8d
  push   %r13
  add    %esi,%r8d
  push   %r12
  sar    %r8d
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x38,%rsp
  cmp    $0x1,%esi
  jle    L43
  lea    -0x2(%rsi),%edx
  lea    0x4(%rdi),%rax
  pxor   %xmm0,%xmm0
  shr    %edx
  lea    0xc(%rdi,%rdx,8),%rdx
  cs nopw 0x0(%rax,%rax,1)
L16:
  addss  (%rax),%xmm0
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L16
  addss  %xmm0,%xmm0
  movss  %xmm0,0x2c(%rsp)
L52:
  lea    0x0(,%r15,4),%edi
  mov    %r10d,(%rsp)
  movslq %r15d,%r13
  movslq %ebp,%r12
  call   <malloc@plt>
  movss  (%rbx),%xmm0
  lea    (%rbx,%r13,4),%rcx
  shl    $0x2,%r12
  lea    (%rax,%r12,1),%rdi
  mov    %rcx,0x10(%rsp)
  cmp    $0x3,%r15d
  mov    (%rsp),%r10d
  movss  %xmm0,(%rax)
  movss  (%rcx),%xmm0
  lea    (%rbx,%r12,1),%rcx
  mov    %rax,0x8(%rsp)
  mov    %rdi,0x18(%rsp)
  mov    %rcx,0x20(%rsp)
  movss  %xmm0,(%rdi)
  jle    L25
  lea    0x4(%rax),%r14
  lea    (%rax,%r13,2),%rdi
  mov    $0x1,%eax
  add    %rdi,%rdi
  mov    %r14,%rdx
  nopl   0x0(%rax,%rax,1)
L72:
  movss  0x4(%rbx,%rax,8),%xmm0
  subss  -0x4(%rbx,%rax,8),%xmm0
  mov    %rdi,%rsi
  movss  (%rbx,%rax,8),%xmm1
  sub    %rdx,%rsi
  add    $0x4,%rdx
  addss  %xmm0,%xmm1
  movss  %xmm1,-0x4(%rdx)
  movss  (%rbx,%rax,8),%xmm1
  add    $0x1,%rax
  subss  %xmm0,%xmm1
  movss  %xmm1,(%rsi)
  cmp    %eax,%ebp
  jg     L72
  mov    0x8(%rsp),%r12
  mov    %r15d,%esi
  mov    %r10d,%edx
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <rsfft@plt>
  pxor   %xmm0,%xmm0
  movsd  D8(%rip),%xmm1
  cvtsi2sd %r15d,%xmm0
  lea    -0x4(%r12,%r13,4),%r15
  mov    $0x1,%r12d
  mov    %r15,%r13
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsp)
  xchg   %ax,%ax
L2:
  pxor   %xmm0,%xmm0
  sub    $0x4,%r13
  cvtsi2sd %r12d,%xmm0
  mulsd  (%rsp),%xmm0
  add    $0x1,%r12d
  call   <sin@plt>
  pxor   %xmm1,%xmm1
  movss  0x4(%r13),%xmm0
  add    %eax,%eax
  cvtsi2ss %eax,%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,0x4(%r13)
  cmp    %r12d,%ebp
  jg     L2
  mov    0x8(%rsp),%rcx
  movss  0x2c(%rsp),%xmm3
  mov    0x10(%rsp),%rax
  movss  (%rcx),%xmm0
  addss  %xmm3,%xmm0
  movss  %xmm0,(%rbx)
  movss  (%rcx),%xmm0
  sub    %rcx,%rbx
  subss  %xmm3,%xmm0
  movss  %xmm0,(%rax)
  mov    0x18(%rsp),%rax
  movss  (%rax),%xmm0
  mov    0x20(%rsp),%rax
  movss  %xmm0,(%rax)
  mov    $0x1,%eax
  nopl   0x0(%rax)
L58:
  movss  (%r14),%xmm0
  addss  (%r15),%xmm0
  add    $0x1,%eax
  movss  %xmm0,(%rbx,%r14,1)
  movss  (%r14),%xmm0
  subss  (%r15),%xmm0
  add    $0x4,%r14
  movss  %xmm0,(%rbx,%r15,1)
  sub    $0x4,%r15
  cmp    %eax,%ebp
  jg     L58
L50:
  mov    0x8(%rsp),%rdi
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
  nopw   0x0(%rax,%rax,1)
L43:
  pxor   %xmm5,%xmm5
  movss  %xmm5,0x2c(%rsp)
  jmp    L52
  nop
L25:
  mov    0x8(%rsp),%r14
  xor    %eax,%eax
  mov    %r10d,%edx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <rsfft@plt>
  movss  (%r14),%xmm0
  movss  0x2c(%rsp),%xmm4
  mov    0x10(%rsp),%rax
  addss  %xmm4,%xmm0
  movss  %xmm0,(%rbx)
  movss  (%r14),%xmm0
  subss  %xmm4,%xmm0
  movss  %xmm0,(%rax)
  mov    0x18(%rsp),%rax
  movss  (%rax),%xmm0
  mov    0x20(%rsp),%rax
  movss  %xmm0,(%rax)
  jmp    L50
```

tool_calls: name: parse_data
arguments: data_label: D8
data_type: f64

tool: D8: 3.141592653589793

assistant: ```c
void resfft(float *x, int n, int m) {
  int n2, n4, i, j, k, nk;
  float b0, yt, *y;
  double e;
  void rsfft();
  n2 = n;
  n4 = n2 / 2;
  for (b0 = 0, i = 1; i < n2; i += 2)
    b0 += x[i];
  b0 *= 2;
  y = (float *)malloc(n2 * sizeof(float));
  y[0] = x[0];
  y[n4] = x[n2];
  for (i = 1; i < n4; i++) {
    j = 2 * i;
    yt = x[j + 1] - x[j - 1];
    y[i] = x[j] + yt;
    y[n2 - i] = x[j] - yt;
  }
  rsfft(y, n2, m);
  e = 3.141592653589793 / n;
  for (k = 1; k < n4; k++)
    y[n2 - k] /= 2 * sin(e * k);
  x[0] = y[0] + b0;
  x[n2] = y[0] - b0;
  x[n4] = y[n4];
  for (k = 1; k < n4; k++) {
    nk = n2 - k;
    x[k] = y[k] + y[nk];
    x[nk] = y[k] - y[nk];
  }
  free(y);
}
```