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

```asm
<_DtHelpGetNxtToken>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L22
  movq   $0x0,(%rsi)
  mov    %rdi,%rbx
  mov    %rsi,%r12
  test   %rdi,%rdi
  je     L22
  movsbl (%rdi),%edi
  test   %dil,%dil
  je     L22
  cmp    $0xa,%dil
  jne    L388
  jmp    L370
  nopl   0x0(%rax,%rax,1)
L29:
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
  test   %dil,%dil
  je     L214
  cmp    $0xa,%dil
  je     L214
L388:
  call   <isspace@plt>
  test   %rax,%rax
  jne    L29
  movzbl (%rbx),%edi
  mov    %rbx,%r14
  mov    %rbx,%r13
  test   %dil,%dil
  jne    L237
L68:
  mov    %r13,(%r12)
L421:
  add    $0x8,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L214:
  mov    %rbx,%r14
  mov    %rbx,%r13
  test   %dil,%dil
  je     L68
L237:
  cmp    $0xa,%dil
  je     L370
  mov    D24(%rip),%r13
  mov    0x0(%r13),%esi
  cmp    $0x1,%esi
  jne    L384
  cmp    $0x22,%dil
  je     L188
L312:
  mov    %rbx,%rbp
  cmp    $0x1,%esi
  je     L363
  nopl   0x0(%rax,%rax,1)
L339:
  mov    %rbp,%rdi
  call   <mblen@plt>
  test   %eax,%eax
  js     L363
  cmp    $0x1,%eax
  je     L363
  cltq
  add    %rbp,%rax
  cmpb   $0x0,(%rax)
  je     L270
L174:
  mov    0x0(%r13),%esi
  mov    %rax,%rbp
  cmp    $0x1,%esi
  jne    L339
L363:
  movsbl 0x0(%rbp),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L305
  cmpb   $0xa,0x0(%rbp)
  je     L305
  cmpb   $0x0,0x1(%rbp)
  lea    0x1(%rbp),%rax
  jne    L174
  mov    %rax,%rbp
  xor    %ebx,%ebx
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L22:
  mov    D34(%rip),%rax
  xor    %r14d,%r14d
  mov    (%rax),%edx
  mov    D8(%rip),%rax
  mov    %edx,(%rax)
  jmp    L421
  nopw   0x0(%rax,%rax,1)
L384:
  mov    %rbx,%rdi
  call   <mblen@plt>
  cmp    $0x1,%eax
  movzbl (%rbx),%eax
  je     L121
L193:
  test   %al,%al
  jne    L18
  mov    %rbx,%rbp
  mov    $0x1,%edi
  xor    %ebx,%ebx
  xor    %r15d,%r15d
  nopl   0x0(%rax)
L425:
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L268
  mov    D8(%rip),%rax
  movl   $0xfffffff9,(%rax)
L106:
  mov    %rbp,%r14
  test   %bl,%bl
  je     L68
  xor    %eax,%eax
  cmpb   $0x22,0x0(%rbp)
  sete   %al
  add    %rax,%r14
  jmp    L68
  xchg   %ax,%ax
L305:
  mov    %rbp,%r15
  sub    %rbx,%r15
  xor    %ebx,%ebx
  lea    0x1(%r15),%edi
  jmp    L425
  xchg   %ax,%ax
L370:
  mov    %rbx,%r13
  lea    0x1(%rbx),%r14
  jmp    L68
  nopl   0x0(%rax)
L268:
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,0x0(%r13,%r15,1)
  jmp    L106
L121:
  cmp    $0x22,%al
  jne    L193
L188:
  cmpb   $0x0,0x1(%rbx)
  lea    0x1(%rbx),%r14
  je     L167
  mov    0x0(%r13),%esi
  mov    %r14,%rbp
  cmp    $0x1,%esi
  je     L332
  nopl   0x0(%rax,%rax,1)
L344:
  mov    %rbp,%rdi
  call   <mblen@plt>
  cmp    $0x1,%eax
  je     L332
  test   %eax,%eax
  js     L332
  cltq
  add    %rbp,%rax
  cmpb   $0x0,(%rax)
  je     L270
L76:
  mov    0x0(%r13),%esi
  mov    %rax,%rbp
  cmp    $0x1,%esi
  jne    L344
L332:
  cmpb   $0x22,0x0(%rbp)
  je     L24
  cmpb   $0x0,0x1(%rbp)
  lea    0x1(%rbp),%rax
  jne    L76
  mov    %rax,%rbp
  mov    $0x1,%ebx
L48:
  mov    %rbp,%r15
  sub    %r14,%r15
  lea    0x1(%r15),%edi
  jmp    L425
  xchg   %ax,%ax
L24:
  mov    %rbp,%r15
  mov    $0x1,%ebx
  sub    %r14,%r15
  lea    0x1(%r15),%edi
  jmp    L425
L18:
  mov    0x0(%r13),%esi
  jmp    L312
L270:
  mov    %rax,%r15
  mov    %rax,%rbp
  xor    %ebx,%ebx
  sub    %r14,%r15
  lea    0x1(%r15),%edi
  jmp    L425
L167:
  mov    %r14,%rbp
  mov    $0x1,%ebx
  mov    $0x1,%edi
  xor    %r15d,%r15d
  jmp    L425
```

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);
}
```