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

```asm
<next_token>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  test   %rdi,%rdi
  je     L20
  movslq (%rsi),%rax
  mov    %rsi,%rbx
  movzbl (%rdi,%rax,1),%r12d
  test   %r12b,%r12b
  je     L20
  xor    %ebp,%ebp
  xor    %edx,%edx
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  jmp    L158
  nopl   0x0(%rax)
L443:
  cmp    $0xa,%r12b
  je     L265
  test   %r12b,%r12b
  je     L265
L85:
  mov    (%rbx),%eax
  add    $0x1,%eax
  mov    %eax,(%rbx)
  test   %r14d,%r14d
  je     L99
L429:
  mov    0x10(%rsp),%rax
  mov    (%rax),%edi
  lea    -0x2(%rdi),%eax
  cmp    %ebp,%eax
  je     L152
  mov    0x8(%rsp),%rax
  mov    (%rax),%r15
L449:
  movslq %ebp,%rax
  add    $0x1,%ebp
  mov    %r12b,(%r15,%rax,1)
  mov    (%rbx),%eax
L434:
  mov    (%rsp),%rcx
  cltq
  movzbl (%rcx,%rax,1),%r12d
L158:
  test   %edx,%edx
  jne    L443
L265:
  movsbl %r12b,%r15d
  mov    %r15d,%edi
  call   <quote@plt>
  test   %eax,%eax
  je     L253
  test   %r14d,%r14d
  jne    L346
  mov    %r15d,%edi
  test   %r13d,%r13d
  jne    L255
  call   <quote@plt>
  mov    %eax,%r13d
  test   %r12b,%r12b
  je     L260
L267:
  mov    %r15d,%edi
  call   <comment@plt>
  test   %rax,%rax
  je     L263
  test   %r13d,%r13d
  jne    L280
  test   %r14d,%r14d
  jne    L346
  mov    (%rbx),%eax
  mov    $0x1,%edx
  add    $0x1,%eax
  mov    %eax,(%rbx)
  jmp    L434
  nopl   0x0(%rax,%rax,1)
L253:
  test   %r12b,%r12b
  jne    L267
  test   %r14d,%r14d
  je     L260
L346:
  mov    $0x61,%r12d
L120:
  mov    0x8(%rsp),%rax
  movslq %ebp,%rbp
  mov    (%rax),%rax
  movb   $0x0,(%rax,%rbp,1)
  jmp    L111
  nopl   0x0(%rax,%rax,1)
L255:
  call   <quote@plt>
  cmp    %r13d,%eax
  je     L342
  test   %r12b,%r12b
  je     L247
  mov    %r15d,%edi
  call   <comment@plt>
  mov    %r15d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L51
  addl   $0x1,(%rbx)
  xor    %edx,%edx
L138:
  mov    %r15d,%edi
  mov    %edx,0x1c(%rsp)
  xor    %r14d,%r14d
  call   <quote@plt>
  mov    0x1c(%rsp),%edx
  cmp    %r13d,%eax
  jne    L429
  mov    (%rbx),%eax
  jmp    L434
  nopl   0x0(%rax,%rax,1)
L263:
  mov    %r15d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L456
L400:
  test   %r13d,%r13d
  jne    L22
  mov    %r15d,%edi
  call   <blank@plt>
  test   %rax,%rax
  je     L458
L150:
  test   %r14d,%r14d
  jne    L346
  mov    (%rbx),%eax
  xor    %edx,%edx
  xor    %r13d,%r13d
  add    $0x1,%eax
  mov    %eax,(%rbx)
  jmp    L434
L60:
  mov    %r15d,%edi
  call   <quote@plt>
  or     %r13d,%eax
  or     %r14d,%eax
  je     L114
  nopl   (%rax)
L22:
  mov    (%rbx),%eax
  xor    %edx,%edx
  add    $0x1,%eax
  mov    %eax,(%rbx)
  test   %r14d,%r14d
  jne    L429
L99:
  test   %r13d,%r13d
  je     L434
  movsbl %r12b,%r15d
  jmp    L138
  nopl   0x0(%rax)
L152:
  add    %edi,%edi
  lea    D16(%rip),%rsi
  mov    %edx,0x1c(%rsp)
  call   <gc_alloc@plt>
  mov    0x8(%rsp),%rcx
  mov    %rax,%r15
  mov    0x10(%rsp),%rax
  mov    (%rcx),%rsi
  mov    %r15,%rdi
  movslq (%rax),%rax
  movb   $0x0,-0x1(%rsi,%rax,1)
  mov    (%rcx),%rsi
  call   <strcpy@plt>
  mov    0x8(%rsp),%rcx
  mov    (%rcx),%rdi
  call   <gc_free@plt>
  mov    0x8(%rsp),%rcx
  mov    0x10(%rsp),%rax
  mov    0x1c(%rsp),%edx
  mov    %r15,(%rcx)
  shll   (%rax)
  jmp    L449
  nopw   0x0(%rax,%rax,1)
L458:
  mov    %r15d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L150
  movslq (%rbx),%rdx
  test   %r14d,%r14d
  jne    L276
  test   %edx,%edx
  jne    L483
  movl   $0x1,(%rbx)
  mov    $0x1,%r14d
  jmp    L429
  cs nopw 0x0(%rax,%rax,1)
L51:
  mov    %r15d,%edi
  call   <quote@plt>
  xor    %edx,%edx
  jmp    L85
  nop
L456:
  mov    %r15d,%edi
  call   <quote@plt>
  or     %r13d,%eax
  or     %r14d,%eax
  jne    L400
L114:
  addl   $0x1,(%rbx)
  jmp    L120
L260:
  mov    0x8(%rsp),%rax
  movslq %ebp,%rbp
  mov    (%rax),%rax
  movb   $0x0,(%rax,%rbp,1)
  test   %r13d,%r13d
  je     L20
L16:
  lea    D2(%rip),%rdi
  call   <error@plt>
L20:
  xor    %r12d,%r12d
L111:
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L276:
  add    $0x1,%edx
  mov    %edx,(%rbx)
  xor    %edx,%edx
  jmp    L429
L483:
  mov    (%rsp),%rax
  movsbl -0x1(%rax,%rdx,1),%r15d
  mov    %r15d,%edi
  call   <blank@plt>
  test   %rax,%rax
  je     L230
L284:
  addl   $0x1,(%rbx)
  xor    %edx,%edx
  mov    $0x1,%r14d
  jmp    L429
L280:
  mov    %r15d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L60
  addl   $0x1,(%rbx)
  xor    %edx,%edx
  test   %r14d,%r14d
  jne    L429
  jmp    L138
  nop
L342:
  addl   $0x1,(%rbx)
  mov    $0x61,%r12d
  jmp    L120
L247:
  mov    0x8(%rsp),%rax
  movslq %ebp,%rbp
  mov    (%rax),%rax
  movb   $0x0,(%rax,%rbp,1)
  jmp    L16
L230:
  mov    %r15d,%edi
  call   <special@plt>
  test   %rax,%rax
  jne    L284
  mov    (%rbx),%eax
  xor    %edx,%edx
  add    $0x1,%eax
  mov    %eax,(%rbx)
  jmp    L434
```

tool_calls: name: retrieve_data
arguments: data_tag: D16
data_type: string
name: retrieve_data
arguments: data_tag: D2
data_type: string

tool: D16: next_token

tool: D2: 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;
}
```