user: 请将以下的汇编代码转换成C语言代码:

```asm
<stepfm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,%r12
  movsd  %xmm0,0x20(%rsp)
  mov    %edx,0x3c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  subsd  %xmm0,%xmm1
  lea    -0x1(%rcx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  movapd %xmm1,%xmm4
  divsd  %xmm0,%xmm4
  movsd  %xmm4,0x10(%rsp)
  movq   $0x0,0x50(%rsp)
  movq   $0x0,0x58(%rsp)
  movq   $0x0,0x60(%rsp)
  test   %rsi,%rsi
  je     L76
  mov    %rsi,%r13
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,0x28(%rsp)
  mov    $0x0,%r14d
  comisd D69(%rip),%xmm0
  jbe    L16
  mov    $0x0,%ebp
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
  movapd %xmm6,%xmm1
  lea    0x48(%rsp),%r15
  lea    0x40(%rsp),%rax
  mov    %rax,0x30(%rsp)
  jmp    L124
L76:
  mulsd  0x10(%rsp),%xmm0
  movq   %xmm0,%r15
  mov    $0x0,%r13d
  comisd D69(%rip),%xmm0
  jbe    L8
  mov    $0x0,%ebp
  mov    D69(%rip),%r14
  movq   %r14,%xmm1
  jmp    L110
L70:
  movslq %ebp,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,2),%edx
  mov    %ebp,%eax
  sub    %edx,%eax
  cltq
  subsd  0x50(%rsp,%rax,8),%xmm0
  movq   %r14,%xmm3
  addsd  %xmm0,%xmm3
  movq   %xmm3,%r14
  mov    %rbx,0x50(%rsp,%rax,8)
  movapd %xmm3,%xmm5
  divsd  D78(%rip),%xmm5
  movq   %xmm5,%rbx
L38:
  movq   %rbx,%xmm0
  mulsd  D39(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  call   <cos@plt>
  movsd  %xmm0,(%r12,%rbp,8)
  add    $0x1,%r13d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r13d,%xmm1
  add    $0x1,%rbp
  movq   %r15,%xmm5
  comisd %xmm1,%xmm5
  jbe    L8
L110:
  mov    %ebp,%r13d
  movapd %xmm1,%xmm0
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x18(%rsp),%xmm0
  addsd  0x20(%rsp),%xmm0
  movq   %xmm0,%rbx
  cmp    $0x2,%ebp
  jg     L70
  movq   %r14,%xmm7
  addsd  %xmm0,%xmm7
  movq   %xmm7,%r14
  movsd  %xmm0,0x50(%rsp,%rbp,8)
  jmp    L38
L8:
  mov    0x3c(%rsp),%eax
  cmp    %r13d,%eax
  jle    L4
  movq   %rbx,%xmm7
  mulsd  D39(%rip),%xmm7
  movsd  %xmm7,0x8(%rsp)
  movslq %r13d,%rbx
  sub    $0x1,%eax
  sub    %r13d,%eax
  lea    0x1(%rbx,%rax,1),%rbp
L35:
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <cos@plt>
  movsd  %xmm0,(%r12,%rbx,8)
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  jne    L35
  jmp    L4
L41:
  movslq %ebp,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,2),%edx
  mov    %ebp,%eax
  sub    %edx,%eax
  cltq
  subsd  0x50(%rsp,%rax,8),%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  mov    %rbx,0x50(%rsp,%rax,8)
  divsd  D78(%rip),%xmm0
  movq   %xmm0,%rbx
L112:
  movq   %rbx,%xmm0
  mulsd  D39(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    0x30(%rsp),%rsi
  mov    %r15,%rdi
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm0,(%r12,%rbp,8)
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm0,0x0(%r13,%rbp,8)
  add    $0x1,%r14d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r14d,%xmm1
  add    $0x1,%rbp
  movsd  0x28(%rsp),%xmm7
  comisd %xmm1,%xmm7
  jbe    L16
L124:
  mov    %ebp,%r14d
  movapd %xmm1,%xmm0
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x18(%rsp),%xmm0
  addsd  0x20(%rsp),%xmm0
  movq   %xmm0,%rbx
  cmp    $0x2,%ebp
  jg     L41
  movapd %xmm0,%xmm5
  addsd  0x8(%rsp),%xmm5
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm0,0x50(%rsp,%rbp,8)
  jmp    L112
L16:
  mov    0x3c(%rsp),%eax
  cmp    %r14d,%eax
  jle    L4
  movq   %rbx,%xmm3
  mulsd  D39(%rip),%xmm3
  movsd  %xmm3,0x8(%rsp)
  movslq %r14d,%rbx
  sub    $0x1,%eax
  sub    %r14d,%eax
  lea    0x1(%rbx,%rax,1),%r14
  lea    0x48(%rsp),%rbp
L114:
  lea    0x40(%rsp),%rsi
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  mulsd  0x8(%rsp),%xmm0
  mov    %rbp,%rdi
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm0,(%r12,%rbx,8)
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm0,0x0(%r13,%rbx,8)
  add    $0x1,%rbx
  cmp    %r14,%rbx
  jne    L114
L4:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L55
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D69
type_infered: f64[2]
name: unpack_data
arguments: data_tag: D78
type_infered: byte[8]
name: unpack_data
arguments: data_tag: D39
type_infered: byte[8]

tool: {"D69": [0.0,3.0]}

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

tool: {"D39": [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);
    }
  }
}
```