// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/exprpars.c
// Function: next_token
static char *next_token (char *p, int *ptype, int *pvalue)
{
   TOKEN *ptok;
   char tokbuf[STRSIZ], *pb;
   
   while (*p && isspace((int)*p)) p++;   /* skip whitespace */

   if (*p == '\0') {   /* end of input? */
      NT_RETURN(p, TK_ENDINPUT, 0);
   }
   
   if (isalpha((int)*p)) {   /* identifier */

      pb = tokbuf;   /* make local copy and look up */
      while (*p && (isalpha((int)*p) || isdigit((int)*p) || *p == '_')) {
         *pb++ = *p++;
      }
      *pb = '\0';
      
      NT_RETURN(p, TK_IDENT, find_sym_name(tokbuf));
   }

   ptok = lookup_token(p);   /* other token */
   NT_RETURN(p + (ptok->name ? strlen(ptok->name) : 1), ptok->type, ptok->value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xf9(%rbp)
je 0xa412
callq 0x52e0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0xf9(%rbp)
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0xa41e
jmp 0xa42c
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xa3d7
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xa45b
jmp 0xa43a
movq -0x18(%rbp), %rax
movl $0x6, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa5f3
callq 0x52e0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0xa57d
leaq -0xf0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xfa(%rbp)
je 0xa512
callq 0x52e0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x400, %ecx            # imm = 0x400
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xfb(%rbp)
jne 0xa506
callq 0x52e0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x800, %ecx            # imm = 0x800
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xfb(%rbp)
jne 0xa506
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5f, %eax
sete %al
movb %al, -0xfb(%rbp)
movb -0xfb(%rbp), %al
movb %al, -0xfa(%rbp)
movb -0xfa(%rbp), %al
testb $0x1, %al
jne 0xa51e
jmp 0xa54b
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0xf8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xf8(%rbp)
movb %cl, (%rax)
jmp 0xa48d
movq -0xf8(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
leaq -0xf0(%rbp), %rdi
callq 0xeba0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa5f3
movq -0x10(%rbp), %rdi
callq 0xa600
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movswl 0x8(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movswl 0xa(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa5d0
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x50e0
movq %rax, -0x110(%rbp)
jmp 0xa5de
movl $0x1, %eax
movq %rax, -0x110(%rbp)
jmp 0xa5de
movq -0x108(%rbp), %rax
movq -0x110(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq