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

```asm
<getnexttoken>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movw   $0x0,-0xe(%rbp)
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x0,%eax
  call   <getch@plt>
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  mov    D8(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0xc(%rbp)
  je     L289
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  jne    L186
  jmp    L110
L289:
  mov    D8(%rip),%rax
  mov    (%rax),%eax
  jmp    L8
L110:
  cmpl   $0x5f,-0xc(%rbp)
  je     L186
  cmpl   $0x23,-0xc(%rbp)
  jne    L270
  jmp    L186
L13:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    -0x8(%rbp),%rdx
  mov    %al,(%rdx)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L118
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L118
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <ungetch@plt>
  nop
  jmp    L206
L118:
  addq   $0x1,-0x8(%rbp)
L186:
  subl   $0x1,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jg     L13
  jmp    L206
L270:
  cmpl   $0x27,-0xc(%rbp)
  je     L9
  cmpl   $0x22,-0xc(%rbp)
  jne    L16
  jmp    L9
L167:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    -0x8(%rbp),%rdx
  mov    %al,(%rdx)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L142
  addq   $0x1,-0x8(%rbp)
  mov    $0x0,%eax
  call   <getch@plt>
  mov    -0x8(%rbp),%rdx
  mov    %al,(%rdx)
  jmp    L5
L142:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    %eax,-0xc(%rbp)
  jne    L5
  addq   $0x1,-0x8(%rbp)
  nop
  jmp    L206
L5:
  addq   $0x1,-0x8(%rbp)
L9:
  subl   $0x1,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jg     L167
  jmp    L206
L16:
  cmpl   $0x2f,-0xc(%rbp)
  jne    L206
  mov    $0x0,%eax
  call   <getch@plt>
  mov    -0x8(%rbp),%rdx
  mov    %al,(%rdx)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L168
  movw   $0x1,-0xe(%rbp)
  jmp    L284
L185:
  nop
L233:
  mov    $0x0,%eax
  call   <getch@plt>
  cmp    $0x2a,%al
  jne    L233
  mov    $0x0,%eax
  call   <getch@plt>
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x2f,-0xc(%rbp)
  jne    L1
  movw   $0x0,-0xe(%rbp)
  jmp    L284
L1:
  mov    -0xc(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <ungetch@plt>
L284:
  cmpw   $0x0,-0xe(%rbp)
  jne    L185
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <getnexttoken>
  jmp    L8
L168:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <ungetch@plt>
L206:
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
L8:
  leave
  ret
```

assistant: ```c
int getnexttoken(char *word, int lim) {
  int c;
  char *w = word;
  short in_comment = 0;
  *w = '\0';
  if ((c = getch()) != EOF)
    *w++ = c;
  else
    return EOF;
  if (isalpha(c) || c == '_' || c == '#') {
    for (; --lim > 0; w++)
      if (!isalnum((unsigned char)(*w = getch())) && *w != '_') {
        ungetch(*w);
        break;
      }
  } else if (c == '\'' || c == '"') {
    for (; --lim > 0; w++) {
      if ((*w = getch()) == '\\') {
        *++w = getch();
      } else if (*w == c) {
        w++;
        break;
      }
    }
  } else if (c == '/') {
    if ((*w = getch()) == '*') {
      in_comment = 1;
      while (in_comment) {
        while (getch() != '*')
          ;
        if ((c = getch()) == '/')
          in_comment = 0;
        else
          ungetch(c);
      }
      return getnexttoken(word, lim);
    } else {
      ungetch(*w);
    }
  }
  *w = '\0';
  return word[0];
}
```