user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<shell_interpreter>:
  endbr64
  push   %rbx
  sub    $0x410,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  movzbl (%rdi),%eax
  test   %al,%al
  je     L184
  mov    $0x0,%ecx
  mov    $0x0,%ebx
  mov    $0x0,%r9d
  mov    $0x0,%r11d
  mov    %rsp,%r10
  jmp    L187
L87:
  mov    %ecx,%r8d
  cmp    %ecx,%ebx
  jge    L196
  movslq %ebx,%rax
  movslq %r9d,%rsi
  shl    $0x5,%rsi
  sub    %rax,%rsi
  add    %r10,%rsi
L147:
  movzbl (%rdi,%rax,1),%edx
  mov    %dl,(%rsi,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%r8d
  jg     L147
  mov    %ecx,%edx
  sub    %ebx,%edx
L191:
  movslq %edx,%rdx
  movslq %r9d,%rax
  shl    $0x5,%rax
  lea    0x410(%rax),%rax
  add    %rsp,%rax
  movb   $0x0,-0x410(%rdx,%rax,1)
  add    $0x1,%r9d
  lea    0x1(%rcx),%ebx
L131:
  add    $0x1,%rcx
  movzbl (%rdi,%rcx,1),%eax
  test   %al,%al
  je     L121
L187:
  cmp    $0x20,%al
  je     L87
  cmp    $0xa,%al
  jne    L131
  jmp    L87
L196:
  mov    %r11d,%edx
  jmp    L191
L184:
  mov    $0x0,%r9d
L121:
  lea    -0x1(%r9),%ebx
  mov    %rsp,%rdi
  lea    D32(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L81
  mov    %rsp,%rsi
  mov    %ebx,%edi
  call   <shell_command_test@plt>
L61:
  mov    $0x0,%eax
  call   <shell_clear@plt>
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x410,%rsp
  pop    %rbx
  ret
L81:
  mov    %rsp,%rdi
  lea    D0(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L77
  mov    %rsp,%rsi
  mov    %ebx,%edi
  call   <shell_command_help@plt>
  jmp    L61
L77:
  mov    %rsp,%rdi
  lea    D45(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L175
  mov    %rsp,%rsi
  mov    %ebx,%edi
  call   <shell_command_color@plt>
  jmp    L61
L175:
  mov    %rsp,%rdi
  lea    D69(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L118
  call   <shell_command_clear@plt>
  jmp    L61
L118:
  mov    %rsp,%rdi
  lea    D21(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L161
  call   <shell_command_exit@plt>
  jmp    L61
L161:
  mov    %rsp,%rdi
  lea    D56(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L61
  mov    %rsp,%rdi
  call   <terminal_writestring@plt>
  lea    D1(%rip),%rdi
  call   <terminal_writestring@plt>
  jmp    L61
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D32
type_infered: string
name: unpack_data
arguments: label: D0
type_infered: string
name: unpack_data
arguments: label: D45
type_infered: string
name: unpack_data
arguments: label: D69
type_infered: string
name: unpack_data
arguments: label: D21
type_infered: string
name: unpack_data
arguments: label: D56
type_infered: string
name: unpack_data
arguments: label: D1
type_infered: string

tool: D32: test

tool: D0: help

tool: D45: color

tool: D69: clear

tool: D21: exit

tool: 

tool: D1: : Prikaz nebol najdeny


assistant: ```c
void shell_interpreter(char *command) {
  int argc = 0;
  char argv[32][32];
  int start = 0;
  int current = 0;
  int i;
  int j = 0;
  while (command[current] != '\0') {
    if (command[current] == ' ' || command[current] == '\n') {
      j = 0;
      for (i = start; i < current; i++) {
        argv[argc][j] = command[i];
        j++;
      }
      argv[argc][j] = '\0';
      argc++;
      start = current + 1;
    }
    current++;
  }
  argc--;
  if (strcmp(argv[0], "test") == 0) {
    shell_command_test(argc, argv);
  } else if (strcmp(argv[0], "help") == 0) {
    shell_command_help(argc, argv);
  } else if (strcmp(argv[0], "color") == 0) {
    shell_command_color(argc, argv);
  } else if (strcmp(argv[0], "clear") == 0) {
    shell_command_clear();
  } else if (strcmp(argv[0], "exit") == 0) {
    shell_command_exit();
  } else if (strcmp(argv[0], "") == 0) {
  } else {
    terminal_writestring(argv[0]);
    terminal_writestring(": Prikaz nebol najdeny\n");
  }
  shell_clear();
}
```