user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x5b8,%rsp
  lea    D114(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x25a8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    D89(%rip),%rsi
  lea    D99(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L11
L83:
  xor    %ebx,%ebx
  lea    0x20(%rsp),%r13
  lea    D67(%rip),%r14
  jmp    L45
  nopl   0x0(%rax,%rax,1)
L39:
  lea    0x0(%r13,%rbx,8),%rdx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  add    $0x1,%rbx
  call   <fscanf@plt>
L45:
  mov    %rbp,%rdi
  mov    %ebx,%r12d
  call   <feof@plt>
  test   %eax,%eax
  je     L39
  lea    0x0(,%rbx,8),%edi
  call   <malloc@plt>
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    %rax,%r14
  call   <ar_mean@plt>
  test   %ebx,%ebx
  je     L75
  lea    (%r14,%rbx,8),%rdx
  mov    %r14,%rax
  sub    %r14,%r13
  nopw   0x0(%rax,%rax,1)
L31:
  movsd  0x0(%r13,%rax,1),%xmm0
  add    $0x8,%rax
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L31
L75:
  mov    %rbp,%rdi
  lea    D126(%rip),%rbp
  call   <fclose@plt>
  mov    $0x38,%edi
  call   <malloc@plt>
  lea    D46(%rip),%rdi
  mov    %rax,%r15
  mov    %rax,(%rsp)
  call   <puts@plt>
  lea    0x18(%rsp),%rax
  mov    %r15,%rcx
  mov    %r12d,%esi
  mov    %rax,%r8
  mov    $0x7,%edx
  mov    %r14,%rdi
  mov    %rax,0x8(%rsp)
  call   <yw@plt>
  mov    $0xa,%edi
  mov    %r15,%rbx
  lea    0x38(%r15),%r13
  call   <putchar@plt>
  lea    D159(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L73:
  movsd  (%r15),%xmm0
  mov    %rbp,%rdi
  mov    $0x1,%eax
  add    $0x8,%r15
  call   <printf@plt>
  cmp    %r15,%r13
  jne    L73
  mov    $0xa,%edi
  call   <putchar@plt>
  movsd  0x18(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D44(%rip),%rdi
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D139(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%r8
  mov    %r12d,%esi
  mov    %r14,%rdi
  mov    (%rsp),%rcx
  mov    $0x7,%edx
  call   <burg@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D159(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L35:
  movsd  (%rbx),%xmm0
  mov    %rbp,%rdi
  mov    $0x1,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    %rbx,%r13
  jne    L35
  mov    $0xa,%edi
  call   <putchar@plt>
  movsd  0x18(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D44(%rip),%rdi
  call   <printf@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    $0x8,%edi
  call   <malloc@plt>
  mov    $0x8,%edi
  mov    %rax,%r13
  call   <malloc@plt>
  mov    $0xa,%edi
  mov    %rax,%r15
  call   <putchar@plt>
  lea    D47(%rip),%rdi
  call   <puts@plt>
  sub    $0x8,%rsp
  mov    %r15,%r9
  mov    %r13,%r8
  push   0x10(%rsp)
  mov    $0x1,%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  mov    $0x1,%ecx
  call   <hr@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D159(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  0x0(%r13),%xmm0
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D135(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  (%r15),%xmm0
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  movsd  0x28(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D44(%rip),%rdi
  call   <printf@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  pop    %rax
  pop    %rdx
  mov    0x25a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  add    $0x25b8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L11:
  lea    D121(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x64,%edi
  call   <exit@plt>
  jmp    L83
L50:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D114
datatype: string
name: disassemble_data
arguments: label: D89
datatype: string
name: disassemble_data
arguments: label: D99
datatype: string
name: disassemble_data
arguments: label: D67
datatype: string
name: disassemble_data
arguments: label: D126
datatype: string
name: disassemble_data
arguments: label: D46
datatype: string
name: disassemble_data
arguments: label: D159
datatype: string
name: disassemble_data
arguments: label: D44
datatype: string
name: disassemble_data
arguments: label: D139
datatype: string
name: disassemble_data
arguments: label: D47
datatype: string
name: disassemble_data
arguments: label: D135
datatype: string
name: disassemble_data
arguments: label: D121
datatype: string

tool: D114: OK

tool: D89: r

tool: D99: ../data/seriesA.txt

tool: D67: %lf 


tool: D126: %g 

tool: D46: AR Coefficients Using Yule Walker Algorithm 

tool: D159: PHI : 

tool: D44: VAR %g 


tool: D139: AR Coefficients Using Burg Algorithm 

tool: D47: ARMA Coefficients Using Hannan Rissanen Algorithm 

tool: D135: THETA : 

tool: D121: Cannot Open File

assistant: ```c
int main(void) {
  int i, N;
  double *inp;
  int p, q;
  double var, wmean;
  double *phi, *theta;
  FILE *ifp;
  double temp[1200];
  printf("OK");
  ifp = fopen("../data/seriesA.txt", "r");
  i = 0;
  if (!ifp) {
    printf("Cannot Open File");
    exit(100);
  }
  while (!feof(ifp)) {
    fscanf(ifp, "%lf \n", &temp[i]);
    i++;
  }
  N = i;
  inp = (double *)malloc(sizeof(double) * N);
  wmean = ar_mean(temp, N);
  for (i = 0; i < N; ++i) {
    inp[i] = temp[i];
  }
  fclose(ifp);
  p = 7;
  phi = (double *)malloc(sizeof(double) * p);
  printf("AR Coefficients Using Yule Walker Algorithm \n");
  yw(inp, N, p, phi, &var);
  printf("\n");
  printf("PHI : ");
  for (i = 0; i < p; ++i) {
    printf("%g ", phi[i]);
  }
  printf("\n");
  printf("VAR %g \n", var);
  printf("\n");
  printf("AR Coefficients Using Burg Algorithm \n");
  burg(inp, N, p, phi, &var);
  printf("\n");
  printf("PHI : ");
  for (i = 0; i < p; ++i) {
    printf("%g ", phi[i]);
  }
  printf("\n");
  printf("VAR %g \n", var);
  free(phi);
  p = 1;
  q = 1;
  phi = (double *)malloc(sizeof(double) * p);
  theta = (double *)malloc(sizeof(double) * q);
  printf("\n");
  printf("ARMA Coefficients Using Hannan Rissanen Algorithm \n");
  hr(inp, N, p, q, phi, theta, &var);
  printf("\n");
  printf("PHI : ");
  for (i = 0; i < p; ++i) {
    printf("%g ", phi[i]);
  }
  printf("\n");
  printf("THETA : ");
  for (i = 0; i < q; ++i) {
    printf("%g ", theta[i]);
  }
  printf("\n");
  printf("VAR %g \n", var);
  free(inp);
  free(phi);
  free(theta);
  return 0;
}
```