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

```asm
<lex_look_ahead>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8d,-0x20(%rbp)
  movl   $0x0,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  movb   $0x0,-0x9(%rbp)
  movb   $0x0,-0xa(%rbp)
  jmp    L191
L124:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x1c(%rbp),%edx
  sub    $0x1,%edx
  cmp    %edx,%eax
  jae    L46
L191:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <is_whitespace@plt>
  test   %rax,%rax
  jne    L124
  jmp    L58
L46:
  nop
L58:
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L114
L48:
  movzbl -0xa(%rbp),%eax
  mov    %al,-0x9(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  movsbl -0xa(%rbp),%eax
  mov    %eax,%edi
  call   <is_whitespace@plt>
  test   %rax,%rax
  jne    L50
  cmpl   $0x0,-0x8(%rbp)
  je     L57
  movsbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <is_alpha@plt>
  test   %rax,%rax
  je     L147
  movsbl -0xa(%rbp),%eax
  mov    %eax,%edi
  call   <is_alpha@plt>
  test   %rax,%rax
  je     L128
L147:
  movsbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <is_number@plt>
  test   %rax,%rax
  je     L179
  movsbl -0xa(%rbp),%eax
  mov    %eax,%edi
  call   <is_number@plt>
  test   %rax,%rax
  je     L120
L179:
  movsbl -0xa(%rbp),%eax
  mov    %eax,%edi
  call   <_is_statement_terminator@plt>
  test   %rax,%rax
  jne    L30
  movsbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <_is_operator@plt>
  test   %rax,%rax
  jne    L74
L57:
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jb     L65
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <err_msg@plt>
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <err_msg@plt>
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <err_msg@plt>
  mov    $0x0,%eax
  call   <die@plt>
L65:
  mov    -0x8(%rbp),%edx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  addl   $0x1,-0x8(%rbp)
L114:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L150
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x4(%rbp)
  ja     L48
  jmp    L150
L50:
  nop
  jmp    L150
L128:
  nop
  jmp    L150
L120:
  nop
  jmp    L150
L30:
  nop
  jmp    L150
L74:
  nop
L150:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D5
data_type: string
name: disassemble_data
arguments: tag: D17
data_type: string

tool: D5: not enough room for next token: '

tool: D17: '


assistant: ```c
void lex_look_ahead(const char *input, unsigned int input_len, unsigned int *pos, char *output, unsigned int output_size) {
  unsigned int i;
  unsigned int end;
  char last;
  char next;
  i = 0;
  end = *pos + input_len;
  last = '\0';
  next = '\0';
  while (is_whitespace(input[*pos])) {
    *pos += 1;
    if (*pos >= input_len - 1) {
      break;
    }
  }
  output[0] = '\0';
  while (input[*pos] && (*pos + i) < end) {
    last = next;
    next = input[*pos + i];
    if (is_whitespace(next)) {
      break;
    }
    if (i > 0) {
      if (is_alpha(last) && !is_alpha(next)) {
        break;
      }
      if (is_number(last) && !is_number(next)) {
        break;
      }
      if (_is_statement_terminator(next)) {
        break;
      }
      if (_is_operator(last)) {
        break;
      }
    }
    if (i >= output_size - 1) {
      err_msg("not enough room for next token: '");
      err_msg(&(input[*pos]));
      err_msg("'\n");
      die();
    }
    output[i] = next;
    output[i + 1] = '\0';
    i++;
  }
}
```