user: 请从给定的汇编指令推导出C源代码:

```asm
<lfr_filter_calculate_s16>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,0x68(%rsp)
  lea    0x0(,%rsi,8),%edi
  mov    %edx,0x4c(%rsp)
  movsd  %xmm0,0x50(%rsp)
  movsd  %xmm1,(%rsp)
  movsd  %xmm2,0x30(%rsp)
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L72
L3:
  movsd  D43(%rip),%xmm4
  movsd  %xmm4,0x60(%rsp)
  cmp    $0x8,%r15d
  jle    L147
  movsd  D55(%rip),%xmm4
  movsd  %xmm4,0x60(%rsp)
L147:
  movsd  0x30(%rsp),%xmm0
  call   <bessel_i0@plt>
  movsd  (%rsp),%xmm4
  mov    0x4c(%rsp),%eax
  movapd %xmm4,%xmm1
  addsd  %xmm4,%xmm1
  mulsd  D48(%rip),%xmm4
  divsd  %xmm0,%xmm1
  movsd  %xmm4,0x40(%rsp)
  movsd  %xmm1,0x38(%rsp)
  test   %eax,%eax
  jle    L86
  lea    -0x1(%r15),%r14d
  pxor   %xmm4,%xmm4
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  mov    %r14d,%eax
  lea    0x8(%r13,%r14,8),%rcx
  shr    $0x1f,%eax
  add    %r14d,%eax
  sar    %eax
  cvtsi2sd %eax,%xmm4
  movsd  %xmm4,0x58(%rsp)
  pxor   %xmm4,%xmm4
L82:
  pxor   %xmm5,%xmm5
  cvtsi2sd %r12d,%xmm5
  mulsd  0x50(%rsp),%xmm5
  addsd  0x58(%rsp),%xmm5
  test   %r15d,%r15d
  jle    L128
  lea    -0x2(%r15),%eax
  pxor   %xmm0,%xmm0
  movapd %xmm4,%xmm3
  xor    %ebx,%ebx
  cvtsi2sd %eax,%xmm0
  movsd  D12(%rip),%xmm7
  movsd  D82(%rip),%xmm6
  movsd  D94(%rip),%xmm8
  divsd  %xmm0,%xmm7
  jmp    L79
  nop
L74:
  addsd  %xmm0,%xmm3
  movsd  %xmm0,0x0(%r13,%rbx,8)
  lea    0x1(%rbx),%rax
  cmp    %r14,%rbx
  je     L46
  mov    %rax,%rbx
L79:
  pxor   %xmm1,%xmm1
  movapd %xmm7,%xmm2
  movapd %xmm4,%xmm0
  cvtsi2sd %ebx,%xmm1
  subsd  %xmm5,%xmm1
  mulsd  %xmm1,%xmm2
  comisd %xmm2,%xmm6
  jae    L74
  comisd %xmm8,%xmm2
  jae    L74
  mulsd  %xmm2,%xmm2
  movapd %xmm8,%xmm0
  subsd  %xmm2,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L8
  sqrtsd %xmm0,%xmm0
L18:
  mulsd  0x30(%rsp),%xmm0
  mov    %rcx,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm5,0x10(%rsp)
  movsd  %xmm7,0x8(%rsp)
  movsd  %xmm1,0x18(%rsp)
  call   <bessel_i0@plt>
  movsd  0x18(%rsp),%xmm1
  mulsd  0x38(%rsp),%xmm0
  mulsd  0x40(%rsp),%xmm1
  movsd  %xmm0,(%rsp)
  movapd %xmm1,%xmm0
  call   <sinc@plt>
  mov    D94(%rip),%rax
  mulsd  (%rsp),%xmm0
  pxor   %xmm4,%xmm4
  mov    0x28(%rsp),%rcx
  movsd  0x20(%rsp),%xmm3
  movq   %rax,%xmm8
  mov    D82(%rip),%rax
  movsd  0x10(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm7
  movq   %rax,%xmm6
  jmp    L74
L46:
  movsd  0x60(%rsp),%xmm8
  mov    0x68(%rsp),%rsi
  movslq %ebp,%rax
  movapd %xmm4,%xmm2
  movsd  D103(%rip),%xmm7
  movsd  D49(%rip),%xmm6
  divsd  %xmm3,%xmm8
  movsd  D72(%rip),%xmm5
  lea    (%rsi,%rax,2),%rdx
  movsd  D94(%rip),%xmm9
  mov    %r13,%rax
L96:
  movsd  (%rax),%xmm1
  mulsd  %xmm8,%xmm1
  addsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm7,%xmm0
  movapd %xmm0,%xmm2
  andpd  %xmm5,%xmm2
  ucomisd %xmm2,%xmm6
  jbe    L73
  cvttsd2si %xmm0,%r8
  pxor   %xmm2,%xmm2
  cvtsi2sd %r8,%xmm2
  movapd %xmm2,%xmm3
  cmpnlesd %xmm0,%xmm3
  andpd  %xmm9,%xmm3
  subsd  %xmm3,%xmm2
  movapd %xmm5,%xmm3
  andnpd %xmm0,%xmm3
  movapd %xmm2,%xmm0
  orpd   %xmm3,%xmm0
L73:
  cvttsd2si %xmm0,%r8d
  movapd %xmm0,%xmm2
  add    $0x8,%rax
  add    $0x2,%rdx
  subsd  %xmm1,%xmm2
  mov    %r8w,-0x2(%rdx)
  cmp    %rax,%rcx
  jne    L96
L128:
  add    $0x1,%r12d
  add    %r15d,%ebp
  cmp    %r12d,0x4c(%rsp)
  jne    L82
L86:
  add    $0x78,%rsp
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <free@plt>
L72:
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L3
L8:
  mov    %rcx,0x20(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm7,(%rsp)
  call   <sqrt@plt>
  mov    0x20(%rsp),%rcx
  movsd  (%rsp),%xmm7
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm5
  jmp    L18
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D43
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_tag: D55
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_tag: D48
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_tag: D12
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D82
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_tag: D94
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D103
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D49
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_tag: D72
type_infered: byte[8]

tool: {"D43": [0.0,6.9613037109375]}

tool: {"D55": [0.0,6.999969482421875]}

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

tool: D12: 2

tool: {"D82": [0.0,-1.875]}

tool: D94: 1

tool: D103: 0.5

tool: {"D49": [0.0,176.0]}

tool: {"D72": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

assistant: ```c
void lfr_filter_calculate_s16(short *data, int nsamp, int nfilt, double offset, double cutoff, double beta) {
  double x, x0, t, y, z, xscale, yscale, err;
  int i, j;
  double *a, sum, fac, scale;
  a = malloc(nsamp * sizeof(double));
  if (!a)
    abort();
  if (nsamp <= 8)
    scale = 31500;
  else
    scale = 32767;
  yscale = 2.0 * cutoff / bessel_i0(beta);
  xscale = (8.0 * atan(1.0)) * cutoff;
  for (i = 0; i < nfilt; ++i) {
    x0 = (nsamp - 1) / 2 + offset * i;
    sum = 0.0;
    for (j = 0; j < nsamp; ++j) {
      x = j - x0;
      t = x * (2.0 / (nsamp - 2));
      if (t <= -1.0 || t >= 1.0) {
        y = 0.0;
      } else {
        y = yscale * bessel_i0(beta * sqrt(1.0 - t * t)) * sinc(xscale * x);
      }
      a[j] = y;
      sum += y;
    }
    fac = scale / sum;
    err = 0.0;
    for (j = 0; j < nsamp; ++j) {
      y = a[j] * fac + err;
      z = floor(y + 0.5);
      err = z - y;
      data[i * nsamp + j] = (short)z;
    }
  }
  free(a);
}
```