user: 下面的汇编指令对应的C源代码是什么:

```asm
<generate_trap_h>:
  endbr64
  push   %r12
  mov    %rdi,%rcx
  mov    %esi,%r8d
  lea    D7(%rip),%rdx
  push   %rbp
  mov    %esi,%r12d
  mov    $0x400,%esi
  sub    $0x418,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <snprintf@plt>
  mov    %rbp,%rdi
  lea    D61(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L22
L19:
  lea    D68(%rip),%rsi
  mov    %rbp,%rdi
  call   <print_head@plt>
  mov    %r12d,%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D44(%rip),%rsi
  call   <fprintf@plt>
  mov    %r12d,%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D54(%rip),%rsi
  call   <fprintf@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D48(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D3(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x7,%edx
  mov    $0x1,%esi
  lea    D116(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0xe,%edx
  mov    $0x1,%esi
  lea    D67(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <generate_traps_as_macros@plt>
  mov    %rbp,%rcx
  mov    $0xc,%edx
  mov    $0x1,%esi
  lea    D76(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %r12d,%edx
  lea    D59(%rip),%rsi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x418,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L22:
  lea    D24(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L19
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D7
data_type: string
name: extract_symbolic_data
arguments: tag: D61
data_type: string
name: extract_symbolic_data
arguments: tag: D68
data_type: string
name: extract_symbolic_data
arguments: tag: D44
data_type: string
name: extract_symbolic_data
arguments: tag: D54
data_type: string
name: extract_symbolic_data
arguments: tag: D48
data_type: string
name: extract_symbolic_data
arguments: tag: D3
data_type: string
name: extract_symbolic_data
arguments: tag: D116
data_type: string
name: extract_symbolic_data
arguments: tag: D67
data_type: string
name: extract_symbolic_data
arguments: tag: D76
data_type: string
name: extract_symbolic_data
arguments: tag: D59
data_type: string
name: extract_symbolic_data
arguments: tag: D24
data_type: string

tool: D7: %s/trap%i.h

tool: D61: w+

tool: D68: gen-syscall

tool: D44: #ifndef _MINT_TRAP%i_H


tool: D54: #define _MINT_TRAP%i_H


tool: D48: #ifndef _COMPILER_H


tool: D3: #include <compiler.h>


tool: D116: #endif


tool: D67: __BEGIN_DECLS


tool: D76: __END_DECLS


tool: D59: #endif /* _MINT_TRAP%i_H */


tool: D24: fopen

assistant: ```c
void generate_trap_h(const char *path, int nr) {
  char buf[1024];
  FILE *f;
  snprintf(buf, sizeof(buf), "%s/trap%i.h", path, nr);
  f = fopen(buf, "w+");
  if (!f) {
    perror("fopen");
    exit(1);
  }
  print_head(f, "gen-syscall");
  fprintf(f, "#ifndef _MINT_TRAP%i_H\n", nr);
  fprintf(f, "#define _MINT_TRAP%i_H\n", nr);
  fprintf(f, "\n");
  fprintf(f, "#ifndef _COMPILER_H\n");
  fprintf(f, "#include <compiler.h>\n");
  fprintf(f, "#endif\n");
  fprintf(f, "\n");
  fprintf(f, "__BEGIN_DECLS\n");
  fprintf(f, "\n");
  if (1)
    generate_traps_as_macros(f, nr);
  else
    generate_trap_protos(f, nr);
  fprintf(f, "__END_DECLS\n");
  fprintf(f, "\n");
  fprintf(f, "#endif /* _MINT_TRAP%i_H */\n", nr);
  fclose(f);
}
```