user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x2c0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L167:
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetwd@plt>
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  lea    -0x2b0(%rbp),%rax
  mov    $0x50,%esi
  mov    %rax,%rdi
  call   <ireads@plt>
  lea    -0x2b0(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <sfindc@plt>
  mov    %eax,-0x2b8(%rbp)
  cmpl   $0x0,-0x2b8(%rbp)
  jns    L55
  lea    -0x2b0(%rbp),%rax
  mov    %rax,%rdi
  call   <slength@plt>
  mov    %eax,-0x2b8(%rbp)
L55:
  mov    -0x2b8(%rbp),%edx
  lea    -0x2b0(%rbp),%rcx
  lea    -0x260(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <scopy@plt>
  lea    -0x260(%rbp),%rax
  lea    D53(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <scompare@plt>
  test   %eax,%eax
  jne    L137
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  jmp    L167
L137:
  lea    -0x260(%rbp),%rax
  lea    D11(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <scompare@plt>
  test   %eax,%eax
  jne    L177
  mov    $0x0,%eax
  call   <ls@plt>
  jmp    L167
L177:
  lea    -0x260(%rbp),%rax
  lea    D125(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <scompare@plt>
  test   %eax,%eax
  jne    L15
  mov    -0x2b8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  lea    -0x2b0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <cd@plt>
  jmp    L167
L15:
  lea    -0x260(%rbp),%rax
  lea    D21(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <scompare@plt>
  test   %eax,%eax
  jne    L140
  mov    -0x2b8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  lea    -0x2b0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <cat@plt>
  jmp    L167
L140:
  lea    -0x260(%rbp),%rax
  lea    D44(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <scompare@plt>
  test   %eax,%eax
  jne    L34
  mov    -0x2b8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  lea    -0x2b0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <echo@plt>
  jmp    L167
L34:
  lea    -0x260(%rbp),%rax
  lea    D74(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <scompare@plt>
  test   %eax,%eax
  jne    L119
  mov    -0x2b8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  lea    -0x2b0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <pwd@plt>
  jmp    L167
L119:
  lea    -0x260(%rbp),%rax
  lea    D52(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <scompare@plt>
  test   %eax,%eax
  jne    L99
  mov    $0x0,%eax
  call   <ireboot@plt>
  jmp    L167
L99:
  lea    -0x260(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <sfindc@plt>
  cmp    $0xffffffff,%eax
  jne    L72
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <fget@plt>
  mov    %eax,-0x2b4(%rbp)
  cmpl   $0x0,-0x2b4(%rbp)
  jne    L37
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  jmp    L81
L37:
  lea    -0x260(%rbp),%rdx
  mov    -0x2b4(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <ffind@plt>
  mov    %eax,-0x2b4(%rbp)
  cmpl   $0x0,-0x2b4(%rbp)
  jne    L58
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  lea    -0x260(%rbp),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  jmp    L81
L58:
  mov    -0x2b4(%rbp),%eax
  mov    %eax,%edi
  call   <fgettype@plt>
  cmp    $0x2,%eax
  jne    L151
  mov    -0x2b4(%rbp),%eax
  mov    %eax,%edi
  call   <iexec@plt>
  jmp    L167
L151:
  lea    D90(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  jmp    L81
L72:
  lea    -0x260(%rbp),%rax
  mov    %rax,%rdi
  call   <fget@plt>
  mov    %eax,-0x2b4(%rbp)
  cmpl   $0x0,-0x2b4(%rbp)
  je     L184
  mov    -0x2b4(%rbp),%eax
  mov    %eax,%edi
  call   <fgettype@plt>
  cmp    $0x2,%eax
  jne    L218
  mov    -0x2b4(%rbp),%eax
  mov    %eax,%edi
  call   <iexec@plt>
  jmp    L167
L218:
  lea    D90(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  jmp    L81
L184:
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <iwrites@plt>
  nop
L81:
  jmp    L167
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D28
type_infered: string
name: extract_symbolic_data
arguments: data_label: D53
type_infered: string
name: extract_symbolic_data
arguments: data_label: D94
type_infered: string
name: extract_symbolic_data
arguments: data_label: D11
type_infered: string
name: extract_symbolic_data
arguments: data_label: D125
type_infered: string
name: extract_symbolic_data
arguments: data_label: D21
type_infered: string
name: extract_symbolic_data
arguments: data_label: D44
type_infered: string
name: extract_symbolic_data
arguments: data_label: D74
type_infered: string
name: extract_symbolic_data
arguments: data_label: D52
type_infered: string
name: extract_symbolic_data
arguments: data_label: D106
type_infered: string
name: extract_symbolic_data
arguments: data_label: D59
type_infered: string
name: extract_symbolic_data
arguments: data_label: D14
type_infered: string
name: extract_symbolic_data
arguments: data_label: D73
type_infered: string
name: extract_symbolic_data
arguments: data_label: D90
type_infered: string
name: extract_symbolic_data
arguments: data_label: D128
type_infered: string

tool: D28: > 

tool: D53: help

tool: D94: 
cat: print file contents
cd: change directories
echo: print a string
help: display this message
ls: list files
pwd: print current working directory



tool: D11: ls

tool: D125: cd

tool: D21: cat

tool: D44: echo

tool: D74: pwd

tool: D52: reboot

tool: D106: /bin/

tool: D59: Error: unable to locate bin directory


tool: D14: Error: unrecognized command "

tool: D73: "


tool: D90: Error: file is not executable


tool: D128: Error: executable not found


assistant: ```c
int main() {
  char buffer[80];
  char verb[80];
  char wd[512];
  int len;
  int prog;
  while (1) {
    fgetwd(wd);
    iwrites(wd);
    iwrites("> ");
    ireads(buffer, 80);
    len = sfindc(buffer, ' ');
    if (len < 0)
      len = slength(buffer);
    scopy(verb, buffer, len);
    if (!scompare(verb, "help")) {
      iwrites("\ncat: print file contents\ncd: change directories\necho: print a string\nhelp: display this message\nls: list files\npwd: print current working directory\n\n");
    } else if (!scompare(verb, "ls")) {
      ls();
    } else if (!scompare(verb, "cd")) {
      cd(buffer + len + 1);
    } else if (!scompare(verb, "cat")) {
      cat(buffer + len + 1);
    } else if (!scompare(verb, "echo")) {
      echo(buffer + len + 1);
    } else if (!scompare(verb, "pwd")) {
      pwd(buffer + len + 1);
    } else if (!scompare(verb, "reboot")) {
      ireboot();
    } else if (sfindc(verb, '/') == -1) {
      prog = fget("/bin/");
      if (!prog) {
        iwrites("Error: unable to locate bin directory\n");
        continue;
      }
      prog = ffind(prog, verb);
      if (!prog) {
        iwrites("Error: unrecognized command \"");
        iwrites(verb);
        iwrites("\"\n");
        continue;
      }
      if (fgettype(prog) == 2)
        iexec(prog);
      else {
        iwrites("Error: file is not executable\n");
        continue;
      }
    } else if (prog = fget(verb)) {
      if (fgettype(prog) == 2)
        iexec(prog);
      else {
        iwrites("Error: file is not executable\n");
        continue;
      }
    } else {
      iwrites("Error: executable not found\n");
      continue;
    }
  }
}
```