user: 请将以下的汇编代码转换成C语言代码:

```asm
<getword>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  nopl   0x0(%rax,%rax,1)
L289:
  call   <getch@plt>
  mov    %eax,%edi
  mov    %eax,%r12d
  call   <isspace@plt>
  test   %rax,%rax
  jne    L289
  cmp    $0x2f,%r12d
  je     L224
  mov    D15(%rip),%rbx
L264:
  cmp    $0x22,%r12d
  je     L23
L33:
  mov    %r12d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  jne    L91
  cmp    $0x23,%r12d
  je     L91
  mov    %rbp,%r14
  cmp    $0x5f,%r12d
  je     L91
  nop
L262:
  cmp    %r12d,(%rbx)
  je     L92
  movb   $0x0,(%r14)
  movsbl 0x0(%rbp),%r12d
L92:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L99:
  cmp    %eax,(%rbx)
  je     L33
L23:
  call   <getch@plt>
  mov    %eax,%r12d
  cmp    $0x22,%eax
  jne    L99
  mov    $0x22,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  jne    L91
L270:
  mov    %rbp,%r14
  jmp    L262
  nopl   (%rax)
L164:
  cmp    %eax,(%rbx)
  je     L135
L110:
  call   <getch@plt>
  cmp    $0x2a,%eax
  jne    L164
  call   <getch@plt>
  mov    %eax,%r12d
  cmp    $0x2f,%eax
  jne    L110
L103:
  mov    %r12d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L270
  nopl   0x0(%rax)
L91:
  mov    %rbp,%r14
  cmp    $0x1,%r13d
  jle    L262
  lea    -0x2(%r13),%eax
  mov    %r12b,0x0(%rbp)
  lea    0x1(%rbp),%r15
  lea    0x1(%rbp,%rax,1),%r14
  jmp    L10
  nopl   0x0(%rax,%rax,1)
L234:
  mov    %r12b,(%r15)
  add    $0x1,%r15
L10:
  call   <getch@plt>
  mov    %eax,%edi
  mov    %eax,%r12d
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L251
  cmp    $0x5f,%r12d
  jne    L139
L251:
  cmp    %r14,%r15
  jne    L234
  jmp    L262
  nopl   0x0(%rax,%rax,1)
L224:
  call   <getch@plt>
  mov    D15(%rip),%rbx
  mov    %eax,%r12d
  cmp    $0x2f,%eax
  je     L50
  cmp    $0x2a,%eax
  jne    L264
  jmp    L110
  nopw   0x0(%rax,%rax,1)
L118:
  cmp    %eax,(%rbx)
  je     L264
L50:
  call   <getch@plt>
  mov    %eax,%r12d
  cmp    $0xa,%eax
  jne    L118
  jmp    L103
  nopw   0x0(%rax,%rax,1)
L139:
  mov    %r15,%r14
  jmp    L262
L135:
  movb   $0x0,0x0(%rbp)
  mov    %eax,%edi
  call   <ungetch@plt>
  movsbl 0x0(%rbp),%r12d
  jmp    L92
```

assistant: ```c
int getword(char *word, int lim) {
  int c, getch(void);
  void ungetch(int);
  char *w = word;
  while (isspace(c = getch()))
    ;
  if (1) {
    if (c == '/') {
      if ((c = getch()) == '/')
        while (((c = getch()) != '\n') && (c != EOF))
          ;
      else if (c == '*') {
        int done = 0;
        while (!done) {
          while ((c = getch()) != '*')
            if (c == EOF) {
              *w = '\0';
              ungetch(c);
              return word[0];
            }
          if ((c = getch()) == '/')
            done = 1;
        }
      }
    }
    if (c == '"') {
      while (((c = getch()) != '"') && (c != EOF))
        ;
    }
  }
  if ((isalpha(c) || (c == '#') || (c == '_')) && (--lim > 0)) {
    *w++ = c;
    while (((isalnum(c = getch())) || (c == '_')) && (--lim > 0))
      *w++ = c;
  }
  if (c == EOF)
    return c;
  *w = '\0';
  return word[0];
}
```