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

```asm
<stepfm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  movsd  %xmm0,-0x78(%rbp)
  movsd  %xmm1,-0x80(%rbp)
  mov    %edx,-0x84(%rbp)
  mov    %ecx,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movsd  -0x80(%rbp),%xmm0
  subsd  -0x78(%rbp),%xmm0
  mov    -0x88(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x84(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x88(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  cmpq   $0x0,-0x70(%rbp)
  jne    L66
  movl   $0x0,-0x5c(%rbp)
  jmp    L97
L84:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  divsd  -0x40(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x48(%rbp),%xmm0
  movsd  -0x78(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  cmpl   $0x2,-0x5c(%rbp)
  jg     L96
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x58(%rbp),%xmm0
  addsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp,%rax,8)
  jmp    L15
L96:
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cltq
  movsd  -0x30(%rbp,%rax,8),%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  D6(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cltq
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp,%rax,8)
L15:
  movsd  -0x50(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x68(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x5c(%rbp)
L97:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x88(%rbp),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L84
  jmp    L82
L36:
  movsd  -0x50(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x68(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x5c(%rbp)
L82:
  mov    -0x5c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L36
  jmp    L108
L66:
  movl   $0x0,-0x5c(%rbp)
  jmp    L149
L147:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  divsd  -0x40(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x48(%rbp),%xmm0
  movsd  -0x78(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  cmpl   $0x2,-0x5c(%rbp)
  jg     L72
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x58(%rbp),%xmm0
  addsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp,%rax,8)
  jmp    L65
L72:
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cltq
  movsd  -0x30(%rbp,%rax,8),%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  D6(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cltq
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp,%rax,8)
L65:
  movsd  -0x50(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x68(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  movsd  -0x50(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x5c(%rbp)
L149:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x88(%rbp),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L147
  jmp    L64
L105:
  movsd  -0x50(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x68(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  movsd  -0x50(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x5c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x5c(%rbp)
L64:
  mov    -0x5c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L105
L108:
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L92
  call   <__stack_chk_fail@plt>
L92:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D6
data_type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D69
data_type: byte[8]

tool: {"D6": [0.0,2.125]}

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

assistant: ```c
void stepfm(double *result_real, double *result_imag, double f1, double f2, int n, int num_bins) {
  int i;
  double f;
  double increment = (double)(f2 - f1) / (num_bins - 1);
  double bin_size = (double)n / (double)num_bins;
  double sum = 0.0;
  double wind[3] = {0, 0, 0};
  double smoothed_freq;
  if (result_imag == NULL) {
    for (i = 0; i < num_bins * bin_size; i++) {
      f = f1 + (int)(i / bin_size) * increment;
      if (i < 3) {
        smoothed_freq = f;
        sum += f;
        wind[i] = f;
      } else {
        sum += f - wind[i % 3];
        smoothed_freq = sum / 3;
        wind[i % 3] = f;
      }
      result_real[i] = cos(2.0 * 3.14159265358979323846 * smoothed_freq * (double)i);
    }
    for (; i < n; i++) {
      result_real[i] = cos(2.0 * 3.14159265358979323846 * smoothed_freq * (double)i);
    }
  } else {
    for (i = 0; i < num_bins * bin_size; i++) {
      f = f1 + (int)(i / bin_size) * increment;
      if (i < 3) {
        smoothed_freq = f;
        sum += f;
        wind[i] = f;
      } else {
        sum += f - wind[i % 3];
        smoothed_freq = sum / 3;
        wind[i % 3] = f;
      }
      result_real[i] = cos(2.0 * 3.14159265358979323846 * smoothed_freq * (double)i);
      result_imag[i] = sin(2.0 * 3.14159265358979323846 * smoothed_freq * (double)i);
    }
    for (; i < n; i++) {
      result_real[i] = cos(2.0 * 3.14159265358979323846 * smoothed_freq * (double)i);
      result_imag[i] = sin(2.0 * 3.14159265358979323846 * smoothed_freq * (double)i);
    }
  }
}
```