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    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    D106(%rip),%rsi
  lea    D79(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L33
L26:
  lea    0x20(%rsp),%rdi
  mov    %rbx,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  lea    D36(%rip),%r12
  lea    0x20(%rsp),%rbp
  lea    D60(%rip),%r13
L70:
  mov    $0x19,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L47
  mov    %rbx,%rdx
  mov    $0x50,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    %rbx,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L70
  mov    %r13,%rdi
  call   <nrerror@plt>
  jmp    L70
L33:
  lea    D71(%rip),%rdi
  call   <nrerror@plt>
  jmp    L26
L47:
  lea    0x8(%rsp),%rdx
  lea    D135(%rip),%rsi
  mov    %rbx,%rdi
  call   <fscanf@plt>
  lea    0x20(%rsp),%rsi
  lea    D11(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D98(%rip),%r9
  lea    D8(%rip),%r8
  lea    D115(%rip),%rcx
  mov    %r8,%rdx
  lea    D21(%rip),%rsi
  lea    D133(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L12
  mov    $0x1,%ebp
  lea    0x1c(%rsp),%r15
  lea    0x18(%rsp),%r14
  lea    D57(%rip),%r13
  lea    D125(%rip),%r12
L21:
  lea    0x14(%rsp),%rdx
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    0x10(%rsp),%rsi
  lea    0xc(%rsp),%rdi
  movss  0x14(%rsp),%xmm0
  call   <cisi@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x14(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd 0x10(%rsp),%xmm4
  pxor   %xmm3,%xmm3
  cvtss2sd 0x1c(%rsp),%xmm3
  pxor   %xmm2,%xmm2
  cvtss2sd 0xc(%rsp),%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd 0x18(%rsp),%xmm1
  mov    %r12,%rdi
  mov    $0x5,%eax
  call   <printf@plt>
  add    $0x1,%ebp
  cmp    %ebp,0x8(%rsp)
  jge    L21
L12:
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  mov    $0x0,%eax
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D106
data_type: string
name: retrieve_data
arguments: data_label: D79
data_type: string
name: retrieve_data
arguments: data_label: D36
data_type: string
name: retrieve_data
arguments: data_label: D60
data_type: string
name: retrieve_data
arguments: data_label: D71
data_type: string
name: retrieve_data
arguments: data_label: D135
data_type: string
name: retrieve_data
arguments: data_label: D11
data_type: string
name: retrieve_data
arguments: data_label: D98
data_type: string
name: retrieve_data
arguments: data_label: D8
data_type: string
name: retrieve_data
arguments: data_label: D115
data_type: string
name: retrieve_data
arguments: data_label: D21
data_type: string
name: retrieve_data
arguments: data_label: D133
data_type: string
name: retrieve_data
arguments: data_label: D57
data_type: string
name: retrieve_data
arguments: data_label: D125
data_type: string

tool: D106: r

tool: D79: fncval.dat

tool: D36: Cosine and Sine Integrals

tool: D60: Data not found in fncval.dat


tool: D71: Data file fncval.dat not found


tool: D135: %d %*s

tool: D11: 
%s


tool: D98: si(x)

tool: D8: actual

tool: D115: ci(x)

tool: D21: x

tool: D133: %5s %12s %12s %12s %12s 


tool: D57: %f %f %f

tool: D125: %6.2f %12.6f %12.6f %12.6f %12.6f


assistant: ```c
int main(void) {
  char txt[80];
  int i, nval;
  float ci, si, x, xci, xsi;
  FILE *fp;
  if ((fp = fopen("fncval.dat", "r")) == NULL)
    nrerror("Data file fncval.dat not found\n");
  fgets(txt, 80, fp);
  while (strncmp(txt, "Cosine and Sine Integrals", 25)) {
    fgets(txt, 80, fp);
    if (feof(fp))
      nrerror("Data not found in fncval.dat\n");
  }
  fscanf(fp, "%d %*s", &nval);
  printf("\n%s\n", txt);
  printf("%5s %12s %12s %12s %12s \n", "x", "actual", "ci(x)", "actual", "si(x)");
  for (i = 1; i <= nval; i++) {
    fscanf(fp, "%f %f %f", &x, &xci, &xsi);
    cisi(x, &ci, &si);
    printf("%6.2f %12.6f %12.6f %12.6f %12.6f\n", x, xci, ci, xsi, si);
  }
  fclose(fp);
  return 0;
}
```