user: Please show me the C implementation that matches the assembly code listed below:

```asm
<do_state_0>:
  endbr64
  mov    %edi,%eax
  mov    %rdx,%rdi
  mov    %rcx,%rdx
  movslq (%rcx),%rcx
  mov    %rsi,%r8
  lea    0x1(%rcx),%esi
  mov    %esi,(%rdx)
  mov    %al,(%rdi,%rcx,1)
  mov    %eax,%ecx
  and    $0xffffffdf,%ecx
  sub    $0x41,%ecx
  cmp    $0x19,%cl
  jbe    L36
  cmp    $0x24,%al
  je     L36
  cmp    $0x5f,%al
  je     L36
  lea    -0x31(%rax),%ecx
  cmp    $0x8,%cl
  jbe    L37
  sub    $0x9,%eax
  cmp    $0x75,%al
  ja     L43
  lea    D9(%rip),%rcx
  movzbl %al,%eax
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
L36:
  movl   $0x1,(%r8)
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L37:
  movl   $0x17,(%r8)
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L43:
  movl   $0xffffffff,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x23,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x25,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x36,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x39,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x42,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x48,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x3e,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x26,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x51,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x1d,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x3b,(%r8)
  xor    %eax,%eax
  ret
  movl   $0xc,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x27,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x2d,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x2f,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x16,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x2a,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x24,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x33,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x31,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x3,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x3c,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x4f,(%r8)
  xor    %eax,%eax
  ret
  movl   $0x4f,(%r8)
  movslq (%rdx),%rax
  movb   $0x5c,-0x1(%rdi,%rax,1)
  movslq (%rdx),%rax
  lea    0x1(%rax),%ecx
  mov    %ecx,(%rdx)
  movb   $0x72,(%rdi,%rax,1)
  xor    %eax,%eax
  ret
  movl   $0x50,(%r8)
  movslq (%rdx),%rax
  movb   $0x5c,-0x1(%rdi,%rax,1)
  movslq (%rdx),%rax
  lea    0x1(%rax),%ecx
  mov    %ecx,(%rdx)
  movb   $0x6e,(%rdi,%rax,1)
  xor    %eax,%eax
  ret
  movl   $0x4f,(%r8)
  movslq (%rdx),%rax
  movb   $0x5c,-0x1(%rdi,%rax,1)
  movslq (%rdx),%rax
  lea    0x1(%rax),%ecx
  mov    %ecx,(%rdx)
  movb   $0x74,(%rdi,%rax,1)
  xor    %eax,%eax
  ret
  mov    $0x1,%eax
  ret
```

assistant: ```c
int do_state_0(char c, int *state, char *word, int *length) {
  word[(*length)++] = c;
  if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '$' || c == '_') {
    *state = 1;
    return 0;
  } else if (c >= '1' && c <= '9') {
    *state = 23;
    return 0;
  }
  switch (c) {
  case '\"':
    *state = 3;
    break;
  case '\'':
    *state = 12;
    break;
  case '.':
    *state = 22;
    break;
  case '0':
    *state = 29;
    break;
  case '[':
  case ']':
  case '(':
  case ')':
    *state = 35;
    break;
  case ',':
    *state = 36;
    break;
  case '{':
  case '}':
    *state = 37;
    break;
  case ';':
    *state = 38;
    break;
  case '+':
    *state = 39;
    break;
  case '-':
    *state = 42;
    break;
  case '*':
    *state = 45;
    break;
  case '/':
    *state = 47;
    break;
  case '%':
    *state = 49;
    break;
  case '&':
    *state = 51;
    break;
  case '|':
    *state = 54;
    break;
  case '^':
    *state = 57;
    break;
  case '~':
    *state = 59;
    break;
  case '!':
    *state = 60;
    break;
  case '<':
    *state = 62;
    break;
  case '>':
    *state = 66;
    break;
  case '=':
    *state = 72;
    break;
  case ' ':
    *state = 79;
    break;
  case '\t':
    *state = 79;
    word[*length - 1] = '\\';
    word[(*length)++] = 't';
    break;
  case '\r':
    *state = 79;
    word[*length - 1] = '\\';
    word[(*length)++] = 'r';
    break;
  case '\n':
    *state = 80;
    word[*length - 1] = '\\';
    word[(*length)++] = 'n';
    break;
  case '?':
    return 1;
  case ':':
    *state = 81;
    break;
  default:
    *state = -1;
    break;
  }
  return 0;
}
```