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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    $0x3e8,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,-0x8(%rbp)
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x1,-0x24(%rbp)
  jmp    L17
L35:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D27(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D83(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D85(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%edi
  mov    -0x10(%rbp),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0xc(%rbp),%esi
  mov    -0x8(%rbp),%rax
  mov    %edi,%r9d
  mov    $0x0,%r8d
  mov    %rax,%rdi
  call   <savgol@plt>
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L5
L94:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  -0x1c(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  addl   $0x1,-0x20(%rbp)
L5:
  mov    -0x20(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L94
  mov    -0x10(%rbp),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L60
L7:
  lea    D100(%rip),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x20(%rbp)
L60:
  cmpl   $0x4,-0x20(%rbp)
  jle    L7
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L14
L54:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  subl   $0x1,-0x20(%rbp)
L14:
  cmpl   $0x0,-0x20(%rbp)
  jg     L54
  movl   $0x0,-0x20(%rbp)
  jmp    L72
L65:
  mov    -0xc(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x20(%rbp)
L72:
  mov    -0x20(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L65
  mov    $0xa,%edi
  call   <putchar@plt>
  pxor   %xmm4,%xmm4
  cvtss2sd -0x1c(%rbp),%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D21(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  mov    %rax,%rsi
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x24(%rbp)
L17:
  cmpl   $0x6,-0x24(%rbp)
  jle    L35
  mov    -0x8(%rbp),%rax
  mov    $0x3e8,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_vector@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D105
data_type: string
name: unpack_data
arguments: data_tag: D49
data_type: string
name: unpack_data
arguments: data_tag: D38
data_type: string
name: unpack_data
arguments: data_tag: D100
data_type: string
name: unpack_data
arguments: data_tag: D4
data_type: string
name: unpack_data
arguments: data_tag: D128
data_type: string
name: unpack_data
arguments: data_tag: D60
data_type: string
name: unpack_data
arguments: data_tag: D76
data_type: string

tool: D105: M nl nr

tool: D49: 			Sample Savitzky-Golay Coefficients

tool: D38: %1d %1d %1d


tool: D100:  

tool: D4: %7s

tool: D128: %7.3f

tool: D60: Sum = %7.3f


tool: D76: Compare answer:
%s


assistant: ```c
int main(void) {
  int i, j, m, nl, np, nr;
  float *c, sum;
  static int mtest[6 + 1] = {0, 2, 2, 2, 2, 4, 4};
  static int nltest[6 + 1] = {0, 2, 3, 4, 5, 4, 5};
  static int nrtest[6 + 1] = {0, 2, 1, 0, 5, 4, 5};
  static char *ans[6 + 1] = {"", "                      -0.086  0.343  0.486  0.343 -0.086", "               -0.143  0.171  0.343  0.371  0.257", "         0.086 -0.143 -0.086  0.257  0.886", " -0.084  0.021  0.103  0.161  0.196  0.207  0.196  0.161  0.103  0.021 -0.084", "         0.035 -0.128  0.070  0.315  0.417  0.315  0.070 -0.128  0.035", "  0.042 -0.105 -0.023  0.140  0.280  0.333  0.280  0.140 -0.023 -0.105  0.042"};
  c = vector(1, 1000);
  printf("M nl nr\n");
  printf("\t\t\tSample Savitzky-Golay Coefficients\n");
  for (i = 1; i <= 6; i++) {
    m = mtest[i];
    nl = nltest[i];
    nr = nrtest[i];
    np = nl + nr + 1;
    savgol(c, np, nl, nr, 0, m);
    for (sum = 0.0, j = 1; j <= np; j++)
      sum += c[j];
    printf("%1d %1d %1d\n", m, nl, nr);
    for (j = nl; j < 5; j++)
      printf("%7s", " ");
    for (j = nl + 1; j >= 1; j--)
      printf("%7.3f", c[j]);
    for (j = 0; j < nr; j++)
      printf("%7.3f", c[np - j]);
    printf("\n");
    printf("Sum = %7.3f\n", sum);
    printf("Compare answer:\n%s\n", ans[i]);
  }
  free_vector(c, 1, 1000);
  return 0;
}
```