user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x358,%rsp
  mov    %edi,%ebx
  mov    %edi,0x4(%rsp)
  mov    %rsi,%r15
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x348(%rsp)
  xor    %eax,%eax
  lea    D30(%rip),%rsi
  lea    D16(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  movl   $0x1,0x18(%rsp)
  movl   $0xf4240,0x1c(%rsp)
  mov    %rax,%rdi
  call   <assert@plt>
  cmp    $0x1,%ebx
  jle    L146
  mov    %ebx,%eax
  lea    0x8(%r15),%rbx
  lea    -0x2(%rax),%eax
  lea    0x10(%r15,%rax,8),%rbp
  lea    D26(%rip),%r12
  jmp    L116
L3:
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  je     L146
L116:
  mov    (%rbx),%rdi
  cmpb   $0x2d,(%rdi)
  jne    L3
  lea    0x1c(%rsp),%rcx
  lea    0x18(%rsp),%rdx
  add    $0x1,%rdi
  mov    %r12,%rsi
  call   <sscanf@plt>
  jmp    L3
L146:
  mov    0x4(%rsp),%eax
  lea    -0x2(%rax),%eax
  mov    0x8(%rsp),%rcx
  lea    0x10(%rcx,%rax,8),%r13
  lea    0x20(%rsp),%r12
  lea    D30(%rip),%r15
L40:
  mov    %r14,%rdx
  mov    $0x320,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L94
  cmpb   $0x2a,0x20(%rsp)
  je     L10
  mov    %r12,%rsi
  lea    D7(%rip),%rdi
  call   <printf@plt>
  jmp    L40
L10:
  mov    0x8(%rsp),%rax
  lea    0x8(%rax),%rbp
  cmpl   $0x1,0x4(%rsp)
  jg     L19
  jmp    L40
L4:
  mov    0x1c(%rsp),%edx
  mov    0x18(%rsp),%esi
  mov    %r12,%rdi
  call   <csv_to_ades@plt>
L34:
  mov    %rbx,%rdx
  mov    $0x320,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L4
L39:
  mov    %rbx,%rdi
  call   <fclose@plt>
L66:
  add    $0x8,%rbp
  cmp    %r13,%rbp
  je     L40
L19:
  mov    0x0(%rbp),%rdi
  cmpb   $0x2d,(%rdi)
  je     L66
  mov    %r15,%rsi
  call   <fopen@plt>
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <assert@plt>
  mov    %rbx,%rdx
  mov    $0x320,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L39
  jmp    L34
L94:
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    0x348(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L117
  mov    $0x0,%eax
  add    $0x358,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L117:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D30
type: string
name: unpack_data
arguments: label: D16
type: string
name: unpack_data
arguments: label: D26
type: string
name: unpack_data
arguments: label: D7
type: string

tool: D30: rb

tool: D16: gaia.hdr

tool: D26: %d,%d

tool: D7: %s

assistant: ```c
int main(const int argc, const char **argv) {
  FILE *hdr_file = fopen("gaia.hdr", "rb");
  char buff[800];
  int i, low_num = 1, high_num = 1000000;
  assert(hdr_file);
  for (i = 1; i < argc; i++)
    if (argv[i][0] == '-')
      sscanf(argv[i] + 1, "%d,%d", &low_num, &high_num);
  while (fgets(buff, sizeof(buff), hdr_file))
    if (*buff != '*')
      printf("%s", buff);
    else
      for (i = 1; i < argc; i++)
        if (argv[i][0] != '-') {
          FILE *ifile = fopen(argv[i], "rb");
          assert(ifile);
          if (fgets(buff, sizeof(buff), ifile))
            while (fgets(buff, sizeof(buff), ifile))
              csv_to_ades(buff, low_num, high_num);
          fclose(ifile);
        }
  fclose(hdr_file);
  return (0);
}
```