user: Please show me the C implementation that matches the assembly code listed below:

```asm
<setCFIR>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  movss  %xmm0,-0x5c(%rbp)
  movss  %xmm1,-0x60(%rbp)
  movss  %xmm2,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0xffffffe8,-0x40(%rbp)
  movl   $0x4a,-0x3c(%rbp)
  movl   $0x1ee,-0x38(%rbp)
  movl   $0x224,-0x34(%rbp)
  movl   $0xfffffc2f,-0x30(%rbp)
  movl   $0xfffff2a8,-0x2c(%rbp)
  movl   $0xfffff1a8,-0x28(%rbp)
  movl   $0x5f5,-0x24(%rbp)
  movl   $0x3312,-0x20(%rbp)
  movl   $0x67b3,-0x1c(%rbp)
  movl   $0x7fff,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L3
L8:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    %eax,(%rdx)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  -0x4c(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  addl   $0x1,-0x48(%rbp)
L3:
  cmpl   $0x9,-0x48(%rbp)
  jle    L8
  mov    -0x58(%rbp),%rax
  add    $0x28,%rax
  movl   $0x7fff,(%rax)
  movss  -0x4c(%rbp),%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm0,%xmm1
  mov    -0x58(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movss  -0x4c(%rbp),%xmm0
  movss  D65(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movss  -0x4c(%rbp),%xmm0
  movss  D47(%rip),%xmm1
  comiss %xmm1,%xmm0
  jbe    L28
  movss  -0x4c(%rbp),%xmm0
  movss  %xmm0,-0x44(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L5
L43:
  movss  D47(%rip),%xmm0
  movaps %xmm0,%xmm1
  divss  -0x44(%rbp),%xmm1
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D66(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  cvttsd2si %xmm0,%eax
  mov    %eax,(%rdx)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  -0x4c(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  addl   $0x1,-0x48(%rbp)
L5:
  cmpl   $0x9,-0x48(%rbp)
  jle    L43
  movss  D47(%rip),%xmm0
  movaps %xmm0,%xmm1
  divss  -0x44(%rbp),%xmm1
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D66(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x58(%rbp),%rax
  lea    0x28(%rax),%rdx
  cvttsd2si %xmm0,%eax
  mov    %eax,(%rdx)
  movss  -0x4c(%rbp),%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm0,%xmm1
  mov    -0x58(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movss  -0x4c(%rbp),%xmm0
  movss  D65(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x4c(%rbp)
L28:
  movss  -0x4c(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L24
  call   <__stack_chk_fail@plt>
L24:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D65
type_infered: byte[4]
name: disassemble_data
arguments: label: D47
type_infered: byte[4]
name: disassemble_data
arguments: label: D66
type_infered: f64

tool: {"D65": [0x00,0x00,0x80,0x47]}

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

tool: D66: 0.499999

assistant: ```c
float setCFIR(int *cfircoeffs, float freq_in, float Fpass, float Fstop) {
  int cfir34[] = {-24, 74, 494, 548, -977, -3416, -3672, 1525, 13074, 26547, 32767};
  float CFIRgain, gaintemp;
  int n;
  CFIRgain = 0;
  for (n = 0; n < 10; n++) {
    cfircoeffs[n] = cfir34[n];
    CFIRgain = CFIRgain + cfircoeffs[n];
  }
  cfircoeffs[10] = 32767;
  CFIRgain = 2 * CFIRgain + cfircoeffs[10];
  CFIRgain = CFIRgain / 65536;
  if (CFIRgain > 1) {
    gaintemp = CFIRgain;
    CFIRgain = 0;
    for (n = 0; n < 10; n++) {
      cfircoeffs[n] = (int)((1 / gaintemp) * (float)cfircoeffs[n] + 0.499999);
      CFIRgain = CFIRgain + cfircoeffs[n];
    }
    cfircoeffs[10] = (int)((1 / gaintemp) * (float)cfircoeffs[n] + 0.499999);
    CFIRgain = 2 * CFIRgain + cfircoeffs[10];
    CFIRgain = CFIRgain / 65536;
  }
  return CFIRgain;
}
```