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

```asm
<tokenizeCommand>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  movl   $0x1,-0xc(%rbp)
  movl   $0x2,-0x8(%rbp)
  movl   $0x4,-0x4(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jg     L125
  mov    $0x20,%esi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <__assert@plt>
  jmp    L125
L91:
  mov    -0x14(%rbp),%eax
  and    -0xc(%rbp),%eax
  test   %eax,%eax
  je     L122
  movsbl -0x15(%rbp),%eax
  cmp    $0x6e,%eax
  je     L196
  cmp    $0x74,%eax
  jne    L8
  movb   $0x9,-0x15(%rbp)
  jmp    L8
L196:
  movb   $0xa,-0x15(%rbp)
  nop
L8:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl -0x15(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  not    %eax
  and    %eax,-0x14(%rbp)
  jmp    L125
L122:
  mov    -0x14(%rbp),%eax
  and    -0x8(%rbp),%eax
  test   %eax,%eax
  je     L195
  movsbl -0x15(%rbp),%eax
  cmp    $0x22,%eax
  je     L9
  cmp    $0x5c,%eax
  jne    L116
  mov    -0xc(%rbp),%eax
  or     %eax,-0x14(%rbp)
  jmp    L125
L9:
  mov    -0x8(%rbp),%eax
  not    %eax
  and    %eax,-0x14(%rbp)
  jmp    L125
L116:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl -0x15(%rbp),%edx
  mov    %dl,(%rax)
  nop
  jmp    L125
L195:
  movsbl -0x15(%rbp),%eax
  cmp    $0xa,%eax
  jg     L148
  cmp    $0x9,%eax
  jge    L293
  jmp    L262
L148:
  cmp    $0x20,%eax
  jne    L262
L293:
  mov    -0x14(%rbp),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L125
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x0,(%rax)
  mov    -0x4(%rbp),%eax
  not    %eax
  and    %eax,-0x14(%rbp)
  jmp    L125
L262:
  mov    -0x14(%rbp),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  jne    L164
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jne    L21
  mov    $0xffffffff,%eax
  jmp    L310
L21:
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x4(%rbp),%eax
  or     %eax,-0x14(%rbp)
L164:
  movsbl -0x15(%rbp),%eax
  cmp    $0x22,%eax
  je     L300
  cmp    $0x5c,%eax
  jne    L52
  mov    -0xc(%rbp),%eax
  or     %eax,-0x14(%rbp)
  jmp    L125
L300:
  mov    -0x8(%rbp),%eax
  or     %eax,-0x14(%rbp)
  jmp    L125
L52:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl -0x15(%rbp),%edx
  mov    %dl,(%rax)
  nop
L125:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x15(%rbp)
  cmpb   $0x0,-0x15(%rbp)
  jne    L91
  mov    -0x14(%rbp),%eax
  and    -0xc(%rbp),%eax
  test   %eax,%eax
  je     L273
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L310
L273:
  mov    -0x14(%rbp),%eax
  and    -0x8(%rbp),%eax
  test   %eax,%eax
  je     L214
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L310
L214:
  mov    -0x14(%rbp),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L90
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x0,(%rax)
L90:
  mov    -0x10(%rbp),%eax
L310:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D14
type_infered: string
name: read_data
arguments: tag: D10
type_infered: string
name: read_data
arguments: tag: D23
type_infered: string

tool: D14: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ElvisLouis/code/refs/heads/master/bin/nachos/test/sh.c

tool: D10: Unmatched \.


tool: D23: Unmatched ".


assistant: ```c
int tokenizeCommand(char *command, int maxTokens, char *tokens[], char *storage) {
  const int quotingCharacter = 0x00000001;
  const int quotingString = 0x00000002;
  const int startedArg = 0x00000004;
  int state = 0;
  int numTokens = 0;
  char c;
  ((maxTokens > 0) ? (void)0 : __assert("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ElvisLouis/code/refs/heads/master/bin/nachos/test/sh.c", 32));
  while ((c = *(command++)) != '\0') {
    if (state & quotingCharacter) {
      switch (c) {
      case 't':
        c = '\t';
        break;
      case 'n':
        c = '\n';
        break;
      }
      *(storage++) = c;
      state &= ~quotingCharacter;
    } else if (state & quotingString) {
      switch (c) {
      case '\\':
        state |= quotingCharacter;
        break;
      case '"':
        state &= ~quotingString;
        break;
      default:
        *(storage++) = c;
        break;
      }
    } else {
      switch (c) {
      case ' ':
      case '\t':
      case '\n':
        if (state & startedArg) {
          *(storage++) = '\0';
          state &= ~startedArg;
        }
        break;
      default:
        if (!(state & startedArg)) {
          if (numTokens == maxTokens) {
            return -1;
          }
          tokens[numTokens++] = storage;
          state |= startedArg;
        }
        switch (c) {
        case '\\':
          state |= quotingCharacter;
          break;
        case '"':
          state |= quotingString;
          break;
        default:
          *(storage++) = c;
          break;
        }
      }
    }
  }
  if (state & quotingCharacter) {
    printf("Unmatched \\.\n");
    return -1;
  }
  if (state & quotingString) {
    printf("Unmatched \".\n");
    return -1;
  }
  if (state & startedArg) {
    *(storage++) = '\0';
  }
  return numTokens;
}
```