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

```asm
<_DtHelpGetNxtToken>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movl   $0x1,-0x14(%rbp)
  movw   $0x0,-0x18(%rbp)
  movw   $0x0,-0x16(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L308
  mov    -0x30(%rbp),%rax
  movq   $0x0,(%rax)
L308:
  cmpq   $0x0,-0x28(%rbp)
  je     L328
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L328
  cmpq   $0x0,-0x30(%rbp)
  jne    L93
L328:
  mov    D55(%rip),%rax
  mov    (%rax),%edx
  mov    D26(%rip),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L306
L17:
  addq   $0x1,-0x28(%rbp)
L93:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L305
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L305
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L17
L305:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L186
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L117
L186:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L16
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  addq   $0x1,-0x28(%rbp)
  jmp    L117
L16:
  mov    D63(%rip),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L87
  mov    D63(%rip),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mblen@plt>
  cmp    $0x1,%eax
  jne    L296
L87:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  jne    L296
  movw   $0x1,-0x18(%rbp)
  addq   $0x1,-0x28(%rbp)
L296:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L325
L38:
  movl   $0x1,-0x14(%rbp)
  mov    D63(%rip),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L146
  mov    D63(%rip),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mblen@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L146
  movl   $0x1,-0x14(%rbp)
L146:
  cmpl   $0x1,-0x14(%rbp)
  jne    L14
  cmpw   $0x0,-0x18(%rbp)
  je     L171
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  je     L115
L171:
  cmpw   $0x0,-0x18(%rbp)
  jne    L6
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L115
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L6
L115:
  movw   $0x1,-0x16(%rbp)
  jmp    L325
L6:
  addq   $0x1,-0x28(%rbp)
  jmp    L325
L14:
  mov    -0x14(%rbp),%eax
  cltq
  add    %rax,-0x28(%rbp)
L325:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L1
  cmpw   $0x0,-0x16(%rbp)
  je     L38
L1:
  mov    -0x28(%rbp),%rax
  sub    -0x8(%rbp),%rax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L67
  mov    -0x28(%rbp),%rax
  sub    -0x8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x28(%rbp),%rax
  sub    -0x8(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L301
L67:
  mov    D26(%rip),%rax
  movl   $0xfffffff9,(%rax)
L301:
  cmpw   $0x0,-0x18(%rbp)
  je     L117
  cmpl   $0x1,-0x14(%rbp)
  jne    L117
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  jne    L117
  addq   $0x1,-0x28(%rbp)
L117:
  mov    -0x30(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%rax
L306:
  leave
  ret
```

assistant: ```c
char *_DtHelpGetNxtToken(char *str, char **retToken) {
  int len = 1;
  char *start;
  char *token;
  short quote = 0;
  short done = 0;
  if (retToken)
    *retToken = 0;
  if (str == 0 || *str == '\0' || retToken == 0) {
    errno = EINVAL;
    return 0;
  }
  while (*str && (*str != '\n') && isspace(*str))
    str++;
  if (*str == '\0')
    token = str;
  else if (*str == '\n') {
    token = str;
    str++;
  } else {
    if ((MB_CUR_MAX == 1 || mblen(str, MB_CUR_MAX) == 1) && *str == '\"') {
      quote = 1;
      str++;
    }
    start = str;
    while (*str && !done) {
      len = 1;
      if (MB_CUR_MAX != 1) {
        len = mblen(str, MB_CUR_MAX);
        if (len < 0)
          len = 1;
      }
      if (len == 1) {
        if ((quote && *str == '\"') || (!quote && (isspace(*str) || *str == '\n')))
          done = 1;
        else
          str++;
      } else
        str += len;
    }
    token = (char *)malloc((str - start + 1) * sizeof(char));
    if (token) {
      strncpy(token, start, str - start);
      *(token + (str - start)) = '\0';
    } else
      errno = -7;
    if (quote && len == 1 && *str == '\"')
      str++;
  }
  *retToken = token;
  return (str);
}
```