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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    $0x10,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,-0x18(%rbp)
  mov    $0x10,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,-0x10(%rbp)
  lea    D38(%rip),%rax
  mov    %rax,%rsi
  lea    D90(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L26
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <nrerror@plt>
L26:
  movl   $0x8,-0x20(%rbp)
  movl   $0x1,-0x1c(%rbp)
  mov    -0x1c(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    $0x10,%edx
  mov    %rax,%rdi
  call   <spctrm@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <rewind@plt>
  movl   $0x10,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x1c(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x10(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    $0x10,%edx
  mov    %rax,%rdi
  call   <spctrm@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D107(%rip),%r8
  lea    D45(%rip),%rax
  mov    %rax,%rcx
  lea    D59(%rip),%rax
  mov    %rax,%rdx
  lea    D45(%rip),%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0x24(%rbp)
  jmp    L16
L19:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm1,%xmm2
  movq   %xmm2,%rdx
  mov    -0x24(%rbp),%eax
  movapd %xmm0,%xmm1
  lea    D45(%rip),%rcx
  movq   %rdx,%xmm0
  lea    D45(%rip),%rdx
  mov    %eax,%esi
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  addl   $0x1,-0x24(%rbp)
L16:
  cmpl   $0x10,-0x24(%rbp)
  jle    L19
  mov    -0x10(%rbp),%rax
  mov    $0x10,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_vector@plt>
  mov    -0x18(%rbp),%rax
  mov    $0x10,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_vector@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D38
type_infered: string
name: unpack_data
arguments: label: D90
type_infered: string
name: unpack_data
arguments: label: D100
type_infered: string
name: unpack_data
arguments: label: D8
type_infered: string
name: unpack_data
arguments: label: D107
type_infered: string
name: unpack_data
arguments: label: D45
type_infered: string
name: unpack_data
arguments: label: D59
type_infered: string
name: unpack_data
arguments: label: D41
type_infered: string
name: unpack_data
arguments: label: D82
type_infered: string

tool: D38: r

tool: D90: spctrl.dat

tool: D100: Data file spctrl.dat not found


tool: D8: 
Spectrum of data in file spctrl.dat

tool: D107: non-overlapped

tool: D45:  

tool: D59: overlapped 

tool: D41: %13s %s %5s %s


tool: D82: %3d %5s %13f %5s %13f


assistant: ```c
int main(void) {
  int j, k, ovrlap;
  float *p, *q;
  FILE *fp;
  p = vector(1, 16);
  q = vector(1, 16);
  if ((fp = fopen("spctrl.dat", "r")) == NULL)
    nrerror("Data file spctrl.dat not found\n");
  k = 8;
  ovrlap = 1;
  spctrm(fp, p, 16, k, ovrlap);
  rewind(fp);
  k = 16;
  ovrlap = 0;
  spctrm(fp, q, 16, k, ovrlap);
  fclose(fp);
  printf("\nSpectrum of data in file spctrl.dat\n");
  printf("%13s %s %5s %s\n", " ", "overlapped ", " ", "non-overlapped");
  for (j = 1; j <= 16; j++)
    printf("%3d %5s %13f %5s %13f\n", j, " ", p[j], " ", q[j]);
  free_vector(q, 1, 16);
  free_vector(p, 1, 16);
  return 0;
}
```