user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r15
  lea    D32(%rip),%rsi
  lea    D41(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L82
L5:
  lea    0x10(%rsp),%rbx
  mov    %rbp,%rdx
  mov    $0x50,%esi
  mov    %rbx,%rdi
  lea    D67(%rip),%r12
  lea    D57(%rip),%r13
  call   <fgets@plt>
  jmp    L65
  cs nopw 0x0(%rax,%rax,1)
L74:
  mov    %rbx,%rdi
  mov    %rbp,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %rax,%rax
  jne    L47
L65:
  mov    $0xe,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L74
  lea    0x4(%rsp),%rdx
  lea    D72(%rip),%rsi
  mov    %rbp,%rdi
  call   <fscanf@plt>
  lea    D23(%rip),%rdi
  call   <puts@plt>
  lea    D30(%rip),%rcx
  xor    %eax,%eax
  lea    D81(%rip),%rdx
  lea    D47(%rip),%rsi
  lea    D114(%rip),%rdi
  call   <printf@plt>
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  jle    L19
  mov    $0x1,%ebx
  lea    0xc(%rsp),%r15
  lea    0x8(%rsp),%r14
  lea    D58(%rip),%r13
  lea    D69(%rip),%r12
  xchg   %ax,%ax
L45:
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <fscanf@plt>
  movss  D2(%rip),%xmm0
  subss  0xc(%rsp),%xmm0
  movss  %xmm0,0xc(%rsp)
  movss  0x8(%rsp),%xmm0
  call   <erffc@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rdi
  mov    $0x3,%eax
  movapd %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm1
  cvtss2sd 0x8(%rsp),%xmm0
  call   <printf@plt>
  cmp    %ebx,0x4(%rsp)
  jge    L45
L19:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  add    $0x78,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L47:
  mov    %r13,%rdi
  call   <nrerror@plt>
  jmp    L65
L82:
  lea    D79(%rip),%rdi
  call   <nrerror@plt>
  jmp    L5
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D32
type_guessed: string
name: disassemble_data
arguments: data_tag: D41
type_guessed: string
name: disassemble_data
arguments: data_tag: D67
type_guessed: string
name: disassemble_data
arguments: data_tag: D57
type_guessed: string
name: disassemble_data
arguments: data_tag: D72
type_guessed: string
name: disassemble_data
arguments: data_tag: D23
type_guessed: string
name: disassemble_data
arguments: data_tag: D30
type_guessed: string
name: disassemble_data
arguments: data_tag: D81
type_guessed: string
name: disassemble_data
arguments: data_tag: D47
type_guessed: string
name: disassemble_data
arguments: data_tag: D114
type_guessed: string
name: disassemble_data
arguments: data_tag: D58
type_guessed: string
name: disassemble_data
arguments: data_tag: D69
type_guessed: string
name: disassemble_data
arguments: data_tag: D2
type_guessed: f32
name: disassemble_data
arguments: data_tag: D79
type_guessed: string

tool: D32: r

tool: D41: fncval.dat

tool: D67: Error Function

tool: D57: Data not found in fncval.dat


tool: D72: %d %*s

tool: D23: 
complementary error function

tool: D30: erfc(x)

tool: D81: actual

tool: D47: x

tool: D114: %5s %12s %13s


tool: D58: %f %f

tool: D69: %6.2f %12.7f %12.7f


tool: D2: 1

tool: D79: Data file fncval.dat not found


assistant: ```c
int main(void) {
  char txt[80];
  int i, nval;
  float x, val;
  FILE *fp;
  if ((fp = fopen("fncval.dat", "r")) == NULL)
    nrerror("Data file fncval.dat not found\n");
  fgets(txt, 80, fp);
  while (strncmp(txt, "Error Function", 14)) {
    fgets(txt, 80, fp);
    if (feof(fp))
      nrerror("Data not found in fncval.dat\n");
  }
  fscanf(fp, "%d %*s", &nval);
  printf("\ncomplementary error function\n");
  printf("%5s %12s %13s\n", "x", "actual", "erfc(x)");
  for (i = 1; i <= nval; i++) {
    fscanf(fp, "%f %f", &x, &val);
    val = 1.0 - val;
    printf("%6.2f %12.7f %12.7f\n", x, val, erffc(x));
  }
  fclose(fp);
  return 0;
}
```