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    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    D99(%rip),%rsi
  lea    D3(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L10
L61:
  lea    0x10(%rsp),%rdi
  mov    %rbx,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  lea    D113(%rip),%r12
  lea    0x10(%rsp),%rbp
  lea    D116(%rip),%r13
L22:
  mov    $0x17,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L76
  mov    %rbx,%rdx
  mov    $0x50,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    %rbx,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L22
  mov    %r13,%rdi
  call   <nrerror@plt>
  jmp    L22
L10:
  lea    D19(%rip),%rdi
  call   <nrerror@plt>
  jmp    L61
L76:
  mov    %rsp,%rdx
  lea    D105(%rip),%rsi
  mov    %rbx,%rdi
  call   <fscanf@plt>
  lea    0x10(%rsp),%rsi
  lea    D123(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D103(%rip),%r8
  lea    D97(%rip),%rcx
  lea    D35(%rip),%rdx
  lea    D86(%rip),%rsi
  lea    D78(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,(%rsp)
  jle    L43
  mov    $0x1,%ebp
  lea    0x8(%rsp),%r15
  lea    0xc(%rsp),%r14
  lea    D89(%rip),%r13
  lea    D101(%rip),%r12
L33:
  lea    0x4(%rsp),%rdx
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  movss  0xc(%rsp),%xmm0
  mov    0x4(%rsp),%edi
  call   <expint@plt>
  movapd %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x8(%rsp),%xmm1
  mov    0x4(%rsp),%esi
  mov    %r12,%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  add    $0x1,%ebp
  cmp    %ebp,(%rsp)
  jge    L33
L43:
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  mov    $0x0,%eax
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D99
type_infered: string
name: disassemble_data
arguments: tag: D3
type_infered: string
name: disassemble_data
arguments: tag: D113
type_infered: string
name: disassemble_data
arguments: tag: D116
type_infered: string
name: disassemble_data
arguments: tag: D19
type_infered: string
name: disassemble_data
arguments: tag: D105
type_infered: string
name: disassemble_data
arguments: tag: D123
type_infered: string
name: disassemble_data
arguments: tag: D103
type_infered: string
name: disassemble_data
arguments: tag: D97
type_infered: string
name: disassemble_data
arguments: tag: D35
type_infered: string
name: disassemble_data
arguments: tag: D86
type_infered: string
name: disassemble_data
arguments: tag: D78
type_infered: string
name: disassemble_data
arguments: tag: D89
type_infered: string
name: disassemble_data
arguments: tag: D101
type_infered: string

tool: D99: r

tool: D3: fncval.dat

tool: D113: Exponential Integral En

tool: D116: Data not found in fncval.dat


tool: D19: Data file fncval.dat not found


tool: D105: %d %*s

tool: D123: 
%s


tool: D103: expint(n,x)

tool: D97: actual

tool: D35: x

tool: D86: n

tool: D78: %4s %7s %15s %21s 


tool: D89: %d %f %f

tool: D101: %4d %8.2f %18.6e %18.6e


assistant: ```c
int main(void) {
  char txt[80];
  int i, nval, n;
  float val, x;
  FILE *fp;
  if ((fp = fopen("fncval.dat", "r")) == NULL)
    nrerror("Data file fncval.dat not found\n");
  fgets(txt, 80, fp);
  while (strncmp(txt, "Exponential Integral En", 23)) {
    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("%4s %7s %15s %21s \n", "n", "x", "actual", "expint(n,x)");
  for (i = 1; i <= nval; i++) {
    fscanf(fp, "%d %f %f", &n, &x, &val);
    printf("%4d %8.2f %18.6e %18.6e\n", n, x, val, expint(n, x));
  }
  fclose(fp);
  return 0;
}
```