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    D109(%rip),%rsi
  lea    D79(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L78
L55:
  lea    0x10(%rsp),%rdi
  mov    %rbx,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  lea    D106(%rip),%r12
  lea    0x10(%rsp),%rbp
  lea    D61(%rip),%r13
L79:
  mov    $0xf,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L7
  mov    %rbx,%rdx
  mov    $0x50,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    %rbx,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L79
  mov    %r13,%rdi
  call   <nrerror@plt>
  jmp    L79
L78:
  lea    D21(%rip),%rdi
  call   <nrerror@plt>
  jmp    L55
L7:
  lea    0x4(%rsp),%rdx
  lea    D77(%rip),%rsi
  mov    %rbx,%rdi
  call   <fscanf@plt>
  lea    0x10(%rsp),%rsi
  lea    D62(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D93(%rip),%rcx
  lea    D37(%rip),%rdx
  lea    D101(%rip),%rsi
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,0x4(%rsp)
  jle    L4
  mov    $0x1,%ebp
  lea    0x8(%rsp),%r15
  lea    0xc(%rsp),%r14
  lea    D36(%rip),%r13
  lea    D71(%rip),%r12
L20:
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  movss  0xc(%rsp),%xmm0
  call   <dawson@plt>
  movapd %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x8(%rsp),%xmm1
  mov    %r12,%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  add    $0x1,%ebp
  cmp    %ebp,0x4(%rsp)
  jge    L20
L4:
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  mov    $0x0,%eax
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L60:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D109
type: string
name: disassemble_data
arguments: data_tag: D79
type: string
name: disassemble_data
arguments: data_tag: D106
type: string
name: disassemble_data
arguments: data_tag: D61
type: string
name: disassemble_data
arguments: data_tag: D21
type: string
name: disassemble_data
arguments: data_tag: D77
type: string
name: disassemble_data
arguments: data_tag: D62
type: string
name: disassemble_data
arguments: data_tag: D93
type: string
name: disassemble_data
arguments: data_tag: D37
type: string
name: disassemble_data
arguments: data_tag: D101
type: string
name: disassemble_data
arguments: data_tag: D0
type: string
name: disassemble_data
arguments: data_tag: D36
type: string
name: disassemble_data
arguments: data_tag: D71
type: string

tool: D109: r

tool: D79: fncval.dat

tool: D106: Dawson integral

tool: D61: Data not found in fncval.dat


tool: D21: Data file fncval.dat not found


tool: D77: %d %*s

tool: D62: 
%s


tool: D93: dawson(x)

tool: D37: actual

tool: D101: x

tool: D0: %5s %12s %11s 


tool: D36: %f %f

tool: D71: %6.2f %12.6f %12.6f


assistant: ```c
int main(void) {
  char txt[80];
  int i, nval;
  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, "Dawson integral", 15)) {
    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 %11s \n", "x", "actual", "dawson(x)");
  for (i = 1; i <= nval; i++) {
    fscanf(fp, "%f %f", &x, &val);
    printf("%6.2f %12.6f %12.6f\n", x, val, dawson(x));
  }
  fclose(fp);
  return 0;
}
```