user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<GetWordType>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L193
L180:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  cmp    $0x9,%eax
  ja     L103
  addl   $0x1,-0x1c(%rbp)
  mov    -0x10(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x8(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  jmp    L12
L103:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L238
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L238
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  jne    L8
L238:
  addl   $0x1,-0x20(%rbp)
  mov    -0x10(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x8(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  jmp    L12
L8:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L99
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L249
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L249
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L99
L249:
  addq   $0x1,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L12
L99:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L65
  cmpl   $0x0,-0x14(%rbp)
  je     L65
  cmpl   $0x0,-0x18(%rbp)
  jne    L65
  addl   $0x1,-0x20(%rbp)
  jmp    L28
L65:
  addl   $0x1,-0x18(%rbp)
L28:
  mov    -0x10(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x8(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L12:
  addl   $0x1,-0x14(%rbp)
L193:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L226
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L226
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L180
L226:
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  cmpl   $0x0,-0x14(%rbp)
  jne    L67
  mov    $0x0,%eax
  jmp    L198
L67:
  cmpl   $0x0,-0x18(%rbp)
  jle    L219
  mov    $0x3,%eax
  jmp    L198
L219:
  cmpl   $0x0,-0x1c(%rbp)
  jle    L252
  cmpl   $0x0,-0x20(%rbp)
  jne    L252
  mov    $0x2,%eax
  jmp    L198
L252:
  mov    $0x1,%eax
L198:
  leave
  ret
```

assistant: ```c
int GetWordType(fptr, tbuf, cflag)
char **fptr;
char *tbuf;
int *cflag;
{
  int alpha, digit, other, got;
  char *f, *t;
  *tbuf = '\0';
  for (got = 0, alpha = 0, digit = 0, other = 0, f = *fptr, *tbuf = '\0', t = tbuf; (*f != '\0') && (*f != ',') && (*f != ']'); got++) {
    if (isdigit((unsigned int)*f)) {
      digit++;
      *t++ = *f++;
    } else if (isalpha((unsigned int)*f) || (*f == '_') || (*f == '$')) {
      alpha++;
      *t++ = *f++;
    } else if ((*f == '+') && ((*(f + 1) == '\0') || (*(f + 1) == ',') || (*(f + 1) == ']'))) {
      f++;
      *cflag = 1;
    } else {
      if ((*f == '-') && got && !other)
        alpha++;
      else
        other++;
      *t++ = *f++;
    }
  }
  *t = '\0';
  *fptr = f;
  if (got == 0)
    return (0);
  else if (other > 0)
    return (3);
  else if ((digit > 0) && (alpha == 0))
    return (2);
  else
    return (1);
}
```