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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x31,%edx
  lea    D110(%rip),%rsi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1c8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1b8(%rsp)
  xor    %eax,%eax
  mov    %dx,0x1b6(%rsp)
  movabs $0x79732f2e2e2f2e2e,%rax
  mov    %rax,0x1aa(%rsp)
  lea    0x1aa(%rsp),%rax
  mov    %rax,%rdi
  movb   $0x46,0x33(%rsp)
  movl   $0x6d657473,0x1b2(%rsp)
  movl   $0x0,0x48(%rsp)
  mov    %rax,0x28(%rsp)
  call   <fopen@plt>
  lea    0x44(%rsp),%rcx
  lea    D45(%rip),%rsi
  mov    %rax,%r14
  lea    0x40(%rsp),%rax
  mov    %rcx,0x10(%rsp)
  mov    %rax,0x18(%rsp)
  mov    %rax,%rdx
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    0x44(%rsp),%ecx
  test   %ecx,%ecx
  jle    L101
  xor    %r13d,%r13d
  lea    0x78(%rsp),%r15
  lea    0x50(%rsp),%rbp
  lea    0x4c(%rsp),%rbx
  lea    D172(%rip),%r12
  nopw   0x0(%rax,%rax,1)
L138:
  mov    %rbx,%rdx
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %r15,%r8
  mov    %rbp,%rcx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <fscanf@plt>
  mov    0x4c(%rsp),%eax
  sub    0x50(%rsp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  cmp    0x48(%rsp),%eax
  jle    L41
  mov    %eax,0x48(%rsp)
L41:
  add    $0x1,%r13d
  cmp    %r13d,0x44(%rsp)
  jg     L138
L101:
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    0x48(%rsp),%eax
  mov    $0x8,%esi
  lea    0x1(%rax,%rax,1),%ebx
  mov    %eax,0x24(%rsp)
  mov    %ebx,0x38(%rsp)
  mov    %ebx,0x3c(%rsp)
  imul   0x40(%rsp),%ebx
  mov    %ebx,%edi
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    %ebx,%edi
  mov    %rax,(%rsp)
  call   <calloc@plt>
  movl   $0x0,0x4c(%rsp)
  mov    %rax,0x8(%rsp)
  test   %ebx,%ebx
  jle    L133
  mov    0x8(%rsp),%rsi
  movslq %ebx,%rdx
  mov    (%rsp),%rdi
  lea    0x0(,%rdx,8),%r12
  lea    (%rsi,%r12,1),%rax
  cmp    %rax,%rdi
  jae    L43
  lea    (%rdi,%r12,1),%rax
  cmp    %rax,%rsi
  jb     L94
L43:
  mov    (%rsp),%rdi
  mov    %r12,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    0x8(%rsp),%rdi
  mov    %r12,%rdx
  xor    %esi,%esi
  call   <memset@plt>
L66:
  mov    %ebx,0x4c(%rsp)
L133:
  mov    0x28(%rsp),%rdi
  lea    D110(%rip),%rsi
  call   <fopen@plt>
  mov    0x10(%rsp),%rcx
  mov    0x18(%rsp),%rdx
  lea    D45(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r13
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    0x44(%rsp),%eax
  test   %eax,%eax
  jle    L10
  movslq 0x24(%rsp),%rax
  lea    0x50(%rsp),%rbp
  xor    %r12d,%r12d
  lea    0x4c(%rsp),%rbx
  lea    D54(%rip),%r15
  lea    D181(%rip),%r14
  mov    %rax,0x10(%rsp)
  mov    %rbp,%rax
  mov    %rbx,%rbp
  mov    %r12d,%ebx
  mov    %rax,%r12
  nopw   0x0(%rax,%rax,1)
L31:
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    %r15,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <fscanf@plt>
  mov    0x50(%rsp),%ecx
  mov    0x4c(%rsp),%edx
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  lea    -0x1(%rcx),%eax
  sub    %ecx,%edx
  mov    0x3c(%rsp),%ecx
  movslq %edx,%rdx
  add    0x10(%rsp),%rdx
  imul   %eax,%ecx
  imul   0x38(%rsp),%eax
  movslq %ecx,%rcx
  cltq
  add    %rdx,%rcx
  add    %rdx,%rax
  lea    (%rsi,%rcx,8),%rcx
  mov    %r14,%rsi
  lea    (%rdi,%rax,8),%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  cmp    %ebx,0x44(%rsp)
  jg     L31
L10:
  mov    %r13,%rdi
  lea    0xa0(%rsp),%r15
  call   <fclose@plt>
  mov    0x40(%rsp),%esi
  lea    D173(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x24(%rsp),%esi
  add    0x48(%rsp),%esi
  xor    %eax,%eax
  add    $0x1,%esi
  lea    D122(%rip),%rdi
  call   <printf@plt>
  lea    0x80(%rsp),%rdi
  xor    %esi,%esi
  call   <gettimeofday@plt>
  mov    $0x8,%esi
  mov    D96(%rip),%rax
  mov    $0x19,%edi
  movl   $0x19,0x54(%rsp)
  mov    %rax,0x68(%rsp)
  mov    D137(%rip),%rax
  mov    %rax,0x70(%rsp)
  call   <calloc@plt>
  mov    0x54(%rsp),%edi
  mov    $0x8,%esi
  mov    %rax,%rbx
  call   <calloc@plt>
  mov    0x40(%rsp),%edi
  imul   0x54(%rsp),%edi
  mov    $0x8,%esi
  mov    %rax,%r14
  call   <calloc@plt>
  mov    %r15,%rdi
  mov    %rax,%rbp
  call   <feastinit@plt>
  lea    0x48(%rsp),%rdx
  lea    0x33(%rsp),%rdi
  movl   $0x1,0xa0(%rsp)
  sub    $0x8,%rsp
  mov    %rdx,%r9
  lea    0x64(%rsp),%rax
  push   %rax
  push   %r14
  lea    0x70(%rsp),%rax
  push   %rax
  push   %rbp
  push   %rbx
  lea    0x84(%rsp),%rax
  push   %rax
  lea    0xa8(%rsp),%rax
  push   %rax
  lea    0xa8(%rsp),%rax
  push   %rax
  lea    0x7c(%rsp),%rax
  push   %rax
  lea    0xb0(%rsp),%rax
  push   %rax
  push   %r15
  lea    0x9c(%rsp),%rax
  push   %rax
  push   0x70(%rsp)
  mov    0x70(%rsp),%rcx
  mov    0x88(%rsp),%rsi
  lea    0xa8(%rsp),%r8
  call   <dfeast_sbgv@plt>
  add    $0x70,%rsp
  xor    %esi,%esi
  lea    0x90(%rsp),%rdi
  call   <gettimeofday@plt>
  mov    0x5c(%rsp),%esi
  lea    D205(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x5c(%rsp),%ebp
  test   %ebp,%ebp
  je     L72
L79:
  mov    0x1b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L119
  add    $0x1c8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L72:
  lea    D19(%rip),%r12
  mov    %r12,%rdi
  call   <puts@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  lea    D215(%rip),%rdi
  mov    $0x1,%eax
  movsd  0x98(%rsp),%xmm0
  subsd  0x88(%rsp),%xmm0
  mulsd  D30(%rip),%xmm0
  movsd  0x90(%rsp),%xmm1
  subsd  0x80(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  call   <printf@plt>
  movsd  0x70(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm0
  lea    D59(%rip),%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  mov    0x54(%rsp),%edx
  mov    0x58(%rsp),%esi
  xor    %eax,%eax
  lea    D32(%rip),%rdi
  call   <printf@plt>
  mov    0x34(%rsp),%esi
  lea    D101(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x58(%rsp),%ecx
  movl   $0x0,0x4c(%rsp)
  test   %ecx,%ecx
  jle    L84
  mov    %ecx,%edx
  mov    %rbx,%rax
  pxor   %xmm0,%xmm0
  lea    (%rbx,%rdx,8),%rdx
  nopw   0x0(%rax,%rax,1)
L97:
  addsd  (%rax),%xmm0
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L97
  mov    %ecx,0x4c(%rsp)
L149:
  lea    D3(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  0x60(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D175(%rip),%rdi
  call   <printf@plt>
  lea    D125(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0x58(%rsp)
  movl   $0x0,0x4c(%rsp)
  jle    L79
  lea    D40(%rip),%r12
  mov    %ebp,%esi
  nopl   0x0(%rax)
L122:
  movslq %esi,%rax
  mov    %r12,%rdi
  movsd  (%rbx,%rax,8),%xmm0
  movsd  (%r14,%rax,8),%xmm1
  mov    $0x2,%eax
  call   <printf@plt>
  mov    0x4c(%rsp),%eax
  lea    0x1(%rax),%esi
  mov    %esi,0x4c(%rsp)
  cmp    0x58(%rsp),%esi
  jl     L122
  jmp    L79
L94:
  mov    (%rsp),%rcx
  mov    0x8(%rsp),%rsi
  xor    %eax,%eax
  nopl   0x0(%rax)
L83:
  movq   $0x0,(%rcx,%rax,8)
  movq   $0x0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L83
  jmp    L66
L84:
  pxor   %xmm0,%xmm0
  jmp    L149
L119:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D110
type: string
name: unpack_data
arguments: label: D45
type: string
name: unpack_data
arguments: label: D172
type: string
name: unpack_data
arguments: label: D54
type: string
name: unpack_data
arguments: label: D181
type: string
name: unpack_data
arguments: label: D173
type: string
name: unpack_data
arguments: label: D122
type: string
name: unpack_data
arguments: label: D96
type: f64
name: unpack_data
arguments: label: D137
type: f64
name: unpack_data
arguments: label: D205
type: string
name: unpack_data
arguments: label: D19
type: string
name: unpack_data
arguments: label: D188
type: string
name: unpack_data
arguments: label: D215
type: string
name: unpack_data
arguments: label: D30
type: f64
name: unpack_data
arguments: label: D59
type: string
name: unpack_data
arguments: label: D32
type: string
name: unpack_data
arguments: label: D101
type: string
name: unpack_data
arguments: label: D3
type: string
name: unpack_data
arguments: label: D175
type: string
name: unpack_data
arguments: label: D125
type: string
name: unpack_data
arguments: label: D40
type: string

tool: D110: r

tool: D45: %d%d


tool: D172: %d%d%lf%lf


tool: D54: %d%d

tool: D181: %lf%lf


tool: D173: dense matrix -system1- size %.d


tool: D122: bandwidth %d 


tool: D96: 0.18

tool: D137: 1

tool: D205: FEAST OUTPUT INFO %d


tool: D19: *************************************************

tool: D188: ************** REPORT ***************************

tool: D215: SIMULATION TIME %f


tool: D30: 1e-06

tool: D59: # Search interval [Emin,Emax] %.15e %.15e


tool: D32: # mode found/subspace %d %d 


tool: D101: # iterations %d 


tool: D3: TRACE %.15e


tool: D175: Relative error on the Trace %.15e


tool: D125: Eigenvalues/Residuals

tool: D40:    %d %.15e %.15e


assistant: ```c
int main() {
  int feastparam[64];
  double epsout;
  int loop, LDA, LDB;
  char UPLO = 'F';
  FILE *fp;
  char name[] = "../../system1";
  int N, nnz, kl, ku;
  double *A, *B;
  struct timeval t1, t2;
  int i, j, k, n2, err;
  int M0, M, info;
  double Emin, Emax, trace, dum;
  double *X;
  double *E, *res;
  kl = 0;
  fp = fopen(name, "r");
  err = fscanf(fp, "%d%d\n", &N, &nnz);
  for (k = 0; k <= nnz - 1; k++) {
    err = fscanf(fp, "%d%d%lf%lf\n", &i, &j, &dum, &dum);
    if (abs(i - j) > kl) {
      kl = abs(i - j);
    }
  }
  fclose(fp);
  ku = kl;
  LDA = (kl + ku + 1);
  LDB = LDA;
  n2 = N * (kl + ku + 1);
  A = calloc(n2, sizeof(double));
  B = calloc(n2, sizeof(double));
  for (i = 0; i <= n2 - 1; i++) {
    *(A + i) = (double)0.0;
    *(B + i) = (double)0.0;
  };
  fp = fopen(name, "r");
  err = fscanf(fp, "%d%d\n", &N, &nnz);
  for (k = 0; k <= nnz - 1; k++) {
    err = fscanf(fp, "%d%d", &i, &j);
    err = fscanf(fp, "%lf%lf\n", A + (j - 1) * LDA + ku + (i - j), B + (j - 1) * LDB + ku + (i - j));
  };
  fclose(fp);
  printf("dense matrix -system1- size %.d\n", N);
  printf("bandwidth %d \n", kl + ku + 1);
  gettimeofday(&t1, NULL);
  Emin = (double)0.18;
  Emax = (double)1.0;
  M0 = 25;
  E = calloc(M0, sizeof(double));
  res = calloc(M0, sizeof(double));
  X = calloc(N * M0, sizeof(double));
  feastinit(feastparam);
  feastparam[0] = 1;
  dfeast_sbgv(&UPLO, &N, &kl, A, &LDA, &kl, B, &LDB, feastparam, &epsout, &loop, &Emin, &Emax, &M0, E, X, &M, res, &info);
  gettimeofday(&t2, NULL);
  printf("FEAST OUTPUT INFO %d\n", info);
  if (info == 0) {
    printf("*************************************************\n");
    printf("************** REPORT ***************************\n");
    printf("*************************************************\n");
    printf("SIMULATION TIME %f\n", (t2.tv_sec - t1.tv_sec) * 1.0 + (t2.tv_usec - t1.tv_usec) * 0.000001);
    printf("# Search interval [Emin,Emax] %.15e %.15e\n", Emin, Emax);
    printf("# mode found/subspace %d %d \n", M, M0);
    printf("# iterations %d \n", loop);
    trace = (double)0.0;
    for (i = 0; i <= M - 1; i = i + 1) {
      trace = trace + *(E + i);
    }
    printf("TRACE %.15e\n", trace);
    printf("Relative error on the Trace %.15e\n", epsout);
    printf("Eigenvalues/Residuals\n");
    for (i = 0; i <= M - 1; i = i + 1) {
      printf("   %d %.15e %.15e\n", i, *(E + i), *(res + i));
    }
  }
  return 0;
}
```