user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<makewt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movl   $0x1,(%rax)
  cmpl   $0x2,-0x24(%rbp)
  jle    L27
  mov    -0x24(%rbp),%eax
  sar    %eax
  mov    %eax,-0x10(%rbp)
  mov    D10(%rip),%eax
  movd   %eax,%xmm0
  call   <atan@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x10(%rbp),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  movss  D10(%rip),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x10(%rbp),%xmm0
  mulss  -0xc(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  mov    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  cmpl   $0x2,-0x10(%rbp)
  jle    L27
  movl   $0x2,-0x14(%rbp)
  jmp    L1
L7:
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x14(%rbp),%xmm0
  mulss  -0xc(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  movss  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x14(%rbp),%xmm0
  mulss  -0xc(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x8(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  sub    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  sub    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x8(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x2,-0x14(%rbp)
L1:
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L7
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x24(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <bitrv2@plt>
L27:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D10
datatype: byte[4]

tool: {"D10": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void makewt(int nw, int *ip, float *w) {
  int j, nwh;
  float delta, x, y;
  ip[0] = nw;
  ip[1] = 1;
  if (nw > 2) {
    nwh = nw >> 1;
    delta = (float)atan(1.0f) / nwh;
    w[0] = 1;
    w[1] = 0;
    w[nwh] = (float)cos(delta * nwh);
    w[nwh + 1] = w[nwh];
    if (nwh > 2) {
      for (j = 2; j < nwh; j += 2) {
        x = (float)cos(delta * j);
        y = (float)sin(delta * j);
        w[j] = x;
        w[j + 1] = y;
        w[nw - j] = y;
        w[nw - j + 1] = x;
      }
      bitrv2(nw, ip + 2, w);
    }
  }
}
```