user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r15
  lea    D33(%rip),%rsi
  lea    D145(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L46
L24:
  lea    0x30(%rsp),%r12
  mov    %rbp,%rdx
  mov    $0x50,%esi
  mov    %r12,%rdi
  lea    D120(%rip),%rbx
  lea    D52(%rip),%r13
  call   <fgets@plt>
  jmp    L72
  nopl   0x0(%rax)
L57:
  mov    %r12,%rdi
  mov    %rbp,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %rax,%rax
  jne    L6
L72:
  mov    $0x18,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L57
  lea    0x1c(%rsp),%rdx
  lea    D14(%rip),%rsi
  mov    %rbp,%rdi
  call   <fscanf@plt>
  mov    %r12,%rsi
  lea    D107(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D89(%rip),%r9
  xor    %eax,%eax
  lea    D94(%rip),%r8
  lea    D126(%rip),%rcx
  lea    D71(%rip),%rdx
  lea    D124(%rip),%rsi
  lea    D48(%rip),%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L17
  mov    $0x1,%ebx
  lea    0x2c(%rsp),%r9
  lea    0x28(%rsp),%r15
  lea    0x24(%rsp),%r14
  lea    0x20(%rsp),%r13
  lea    D131(%rip),%r12
  nopl   0x0(%rax,%rax,1)
L86:
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %rbp,%rdi
  lea    D121(%rip),%rsi
  xor    %eax,%eax
  mov    %r9,0x8(%rsp)
  add    $0x1,%ebx
  call   <fscanf@plt>
  movss  0x28(%rsp),%xmm2
  movss  0x24(%rsp),%xmm1
  movss  0x20(%rsp),%xmm0
  call   <betai@plt>
  pxor   %xmm3,%xmm3
  pxor   %xmm2,%xmm2
  mov    %r12,%rdi
  movapd %xmm0,%xmm4
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  mov    $0x5,%eax
  cvtss2sd 0x20(%rsp),%xmm0
  cvtss2sd 0x2c(%rsp),%xmm3
  cvtss2sd 0x28(%rsp),%xmm2
  cvtss2sd 0x24(%rsp),%xmm1
  call   <printf@plt>
  cmp    %ebx,0x1c(%rsp)
  mov    0x8(%rsp),%r9
  jge    L86
L17:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L85
  add    $0x98,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L6:
  mov    %r13,%rdi
  call   <nrerror@plt>
  jmp    L72
L46:
  lea    D142(%rip),%rdi
  call   <nrerror@plt>
  jmp    L24
L85:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D33
datatype: string
name: unpack_data
arguments: label: D145
datatype: string
name: unpack_data
arguments: label: D120
datatype: string
name: unpack_data
arguments: label: D52
datatype: string
name: unpack_data
arguments: label: D14
datatype: string
name: unpack_data
arguments: label: D107
datatype: string
name: unpack_data
arguments: label: D89
datatype: string
name: unpack_data
arguments: label: D94
datatype: string
name: unpack_data
arguments: label: D126
datatype: string
name: unpack_data
arguments: label: D71
datatype: string
name: unpack_data
arguments: label: D124
datatype: string
name: unpack_data
arguments: label: D48
datatype: string
name: unpack_data
arguments: label: D131
datatype: string
name: unpack_data
arguments: label: D121
datatype: string
name: unpack_data
arguments: label: D142
datatype: string

tool: D33: r

tool: D145: fncval.dat

tool: D120: Incomplete Beta Function

tool: D52: Data not found in fncval.dat


tool: D14: %d %*s

tool: D107: 
%s


tool: D89: betai(x)

tool: D94: actual

tool: D126: x

tool: D71: b

tool: D124: a

tool: D48: %5s %10s %12s %14s %13s 


tool: D131: %6.2f %12.6f %12.6f %12.6f %12.6f


tool: D121: %f %f %f %f

tool: D142: Data file fncval.dat not found


assistant: ```c
int main(void) {
  char txt[80];
  int i, nval;
  float a, b, 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, "Incomplete Beta Function", 24)) {
    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 %10s %12s %14s %13s \n", "a", "b", "x", "actual", "betai(x)");
  for (i = 1; i <= nval; i++) {
    fscanf(fp, "%f %f %f %f", &a, &b, &x, &val);
    printf("%6.2f %12.6f %12.6f %12.6f %12.6f\n", a, b, x, val, betai(a, b, x));
  }
  fclose(fp);
  return 0;
}
```