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

```asm
<setresamp>:
  endbr64
  push   %r12
  mov    $0x80,%esi
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x240,%rsp
  lea    0x30(%rsp),%rbp
  movss  %xmm1,0x10(%rsp)
  movss  %xmm0,0xc(%rsp)
  mov    %rbp,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x238(%rsp)
  xor    %eax,%eax
  call   <blackman@plt>
  movss  0x10(%rsp),%xmm1
  pxor   %xmm3,%xmm3
  movsd  D78(%rip),%xmm2
  mulss  D48(%rip),%xmm1
  divss  0xc(%rsp),%xmm1
  cvtss2sd %xmm1,%xmm3
  divsd  %xmm3,%xmm2
  movl   $0x0,0xc(%rsp)
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  nopw   0x0(%rax,%rax,1)
L26:
  pxor   %xmm1,%xmm1
  movss  D24(%rip),%xmm0
  movsd  0x28(%rsp),%xmm6
  cvtsi2ss %r12d,%xmm1
  mulss  0x0(%rbp,%r12,4),%xmm0
  cvtss2sd %xmm1,%xmm1
  subsd  D0(%rip),%xmm1
  cvtss2sd %xmm0,%xmm0
  mulsd  0x20(%rsp),%xmm0
  mulsd  %xmm1,%xmm6
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm6,%xmm0
  call   <sin@plt>
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm1
  cvtsi2sd %eax,%xmm0
  mulsd  D78(%rip),%xmm1
  mulsd  0x10(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  addsd  D79(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  mov    %ax,(%rbx,%r12,2)
  cwtl
  add    $0x1,%r12
  cvtsi2ss %eax,%xmm0
  addss  0xc(%rsp),%xmm0
  movss  %xmm0,0xc(%rsp)
  cmp    $0x40,%r12
  jne    L26
  addss  %xmm0,%xmm0
  movss  D18(%rip),%xmm4
  movss  D62(%rip),%xmm2
  mulss  %xmm4,%xmm0
  comiss %xmm2,%xmm0
  jbe    L7
  movsd  D88(%rip),%xmm3
  divss  %xmm0,%xmm2
  lea    0x80(%rbx),%rdx
  pxor   %xmm0,%xmm0
  nopl   (%rax)
L6:
  movswl (%rbx),%eax
  pxor   %xmm1,%xmm1
  add    $0x2,%rbx
  cvtsi2ss %eax,%xmm1
  mulss  %xmm2,%xmm1
  cvtss2sd %xmm1,%xmm1
  addsd  %xmm3,%xmm1
  cvttsd2si %xmm1,%eax
  pxor   %xmm1,%xmm1
  mov    %ax,-0x2(%rbx)
  cwtl
  cvtsi2ss %eax,%xmm1
  addss  %xmm1,%xmm0
  cmp    %rbx,%rdx
  jne    L6
  addss  %xmm0,%xmm0
  mulss  %xmm4,%xmm0
L7:
  mov    0x238(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x240,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D78
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_tag: D48
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_tag: D24
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_tag: D0
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D79
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_tag: D18
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_tag: D62
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_tag: D88
type_infered: f64

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

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

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

tool: D0: 63.5

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

tool: {"D18": [0x00,0x00,0x80,0x39]}

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

tool: D88: 0.499999

assistant: ```c
float setresamp(short *resampcoeffs, float freq_in, float BW) {
  int pi = 3.14159265359;
  int length = 128;
  float window[128];
  float resampgain;
  float gaintemp;
  double wp, ws, wc;
  int n;
  blackman(window, length);
  wc = pi * (float)BW / (float)freq_in;
  resampgain = 0;
  for (n = 0; n < 64; n++) {
    resampcoeffs[n] = (short)(2047 * window[n] * (pi / wc) * sin(wc * ((float)n - 63.5)) / (pi * ((float)n - 63.5)) + .49999);
    resampgain = resampgain + resampcoeffs[n];
  }
  resampgain = 2 * resampgain / 4096;
  if (resampgain > 1) {
    gaintemp = resampgain;
    resampgain = 0;
    for (n = 0; n < 64; n++) {
      resampcoeffs[n] = (short)((1 / gaintemp) * (float)resampcoeffs[n] + 0.499999);
      resampgain = resampgain + resampcoeffs[n];
    }
    resampgain = 2 * resampgain;
    resampgain = resampgain / 4096;
  }
  return resampgain;
}
```