user: What is the c source code of the assembly code below?

```asm
<lex_look_ahead>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %r8d,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  lea    -0x1(%rsi),%ebx
  sub    $0x18,%rsp
  mov    (%rdx),%eax
  mov    %rcx,(%rsp)
  lea    (%rax,%rsi,1),%ecx
  mov    %ecx,0x8(%rsp)
  jmp    L37
  nopl   (%rax)
L82:
  mov    (%r12),%eax
  add    $0x1,%eax
  mov    %eax,(%r12)
  cmp    %ebx,%eax
  jae    L90
L37:
  movsbl 0x0(%rbp,%rax,1),%edi
  call   <is_whitespace@plt>
  test   %rax,%rax
  jne    L82
L90:
  mov    (%rsp),%rax
  movb   $0x0,(%rax)
  mov    (%r12),%edx
  movzbl 0x0(%rbp,%rdx,1),%ebx
  test   %bl,%bl
  je     L28
  cmp    %edx,0x8(%rsp)
  jbe    L28
  lea    -0x1(%r13),%eax
  xor    %r14d,%r14d
  xor    %r15d,%r15d
  mov    %eax,0xc(%rsp)
  jmp    L175
L91:
  cmp    %r15d,0xc(%rsp)
  jbe    L125
L18:
  mov    (%rsp),%rdx
  mov    %r15d,%eax
  mov    %bl,(%rdx,%rax,1)
  lea    0x1(%r15),%eax
  movb   $0x0,(%rdx,%rax,1)
  mov    (%r12),%ecx
  mov    %rax,%r15
  cmpb   $0x0,0x0(%rbp,%rcx,1)
  mov    %rcx,%rax
  je     L28
  add    %r15d,%eax
  cmp    0x8(%rsp),%eax
  jae    L28
  movsbl %bl,%r14d
  movzbl 0x0(%rbp,%rax,1),%ebx
L175:
  movsbl %bl,%r13d
  mov    %r13d,%edi
  call   <is_whitespace@plt>
  test   %rax,%rax
  jne    L28
  test   %r15d,%r15d
  je     L91
  mov    %r14d,%edi
  call   <is_alpha@plt>
  test   %rax,%rax
  je     L109
  mov    %r13d,%edi
  call   <is_alpha@plt>
  test   %rax,%rax
  je     L28
L109:
  mov    %r14d,%edi
  call   <is_number@plt>
  test   %rax,%rax
  je     L105
  mov    %r13d,%edi
  call   <is_number@plt>
  test   %rax,%rax
  je     L28
L105:
  mov    %r13d,%edi
  call   <_is_statement_terminator@plt>
  test   %rax,%rax
  jne    L28
  mov    %r14d,%edi
  call   <_is_operator@plt>
  test   %rax,%rax
  je     L91
L28:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L125:
  lea    D3(%rip),%rdi
  call   <err_msg@plt>
  mov    (%r12),%edi
  add    %rbp,%rdi
  call   <err_msg@plt>
  lea    D12(%rip),%rdi
  call   <err_msg@plt>
  xor    %eax,%eax
  call   <die@plt>
  jmp    L18
```

tool_calls: name: unpack_data
arguments: data_tag: D3
data_type: string
name: unpack_data
arguments: data_tag: D12
data_type: string

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

tool: D12: '


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