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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x14,%esi
  mov    $0x1,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x2f8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2e8(%rsp)
  xor    %eax,%eax
  call   <vector@plt>
  mov    $0x14,%esi
  mov    $0x1,%edi
  mov    %rax,0x28(%rsp)
  call   <vector@plt>
  mov    $0x14,%esi
  mov    $0x1,%edi
  mov    %rax,0x10(%rsp)
  call   <vector@plt>
  mov    $0x14,%esi
  mov    $0x1,%edi
  mov    %rax,0x30(%rsp)
  call   <vector@plt>
  mov    $0xc,%ecx
  mov    $0x1,%edx
  mov    $0x14,%esi
  mov    $0x1,%edi
  mov    %rax,0x38(%rsp)
  call   <matrix@plt>
  lea    D142(%rip),%rsi
  lea    D33(%rip),%rdi
  mov    %rax,%r12
  call   <fopen@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L12
L62:
  lea    0x240(%rsp),%rbp
  mov    %r15,%rdx
  mov    $0x50,%esi
  mov    %rbp,%rdi
  lea    0x85(%rsp),%r14
  lea    0xc1(%rsp),%r13
  call   <fgets@plt>
  lea    0x290(%rsp),%rax
  mov    %r15,%rdx
  mov    $0x50,%esi
  mov    %rax,%rdi
  mov    %rax,0x48(%rsp)
  lea    D104(%rip),%rbx
  call   <fgets@plt>
  lea    D136(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    %r14,0x40(%rsp)
  mov    %r13,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L2:
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  add    $0x5,%r14
  cmp    %r13,%r14
  jne    L2
  mov    %rbp,%rdi
  mov    %r15,%rdx
  lea    0x8(%r12),%rbx
  mov    $0x50,%esi
  call   <fgets@plt>
  mov    %rbp,%rdi
  mov    %r15,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  mov    0x28(%rsp),%rcx
  mov    %r12,0x50(%rsp)
  mov    %rbx,%rbp
  lea    0xe1(%rsp),%rax
  mov    %rbx,0x58(%rsp)
  lea    D177(%rip),%r14
  lea    0x4(%rcx),%r13
  mov    0x38(%rsp),%rcx
  mov    %rax,0x20(%rsp)
  mov    %rax,%rbx
  add    $0x4,%rcx
  mov    %rcx,(%rsp)
  lea    0x235(%rsp),%rcx
  mov    %rcx,0x8(%rsp)
  nopl   (%rax)
L32:
  mov    %rbx,%rdx
  lea    D105(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  movb   $0x0,0x10(%rbx)
  mov    $0x4,%r12d
  cs nopw 0x0(%rax,%rax,1)
L14:
  mov    0x0(%rbp),%rdx
  mov    %r14,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  add    %r12,%rdx
  add    $0x4,%r12
  call   <fscanf@plt>
  cmp    $0x34,%r12
  jne    L14
  mov    (%rsp),%r12
  mov    %r13,%rdx
  lea    D7(%rip),%rsi
  xor    %eax,%eax
  mov    %r15,%rdi
  add    $0x11,%rbx
  add    $0x4,%r13
  add    $0x8,%rbp
  mov    %r12,%rcx
  call   <fscanf@plt>
  mov    %r12,%rax
  add    $0x4,%rax
  mov    %rax,(%rsp)
  cmp    %rbx,0x8(%rsp)
  jne    L32
  mov    %r15,%rdi
  mov    0x50(%rsp),%r12
  mov    0x58(%rsp),%rbx
  lea    D71(%rip),%rbp
  call   <fclose@plt>
  mov    0x48(%rsp),%rdi
  call   <puts@plt>
  lea    D219(%rip),%rsi
  lea    D227(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x40(%rsp),%r14
  mov    0x18(%rsp),%r13
  nopl   0x0(%rax)
L0:
  mov    %r14,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x5,%r14
  call   <printf@plt>
  cmp    %r13,%r14
  jne    L0
  mov    $0xa,%edi
  lea    D124(%rip),%r14
  lea    D144(%rip),%rbp
  call   <putchar@plt>
  mov    %r12,(%rsp)
  mov    0x8(%rsp),%r15
  mov    0x20(%rsp),%r13
  nopl   0x0(%rax)
L50:
  mov    %r13,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  mov    $0x4,%r12d
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L65:
  mov    (%rbx),%rax
  pxor   %xmm0,%xmm0
  mov    %rbp,%rdi
  cvtss2sd (%rax,%r12,1),%xmm0
  addsd  D184(%rip),%xmm0
  xor    %eax,%eax
  add    $0x4,%r12
  cvttsd2si %xmm0,%esi
  call   <printf@plt>
  cmp    $0x34,%r12
  jne    L65
  mov    $0xa,%edi
  add    $0x11,%r13
  add    $0x8,%rbx
  call   <putchar@plt>
  cmp    %r13,%r15
  jne    L50
  lea    D186(%rip),%rdi
  mov    (%rsp),%r12
  call   <puts@plt>
  lea    D248(%rip),%rdi
  call   <puts@plt>
  lea    D138(%rip),%rdi
  call   <puts@plt>
  sub    $0x8,%rsp
  lea    D76(%rip),%rax
  lea    D91(%rip),%rcx
  push   %rax
  lea    D98(%rip),%rsi
  xor    %eax,%eax
  lea    D161(%rip),%r9
  lea    D112(%rip),%r8
  lea    D147(%rip),%rdx
  lea    D241(%rip),%rdi
  call   <printf@plt>
  pop    %rcx
  pop    %rsi
  mov    $0x1,%eax
  mov    0x10(%rsp),%rcx
  nopl   (%rax)
L91:
  mov    (%r12,%rax,8),%rdx
  movss  0x4(%rdx),%xmm0
  movss  %xmm0,(%rcx,%rax,4)
  add    $0x1,%rax
  cmp    $0x15,%rax
  jne    L91
  lea    0x78(%rsp),%rax
  lea    0x70(%rsp),%rbp
  mov    $0x4,%ebx
  lea    0x7c(%rsp),%r15
  lea    0x74(%rsp),%r13
  mov    %rax,0x8(%rsp)
  mov    %r13,0x20(%rsp)
  mov    %r15,%r8
  mov    0x30(%rsp),%r13
  mov    %rbp,%r15
  mov    0x40(%rsp),%rbp
  lea    0x6c(%rsp),%r14
L63:
  mov    $0x1,%eax
  nopl   (%rax)
L18:
  mov    (%r12,%rax,8),%rdx
  movss  (%rdx,%rbx,1),%xmm0
  movss  %xmm0,0x0(%r13,%rax,4)
  add    $0x1,%rax
  cmp    $0x15,%rax
  jne    L18
  push   0x20(%rsp)
  mov    $0x14,%edx
  mov    %r15,%r9
  mov    %r14,%rcx
  push   0x10(%rsp)
  mov    %r13,%rsi
  add    $0x4,%rbx
  mov    0x20(%rsp),%rdi
  mov    %r8,0x10(%rsp)
  call   <spear@plt>
  mov    %rbp,%rsi
  pxor   %xmm0,%xmm0
  pxor   %xmm4,%xmm4
  pxor   %xmm3,%xmm3
  pxor   %xmm2,%xmm2
  pxor   %xmm1,%xmm1
  add    $0x5,%rbp
  lea    D211(%rip),%rdi
  mov    $0x5,%eax
  cvtss2sd 0x7c(%rsp),%xmm0
  cvtss2sd 0x84(%rsp),%xmm4
  cvtss2sd 0x88(%rsp),%xmm3
  cvtss2sd 0x80(%rsp),%xmm2
  cvtss2sd 0x8c(%rsp),%xmm1
  call   <printf@plt>
  pop    %rax
  pop    %rdx
  cmp    0x18(%rsp),%rbp
  mov    (%rsp),%r8
  jne    L63
  mov    $0xc,%r8d
  mov    $0x1,%ecx
  mov    $0x14,%edx
  mov    %r12,%rdi
  mov    $0x1,%esi
  call   <free_matrix@plt>
  mov    0x38(%rsp),%rdi
  mov    $0x14,%edx
  mov    $0x1,%esi
  call   <free_vector@plt>
  mov    0x30(%rsp),%rdi
  mov    $0x14,%edx
  mov    $0x1,%esi
  call   <free_vector@plt>
  mov    0x10(%rsp),%rdi
  mov    $0x14,%edx
  mov    $0x1,%esi
  call   <free_vector@plt>
  mov    0x28(%rsp),%rdi
  mov    $0x14,%edx
  mov    $0x1,%esi
  call   <free_vector@plt>
  mov    0x2e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L67
  add    $0x2f8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  lea    D78(%rip),%rdi
  call   <nrerror@plt>
  jmp    L62
L67:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D142
datatype: string
name: unpack_data
arguments: label: D33
datatype: string
name: unpack_data
arguments: label: D104
datatype: string
name: unpack_data
arguments: label: D136
datatype: string
name: unpack_data
arguments: label: D177
datatype: string
name: unpack_data
arguments: label: D105
datatype: string
name: unpack_data
arguments: label: D7
datatype: string
name: unpack_data
arguments: label: D71
datatype: string
name: unpack_data
arguments: label: D219
datatype: string
name: unpack_data
arguments: label: D227
datatype: string
name: unpack_data
arguments: label: D124
datatype: string
name: unpack_data
arguments: label: D144
datatype: string
name: unpack_data
arguments: label: D184
datatype: f64
name: unpack_data
arguments: label: D186
datatype: string
name: unpack_data
arguments: label: D248
datatype: string
name: unpack_data
arguments: label: D138
datatype: string
name: unpack_data
arguments: label: D76
datatype: string
name: unpack_data
arguments: label: D91
datatype: string
name: unpack_data
arguments: label: D98
datatype: string
name: unpack_data
arguments: label: D161
datatype: string
name: unpack_data
arguments: label: D112
datatype: string
name: unpack_data
arguments: label: D147
datatype: string
name: unpack_data
arguments: label: D241
datatype: string
name: unpack_data
arguments: label: D211
datatype: string
name: unpack_data
arguments: label: D78
datatype: string

tool: D142: r

tool: D33: table2.dat

tool: D104:  %s

tool: D136: %*15c

tool: D177: %f

tool: D105: %[^0123456789]

tool: D7: %f %f 

tool: D71: %4s

tool: D219:  

tool: D227: %16s

tool: D124: %s

tool: D144: %4d

tool: D184: 0.5

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

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

tool: D138: (july with other months)


tool: D76: probrs

tool: D91: st. dev.

tool: D98: month

tool: D161: spearman-r

tool: D112: probd

tool: D147: d

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


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


tool: D78: Data file table2.dat not found


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;
}
```