user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  lea    D107(%rip),%rsi
  lea    D3(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L51
L9:
  lea    0x20(%rsp),%r12
  mov    %rbp,%rdx
  mov    $0x50,%esi
  mov    %r12,%rdi
  lea    D51(%rip),%rbx
  lea    D2(%rip),%r13
  call   <fgets@plt>
  jmp    L31
  nopl   0x0(%rax)
L64:
  mov    %r12,%rdi
  mov    %rbp,%rdx
  mov    $0x50,%esi
  call   <fgets@plt>
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %rax,%rax
  jne    L85
L31:
  mov    $0x1b,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L64
  lea    0x10(%rsp),%rdx
  lea    D129(%rip),%rsi
  mov    %rbp,%rdi
  call   <fscanf@plt>
  mov    %r12,%rsi
  lea    D58(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D0(%rip),%r8
  xor    %eax,%eax
  lea    D91(%rip),%rcx
  lea    D67(%rip),%rdx
  lea    D6(%rip),%rsi
  lea    D60(%rip),%rdi
  call   <printf@plt>
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jle    L44
  mov    $0x1,%r12d
  lea    0x18(%rsp),%r8
  lea    0x1c(%rsp),%r15
  lea    0x14(%rsp),%r14
  lea    D99(%rip),%r13
  lea    D39(%rip),%rbx
  nopl   0x0(%rax)
L42:
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %r8,0x8(%rsp)
  add    $0x1,%r12d
  call   <fscanf@plt>
  mov    0x14(%rsp),%edi
  movss  0x1c(%rsp),%xmm0
  call   <bessi@plt>
  mov    0x14(%rsp),%esi
  pxor   %xmm1,%xmm1
  mov    %rbx,%rdi
  movapd %xmm0,%xmm2
  mov    $0x3,%eax
  pxor   %xmm0,%xmm0
  cvtss2sd 0x18(%rsp),%xmm1
  cvtss2sd 0x1c(%rsp),%xmm0
  call   <printf@plt>
  cmp    %r12d,0x10(%rsp)
  mov    0x8(%rsp),%r8
  jge    L42
L44:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x88,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L85:
  mov    %r13,%rdi
  call   <nrerror@plt>
  jmp    L31
L51:
  lea    D125(%rip),%rdi
  call   <nrerror@plt>
  jmp    L9
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D107
data_type: string
name: unpack_data
arguments: label: D3
data_type: string
name: unpack_data
arguments: label: D51
data_type: string
name: unpack_data
arguments: label: D2
data_type: string
name: unpack_data
arguments: label: D129
data_type: string
name: unpack_data
arguments: label: D58
data_type: string
name: unpack_data
arguments: label: D0
data_type: string
name: unpack_data
arguments: label: D91
data_type: string
name: unpack_data
arguments: label: D67
data_type: string
name: unpack_data
arguments: label: D6
data_type: string
name: unpack_data
arguments: label: D60
data_type: string
name: unpack_data
arguments: label: D99
data_type: string
name: unpack_data
arguments: label: D39
data_type: string
name: unpack_data
arguments: label: D125
data_type: string

tool: D107: r

tool: D3: fncval.dat

tool: D51: Modified Bessel Function In

tool: D2: Data not found in fncval.dat


tool: D129: %d %*s

tool: D58: 
%s


tool: D0: bessi(n,x)

tool: D91: actual

tool: D67: x

tool: D6: n

tool: D60: %4s %7s %15s %20s


tool: D99: %d %f %f

tool: D39: %4d %8.2f %18.7e %18.7e


tool: D125: Data file fncval.dat not found


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, "Modified Bessel Function In", 27)) {
    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 %20s\n", "n", "x", "actual", "bessi(n,x)");
  for (i = 1; i <= nval; i++) {
    fscanf(fp, "%d %f %f", &n, &x, &val);
    printf("%4d %8.2f %18.7e %18.7e\n", n, x, val, bessi(n, x));
  }
  fclose(fp);
  return 0;
}
```