user: 请从给定的汇编指令推导出C源代码:

```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    D51(%rip),%rsi
  lea    D6(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L77
L12:
  lea    0x20(%rsp),%rdi
  mov    %rbx,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  lea    D32(%rip),%r12
  lea    0x20(%rsp),%rbp
  lea    D98(%rip),%r13
L59:
  mov    $0x11,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L52
  mov    %rbx,%rdx
  mov    $0x50,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    %rbx,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L59
  mov    %r13,%rdi
  call   <nrerror@plt>
  jmp    L59
L77:
  lea    D21(%rip),%rdi
  call   <nrerror@plt>
  jmp    L12
L52:
  lea    0x8(%rsp),%rdx
  lea    D118(%rip),%rsi
  mov    %rbx,%rdi
  call   <fscanf@plt>
  lea    0x20(%rsp),%rsi
  lea    D85(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D41(%rip),%r9
  lea    D34(%rip),%r8
  lea    D90(%rip),%rcx
  mov    %r8,%rdx
  lea    D130(%rip),%rsi
  lea    D95(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L30
  mov    $0x1,%ebp
  lea    0x18(%rsp),%r15
  lea    0x1c(%rsp),%r14
  lea    D13(%rip),%r13
  lea    D10(%rip),%r12
L14:
  lea    0x14(%rsp),%rdx
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    0xc(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  movss  0x14(%rsp),%xmm0
  call   <frenel@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x14(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd 0xc(%rsp),%xmm4
  pxor   %xmm3,%xmm3
  cvtss2sd 0x18(%rsp),%xmm3
  pxor   %xmm2,%xmm2
  cvtss2sd 0x10(%rsp),%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd 0x1c(%rsp),%xmm1
  mov    %r12,%rdi
  mov    $0x5,%eax
  call   <printf@plt>
  add    $0x1,%ebp
  cmp    %ebp,0x8(%rsp)
  jge    L14
L30:
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    $0x0,%eax
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D51
type: string
name: unpack_data
arguments: data_tag: D6
type: string
name: unpack_data
arguments: data_tag: D32
type: string
name: unpack_data
arguments: data_tag: D98
type: string
name: unpack_data
arguments: data_tag: D21
type: string
name: unpack_data
arguments: data_tag: D118
type: string
name: unpack_data
arguments: data_tag: D85
type: string
name: unpack_data
arguments: data_tag: D41
type: string
name: unpack_data
arguments: data_tag: D34
type: string
name: unpack_data
arguments: data_tag: D90
type: string
name: unpack_data
arguments: data_tag: D130
type: string
name: unpack_data
arguments: data_tag: D95
type: string
name: unpack_data
arguments: data_tag: D13
type: string
name: unpack_data
arguments: data_tag: D10
type: string

tool: D51: r

tool: D6: fncval.dat

tool: D32: Fresnel Integrals

tool: D98: Data not found in fncval.dat


tool: D21: Data file fncval.dat not found


tool: D118: %d %*s

tool: D85: 
%s


tool: D41: s(x)

tool: D34: actual

tool: D90: c(x)

tool: D130: x

tool: D95: %5s %12s %14s %16s %14s 


tool: D13: %f %f %f

tool: D10: %6.2f %15.6e %15.6e %15.6e %15.6e


assistant: ```c
int main(void) {
  char txt[80];
  int i, nval;
  float c, s, x, xc, xs;
  FILE *fp;
  if ((fp = fopen("fncval.dat", "r")) == NULL)
    nrerror("Data file fncval.dat not found\n");
  fgets(txt, 80, fp);
  while (strncmp(txt, "Fresnel Integrals", 17)) {
    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 %14s %16s %14s \n", "x", "actual", "c(x)", "actual", "s(x)");
  for (i = 1; i <= nval; i++) {
    fscanf(fp, "%f %f %f", &x, &xs, &xc);
    frenel(x, &s, &c);
    printf("%6.2f %15.6e %15.6e %15.6e %15.6e\n", x, xs, s, xc, c);
  }
  fclose(fp);
  return 0;
}
```