user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x2,%edi
  jne    L14
  mov    0x8(%rsi),%rbp
  mov    %rsi,%rbx
  cmpb   $0x2d,0x0(%rbp)
  je     L14
  mov    %rbp,%rdi
  call   <filename2varname@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L91
  lea    D8(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L39
  mov    %r15,%rsi
  lea    D45(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
  mov    $0x1,%ebx
  lea    D66(%rip),%r14
  jmp    L0
  nopl   (%rax)
L74:
  cmp    $0x10,%ebx
  je     L119
L147:
  mov    %ebp,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  add    $0x1,%r12
  call   <printf@plt>
L0:
  mov    %r13,%rdi
  call   <getc@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  js     L55
  test   %r12,%r12
  je     L74
  mov    $0x2c,%edi
  call   <putchar@plt>
  cmp    $0x10,%ebx
  jne    L147
L119:
  mov    $0xa,%edi
  mov    $0x1,%ebx
  call   <putchar@plt>
  jmp    L147
L14:
  lea    D83(%rip),%rdi
  call   <puts@plt>
  lea    D10(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
L46:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L55:
  test   %r12,%r12
  jne    L88
L68:
  lea    D48(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdx
  mov    %r15,%rsi
  xor    %eax,%eax
  lea    D0(%rip),%rdi
  call   <printf@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    %r15,%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L46
L88:
  mov    $0x2c,%edi
  call   <putchar@plt>
  jmp    L68
L91:
  lea    D85(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L46
L39:
  mov    0x8(%rbx),%rsi
  lea    D72(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x3,%eax
  jmp    L46
```

tool_calls: name: parse_data
arguments: label: D8
datatype: string
name: parse_data
arguments: label: D45
datatype: string
name: parse_data
arguments: label: D66
datatype: string
name: parse_data
arguments: label: D83
datatype: string
name: parse_data
arguments: label: D10
datatype: string
name: parse_data
arguments: label: D48
datatype: string
name: parse_data
arguments: label: D0
datatype: string
name: parse_data
arguments: label: D85
datatype: string
name: parse_data
arguments: label: D72
datatype: string

tool: D8: rb

tool: D45: unsigned char %s[] = {


tool: D66: 0x%02X

tool: D83: file2c transforms a data file into C code. Copyright (C) Mateusz Viste 2014

tool: D10: Usage: file2c file.dat

tool: D48: 0x00};

tool: D0: long %s_len = %ldl;


tool: D85: Error: unable to parse filename.

tool: D72: Error: failed to open '%s'.


assistant: ```c
int main(int argc, char **argv) {
  FILE *fd;
  int bytebuff, column = 1;
  long bytecount = 0;
  char *varname, *filename;
  if ((argc != 2) || (argv[1][0] == '-')) {
    puts("file2c transforms a data file into C code. Copyright (C) Mateusz Viste 2014");
    puts("Usage: file2c file.dat");
    return (1);
  }
  filename = argv[1];
  varname = filename2varname(filename);
  if (varname == NULL) {
    puts("Error: unable to parse filename.");
    return (2);
  }
  fd = fopen(filename, "rb");
  if (fd == NULL) {
    printf("Error: failed to open '%s'.\n", argv[1]);
    return (3);
  }
  printf("unsigned char %s[] = {\n", varname);
  for (;;) {
    bytebuff = getc(fd);
    if (bytebuff < 0)
      break;
    if (bytecount > 0)
      printf(",");
    if (column > 15) {
      column = 1;
      printf("\n");
    }
    column += 1;
    bytecount += 1;
    printf("0x%02X", bytebuff);
  }
  if (bytecount > 0)
    printf(",");
  printf("0x00};\n");
  printf("long %s_len = %ldl;\n", varname, bytecount);
  fclose(fd);
  free(varname);
  return (0);
}
```