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

```asm
<setresamp>:
  endbr64
  push   %r14
  mov    %edx,%r14d
  push   %r13
  movslq %esi,%r13
  mov    $0x100,%esi
  push   %r12
  movd   %xmm1,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x440,%rsp
  lea    0x30(%rsp),%rbx
  movss  %xmm0,0xc(%rsp)
  movss  %xmm2,0x10(%rsp)
  mov    %rbx,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x438(%rsp)
  xor    %eax,%eax
  call   <blackman@plt>
  test   %r14d,%r14d
  je     L6
  lea    0xa(%rbp),%rdi
  mov    $0x400,%eax
  movq   $0x0,0x2(%rbp)
  movss  D13(%rip),%xmm0
  and    $0xfffffffffffffff8,%rdi
  mov    %ax,0x0(%rbp)
  xor    %eax,%eax
  movq   $0x0,0x1f8(%rbp)
  sub    %edi,%ebp
  lea    0x200(%rbp),%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
L39:
  mov    0x438(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x440,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L6:
  movd   %r12d,%xmm1
  lea    0x0(%rbp,%r13,2),%rbp
  xor    %r12d,%r12d
  movss  D38(%rip),%xmm0
  movss  0xc(%rsp),%xmm7
  movsd  D35(%rip),%xmm2
  mulss  %xmm0,%xmm1
  mulss  0x10(%rsp),%xmm0
  divss  %xmm7,%xmm1
  divss  %xmm7,%xmm0
  pxor   %xmm7,%xmm7
  movss  %xmm7,0xc(%rsp)
  cvtss2sd %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  divsd  %xmm1,%xmm2
  movsd  %xmm1,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  nopl   (%rax)
L9:
  pxor   %xmm1,%xmm1
  movss  D65(%rip),%xmm0
  movsd  0x28(%rsp),%xmm4
  cvtsi2ss %r12d,%xmm1
  mulss  (%rbx,%r12,4),%xmm0
  cvtss2sd %xmm1,%xmm1
  subsd  D21(%rip),%xmm1
  cvtss2sd %xmm0,%xmm0
  mulsd  0x20(%rsp),%xmm0
  mulsd  %xmm1,%xmm4
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm4,%xmm0
  call   <sin@plt>
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm1
  cvtsi2sd %eax,%xmm0
  mulsd  D35(%rip),%xmm1
  mulsd  0x10(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  addsd  D7(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  mov    %ax,0x0(%rbp,%r12,4)
  cwtl
  add    $0x1,%r12
  cvtsi2ss %eax,%xmm0
  addss  0xc(%rsp),%xmm0
  movss  %xmm0,0xc(%rsp)
  cmp    $0x80,%r12
  jne    L9
  addss  %xmm0,%xmm0
  mulss  D77(%rip),%xmm0
  jmp    L39
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D13
type: f32
name: retrieve_data
arguments: label: D38
type: byte[4]
name: retrieve_data
arguments: label: D35
type: byte[8]
name: retrieve_data
arguments: label: D65
type: byte[4]
name: retrieve_data
arguments: label: D21
type: f64
name: retrieve_data
arguments: label: D7
type: byte[8]
name: retrieve_data
arguments: label: D77
type: byte[4]

tool: D13: 0.3125

tool: {"D38": [0x00,0x00,0x40,0x40]}

tool: {"D35": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

tool: {"D65": [0x00,0xe0,0xff,0x44]}

tool: D21: 127.5

tool: {"D7": [0x39,0xee,0x94,0x0e,0xd6,0xff,0xdf,0x3f]}

tool: {"D77": [0x00,0x00,0x00,0x38]}

assistant: ```c
float setresamp(short *resampcoeffs, float freq_in, float Fpass, float Fstop, int filtnum, int bypass) {
  int pi = 3.14159265359;
  int length = 256;
  float window[256];
  float resampgain;
  double wp, ws, wc;
  int n;
  blackman(window, length);
  wp = pi * (float)Fpass / (float)freq_in;
  ws = pi * (float)Fstop / (float)freq_in;
  wc = (wp + ws);
  resampgain = 0;
  if (bypass) {
    resampcoeffs[0] = 1024;
    for (n = 1; n < 256; n++) {
      resampcoeffs[n] = 0;
    }
    resampgain = 0.3125;
  } else {
    for (n = 0; n < 128; n++) {
      resampcoeffs[2 * n + filtnum] = (short)(2047 * window[n] * (pi / wc) * sin(wc * ((float)n - 127.5)) / (pi * ((float)n - 127.5)) + .49999);
      resampgain = resampgain + resampcoeffs[2 * n + filtnum];
    }
    resampgain = 2 * resampgain / 32768;
  }
  return resampgain;
}
```