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    $0x2e8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2d8(%rsp)
  xor    %eax,%eax
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,0x18(%rsp)
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,0x8(%rsp)
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,%r15
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,0x20(%rsp)
  mov    $0xc,%ecx
  mov    $0x1,%edx
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <matrix@plt>
  mov    %rax,%r14
  lea    D154(%rip),%rsi
  lea    D188(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L107
L66:
  lea    0x230(%rsp),%rdi
  mov    %rbp,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  lea    0x280(%rsp),%rdi
  mov    %rbp,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    0x75(%rsp),%rbx
  mov    %rbx,0x10(%rsp)
  lea    0xb1(%rsp),%r13
  mov    %r13,0x28(%rsp)
  lea    D65(%rip),%r12
L76:
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  add    $0x5,%rbx
  cmp    %r13,%rbx
  jne    L76
  lea    0x230(%rsp),%rbx
  mov    %rbp,%rdx
  mov    $0x50,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  mov    %rbp,%rdx
  mov    $0x50,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  lea    0xd1(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0x18(%rsp),%rcx
  add    $0x4,%rcx
  mov    0x20(%rsp),%rdi
  add    $0x4,%rdi
  lea    0x8(%r14),%r12
  lea    0x225(%rsp),%rsi
  mov    %rsi,(%rsp)
  mov    %r12,%r13
  mov    %r15,0x38(%rsp)
  mov    %r14,0x40(%rsp)
  mov    %r12,0x48(%rsp)
  mov    %rax,%r12
  mov    %rcx,%r14
  mov    %rdi,%r15
  jmp    L68
L107:
  lea    D103(%rip),%rdi
  call   <nrerror@plt>
  jmp    L66
L78:
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D101(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  add    $0x11,%r12
  add    $0x4,%r14
  add    $0x4,%r15
  add    $0x8,%r13
  cmp    (%rsp),%r12
  je     L120
L68:
  mov    %r12,%rdx
  lea    D115(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  movb   $0x0,0x10(%r12)
  mov    $0x4,%ebx
L54:
  mov    %rbx,%rdx
  add    0x0(%r13),%rdx
  lea    D219(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  add    $0x4,%rbx
  cmp    $0x34,%rbx
  jne    L54
  jmp    L78
L120:
  mov    0x38(%rsp),%r15
  mov    0x40(%rsp),%r14
  mov    0x48(%rsp),%r12
  mov    %rbp,%rdi
  call   <fclose@plt>
  lea    0x280(%rsp),%rdi
  call   <puts@plt>
  lea    D135(%rip),%rsi
  lea    D29(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x10(%rsp),%rbx
  lea    D16(%rip),%rbp
  mov    0x28(%rsp),%r13
L144:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x5,%rbx
  cmp    %r13,%rbx
  jne    L144
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D2(%rip),%r13
  lea    D52(%rip),%rbp
  mov    %r15,0x38(%rsp)
  mov    %r14,0x40(%rsp)
  mov    0x30(%rsp),%r14
  mov    (%rsp),%r15
  jmp    L116
L0:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x11,%r14
  add    $0x8,%r12
  cmp    %r15,%r14
  je     L121
L116:
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x4,%ebx
L56:
  mov    (%r12),%rax
  pxor   %xmm0,%xmm0
  cvtss2sd (%rax,%rbx,1),%xmm0
  addsd  D139(%rip),%xmm0
  cvttsd2si %xmm0,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    $0x34,%rbx
  jne    L56
  jmp    L0
L121:
  mov    0x38(%rsp),%r15
  mov    0x40(%rsp),%r14
  lea    D187(%rip),%rdi
  call   <puts@plt>
  lea    D231(%rip),%rdi
  call   <puts@plt>
  lea    D116(%rip),%rdi
  call   <puts@plt>
  sub    $0x8,%rsp
  lea    D91(%rip),%rax
  push   %rax
  lea    D215(%rip),%r9
  lea    D167(%rip),%r8
  lea    D168(%rip),%rcx
  lea    D160(%rip),%rdx
  lea    D21(%rip),%rsi
  lea    D112(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x10,%rsp
  mov    $0x1,%eax
  mov    0x8(%rsp),%rcx
L69:
  mov    (%r14,%rax,8),%rdx
  movss  0x4(%rdx),%xmm0
  movss  %xmm0,(%rcx,%rax,4)
  add    $0x1,%rax
  cmp    $0x15,%rax
  jne    L69
  mov    $0x4,%ebx
  lea    D119(%rip),%rbp
  mov    0x10(%rsp),%r12
  mov    0x28(%rsp),%r13
L139:
  mov    $0x1,%eax
L20:
  mov    (%r14,%rax,8),%rdx
  movss  (%rdx,%rbx,1),%xmm0
  movss  %xmm0,(%r15,%rax,4)
  add    $0x1,%rax
  cmp    $0x15,%rax
  jne    L20
  lea    0x5c(%rsp),%rcx
  lea    0x64(%rsp),%rax
  push   %rax
  lea    0x70(%rsp),%rax
  push   %rax
  lea    0x70(%rsp),%r9
  lea    0x7c(%rsp),%r8
  mov    $0x14,%edx
  mov    %r15,%rsi
  mov    0x18(%rsp),%rdi
  call   <spear@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x6c(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd 0x74(%rsp),%xmm4
  pxor   %xmm3,%xmm3
  cvtss2sd 0x78(%rsp),%xmm3
  pxor   %xmm2,%xmm2
  cvtss2sd 0x70(%rsp),%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd 0x7c(%rsp),%xmm1
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x5,%eax
  call   <printf@plt>
  add    $0x5,%r12
  add    $0x4,%rbx
  add    $0x10,%rsp
  cmp    %r13,%r12
  jne    L139
  mov    $0xc,%r8d
  mov    $0x1,%ecx
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  call   <free_matrix@plt>
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    0x20(%rsp),%rdi
  call   <free_vector@plt>
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  call   <free_vector@plt>
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    0x8(%rsp),%rdi
  call   <free_vector@plt>
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    0x18(%rsp),%rdi
  call   <free_vector@plt>
  mov    0x2d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L87
  mov    $0x0,%eax
  add    $0x2e8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L87:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D154
type_infered: string
name: retrieve_data
arguments: data_tag: D188
type_infered: string
name: retrieve_data
arguments: data_tag: D0
type_infered: string
name: retrieve_data
arguments: data_tag: D65
type_infered: string
name: retrieve_data
arguments: data_tag: D103
type_infered: string
name: retrieve_data
arguments: data_tag: D101
type_infered: string
name: retrieve_data
arguments: data_tag: D115
type_infered: string
name: retrieve_data
arguments: data_tag: D219
type_infered: string
name: retrieve_data
arguments: data_tag: D135
type_infered: string
name: retrieve_data
arguments: data_tag: D29
type_infered: string
name: retrieve_data
arguments: data_tag: D16
type_infered: string
name: retrieve_data
arguments: data_tag: D2
type_infered: string
name: retrieve_data
arguments: data_tag: D52
type_infered: string
name: retrieve_data
arguments: data_tag: D139
type_infered: f64
name: retrieve_data
arguments: data_tag: D187
type_infered: string
name: retrieve_data
arguments: data_tag: D231
type_infered: string
name: retrieve_data
arguments: data_tag: D116
type_infered: string
name: retrieve_data
arguments: data_tag: D91
type_infered: string
name: retrieve_data
arguments: data_tag: D215
type_infered: string
name: retrieve_data
arguments: data_tag: D167
type_infered: string
name: retrieve_data
arguments: data_tag: D168
type_infered: string
name: retrieve_data
arguments: data_tag: D160
type_infered: string
name: retrieve_data
arguments: data_tag: D21
type_infered: string
name: retrieve_data
arguments: data_tag: D112
type_infered: string
name: retrieve_data
arguments: data_tag: D119
type_infered: string

tool: D154: r

tool: D188: table2.dat

tool: D0: %*15c

tool: D65:  %s

tool: D103: Data file table2.dat not found


tool: D101: %f %f 

tool: D115: %[^0123456789]

tool: D219: %f

tool: D135:  

tool: D29: %16s

tool: D16: %4s

tool: D2: %s

tool: D52: %4d

tool: D139: 0.5

tool: D187: 
Are sunny summer places also sunny winter places?

tool: D231: Check correlation of sampled U.S. solar radiation

tool: D116: (july with other months)


tool: D91: probrs

tool: D215: spearman-r

tool: D167: probd

tool: D168: st. dev.

tool: D160: d

tool: D21: month

tool: D112: %s %9s %14s %11s %15s %10s


tool: D119: %4s %12.2f %12.6f %12.6f %13.6f %12.6f


assistant: ```c
int main(void) {
  int i, j;
  float d, probd, probrs, rs, zd, *ave, *data1, *data2, *zlat, **rays;
  char dummy[80], txt[80], city[20 + 1][17], mon[12 + 1][5];
  FILE *fp;
  ave = vector(1, 20);
  data1 = vector(1, 20);
  data2 = vector(1, 20);
  zlat = vector(1, 20);
  rays = matrix(1, 20, 1, 12);
  if ((fp = fopen("table2.dat", "r")) == NULL)
    nrerror("Data file table2.dat not found\n");
  fgets(dummy, 80, fp);
  fgets(txt, 80, fp);
  fscanf(fp, "%*15c");
  for (i = 1; i <= 12; i++)
    fscanf(fp, " %s", mon[i]);
  fgets(dummy, 80, fp);
  fgets(dummy, 80, fp);
  for (i = 1; i <= 20; i++) {
    fscanf(fp, "%[^0123456789]", city[i]);
    city[i][16] = '\0';
    for (j = 1; j <= 12; j++)
      fscanf(fp, "%f", &rays[i][j]);
    fscanf(fp, "%f %f ", &ave[i], &zlat[i]);
  }
  fclose(fp);
  printf("%s\n", txt);
  printf("%16s", " ");
  for (i = 1; i <= 12; i++)
    printf("%4s", mon[i]);
  printf("\n");
  for (i = 1; i <= 20; i++) {
    printf("%s", city[i]);
    for (j = 1; j <= 12; j++)
      printf("%4d", (int)(0.5 + rays[i][j]));
    printf("\n");
  }
  printf("\nAre sunny summer places also sunny winter places?\n");
  printf("Check correlation of sampled U.S. solar radiation\n");
  printf("(july with other months)\n\n");
  printf("%s %9s %14s %11s %15s %10s\n", "month", "d", "st. dev.", "probd", "spearman-r", "probrs");
  for (i = 1; i <= 20; i++)
    data1[i] = rays[i][1];
  for (j = 1; j <= 12; j++) {
    for (i = 1; i <= 20; i++)
      data2[i] = rays[i][j];
    spear(data1, data2, 20, &d, &zd, &probd, &rs, &probrs);
    printf("%4s %12.2f %12.6f %12.6f %13.6f %12.6f\n", mon[j], d, zd, probd, rs, probrs);
  }
  free_matrix(rays, 1, 20, 1, 12);
  free_vector(zlat, 1, 20);
  free_vector(data2, 1, 20);
  free_vector(data1, 1, 20);
  free_vector(ave, 1, 20);
  return 0;
}
```