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

```asm
<sincApply>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x1c(%rsp)
  mov    %rsi,0x10(%rsp)
  movsd  %xmm0,(%rsp)
  test   %edx,%edx
  jle    L55
  lea    -0x1(%rdx),%eax
  mov    D5(%rip),%r12
  mov    %edx,%ebx
  mov    %rsi,%rbp
  mov    %eax,%r13d
  mov    %rsi,%r14
  xor    %r15d,%r15d
  shr    $0x1f,%r13d
  add    %eax,%r13d
  sar    %r13d
  neg    %r13d
  jmp    L46
  nop
L19:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r13d,%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm1
  mov    0x1c(%rsp),%eax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r14)
  cmp    $0x1,%eax
  je     L139
  cmp    $0x2,%eax
  je     L119
  test   %eax,%eax
  je     L43
  xor    %edi,%edi
  call   <assert@plt>
  nopl   0x0(%rax)
L72:
  add    $0x1,%r15d
  add    $0x1,%r13d
  add    $0x8,%r14
  cmp    %r15d,%ebx
  je     L154
L46:
  movsd  (%r12),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  (%rsp),%xmm0
  test   %r13d,%r13d
  jne    L19
  movsd  %xmm0,(%r14)
  jmp    L72
  nopl   0x0(%rax)
L43:
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <wdw_Hamming@plt>
  mulsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  jmp    L72
  xchg   %ax,%ax
L119:
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <wdw_Hanning@plt>
  mulsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  jmp    L72
  cs nopw 0x0(%rax,%rax,1)
L139:
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <wdw_Blackman@plt>
  mulsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  jmp    L72
  cs nopw 0x0(%rax,%rax,1)
L154:
  cmp    $0x1,%ebx
  je     L48
  mov    %ebx,%eax
  pxor   %xmm0,%xmm0
  shr    %eax
  lea    -0x1(%rax),%esi
  mov    0x10(%rsp),%rax
  shl    $0x4,%rsi
  lea    0x10(%rax),%rdi
  add    %rdi,%rsi
  nopl   0x0(%rax)
L6:
  movsd  (%rax),%xmm1
  add    $0x10,%rax
  addsd  %xmm1,%xmm0
  movsd  -0x8(%rax),%xmm1
  addsd  %xmm1,%xmm0
  cmp    %rsi,%rax
  jne    L6
  mov    %ebx,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%bl
  je     L27
  mov    0x10(%rsp),%rdx
  cltq
  addsd  (%rdx,%rax,8),%xmm0
L27:
  mov    %ebx,%eax
  movapd %xmm0,%xmm2
  shr    %eax
  unpcklpd %xmm2,%xmm2
  sub    $0x1,%eax
  shl    $0x4,%rax
  add    %rdi,%rax
  xchg   %ax,%ax
L15:
  movupd 0x0(%rbp),%xmm1
  add    $0x10,%rbp
  divpd  %xmm2,%xmm1
  movups %xmm1,-0x10(%rbp)
  cmp    %rbp,%rax
  jne    L15
  mov    %ebx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%ebx
  je     L55
L84:
  mov    0x10(%rsp),%rcx
  cltq
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
L55:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L48:
  mov    0x10(%rsp),%rax
  pxor   %xmm0,%xmm0
  addsd  (%rax),%xmm0
  xor    %eax,%eax
  jmp    L84
```

assistant: ```c
void sincApply(double fc, int wdw, double a[], int m) {
  int i;
  int Mp = m - 1;
  double sum;
  for (i = 0; i < m; i++) {
    if ((i - (Mp / 2)) == 0) {
      a[i] = 2.0 * M_PI * fc;
    } else {
      double k = (double)(i - (Mp / 2));
      a[i] = sin(2.0 * M_PI * fc * k) / k;
      switch (wdw) {
      case 0:
        a[i] *= wdw_Hamming(i, m);
        break;
      case 1:
        a[i] *= wdw_Blackman(i, m);
        break;
      case 2:
        a[i] *= wdw_Hanning(i, m);
        break;
      default:
        assert(0);
      }
    }
  }
  for (i = 0, sum = 0.0; i < m; i++) {
    sum += a[i];
  }
  for (i = 0; i < m; i++) {
    a[i] /= sum;
  }
}
```