user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<firGen>:
  endbr64
  movslq %edi,%rax
  push   %r15
  push   %r14
  push   %r13
  mov    %eax,%r13d
  push   %r12
  shr    $0x1f,%r13d
  push   %rbp
  add    %eax,%r13d
  mov    %edx,%ebp
  push   %rbx
  mov    %rcx,%rbx
  mov    %r13d,%ecx
  sar    %ecx
  sub    $0x68,%rsp
  mov    %ecx,0x5c(%rsp)
  movsd  %xmm2,0x10(%rsp)
  test   $0x1,%al
  jne    L173
  movl   $0x1,0x58(%rsp)
  lea    0x1(%rcx),%r12d
L174:
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  mulsd  D88(%rip),%xmm2
  movsd  %xmm2,0x8(%rsp)
  movsd  D71(%rip),%xmm2
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,(%rsp)
  cmp    $0x2,%esi
  jle    L47
  mulsd  %xmm2,%xmm1
  movsd  %xmm1,0x28(%rsp)
  cmp    $0x3,%esi
  je     L172
L47:
  cmp    $0x3,%esi
  jg     L124
  cmp    $0x1,%esi
  je     L55
  cmp    $0x2,%esi
  jne    L108
  test   %r12d,%r12d
  js     L69
  movsd  D62(%rip),%xmm7
  lea    0x1(%rax),%r15d
  lea    (%rbx,%rax,8),%r14
  xor    %r13d,%r13d
  movsd  %xmm7,0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L102:
  pxor   %xmm2,%xmm2
  movsd  0x18(%rsp),%xmm3
  mov    %r13d,0x38(%rsp)
  sub    $0x8,%r14
  cvtsi2sd %r13d,%xmm2
  subsd  0x8(%rsp),%xmm2
  mulsd  %xmm2,%xmm3
  movsd  %xmm2,0x30(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x28(%rsp)
  call   <sin@plt>
  movsd  0x30(%rsp),%xmm2
  mulsd  (%rsp),%xmm2
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm2,%xmm0
  pxor   %xmm2,%xmm2
  divsd  %xmm2,%xmm0
  call   <sin@plt>
  movsd  0x20(%rsp),%xmm1
  mov    %r13d,%edx
  mov    %ebp,%edi
  movsd  0x28(%rsp),%xmm3
  mov    %r15d,%esi
  subsd  %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm0
  divsd  %xmm3,%xmm1
  movsd  %xmm1,(%rbx,%r13,8)
  movsd  %xmm1,0x20(%rsp)
  call   <window@plt>
  movsd  0x20(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx,%r13,8)
  add    $0x1,%r13
  movsd  %xmm1,0x8(%r14)
  cmp    %r13d,%r12d
  jge    L102
L69:
  cmpl   $0x1,0x58(%rsp)
  je     L123
L108:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L124:
  cmp    $0x4,%esi
  jne    L108
  test   %r12d,%r12d
  js     L119
  movsd  D62(%rip),%xmm7
  lea    0x1(%rax),%r15d
  lea    (%rbx,%rax,8),%r13
  xor    %r14d,%r14d
  movsd  %xmm7,0x18(%rsp)
  nop
L117:
  pxor   %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  mov    %r14d,0x54(%rsp)
  sub    $0x8,%r13
  cvtsi2sd %r14d,%xmm0
  subsd  0x8(%rsp),%xmm0
  movsd  %xmm2,0x48(%rsp)
  movapd %xmm0,%xmm4
  movsd  (%rsp),%xmm0
  movsd  %xmm4,0x20(%rsp)
  mulsd  %xmm4,%xmm0
  divsd  %xmm2,%xmm0
  call   <sin@plt>
  movsd  0x20(%rsp),%xmm3
  mulsd  0x18(%rsp),%xmm3
  movsd  %xmm0,0x30(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x40(%rsp)
  call   <sin@plt>
  movsd  0x20(%rsp),%xmm3
  mulsd  0x28(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm2
  movsd  %xmm0,0x38(%rsp)
  movapd %xmm3,%xmm0
  divsd  %xmm2,%xmm0
  call   <sin@plt>
  movsd  0x30(%rsp),%xmm1
  mov    %r14d,%edx
  mov    %ebp,%edi
  addsd  0x38(%rsp),%xmm1
  movsd  0x40(%rsp),%xmm3
  mov    %r15d,%esi
  subsd  %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm0
  divsd  %xmm3,%xmm1
  movsd  %xmm1,(%rbx,%r14,8)
  movsd  %xmm1,0x20(%rsp)
  call   <window@plt>
  movsd  0x20(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx,%r14,8)
  add    $0x1,%r14
  movsd  %xmm1,0x8(%r13)
  cmp    %r14d,%r12d
  jge    L117
L119:
  cmpl   $0x1,0x58(%rsp)
  jne    L108
  movsd  D62(%rip),%xmm1
  movsd  (%rsp),%xmm0
  movslq 0x5c(%rsp),%r13
  addsd  %xmm1,%xmm0
  subsd  0x28(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx,%r13,8)
  jmp    L108
  cs nopw 0x0(%rax,%rax,1)
L173:
  movl   $0x0,0x58(%rsp)
  mov    %ecx,%r12d
  jmp    L174
L172:
  test   %r12d,%r12d
  jle    L59
  lea    0x1(%rax),%r15d
  lea    (%rbx,%rax,8),%r14
  movslq %r12d,%rax
  xor    %r13d,%r13d
  movsd  D62(%rip),%xmm6
  mov    %rax,0x40(%rsp)
  movsd  %xmm6,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L29:
  pxor   %xmm0,%xmm0
  movsd  0x28(%rsp),%xmm7
  pxor   %xmm2,%xmm2
  sub    $0x8,%r14
  cvtsi2sd %r13d,%xmm0
  subsd  0x8(%rsp),%xmm0
  movsd  %xmm2,0x38(%rsp)
  mulsd  %xmm0,%xmm7
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm7,%xmm0
  divsd  %xmm2,%xmm0
  call   <sin@plt>
  movsd  (%rsp),%xmm6
  mulsd  0x20(%rsp),%xmm6
  movsd  0x38(%rsp),%xmm2
  movsd  %xmm0,0x30(%rsp)
  movapd %xmm6,%xmm0
  divsd  %xmm2,%xmm0
  call   <sin@plt>
  movsd  0x30(%rsp),%xmm1
  mov    %r13d,%edx
  mov    %ebp,%edi
  mov    %r15d,%esi
  subsd  %xmm0,%xmm1
  movsd  0x20(%rsp),%xmm0
  mulsd  0x18(%rsp),%xmm0
  divsd  %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm1,(%rbx,%r13,8)
  movsd  %xmm1,0x20(%rsp)
  call   <window@plt>
  movsd  0x20(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx,%r13,8)
  add    $0x1,%r13
  movsd  %xmm1,0x8(%r14)
  cmp    %r13,0x40(%rsp)
  jne    L29
L59:
  cmpl   $0x1,0x58(%rsp)
  jne    L108
  movslq 0x5c(%rsp),%r13
  movsd  0x28(%rsp),%xmm0
  subsd  (%rsp),%xmm0
  divsd  D62(%rip),%xmm0
  movsd  %xmm0,(%rbx,%r13,8)
  jmp    L108
  nopw   0x0(%rax,%rax,1)
L55:
  test   %r12d,%r12d
  js     L34
  movsd  D62(%rip),%xmm6
  lea    0x1(%rax),%r15d
  lea    (%rbx,%rax,8),%r14
  xor    %r13d,%r13d
  movsd  %xmm6,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L103:
  pxor   %xmm1,%xmm1
  movsd  (%rsp),%xmm0
  pxor   %xmm2,%xmm2
  mov    %r13d,0x28(%rsp)
  cvtsi2sd %r13d,%xmm1
  subsd  0x8(%rsp),%xmm1
  sub    $0x8,%r14
  mulsd  %xmm1,%xmm0
  movsd  %xmm1,0x20(%rsp)
  divsd  %xmm2,%xmm0
  call   <sin@plt>
  movsd  0x20(%rsp),%xmm1
  mov    %r13d,%edx
  mov    %ebp,%edi
  mulsd  0x18(%rsp),%xmm1
  mov    %r15d,%esi
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x20(%rsp)
  movsd  0x10(%rsp),%xmm0
  call   <window@plt>
  mulsd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%rbx,%r13,8)
  add    $0x1,%r13
  movsd  %xmm0,0x8(%r14)
  cmp    %r13d,%r12d
  jge    L103
L34:
  cmpl   $0x1,0x58(%rsp)
  jne    L108
  movslq 0x5c(%rsp),%r13
  movsd  (%rsp),%xmm0
  divsd  D62(%rip),%xmm0
  movsd  %xmm0,(%rbx,%r13,8)
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L123:
  movsd  D68(%rip),%xmm0
  movsd  (%rsp),%xmm1
  divsd  D62(%rip),%xmm1
  movslq 0x5c(%rsp),%r13
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx,%r13,8)
  jmp    L108
```

tool_calls: name: disassemble_data
arguments: data_tag: D88
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D71
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D62
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D68
datatype: f64

tool: {"D88": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D71": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40]}

tool: {"D62": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x09,0x40]}

tool: D68: 1

assistant: ```c
void firGen(int n, int band, double fln, double fhn, int wn, double *h, double beta) {
  int i, n2, mid;
  double s, pi, wc1, wc2, delay, fs;
  pi = 4.0 * atan(1.0);
  if ((n % 2) == 0) {
    n2 = n / 2 + 1;
    mid = 1;
  } else {
    n2 = n / 2;
    mid = 0;
  }
  delay = n / 2.0;
  wc1 = 2.0 * pi * fln;
  if (band >= 3)
    wc2 = 2.0 * pi * fhn;
  switch (band) {
  case 1:
    for (i = 0; i <= n2; i++) {
      s = i - delay;
      h[i] = (sin(wc1 * s / fs) / (pi * s)) * window(wn, n + 1, i, beta);
      h[n - i] = h[i];
    }
    if (mid == 1)
      h[n / 2] = wc1 / pi;
    break;
  case 2:
    for (i = 0; i <= n2; i++) {
      s = i - delay;
      h[i] = (sin(pi * s) - sin(wc1 * s / fs)) / (pi * s);
      h[i] = h[i] * window(wn, n + 1, i, beta);
      h[n - i] = h[i];
    }
    if (mid == 1)
      h[n / 2] = 1.0 - wc1 / pi;
    break;
  case 3:
    for (i = 0; i < n2; i++) {
      s = i - delay;
      h[i] = (sin(wc2 * s / fs) - sin(wc1 * s / fs)) / (pi * s);
      h[i] = h[i] * window(wn, n + 1, i, beta);
      h[n - i] = h[i];
    }
    if (mid == 1)
      h[n / 2] = (wc2 - wc1) / pi;
    break;
  case 4:
    for (i = 0; i <= n2; i++) {
      s = i - delay;
      h[i] = (sin(wc1 * s / fs) + sin(pi * s) - sin(wc2 * s / fs)) / (pi * s);
      h[i] = h[i] * window(wn, n + 1, i, beta);
      h[n - i] = h[i];
    }
    if (mid == 1)
      h[n / 2] = (wc1 + pi - wc2) / pi;
    break;
  }
}
```