user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r15
  lea    D206(%rip),%rdi
  push   %r14
  lea    D56(%rip),%r14
  push   %r13
  lea    D232(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1b8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1a8(%rsp)
  xor    %eax,%eax
  call   <system@plt>
  lea    D271(%rip),%rdi
  call   <system@plt>
  lea    D46(%rip),%rdi
  call   <system@plt>
  lea    D217(%rip),%rdi
  call   <system@plt>
  lea    D299(%rip),%rdi
  call   <system@plt>
  lea    D133(%rip),%rdi
  call   <system@plt>
  lea    D59(%rip),%rdi
  call   <system@plt>
  lea    D102(%rip),%rdi
  call   <system@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L7
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D16(%rip),%rdi
  call   <printf@plt>
  lea    D254(%rip),%rsi
  lea    D276(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L48
L99:
  mov    %r14,%rdi
  mov    %r13,%rsi
  call   <fopen@plt>
  mov    $0x1,%ecx
  lea    D235(%rip),%rdx
  mov    %r12,%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <cofile@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %r14,%rdi
  lea    D262(%rip),%r14
  call   <unlink@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L15
  xor    %ecx,%ecx
  lea    D228(%rip),%rdx
  mov    %r12,%rsi
  mov    %rax,%rdi
  call   <cofile@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %r14,%rdi
  call   <unlink@plt>
L15:
  mov    $0x1,%r14d
  lea    0x10(%rsp),%rbx
  lea    D233(%rip),%r15
  lea    0xe0(%rsp),%rbp
  nopw   0x0(%rax,%rax,1)
L35:
  mov    %r14d,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %r14d,%edx
  lea    D108(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  mov    %r13,%rsi
  call   <fopen@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L108
  xor    %ecx,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rax,0x8(%rsp)
  call   <cofile@plt>
  mov    0x8(%rsp),%rdi
  call   <fclose@plt>
  mov    %r14d,%edi
  mov    %r12,%rsi
  call   <convertlists@plt>
  mov    %rbx,%rdi
  call   <unlink@plt>
L108:
  add    $0x1,%r14d
  cmp    $0x3e8,%r14d
  jne    L35
  lea    D167(%rip),%rdi
  mov    %r12,%r8
  lea    D243(%rip),%rcx
  lea    D235(%rip),%rdx
  lea    D209(%rip),%rsi
  call   <convertlist@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
L119:
  lea    D182(%rip),%rbp
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L2
  call   <fclose@plt>
L62:
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x1a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L105
  add    $0x1b8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L7:
  lea    D276(%rip),%r12
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L95
  lea    D159(%rip),%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L119
L2:
  mov    %rbp,%rdi
  lea    D127(%rip),%rsi
  call   <fopen@plt>
  lea    D28(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L62
L48:
  lea    D176(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L99
L95:
  mov    %r12,%rdi
  lea    D127(%rip),%rsi
  call   <fopen@plt>
  lea    D113(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  lea    D9(%rip),%rsi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  lea    D5(%rip),%rsi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L119
L105:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D206
type_infered: string
name: unpack_data
arguments: data_label: D56
type_infered: string
name: unpack_data
arguments: data_label: D232
type_infered: string
name: unpack_data
arguments: data_label: D271
type_infered: string
name: unpack_data
arguments: data_label: D46
type_infered: string
name: unpack_data
arguments: data_label: D217
type_infered: string
name: unpack_data
arguments: data_label: D299
type_infered: string
name: unpack_data
arguments: data_label: D133
type_infered: string
name: unpack_data
arguments: data_label: D59
type_infered: string
name: unpack_data
arguments: data_label: D102
type_infered: string
name: unpack_data
arguments: data_label: D16
type_infered: string
name: unpack_data
arguments: data_label: D254
type_infered: string
name: unpack_data
arguments: data_label: D276
type_infered: string
name: unpack_data
arguments: data_label: D235
type_infered: string
name: unpack_data
arguments: data_label: D262
type_infered: string
name: unpack_data
arguments: data_label: D228
type_infered: string
name: unpack_data
arguments: data_label: D233
type_infered: string
name: unpack_data
arguments: data_label: D108
type_infered: string
name: unpack_data
arguments: data_label: D167
type_infered: string
name: unpack_data
arguments: data_label: D243
type_infered: string
name: unpack_data
arguments: data_label: D209
type_infered: string
name: unpack_data
arguments: data_label: D182
type_infered: string
name: unpack_data
arguments: data_label: D159
type_infered: string
name: unpack_data
arguments: data_label: D127
type_infered: string
name: unpack_data
arguments: data_label: D28
type_infered: string
name: unpack_data
arguments: data_label: D176
type_infered: string
name: unpack_data
arguments: data_label: D113
type_infered: string
name: unpack_data
arguments: data_label: D9
type_infered: string
name: unpack_data
arguments: data_label: D5
type_infered: string

tool: D206: mv *.LOG log 2>/dev/null

tool: D56: psbnc.ini

tool: D232: r

tool: D271: mv *.LOG.old log 2>/dev/null

tool: D46: mv *.log log 2>/dev/null

tool: D217: mv *.log.old log 2>/dev/null

tool: D299: mv *.TRL log 2>/dev/null

tool: D133: mv *.MOTD motd 2>/dev/null

tool: D59: mv *.MOTD.old motd 2>/dev/null

tool: D102: rm -rf *.INI.old 2>/dev/null

tool: D16: psyBNC2.1 -> psyBNC2.2 Conversion Utility
Checking old Ini-Files


tool: D254: a

tool: D276: psybnc.conf

tool: D235: PSYBNC

tool: D262: LINKS.INI

tool: D228: LINKS

tool: D233: USER%d.INI

tool: D108: USER%d

tool: D167: HOSTALLOWS

tool: D243: psbnc.hosts

tool: D209: ENTRY%d

tool: D182: config.h

tool: D159: Using existent configuration File.


tool: D127: w

tool: D28: /* Empty Config File */


tool: D176: Can't open psybnc.conf, aborting


tool: D113: PSYBNC.SYSTEM.PORT1=31337


tool: D9: PSYBNC.SYSTEM.HOST1=*


tool: D5: PSYBNC.HOSTALLOWS.ENTRY0=*;*


assistant: ```c
int main(int argc, char **argv) {
  int i;
  FILE *handle;
  FILE *fconfif;
  char file[200];
  char sn[200];
  system("mv *.LOG log 2>/dev/null");
  system("mv *.LOG.old log 2>/dev/null");
  system("mv *.log log 2>/dev/null");
  system("mv *.log.old log 2>/dev/null");
  system("mv *.TRL log 2>/dev/null");
  system("mv *.MOTD motd 2>/dev/null");
  system("mv *.MOTD.old motd 2>/dev/null");
  system("rm -rf *.INI.old 2>/dev/null");
  handle = fopen("psbnc.ini", "r");
  if (handle != NULL) {
    fclose(handle);
    printf("psyBNC2.1 -> psyBNC2.2 Conversion Utility\nChecking old Ini-Files\n");
    fconfif = fopen("psybnc.conf", "a");
    if (fconfif == NULL) {
      printf("Can't open psybnc.conf, aborting\n");
      exit(0x1);
    }
    handle = fopen("psbnc.ini", "r");
    cofile(handle, fconfif, "PSYBNC", 1);
    fclose(handle);
    unlink("psbnc.ini");
    handle = fopen("LINKS.INI", "r");
    if (handle != NULL) {
      cofile(handle, fconfif, "LINKS", 0);
      fclose(handle);
      unlink("LINKS.INI");
    }
    for (i = 1; i < 1000; i++) {
      sprintf(file, "USER%d.INI", i);
      sprintf(sn, "USER%d", i);
      handle = fopen(file, "r");
      if (handle != NULL) {
        cofile(handle, fconfif, sn, 0);
        fclose(handle);
        convertlists(i, fconfif);
        unlink(file);
      }
    }
    convertlist("HOSTALLOWS", "ENTRY%d", "PSYBNC", "psbnc.hosts", fconfif);
    fclose(fconfif);
  } else {
    fconfif = fopen("psybnc.conf", "r");
    if (fconfif != NULL) {
      printf("Using existent configuration File.\n");
      fclose(fconfif);
    } else {
      fconfif = fopen("psybnc.conf", "w");
      fprintf(fconfif, "PSYBNC.SYSTEM.PORT1=31337\n");
      fprintf(fconfif, "PSYBNC.SYSTEM.HOST1=*\n");
      fprintf(fconfif, "PSYBNC.HOSTALLOWS.ENTRY0=*;*\n");
      fclose(fconfif);
    }
  }
  fconfif = fopen("config.h", "r");
  if (fconfif == NULL) {
    fconfif = fopen("config.h", "w");
    fprintf(fconfif, "/* Empty Config File */\n");
    fclose(fconfif);
  } else {
    fclose(fconfif);
  }
  exit(0x0);
}
```