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

```asm
<gen_parser>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  call   <gen_known@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <gen_non_term@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <gen_goto@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <gen_states@plt>
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <gen_reduce@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <gen_free@plt>
  mov    %r12,%rcx
  mov    $0x15,%edx
  mov    $0x1,%esi
  lea    D23(%rip),%rdi
  call   <fwrite@plt>
  mov    %r13,%rdx
  mov    %r12,%rdi
  xor    %eax,%eax
  lea    D42(%rip),%rsi
  call   <fprintf@plt>
  mov    %r12,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D94(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x1d,%edx
  mov    $0x1,%esi
  lea    D27(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x1e,%edx
  mov    $0x1,%esi
  lea    D12(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x37,%edx
  mov    $0x1,%esi
  lea    D72(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x46,%edx
  mov    $0x1,%esi
  lea    D101(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x24,%edx
  mov    $0x1,%esi
  lea    D89(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x55,%edx
  mov    $0x1,%esi
  lea    D77(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D91(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0xc,%edx
  mov    $0x1,%esi
  lea    D106(%rip),%rdi
  call   <fwrite@plt>
  pop    %rbp
  mov    %r12,%rcx
  mov    $0x3,%edx
  pop    %r12
  mov    $0x1,%esi
  lea    D39(%rip),%rdi
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1120 <fwrite@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D23
type_guessed: string
name: disassemble_data
arguments: data_label: D42
type_guessed: string
name: disassemble_data
arguments: data_label: D94
type_guessed: string
name: disassemble_data
arguments: data_label: D27
type_guessed: string
name: disassemble_data
arguments: data_label: D12
type_guessed: string
name: disassemble_data
arguments: data_label: D72
type_guessed: string
name: disassemble_data
arguments: data_label: D101
type_guessed: string
name: disassemble_data
arguments: data_label: D89
type_guessed: string
name: disassemble_data
arguments: data_label: D77
type_guessed: string
name: disassemble_data
arguments: data_label: D91
type_guessed: string
name: disassemble_data
arguments: data_label: D106
type_guessed: string
name: disassemble_data
arguments: data_label: D39
type_guessed: string

tool: D23: #line 0 "gen_parser"


tool: D42: void *parse_%s(struct code_node *code, struct token_config *config, FILE *trace)


tool: D94: {


tool: D27: 	struct token_state *tokens;


tool: D12: 	config->words_marks = known;


tool: D72: 	config->known_count = sizeof(known)/sizeof(known[0]);


tool: D101: 	config->ignored |= (1 << TK_line_comment) | (1 << TK_block_comment);


tool: D89: 	tokens = token_open(code, config);


tool: D77: 	void *rv = parser_run(tokens, states, do_reduce, do_free, trace, non_term, config);


tool: D91: 	token_close(tokens);


tool: D106: 	return rv;


tool: D39: }



assistant: ```c
void gen_parser(FILE *f, struct grammar *g, char *file, char *name, struct code_node *pre_reduce) {
  gen_known(f, g);
  gen_non_term(f, g);
  gen_goto(f, g);
  gen_states(f, g);
  gen_reduce(f, g, file, pre_reduce);
  gen_free(f, g);
  fprintf(f, "#line 0 \"gen_parser\"\n");
  fprintf(f, "void *parse_%s(struct code_node *code, struct token_config *config, FILE *trace)\n", name);
  fprintf(f, "{\n");
  fprintf(f, "\tstruct token_state *tokens;\n");
  fprintf(f, "\tconfig->words_marks = known;\n");
  fprintf(f, "\tconfig->known_count = sizeof(known)/sizeof(known[0]);\n");
  fprintf(f, "\tconfig->ignored |= (1 << TK_line_comment) | (1 << TK_block_comment);\n");
  fprintf(f, "\ttokens = token_open(code, config);\n");
  fprintf(f, "\tvoid *rv = parser_run(tokens, states, do_reduce, do_free, trace, non_term, config);\n");
  fprintf(f, "\ttoken_close(tokens);\n");
  fprintf(f, "\treturn rv;\n");
  fprintf(f, "}\n\n");
}
```