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

```asm
<dspl_win_flat_top>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D0(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D49(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D71(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  D32(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D87(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x50(%rbp),%eax
  and    $0x100,%eax
  test   %eax,%eax
  jne    L18
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D58(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
L18:
  mov    -0x50(%rbp),%eax
  and    $0x100,%eax
  test   %eax,%eax
  je     L25
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4c(%rbp),%xmm1
  movsd  D58(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
L25:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L33
L14:
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm4
  addsd  %xmm0,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm5
  mulsd  -0x18(%rbp),%xmm5
  movapd %xmm5,%xmm0
  addsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x38(%rbp),%xmm1
  movsd  D7(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm6
  mulsd  -0x10(%rbp),%xmm6
  movapd %xmm6,%xmm0
  movsd  -0x58(%rbp),%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,-0x58(%rbp)
  movsd  -0x38(%rbp),%xmm1
  movsd  D31(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  addsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x38(%rbp),%xmm0
  addsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  addl   $0x1,-0x3c(%rbp)
L33:
  mov    -0x3c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L14
  nop
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D0
type_infered: f64
name: unpack_data
arguments: label: D49
type_infered: f64
name: unpack_data
arguments: label: D71
type_infered: f64
name: unpack_data
arguments: label: D32
type_infered: f64
name: unpack_data
arguments: label: D87
type_infered: f64
name: unpack_data
arguments: label: D58
type_infered: f64
name: unpack_data
arguments: label: D7
type_infered: f64
name: unpack_data
arguments: label: D31
type_infered: f64

tool: D0: 1

tool: D49: 1.93

tool: D71: 1.29

tool: D32: 0.388

tool: D87: 0.032

tool: D58: 6.283185307179586

tool: D7: 3

tool: D31: 4

assistant: ```c
void dspl_win_flat_top(double *w, int n, int win_type) {
  double y;
  double x = 0.0;
  double a0 = 1.0;
  double a1 = 1.93;
  double a2 = 1.29;
  double a3 = 0.388;
  double a4 = 0.032;
  int i;
  if ((win_type & 0x00000100) == 0x00000000)
    x = 6.283185307179586476925286766559 / (double)(n - 1);
  if ((win_type & 0x00000100) == 0x00000100)
    x = 6.283185307179586476925286766559 / (double)n;
  y = 0.0;
  for (i = 0; i < n; i++) {
    w[i] = a0 - a1 * cos(y) + a2 * cos(2.0 * y) - a3 * cos(3.0 * y) + a4 * cos(4.0 * y);
    y += x;
  }
}
```