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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L16:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L16
  sub    $0xe98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x4e88(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  movl   $0x0,0x58(%rsp)
  lea    D46(%rip),%rsi
  lea    D1(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <filelength@plt>
  mov    %rax,%r13
  lea    0x60(%rsp),%r14
  mov    %r14,%rdx
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <char_n@plt>
  mov    %eax,%r12d
  mov    $0x0,%ecx
  mov    %r14,%rdx
  mov    $0x48,%esi
  mov    %rbp,%rdi
  call   <row_num@plt>
  movsbl %r12b,%r12d
  mov    %r12d,%edx
  mov    %r14,%rsi
  lea    D45(%rip),%rdi
  call   <nth_delimiter@plt>
  mov    %rsp,%rbx
  push   %rax
  push   %r12
  lea    0x2780(%rsp),%r9
  mov    %r14,%r8
  mov    $0x43,%ecx
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <manasymbols@plt>
  lea    D92(%rip),%rdi
  call   <puts@plt>
  lea    0x28(%rsp),%r15
  mov    %rbx,%rsp
  lea    D63(%rip),%r14
L19:
  mov    (%rbx),%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    %r15,%rbx
  jne    L19
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x60(%rsp),%r14
  mov    $0x0,%ecx
  mov    %r14,%rdx
  mov    $0x48,%esi
  mov    %rbp,%rdi
  call   <row_num@plt>
  mov    %r12d,%edx
  mov    %r14,%rsi
  lea    D94(%rip),%rdi
  call   <nth_delimiter@plt>
  lea    0x20(%rsp),%rbx
  push   %rax
  push   %r12
  lea    0x2780(%rsp),%r9
  mov    %r14,%r8
  mov    $0x43,%ecx
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <rarities@plt>
  lea    D18(%rip),%rdi
  call   <puts@plt>
  lea    0x48(%rsp),%r15
  add    $0x10,%rsp
  lea    D63(%rip),%r14
L10:
  mov    (%rbx),%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    %rbx,%r15
  jne    L10
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x60(%rsp),%r14
  mov    $0x0,%ecx
  mov    %r14,%rdx
  mov    $0x48,%esi
  mov    %rbp,%rdi
  call   <row_num@plt>
  mov    %r12d,%edx
  mov    %r14,%rsi
  lea    D23(%rip),%rdi
  call   <nth_delimiter@plt>
  lea    0x40(%rsp),%rbx
  push   %rax
  push   %r12
  lea    0x2780(%rsp),%r9
  mov    %r14,%r8
  mov    $0x43,%ecx
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <types@plt>
  lea    D66(%rip),%rdi
  call   <puts@plt>
  lea    0x6c(%rsp),%r13
  add    $0x10,%rsp
  lea    D63(%rip),%r12
L33:
  mov    (%rbx),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    %r13,%rbx
  jne    L33
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x4e88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x4e98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D46
data_type: string
name: parse_data
arguments: label: D1
data_type: string
name: parse_data
arguments: label: D45
data_type: string
name: parse_data
arguments: label: D92
data_type: string
name: parse_data
arguments: label: D63
data_type: string
name: parse_data
arguments: label: D94
data_type: string
name: parse_data
arguments: label: D18
data_type: string
name: parse_data
arguments: label: D23
data_type: string
name: parse_data
arguments: label: D66
data_type: string

tool: D46: r

tool: D1: ../../test/sample.mc

tool: D45: manaCost

tool: D92: 
Manasymbols:

tool: D63:  %d 

tool: D94: rarity

tool: D18: 
Rarities:

tool: D23: types

tool: D66: 
Types:

assistant: ```c
void main() {
  int del_pos = 1;
  int del_count;
  int symbol_counts[6] = {0};
  int rarity_counts[6] = {0};
  int types_counts[7] = {0};
  int i;
  char header_row = 'H';
  char card_row = 'C';
  char buf[10000];
  char substring[10000];
  char delimiter;
  char *mana_heading = "manaCost";
  char *rarity_heading = "rarity";
  char *types_heading = "types";
  FILE *fp;
  long length;
  fp = fopen("../../test/sample.mc", "r");
  length = filelength(fp);
  delimiter = char_n(fp, del_pos, buf);
  row_num(fp, header_row, buf, 0);
  del_count = nth_delimiter(mana_heading, buf, delimiter);
  manasymbols(fp, length, symbol_counts, card_row, buf, substring, delimiter, del_count);
  printf("\nManasymbols:\n");
  for (i = 0; i < (sizeof(symbol_counts) / sizeof(int)); i++) {
    printf(" %d ", symbol_counts[i]);
  }
  printf("\n");
  row_num(fp, header_row, buf, 0);
  del_count = nth_delimiter(rarity_heading, buf, delimiter);
  rarities(fp, length, rarity_counts, card_row, buf, substring, delimiter, del_count);
  printf("\nRarities:\n");
  for (i = 0; i < (sizeof(rarity_counts) / sizeof(int)); i++) {
    printf(" %d ", rarity_counts[i]);
  }
  printf("\n");
  row_num(fp, header_row, buf, 0);
  del_count = nth_delimiter(types_heading, buf, delimiter);
  types(fp, length, types_counts, card_row, buf, substring, delimiter, del_count);
  printf("\nTypes:\n");
  for (i = 0; i < (sizeof(types_counts) / sizeof(int)); i++) {
    printf(" %d ", types_counts[i]);
  }
  printf("\n");
  fclose(fp);
}
```