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

```asm
<stepfm>:
  endbr64
  push   %r15
  subsd  %xmm0,%xmm1
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x78,%rsp
  movsd  %xmm0,0x18(%rsp)
  pxor   %xmm0,%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rcx),%eax
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  movsd  %xmm1,0x8(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  movapd %xmm1,%xmm3
  pxor   %xmm1,%xmm1
  divsd  %xmm0,%xmm3
  mulsd  %xmm3,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm0,(%rsp)
  test   %rsi,%rsi
  je     L6
  xor    %eax,%eax
  comisd %xmm1,%xmm0
  mov    %rsi,%r12
  jbe    L36
  movapd %xmm1,%xmm0
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  movsd  D79(%rip),%xmm2
  lea    0x48(%rsp),%r14
  lea    0x40(%rsp),%r13
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  %xmm2,0x28(%rsp)
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm4
  movsd  %xmm0,0x20(%rsp)
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm4
  movsd  %xmm4,0x30(%rsp)
  mulsd  %xmm1,%xmm0
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm0
  movsd  (%rsp),%xmm1
  mov    $0x1,%eax
  movsd  %xmm0,0x0(%rbp)
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  movsd  D40(%rip),%xmm0
  comisd %xmm0,%xmm1
  jbe    L36
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm2
  movsd  0x30(%rsp),%xmm4
  mov    %r13,%rsi
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x8(%rsp),%xmm1
  addsd  0x18(%rsp),%xmm1
  mulsd  %xmm1,%xmm2
  addsd  %xmm1,%xmm4
  movsd  %xmm1,0x58(%rsp)
  movsd  %xmm1,0x30(%rsp)
  movsd  %xmm4,0x38(%rsp)
  movapd %xmm2,%xmm0
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm0
  movsd  (%rsp),%xmm1
  movsd  %xmm0,0x8(%rbp)
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm0,0x8(%r12)
  movsd  D69(%rip),%xmm0
  comisd %xmm0,%xmm1
  movsd  0x30(%rsp),%xmm1
  jbe    L19
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm6
  movsd  0x38(%rsp),%xmm4
  mov    %r13,%rsi
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x8(%rsp),%xmm1
  addsd  0x18(%rsp),%xmm1
  mulsd  %xmm1,%xmm6
  addsd  %xmm1,%xmm4
  movsd  %xmm1,0x60(%rsp)
  movsd  %xmm1,0x30(%rsp)
  movsd  %xmm4,0x38(%rsp)
  movapd %xmm6,%xmm0
  addsd  %xmm6,%xmm0
  call   <sincos@plt>
  movsd  (%rsp),%xmm1
  movsd  D44(%rip),%xmm2
  movsd  0x40(%rsp),%xmm0
  comisd %xmm2,%xmm1
  movsd  0x30(%rsp),%xmm1
  movsd  %xmm0,0x10(%rbp)
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm0,0x10(%r12)
  jbe    L167
  movapd %xmm2,%xmm11
  pxor   %xmm0,%xmm0
  mov    %r13,%rsi
  mov    %r14,%rdi
  divsd  0x10(%rsp),%xmm11
  cvttsd2si %xmm11,%eax
  movsd  0x38(%rsp),%xmm1
  movsd  %xmm2,0x30(%rsp)
  mov    $0x4,%r15d
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm3
  subsd  0x20(%rsp),%xmm3
  movsd  %xmm0,0x50(%rsp)
  movsd  0x28(%rsp),%xmm0
  addsd  %xmm3,%xmm1
  movapd %xmm1,%xmm4
  movsd  %xmm1,0x38(%rsp)
  divsd  %xmm2,%xmm4
  mulsd  %xmm4,%xmm0
  movsd  %xmm4,0x20(%rsp)
  mulsd  %xmm2,%xmm0
  call   <sincos@plt>
  movsd  (%rsp),%xmm1
  mov    $0xaaaaaaab,%edx
  movsd  D55(%rip),%xmm3
  movsd  0x40(%rsp),%xmm0
  movsd  0x30(%rsp),%xmm2
  mov    $0x4,%eax
  comisd %xmm3,%xmm1
  movsd  0x38(%rsp),%xmm1
  movsd  %xmm0,0x18(%rbp)
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm0,0x18(%r12)
  jbe    L36
L163:
  movapd %xmm3,%xmm0
  divsd  0x10(%rsp),%xmm0
  mov    %r13,%rsi
  mov    %r14,%rdi
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm2,0x30(%rsp)
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  mov    %r15d,%eax
  imul   %rdx,%rax
  addsd  0x18(%rsp),%xmm0
  shr    $0x21,%rax
  movapd %xmm0,%xmm4
  lea    (%rax,%rax,2),%ecx
  mov    %r15d,%eax
  sub    %ecx,%eax
  cltq
  subsd  0x50(%rsp,%rax,8),%xmm4
  movsd  %xmm0,0x50(%rsp,%rax,8)
  movsd  0x28(%rsp),%xmm0
  addsd  %xmm4,%xmm1
  movapd %xmm1,%xmm6
  movsd  %xmm1,0x38(%rsp)
  divsd  %xmm2,%xmm6
  mulsd  %xmm6,%xmm0
  movsd  %xmm6,0x20(%rsp)
  mulsd  %xmm3,%xmm0
  call   <sincos@plt>
  lea    0x1(%r15),%eax
  pxor   %xmm3,%xmm3
  movsd  0x40(%rsp),%xmm0
  cvtsi2sd %eax,%xmm3
  movsd  (%rsp),%xmm7
  mov    $0xaaaaaaab,%edx
  movsd  0x30(%rsp),%xmm2
  movsd  %xmm0,0x0(%rbp,%r15,8)
  movsd  0x48(%rsp),%xmm0
  movsd  0x38(%rsp),%xmm1
  movsd  %xmm0,(%r12,%r15,8)
  add    $0x1,%r15
  comisd %xmm3,%xmm7
  ja     L163
  nopl   (%rax)
L36:
  cmp    %eax,%ebx
  jle    L77
  sub    $0x1,%ebx
  lea    0x48(%rsp),%r14
  lea    0x40(%rsp),%r13
  movslq %eax,%r15
  movsd  0x20(%rsp),%xmm7
  mulsd  D79(%rip),%xmm7
  mov    %ebx,%edx
  lea    0x1(%r15),%rbx
  sub    %eax,%edx
  lea    (%rdx,%rbx,1),%rax
  mov    %rax,0x8(%rsp)
  movsd  %xmm7,(%rsp)
  jmp    L59
  nopw   0x0(%rax,%rax,1)
L49:
  add    $0x1,%rbx
L59:
  pxor   %xmm0,%xmm0
  mov    %r13,%rsi
  mov    %r14,%rdi
  cvtsi2sd %r15d,%xmm0
  mulsd  (%rsp),%xmm0
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp,%r15,8)
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm0,(%r12,%r15,8)
  mov    %rbx,%r15
  cmp    %rbx,0x8(%rsp)
  jne    L49
L77:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L84
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L6:
  xor    %eax,%eax
  comisd %xmm1,%xmm0
  jbe    L13
  movapd %xmm1,%xmm0
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm7
  movsd  %xmm0,0x20(%rsp)
  addsd  %xmm1,%xmm7
  movq   %xmm7,%r12
  movsd  D79(%rip),%xmm7
  mulsd  %xmm7,%xmm0
  movsd  %xmm7,0x28(%rsp)
  mulsd  %xmm1,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm2
  mov    $0x1,%eax
  movsd  %xmm0,0x0(%rbp)
  movsd  D40(%rip),%xmm0
  comisd %xmm0,%xmm2
  jbe    L13
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm7
  movq   %r12,%xmm12
  cvtsi2sd %eax,%xmm1
  mulsd  0x8(%rsp),%xmm1
  addsd  0x18(%rsp),%xmm1
  mulsd  %xmm1,%xmm7
  addsd  %xmm1,%xmm12
  movsd  %xmm1,0x58(%rsp)
  movsd  %xmm1,0x30(%rsp)
  movq   %xmm12,%r12
  movapd %xmm7,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm2
  movsd  0x30(%rsp),%xmm1
  movsd  %xmm0,0x8(%rbp)
  movsd  D69(%rip),%xmm0
  comisd %xmm0,%xmm2
  jbe    L191
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm6
  movq   %r12,%xmm13
  cvtsi2sd %eax,%xmm1
  mulsd  0x8(%rsp),%xmm1
  addsd  0x18(%rsp),%xmm1
  mulsd  %xmm1,%xmm6
  addsd  %xmm1,%xmm13
  movsd  %xmm1,0x60(%rsp)
  movsd  %xmm1,0x30(%rsp)
  movsd  %xmm13,0x38(%rsp)
  movapd %xmm6,%xmm0
  addsd  %xmm6,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm3
  movsd  D44(%rip),%xmm2
  movsd  0x30(%rsp),%xmm1
  movsd  %xmm0,0x10(%rbp)
  comisd %xmm2,%xmm3
  jbe    L92
  movapd %xmm2,%xmm1
  divsd  0x10(%rsp),%xmm1
  cvttsd2si %xmm1,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm2,0x30(%rsp)
  mov    $0x4,%r12d
  mov    $0xaaaaaaab,%r13d
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm1
  subsd  0x20(%rsp),%xmm1
  addsd  0x38(%rsp),%xmm1
  movsd  %xmm0,0x50(%rsp)
  movsd  0x28(%rsp),%xmm0
  movapd %xmm1,%xmm4
  movsd  %xmm1,0x38(%rsp)
  divsd  %xmm2,%xmm4
  mulsd  %xmm4,%xmm0
  movsd  %xmm4,0x20(%rsp)
  mulsd  %xmm2,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm2
  movsd  0x38(%rsp),%xmm1
  mov    $0x4,%eax
  movsd  D55(%rip),%xmm3
  movsd  %xmm0,0x18(%rbp)
  comisd %xmm3,%xmm2
  movsd  0x30(%rsp),%xmm2
  jbe    L13
L106:
  movapd %xmm3,%xmm0
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm2,0x30(%rsp)
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  mov    %r12d,%eax
  imul   %r13,%rax
  addsd  0x18(%rsp),%xmm0
  shr    $0x21,%rax
  movapd %xmm0,%xmm4
  lea    (%rax,%rax,2),%edx
  mov    %r12d,%eax
  sub    %edx,%eax
  cltq
  subsd  0x50(%rsp,%rax,8),%xmm4
  movsd  %xmm0,0x50(%rsp,%rax,8)
  movsd  0x28(%rsp),%xmm0
  addsd  %xmm4,%xmm1
  movapd %xmm1,%xmm6
  movsd  %xmm1,0x38(%rsp)
  divsd  %xmm2,%xmm6
  mulsd  %xmm6,%xmm0
  movsd  %xmm6,0x20(%rsp)
  mulsd  %xmm3,%xmm0
  call   <cos@plt>
  lea    0x1(%r12),%eax
  pxor   %xmm3,%xmm3
  movsd  (%rsp),%xmm2
  cvtsi2sd %eax,%xmm3
  movsd  %xmm0,0x0(%rbp,%r12,8)
  add    $0x1,%r12
  movsd  0x38(%rsp),%xmm1
  comisd %xmm3,%xmm2
  movsd  0x30(%rsp),%xmm2
  ja     L106
  nopl   0x0(%rax,%rax,1)
L13:
  cmp    %eax,%ebx
  jle    L77
  movsd  0x20(%rsp),%xmm2
  movslq %eax,%r13
  sub    $0x1,%ebx
  mulsd  D79(%rip),%xmm2
  sub    %eax,%ebx
  lea    0x1(%r13),%r12
  add    %r12,%rbx
  movsd  %xmm2,(%rsp)
  jmp    L246
  nopl   0x0(%rax)
L212:
  add    $0x1,%r12
L246:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  mulsd  (%rsp),%xmm0
  call   <cos@plt>
  movsd  %xmm0,0x0(%rbp,%r13,8)
  mov    %r12,%r13
  cmp    %r12,%rbx
  jne    L212
  jmp    L77
  nopl   0x0(%rax,%rax,1)
L19:
  movsd  %xmm1,0x20(%rsp)
  mov    $0x2,%eax
  jmp    L36
L167:
  movsd  %xmm1,0x20(%rsp)
  mov    $0x3,%eax
  jmp    L36
L191:
  movsd  %xmm1,0x20(%rsp)
  mov    $0x2,%eax
  jmp    L13
L92:
  movsd  %xmm1,0x20(%rsp)
  mov    $0x3,%eax
  jmp    L13
L84:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D79
type_infered: byte[8]
name: disassemble_data
arguments: tag: D40
type_infered: f64
name: disassemble_data
arguments: tag: D69
type_infered: f64
name: disassemble_data
arguments: tag: D44
type_infered: f32[2]
name: disassemble_data
arguments: tag: D55
type_infered: f32[2]

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

tool: D40: 1

tool: D69: 2

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

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

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);
    }
  }
}
```