user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x598,%rsp
  mov    $0xd,%edx
  mov    $0xd,%ecx
  mov    $0x20,%esi
  mov    $0xa0d,%edi
  mov    $0xa0d,%r8d
  mov    $0x20,%r9d
  mov    %fs:0x28,%rax
  mov    %rax,0x3588(%rsp)
  movabs $0x203e4c4c454853,%rax
  mov    %dx,0xee(%rsp)
  lea    0xf0(%rsp),%r14
  lea    0x130(%rsp),%rbx
  movb   $0x0,0x110(%rsp)
  lea    0xd2(%rsp),%r13
  lea    0x135(%rsp),%rbp
  mov    %cx,0xdc(%rsp)
  lea    0x180(%rsp),%r12
  lea    0x108(%rsp),%r15
  movl   $0x65707974,0xd2(%rsp)
  movl   $0x706c6568,0xea(%rsp)
  movl   $0x74697865,0xd8(%rsp)
  mov    %rax,0xf0(%rsp)
  mov    $0x20,%eax
  mov    %ax,0xd6(%rsp)
  movabs $0x2065747563657865,%rax
  mov    %rax,0x108(%rsp)
  movabs $0x206574656c6564,%rax
  mov    %rax,0xf8(%rsp)
  sub    $0x406f301,%rax
  mov    %rax,0x100(%rsp)
  movabs $0x6d6d6f4320646142,%rax
  mov    %rax,0x111(%rsp)
  movabs $0x65726f6663657865,%rax
  mov    %rax,0x120(%rsp)
  movabs $0x20646e756f7267,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  movl   $0x79706f63,0xde(%rsp)
  mov    %si,0xe2(%rsp)
  movl   $0xd726964,0xc0(%rsp)
  movl   $0x21646e61,0x119(%rsp)
  mov    %di,0x11d(%rsp)
  movb   $0x0,0x11f(%rsp)
  mov    %r8w,0xbd(%rsp)
  movb   $0x0,0xbf(%rsp)
  movl   $0xd736c63,0xc4(%rsp)
  movl   $0x6c6c696b,0xe4(%rsp)
  mov    %r9w,0xe8(%rsp)
  movl   $0x20676263,0xc8(%rsp)
  movb   $0x0,0xcc(%rsp)
  movl   $0x20676663,0xcd(%rsp)
  movb   $0x0,0xd1(%rsp)
  call   <enableInterrupts@plt>
  lea    0x138(%rsp),%rax
  mov    %rax,0x10(%rsp)
  lea    0xd8(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0xf8(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x137(%rsp),%rax
  mov    %rax,0x20(%rsp)
  lea    0xde(%rsp),%rax
  mov    %rax,0x28(%rsp)
  lea    0xb8(%rsp),%rax
  mov    %rax,0x48(%rsp)
  lea    0xc0(%rsp),%rax
  mov    %rax,0x30(%rsp)
  lea    0xc8(%rsp),%rax
  mov    %rax,0x40(%rsp)
  lea    0xcd(%rsp),%rax
  mov    %rax,0x50(%rsp)
  lea    0xc4(%rsp),%rax
  mov    %rax,0x58(%rsp)
  lea    0x100(%rsp),%rax
  mov    %rax,0x60(%rsp)
  lea    0xbd(%rsp),%rax
  mov    %rax,0x90(%rsp)
  lea    0xe4(%rsp),%rax
  mov    %rax,0x68(%rsp)
  lea    0x120(%rsp),%rax
  mov    %rax,0x70(%rsp)
  lea    0x13f(%rsp),%rax
  mov    %rax,0x80(%rsp)
  lea    0xea(%rsp),%rax
  mov    %rax,0x78(%rsp)
  lea    0x111(%rsp),%rax
  mov    %rax,0x88(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L91:
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %esi,%esi
  mov    %r14,%rdx
  mov    $0x21,%edi
  xor    %eax,%eax
  movb   $0x0,0x130(%rsp)
  movb   $0x0,0x180(%rsp)
  call   <interrupt@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    %rbx,%rdx
  mov    $0x1,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  mov    $0x5,%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L22
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <cleanFilename@plt>
  xor    %r8d,%r8d
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x3,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
  nopw   0x0(%rax,%rax,1)
L22:
  mov    $0x8,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L90
  mov    0x8(%rsp),%rsi
  mov    $0x5,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L282
  mov    0x18(%rsp),%rsi
  mov    $0x7,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L123
  mov    0x28(%rsp),%rsi
  mov    $0x5,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L216
  mov    0x30(%rsp),%rsi
  mov    $0x4,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L97
  mov    0x40(%rsp),%rsi
  mov    $0x4,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L107
  mov    0x50(%rsp),%rsi
  mov    $0x4,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L234
  mov    0x58(%rsp),%rsi
  mov    $0x4,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L161
  mov    0x60(%rsp),%rsi
  mov    $0x7,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L262
  mov    0x68(%rsp),%rsi
  mov    $0x5,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L13
  mov    0x70(%rsp),%rsi
  mov    $0xf,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L56
  mov    0x78(%rsp),%rsi
  mov    $0x5,%edx
  mov    %rbx,%rdi
  call   <strncmp@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  test   %eax,%eax
  je     L247
  xor    %edx,%edx
  mov    $0xf,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
  nopl   0x0(%rax,%rax,1)
L90:
  mov    0x10(%rsp),%rdi
  xor    %eax,%eax
  call   <cleanFilename@plt>
  mov    0x10(%rsp),%rdx
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x4,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
  nopl   0x0(%rax)
L282:
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    $0x5,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
  nopl   (%rax)
L123:
  mov    0x20(%rsp),%rdi
  xor    %eax,%eax
  call   <cleanFilename@plt>
  mov    0x20(%rsp),%rdx
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x7,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
  nopl   0x0(%rax)
L216:
  mov    %rbp,%rdi
  mov    $0x20,%esi
  xor    %eax,%eax
  call   <indexOf@plt>
  mov    $0x20,%esi
  mov    %rbp,%rdi
  cltq
  lea    0x1(%rbp,%rax,1),%r9
  xor    %eax,%eax
  mov    %r9,0x38(%rsp)
  call   <indexOf@plt>
  mov    %rbp,%rdi
  cltq
  movb   $0x0,0x135(%rsp,%rax,1)
  xor    %eax,%eax
  call   <cleanFilename@plt>
  mov    0x38(%rsp),%rdi
  xor    %eax,%eax
  call   <cleanFilename@plt>
  xor    %r8d,%r8d
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x3,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  mov    0x48(%rsp),%rcx
  xor    %r8d,%r8d
  mov    %rbp,%rdx
  mov    $0x63,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  mov    0x38(%rsp),%rdx
  mov    %r12,%rcx
  xor    %eax,%eax
  mov    0xb8(%rsp),%r8d
  mov    $0x8,%esi
  mov    $0x21,%edi
  call   <interrupt@plt>
  jmp    L91
  cs nopw 0x0(%rax,%rax,1)
L97:
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    $0x9,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
  nopl   (%rax)
L107:
  movsbl 0x134(%rsp),%edx
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %eax,%eax
  mov    $0xd,%esi
  mov    $0x21,%edi
  call   <interrupt@plt>
  jmp    L91
  nopl   0x0(%rax,%rax,1)
L234:
  xor    %r8d,%r8d
  mov    $0xc,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  movsbl 0x136(%rsp),%ecx
  movsbl 0x134(%rsp),%edx
  call   <interrupt@plt>
  jmp    L91
  nopl   0x0(%rax)
L161:
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    $0xa,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
L13:
  movsbl 0x135(%rsp),%edx
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %eax,%eax
  mov    $0xb,%esi
  mov    $0x21,%edi
  sub    $0x30,%edx
  call   <interrupt@plt>
  jmp    L91
L247:
  mov    0x88(%rsp),%rdx
  xor    %esi,%esi
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
L56:
  mov    0x80(%rsp),%rdi
  xor    %eax,%eax
  call   <cleanFilename@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0xe,%esi
  mov    0x80(%rsp),%rdx
  mov    $0x21,%edi
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
L262:
  mov    0x20(%rsp),%rdi
  xor    %eax,%eax
  call   <cleanFilename@plt>
  xor    %eax,%eax
  mov    %rbx,0x38(%rsp)
  mov    %rbp,0x98(%rsp)
  mov    %eax,%ebx
  mov    0x90(%rsp),%rbp
  mov    %r13,0xa0(%rsp)
  mov    %r14,0xa8(%rsp)
  jmp    L3
  nop
L195:
  mov    %r14,%rdi
  call   <strlen@plt>
  add    %eax,%ebx
L3:
  mov    %ebx,%r13d
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x1,%esi
  lea    (%r12,%r13,1),%r14
  mov    $0x21,%edi
  xor    %eax,%eax
  mov    %r14,%rdx
  call   <interrupt@plt>
  mov    $0x3,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L195
  mov    %r13,%r10
  mov    %r12,%rdi
  mov    0x38(%rsp),%rbx
  mov    0x98(%rsp),%rbp
  mov    0xa0(%rsp),%r13
  mov    0xa8(%rsp),%r14
  movb   $0x0,0x180(%rsp,%r10,1)
  call   <strlen@plt>
  mov    0x20(%rsp),%rdx
  mov    %r12,%rcx
  mov    $0x8,%esi
  shr    $0x9,%rax
  mov    $0x21,%edi
  lea    0x1(%rax),%r8
  xor    %eax,%eax
  call   <interrupt@plt>
  jmp    L91
```

assistant: ```c
int main() {
  char buffer[80];
  char *filename1, *filename2, *filename3, *filename4, *processToKill;
  char fileContentBuffer[13312];
  char prompt[8], type[6], execute[9], exit[6], delete[8], copy[6], dir[4], create[8], errorMsg[15], newline[3], clear[4], kill[6], changeBG[5], changeFG[5], execforeground[16], help[6];
  unsigned int i;
  int numSectors;
  prompt[0] = 'S';
  prompt[1] = 'H';
  prompt[2] = 'E';
  prompt[3] = 'L';
  prompt[4] = 'L';
  prompt[5] = '>';
  prompt[6] = ' ';
  prompt[7] = '\0';
  type[0] = 't';
  type[1] = 'y';
  type[2] = 'p';
  type[3] = 'e';
  type[4] = ' ';
  type[5] = '\0';
  help[0] = 'h';
  help[1] = 'e';
  help[2] = 'l';
  help[3] = 'p';
  help[4] = '\r';
  help[5] = '\0';
  execute[0] = 'e';
  execute[1] = 'x';
  execute[2] = 'e';
  execute[3] = 'c';
  execute[4] = 'u';
  execute[5] = 't';
  execute[6] = 'e';
  execute[7] = ' ';
  execute[8] = '\0';
  exit[0] = 'e';
  exit[1] = 'x';
  exit[2] = 'i';
  exit[3] = 't';
  exit[4] = '\r';
  exit[5] = '\0';
  delete[0] = 'd';
  delete[1] = 'e';
  delete[2] = 'l';
  delete[3] = 'e';
  delete[4] = 't';
  delete[5] = 'e';
  delete[6] = ' ';
  delete[7] = '\0';
  copy[0] = 'c';
  copy[1] = 'o';
  copy[2] = 'p';
  copy[3] = 'y';
  copy[4] = ' ';
  copy[5] = '\0';
  dir[0] = 'd';
  dir[1] = 'i';
  dir[2] = 'r';
  dir[3] = '\r';
  create[0] = 'c';
  create[1] = 'r';
  create[2] = 'e';
  create[3] = 'a';
  create[4] = 't';
  create[5] = 'e';
  create[6] = ' ';
  create[7] = '\0';
  errorMsg[0] = 'B';
  errorMsg[1] = 'a';
  errorMsg[2] = 'd';
  errorMsg[3] = ' ';
  errorMsg[4] = 'C';
  errorMsg[5] = 'o';
  errorMsg[6] = 'm';
  errorMsg[7] = 'm';
  errorMsg[8] = 'a';
  errorMsg[9] = 'n';
  errorMsg[10] = 'd';
  errorMsg[11] = '!';
  errorMsg[12] = '\r';
  errorMsg[13] = '\n';
  errorMsg[14] = '\0';
  newline[0] = '\r';
  newline[1] = '\n';
  newline[2] = '\0';
  clear[0] = 'c';
  clear[1] = 'l';
  clear[2] = 's';
  clear[3] = '\r';
  kill[0] = 'k';
  kill[1] = 'i';
  kill[2] = 'l';
  kill[3] = 'l';
  kill[4] = ' ';
  kill[5] = '\0';
  changeBG[0] = 'c';
  changeBG[1] = 'b';
  changeBG[2] = 'g';
  changeBG[3] = ' ';
  changeBG[4] = '\0';
  changeFG[0] = 'c';
  changeFG[1] = 'f';
  changeFG[2] = 'g';
  changeFG[3] = ' ';
  changeFG[4] = '\0';
  execforeground[0] = 'e';
  execforeground[1] = 'x';
  execforeground[2] = 'e';
  execforeground[3] = 'c';
  execforeground[4] = 'f';
  execforeground[5] = 'o';
  execforeground[6] = 'r';
  execforeground[7] = 'e';
  execforeground[8] = 'g';
  execforeground[9] = 'r';
  execforeground[10] = 'o';
  execforeground[11] = 'u';
  execforeground[12] = 'n';
  execforeground[13] = 'd';
  execforeground[14] = ' ';
  execforeground[15] = '\0';
  enableInterrupts();
  while (1) {
    buffer[0] = '\0';
    filename1 = 0;
    fileContentBuffer[0] = '\0';
    interrupt(0x21, 0, prompt, 0, 0);
    interrupt(0x21, 1, buffer, 0, 0);
    if (strncmp(buffer, type, 5)) {
      filename1 = buffer + 5;
      cleanFilename(filename1);
      interrupt(0x21, 3, filename1, fileContentBuffer, 0);
      interrupt(0x21, 0, fileContentBuffer, 0, 0);
    } else if (strncmp(buffer, execute, 8)) {
      filename1 = buffer + 8;
      cleanFilename(filename1);
      interrupt(0x21, 4, filename1, 0, 0);
    } else if (strncmp(buffer, exit, 5)) {
      interrupt(0x21, 5, 0, 0, 0);
    } else if (strncmp(buffer, delete, 7)) {
      filename1 = buffer + 7;
      cleanFilename(filename1);
      interrupt(0x21, 7, filename1, 0, 0);
    } else if (strncmp(buffer, copy, 5)) {
      filename1 = buffer + 5;
      filename2 = filename1 + indexOf(filename1, ' ') + 1;
      filename1[indexOf(filename1, ' ')] = '\0';
      cleanFilename(filename1);
      cleanFilename(filename2);
      interrupt(0x21, 3, filename1, fileContentBuffer, 0);
      interrupt(0x21, 99, filename1, &numSectors, 0);
      interrupt(0x21, 8, filename2, fileContentBuffer, numSectors);
    } else if (strncmp(buffer, dir, 4)) {
      interrupt(0x21, 9, 0, 0, 0);
    } else if (strncmp(buffer, changeBG, 4)) {
      interrupt(0x21, 13, buffer[4], 0, 0);
    } else if (strncmp(buffer, changeFG, 4)) {
      interrupt(0x21, 12, buffer[4], buffer[6], 0);
    } else if (strncmp(buffer, clear, 4)) {
      interrupt(0x21, 10, 0, 0, 0);
    } else if (strncmp(buffer, create, 7)) {
      filename1 = buffer + 7;
      cleanFilename(filename1);
      i = 0;
      while (1) {
        interrupt(0x21, 1, fileContentBuffer + i, 0, 0);
        if (strncmp(fileContentBuffer + i, newline, 3)) {
          fileContentBuffer[i] = '\0';
          break;
        } else {
          i += strlen(fileContentBuffer + i);
        }
      }
      interrupt(0x21, 8, filename1, fileContentBuffer, strlen(fileContentBuffer) / 512 + 1);
    } else if (strncmp(buffer, kill, 5)) {
      interrupt(0x21, 11, ((int)buffer[5] - 0x30), 0, 0);
    } else if (strncmp(buffer, execforeground, 15)) {
      filename1 = buffer + 15;
      cleanFilename(filename1);
      interrupt(0x21, 14, filename1, 0, 0);
    } else if (strncmp(buffer, help, 5)) {
      interrupt(0x21, 15, 0, 0, 0);
    } else {
      interrupt(0x21, 0, errorMsg, 0, 0);
    }
  }
  return 0;
}
```