user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  lea    D16(%rip),%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x358,%rsp
  mov    %edi,0x8(%rsp)
  lea    D3(%rip),%rdi
  mov    %rsi,(%rsp)
  mov    %r15,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x348(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  movl   $0x1,0x18(%rsp)
  mov    %rax,%rdi
  movl   $0xf4240,0x1c(%rsp)
  mov    %rax,%r14
  call   <assert@plt>
  cmp    $0x1,%ebx
  jle    L166
  mov    (%rsp),%rcx
  mov    0x8(%rsp),%eax
  lea    D14(%rip),%rbx
  sub    $0x2,%eax
  lea    0x10(%rcx),%rbp
  lea    0x8(%rcx),%r12
  mov    %eax,0xc(%rsp)
  lea    0x0(%rbp,%rax,8),%r13
  jmp    L137
  nopl   0x0(%rax)
L156:
  add    $0x8,%r12
  cmp    %r13,%r12
  je     L27
L137:
  mov    (%r12),%rdi
  cmpb   $0x2d,(%rdi)
  jne    L156
  lea    0x1c(%rsp),%rcx
  add    $0x1,%rdi
  mov    %rbx,%rsi
  add    $0x8,%r12
  lea    0x18(%rsp),%rdx
  call   <sscanf@plt>
  cmp    %r13,%r12
  jne    L137
  nopl   0x0(%rax)
L27:
  mov    0xc(%rsp),%ebx
  lea    0x20(%rsp),%r12
  lea    0x0(%rbp,%rbx,8),%r13
  xchg   %ax,%ax
L149:
  mov    %r14,%rdx
  mov    $0x320,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L151
  cmpb   $0x2a,0x20(%rsp)
  je     L33
  mov    %r12,%rsi
  lea    D33(%rip),%rdi
  call   <printf@plt>
  jmp    L149
  nopl   0x0(%rax)
L33:
  mov    (%rsp),%rax
  cmpl   $0x1,0x8(%rsp)
  lea    0x8(%rax),%rbx
  jg     L11
  jmp    L149
  nopl   0x0(%rax)
L28:
  mov    %rbp,%rdi
  call   <fclose@plt>
L178:
  add    $0x8,%rbx
  cmp    %rbx,%r13
  je     L149
L11:
  mov    (%rbx),%rdi
  cmpb   $0x2d,(%rdi)
  je     L178
  mov    %r15,%rsi
  call   <fopen@plt>
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <assert@plt>
  mov    %rbp,%rdx
  mov    $0x320,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L28
  jmp    L13
  nopl   0x0(%rax,%rax,1)
L72:
  mov    0x1c(%rsp),%edx
  mov    0x18(%rsp),%esi
  mov    %r12,%rdi
  call   <csv_to_ades@plt>
L13:
  mov    %rbp,%rdx
  mov    $0x320,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L72
  jmp    L28
  nop
L151:
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    0x348(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L144
  add    $0x358,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L166:
  mov    0x8(%rsp),%eax
  sub    $0x2,%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%rax
  lea    0x10(%rax),%rbp
  jmp    L27
L144:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D16
type: string
name: disassemble_data
arguments: data_tag: D3
type: string
name: disassemble_data
arguments: data_tag: D14
type: string
name: disassemble_data
arguments: data_tag: D33
type: string

tool: D16: rb

tool: D3: gaia.hdr

tool: D14: %d,%d

tool: D33: %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);
}
```