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

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