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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L47
  mov    $0x0,%edi
  call   <parse_syscall_description@plt>
  mov    %eax,-0x1c(%rbp)
  jmp    L4
L47:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  lea    D222(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L25
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <parse_syscall_description@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  jmp    L4
L25:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L4:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L33
  lea    D57(%rip),%rax
  mov    %rax,%rsi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L58
  lea    D363(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L58:
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <print_head@plt>
  mov    -0x8(%rbp),%rax
  lea    D352(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D326(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D116(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D201(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D170(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D113(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D240(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D170(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D169(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D170(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D333(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D302(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D170(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D202(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D41(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D170(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D232(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D299(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    $0x0,%eax
  call   <gemdos_table@plt>
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <generate_bindings_old@plt>
  mov    -0x8(%rbp),%rax
  lea    D94(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    $0x0,%eax
  call   <bios_table@plt>
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  mov    $0xd,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <generate_bindings_old@plt>
  mov    -0x8(%rbp),%rax
  lea    D96(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    $0x0,%eax
  call   <xbios_table@plt>
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  mov    $0xe,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <generate_bindings_old@plt>
  mov    -0x8(%rbp),%rax
  lea    D69(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D236(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  lea    D179(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <generate_traps_h@plt>
L33:
  mov    -0x1c(%rbp),%eax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D222
data_type: string
name: extract_symbolic_data
arguments: label: D57
data_type: string
name: extract_symbolic_data
arguments: label: D60
data_type: string
name: extract_symbolic_data
arguments: label: D363
data_type: string
name: extract_symbolic_data
arguments: label: D352
data_type: string
name: extract_symbolic_data
arguments: label: D326
data_type: string
name: extract_symbolic_data
arguments: label: D236
data_type: string
name: extract_symbolic_data
arguments: label: D116
data_type: string
name: extract_symbolic_data
arguments: label: D201
data_type: string
name: extract_symbolic_data
arguments: label: D170
data_type: string
name: extract_symbolic_data
arguments: label: D113
data_type: string
name: extract_symbolic_data
arguments: label: D240
data_type: string
name: extract_symbolic_data
arguments: label: D40
data_type: string
name: extract_symbolic_data
arguments: label: D169
data_type: string
name: extract_symbolic_data
arguments: label: D333
data_type: string
name: extract_symbolic_data
arguments: label: D302
data_type: string
name: extract_symbolic_data
arguments: label: D202
data_type: string
name: extract_symbolic_data
arguments: label: D41
data_type: string
name: extract_symbolic_data
arguments: label: D232
data_type: string
name: extract_symbolic_data
arguments: label: D299
data_type: string
name: extract_symbolic_data
arguments: label: D94
data_type: string
name: extract_symbolic_data
arguments: label: D96
data_type: string
name: extract_symbolic_data
arguments: label: D69
data_type: string
name: extract_symbolic_data
arguments: label: D179
data_type: string
name: extract_symbolic_data
arguments: label: D10
data_type: string

tool: D222: rt

tool: D57: w

tool: D60: ../include/mint/sysbind.h

tool: D363: sysbind.h

tool: D352: #ifndef _MINT_SYSBIND_H


tool: D326: #define _MINT_SYSBIND_H


tool: D236: 


tool: D116: #ifndef _FEATURES_H


tool: D201: # include <features.h>


tool: D170: #endif


tool: D113: #ifndef _MINT_OSTRUCT_H


tool: D240: # include <mint/ostruct.h>


tool: D40: #ifndef _MINT_TRAP1_H


tool: D169: # include <mint/trap1.h>


tool: D333: #ifndef _MINT_TRAP13_H


tool: D302: # include <mint/trap13.h>


tool: D202: #ifndef _MINT_TRAP14_H


tool: D41: # include <mint/trap14.h>


tool: D232: __BEGIN_DECLS


tool: D299: /* GEMDOS */


tool: D94: /* BIOS */


tool: D96: /* XBIOS */


tool: D69: __END_DECLS


tool: D179: #endif /* _MINT_SYSBIND_H */


tool: D10: ../include/mint

assistant: ```c
int main(int argc, char **argv) {
  const char *myname = *argv++;
  int error;
  if (*argv == NULL) {
    error = parse_syscall_description(NULL);
  } else {
    FILE *f;
    f = fopen(*argv, "rt");
    if (f) {
      error = parse_syscall_description(f);
      fclose(f);
    } else {
      perror(*argv);
      exit(1);
    }
  }
  if (!error) {
    FILE *f;
    f = fopen("../include/mint/sysbind.h", "w");
    if (!f) {
      perror("sysbind.h");
      exit(1);
    }
    print_head(f, myname);
    fprintf(f, "#ifndef _MINT_SYSBIND_H\n");
    fprintf(f, "#define _MINT_SYSBIND_H\n");
    fprintf(f, "\n");
    fprintf(f, "#ifndef _FEATURES_H\n");
    fprintf(f, "# include <features.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "\n");
    fprintf(f, "#ifndef _MINT_OSTRUCT_H\n");
    fprintf(f, "# include <mint/ostruct.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "\n");
    fprintf(f, "#ifndef _MINT_TRAP1_H\n");
    fprintf(f, "# include <mint/trap1.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "#ifndef _MINT_TRAP13_H\n");
    fprintf(f, "# include <mint/trap13.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "#ifndef _MINT_TRAP14_H\n");
    fprintf(f, "# include <mint/trap14.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "\n");
    fprintf(f, "__BEGIN_DECLS\n");
    fprintf(f, "\n");
    fprintf(f, "/* GEMDOS */\n");
    fprintf(f, "\n");
    generate_bindings_old(f, gemdos_table(), 1);
    fprintf(f, "/* BIOS */\n");
    fprintf(f, "\n");
    generate_bindings_old(f, bios_table(), 13);
    fprintf(f, "/* XBIOS */\n");
    fprintf(f, "\n");
    generate_bindings_old(f, xbios_table(), 14);
    fprintf(f, "__END_DECLS\n");
    fprintf(f, "\n");
    fprintf(f, "#endif /* _MINT_SYSBIND_H */\n");
    fclose(f);
    generate_traps_h("../include/mint");
  }
  return error;
}
```