user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<next_token>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rdx,(%rsp)
  mov    %rcx,0x10(%rsp)
  test   %rdi,%rdi
  je     L392
  mov    %rsi,%rbp
  movslq (%rsi),%rax
  movzbl (%rdi,%rax,1),%ebx
  test   %bl,%bl
  je     L413
  mov    $0x0,%r14d
  mov    $0x0,%r15d
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  jmp    L452
L335:
  mov    %r12d,%r13d
  jmp    L452
L386:
  mov    %r15d,%edi
  call   <quote@plt>
  cmp    %r12d,%eax
  jne    L441
  addl   $0x1,0x0(%rbp)
  mov    $0x61,%ebx
  jmp    L398
L374:
  test   %r13d,%r13d
  jne    L319
  addl   $0x1,0x0(%rbp)
  mov    %r13d,%r12d
  mov    $0x1,%r15d
  jmp    L452
L11:
  mov    %r15d,%edi
  call   <quote@plt>
  mov    %eax,%edx
  mov    %r13d,%eax
  or     %r12d,%eax
  or     %edx,%eax
  jne    L405
  addl   $0x1,0x0(%rbp)
  jmp    L398
L439:
  mov    %r15d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L72
  test   %r13d,%r13d
  jne    L427
  mov    0x0(%rbp),%eax
  test   %eax,%eax
  jne    L361
L427:
  addl   $0x1,0x0(%rbp)
  mov    %r12d,%r15d
  mov    $0x1,%r13d
  jmp    L350
L361:
  cltq
  mov    0x8(%rsp),%rdx
  movsbl -0x1(%rdx,%rax,1),%r13d
  mov    %r13d,%edi
  call   <blank@plt>
  test   %rax,%rax
  jne    L427
  mov    %r13d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L427
  jmp    L423
L32:
  test   %r12d,%r12d
  je     L335
L7:
  movsbl %bl,%edi
  call   <quote@plt>
  mov    $0x0,%r13d
  cmp    %r12d,%eax
  jne    L350
  jmp    L452
L410:
  add    %edi,%edi
  lea    D17(%rip),%rsi
  call   <gc_alloc@plt>
  mov    %rax,%rcx
  mov    0x10(%rsp),%rdx
  movslq (%rdx),%rax
  mov    (%rsp),%rsi
  mov    (%rsi),%rdx
  movb   $0x0,-0x1(%rdx,%rax,1)
  mov    (%rsi),%rsi
  mov    %rcx,0x18(%rsp)
  mov    %rcx,%rdi
  call   <strcpy@plt>
  mov    (%rsp),%rax
  mov    (%rax),%rdi
  call   <gc_free@plt>
  mov    (%rsp),%rax
  mov    0x18(%rsp),%rcx
  mov    %rcx,(%rax)
  mov    0x10(%rsp),%rdx
  shll   (%rdx)
  jmp    L438
L392:
  mov    $0x0,%ebx
  jmp    L413
L180:
  mov    $0x0,%ebx
  jmp    L413
L127:
  mov    $0x61,%ebx
  jmp    L398
L211:
  mov    $0x61,%ebx
L398:
  movslq %r14d,%r14
  mov    (%rsp),%rax
  mov    (%rax),%rax
  movb   $0x0,(%rax,%r14,1)
L413:
  mov    %ebx,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L319:
  mov    $0x61,%ebx
  jmp    L398
L461:
  mov    $0x61,%ebx
  jmp    L398
L323:
  test   %bl,%bl
  jne    L30
L477:
  test   %r13d,%r13d
  jne    L211
  movslq %r14d,%r14
  mov    (%rsp),%rax
  mov    (%rax),%rax
  movb   $0x0,(%rax,%r14,1)
  test   %r12d,%r12d
  je     L180
  lea    D3(%rip),%rdi
  call   <error@plt>
  mov    $0x0,%ebx
  jmp    L413
L83:
  addl   $0x1,0x0(%rbp)
  mov    $0x0,%r15d
  test   %r13d,%r13d
  jne    L350
  mov    %r13d,%r15d
  jmp    L7
L23:
  addl   $0x1,0x0(%rbp)
  test   %r13d,%r13d
  je     L32
  mov    %r13d,%r15d
L350:
  mov    0x10(%rsp),%rax
  mov    (%rax),%edi
  lea    -0x2(%rdi),%eax
  cmp    %r14d,%eax
  je     L410
L438:
  movslq %r14d,%rax
  mov    (%rsp),%rsi
  mov    (%rsi),%rdx
  mov    %bl,(%rdx,%rax,1)
  lea    0x1(%r14),%r14d
L452:
  movslq 0x0(%rbp),%rax
  mov    0x8(%rsp),%rcx
  movzbl (%rcx,%rax,1),%ebx
  test   %r15d,%r15d
  je     L189
  cmp    $0xa,%bl
  je     L189
  test   %bl,%bl
  jne    L23
L189:
  movsbl %bl,%r15d
  mov    %r15d,%edi
  call   <quote@plt>
  test   %eax,%eax
  je     L323
  test   %r13d,%r13d
  jne    L127
  test   %r12d,%r12d
  jne    L386
  mov    %r15d,%edi
  call   <quote@plt>
  mov    %eax,%r12d
L441:
  test   %bl,%bl
  je     L477
L30:
  movsbl %bl,%r15d
  mov    %r15d,%edi
  call   <comment@plt>
  test   %r12d,%r12d
  jne    L193
  test   %rax,%rax
  jne    L374
L193:
  mov    %r15d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L11
L405:
  test   %r12d,%r12d
  jne    L83
  mov    %r15d,%edi
  call   <blank@plt>
  test   %rax,%rax
  je     L439
L72:
  test   %r13d,%r13d
  jne    L461
L423:
  addl   $0x1,0x0(%rbp)
  mov    %r12d,%r15d
  mov    %r12d,%r13d
  jmp    L452
```

tool_calls: name: disassemble_data
arguments: tag: D17
datatype: string
name: disassemble_data
arguments: tag: D3
datatype: string

tool: D17: next_token

tool: D3: esh: parse error: end of input while looking for a closing quote.

assistant: ```c
char next_token(char *input, int *i, char **token_value, int *len) {
  char ret, foo;
  int currquote = 0;
  int do_write = 0;
  int ignore = 0;
  int j = 0;
  if (!input || !input[*i]) {
    return '\0';
  }
  while (1) {
    foo = input[*i];
    if (ignore) {
      if (foo == '\n' || !foo) {
        ignore = 0;
      }
    }
    if (!ignore && quote(foo)) {
      if (do_write) {
        ret = 'a';
        break;
      } else if (!currquote) {
        currquote = quote(foo);
      } else if (currquote == quote(foo)) {
        ret = 'a';
        (*i)++;
        break;
      }
    }
    if (!foo) {
      if (do_write) {
        ret = 'a';
      } else {
        ret = '\0';
      }
      break;
    }
    if (!ignore && comment(foo) && !currquote) {
      if (do_write) {
        ret = 'a';
        break;
      } else {
        ignore = 1;
      }
    }
    if (!ignore && special(foo) && !quote(foo) && !currquote && !do_write) {
      (*i)++;
      ret = foo;
      break;
    }
    if (!ignore && !currquote) {
      if (!blank(foo) && !special(foo)) {
        char bar;
        if (do_write) {
        } else if (!*i) {
          do_write = 1;
        } else {
          bar = input[(*i) - 1];
          if (blank(bar) || special(bar))
            do_write = 1;
        }
      } else if (do_write) {
        ret = 'a';
        break;
      }
    }
    (*i)++;
    if (do_write || (currquote && currquote != quote(foo))) {
      if (j == (*len) - 2) {
        char *tmp = (char *)gc_alloc(sizeof(char) * (*len) * 2, "next_token");
        (*token_value)[(*len) - 1] = '\0';
        strcpy(tmp, (*token_value));
        gc_free(*token_value);
        (*token_value) = tmp;
        (*len) *= 2;
      }
      (*token_value)[j++] = foo;
    }
  }
  (*token_value)[j] = '\0';
  if (!ret && currquote) {
    error("esh: parse error: end of input while looking for "
          "a closing quote.");
  }
  return ret;
}
```