// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: next
static es_token_t next(es_val_t port, char* pbuf)
{
  es_token_t t;
  eat_sp(port);
  int c = pgetc(port);
  switch(c) {
  case -1:   t = tk_eof;    break;
  case '(':  t = tk_lpar;   break;
  case ')':  t = tk_rpar;   break;
  case '\'': t = tk_quot;   break;
  case '`':  t = tk_qquot;  break;
  case ',':
    t = tk_unquot;
    if (ppeekc(port) == '@') {
      pgetc(port);
      t = tk_unquot_splice;
    }
    break;
  case '"':
    while((c = pgetc(port)) != '"')
      *pbuf++ = '\\' == c ? escape(pgetc(port)) : c;
    t = tk_str;
    break;
  case '#':
    c = pgetc(port);
    if (c == 't')       t = tk_tbool;
    else if (c == 'f')  t = tk_fbool;
    else if (c == '(')  t = tk_hlpar;
    else if (c == '\\') {
      while(!eot(ppeekc(port)))
        *pbuf++ = pgetc(port);
      t = tk_char;
    }
    else                t = tk_unknown;
    break;
  default: {
    lstate_t s = step(lstate_start, c);
    *pbuf++ = c;
    while(!eot(ppeekc(port))) {
      s = step(s, (*pbuf++ = c = pgetc(port)));
    }
    s = step(s, ppeekc(port));
    if (s == lstate_sym)      t = tk_sym;
    else if (s == lstate_int) t = tk_int;
    else if (s == lstate_dot) t = tk_dot;
    else                      t = tk_unknown;
    }
    break;
  }
  *pbuf = '\0';
  while(strchr(" \t", ppeekc(port))) pgetc(port);
  if (ppeekc(port) == '\n') pgetc(port);
  return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1190
movq %rax, %r15
movq (%r15), %r12
movq %rbx, %rdi
callq 0x2818
cltq
testb $0x20, 0x1(%r12,%rax,2)
jne 0x544c
movq %rbx, %rdi
callq 0x2818
cmpl $0x3b, %eax
jne 0x546b
movq %rbx, %rdi
callq 0x274b
cmpl $0xa, %eax
jne 0x543d
jmp 0x541b
movq %rbx, %rdi
callq 0x274b
movq (%r15), %r12
movq %rbx, %rdi
callq 0x2818
cltq
testb $0x20, 0x1(%r12,%rax,2)
jne 0x544c
jmp 0x541b
movq %rbx, %rdi
callq 0x274b
leal -0x22(%rax), %ecx
cmpl $0xa, %ecx
ja 0x5512
leaq 0xede(%rip), %rdx       # 0x6364
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0xefa(%rip), %r15       # 0x6390
movq %rbx, %rdi
callq 0x274b
cmpl $0x5c, %eax
je 0x54b4
cmpl $0x22, %eax
je 0x55fe
movb %al, (%r14)
incq %r14
jmp 0x5496
movq %rbx, %rdi
callq 0x274b
cmpl $0x6d, %eax
jle 0x54d9
leal -0x6e(%rax), %ecx
cmpl $0x8, %ecx
ja 0x54ac
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movl $0xa, %eax
jmp 0x54ac
cmpl $0x61, %eax
je 0x5504
cmpl $0x62, %eax
je 0x550b
cmpl $0x66, %eax
jne 0x54ac
movl $0xc, %eax
jmp 0x54ac
movl $0x9, %eax
jmp 0x54ac
movl $0xb, %eax
jmp 0x54ac
movl $0xd, %eax
jmp 0x54ac
movl $0x7, %eax
jmp 0x54ac
movl $0x8, %eax
jmp 0x54ac
cmpl $-0x1, %eax
je 0x56cd
cmpl $0x60, %eax
jne 0x552a
movl $0xc, %ebp
jmp 0x5728
cmpb $0x2d, %al
ja 0x56f5
movl $0x1, %ebp
movzbl %al, %ecx
movabsq $0x280000000001, %rdx   # imm = 0x280000000001
btq %rcx, %rdx
jae 0x56f5
movb %al, (%r14)
incq %r14
movq %rbx, %rdi
callq 0x2818
leaq 0x1339(%rip), %rdi      # 0x689c
movl $0xb, %edx
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
jne 0x55be
leaq 0x1321(%rip), %r15      # 0x689c
movq %rbx, %rdi
callq 0x2818
cmpl $-0x1, %eax
je 0x55be
movq %rbx, %rdi
callq 0x274b
movb %al, (%r14)
movsbl %al, %esi
movl %ebp, %edi
callq 0x57ba
movl %eax, %ebp
incq %r14
movq %rbx, %rdi
callq 0x2818
movl $0xb, %edx
movq %r15, %rdi
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
je 0x557b
movq %rbx, %rdi
callq 0x2818
movl %ebp, %edi
movl %eax, %esi
callq 0x57ba
cmpl $0x4, %eax
je 0x56ee
cmpl $0x3, %eax
je 0x56e7
cmpl $0x2, %eax
jne 0x56e0
movl $0x4, %ebp
jmp 0x5728
movl $0x1, %ebp
jmp 0x5728
movl $0x7, %ebp
jmp 0x5728
movq %rbx, %rdi
callq 0x274b
cmpl $0x65, %eax
jg 0x56d1
cmpl $0x28, %eax
je 0x571c
cmpl $0x5c, %eax
jne 0x56e0
movq %rbx, %rdi
callq 0x2818
leaq 0x1262(%rip), %rdi      # 0x689c
movl $0xb, %edx
movl %eax, %esi
callq 0x10d0
movl $0x8, %ebp
testq %rax, %rax
jne 0x5728
leaq 0x1241(%rip), %r15      # 0x689c
movq %rbx, %rdi
callq 0x2818
cmpl $-0x1, %eax
je 0x5728
movq %rbx, %rdi
callq 0x274b
movb %al, (%r14)
incq %r14
movq %rbx, %rdi
callq 0x2818
movl $0xb, %edx
movq %r15, %rdi
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
je 0x565b
jmp 0x5728
movl $0x3, %ebp
jmp 0x5728
movl $0xb, %ebp
jmp 0x5728
movq %rbx, %rdi
callq 0x2818
movl $0xd, %ebp
cmpl $0x40, %eax
jne 0x5728
movq %rbx, %rdi
callq 0x274b
movl $0xe, %ebp
jmp 0x5728
xorl %ebp, %ebp
jmp 0x5728
cmpl $0x66, %eax
je 0x5723
movl $0x5, %ebp
cmpl $0x74, %eax
je 0x5728
movl $0xf, %ebp
jmp 0x5728
movl $0x9, %ebp
jmp 0x5728
movl $0xa, %ebp
jmp 0x5728
movq (%r15), %rcx
movslq %eax, %rdx
movl $0x2, %ebp
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0x554e
xorl %ebp, %ebp
cmpl $0x2e, %eax
setne %bpl
addl $0x3, %ebp
jmp 0x554e
movl $0x2, %ebp
jmp 0x5728
movl $0x6, %ebp
movb $0x0, (%r14)
movabsq $0x100000201, %r14      # imm = 0x100000201
movq %rbx, %rdi
callq 0x2818
cmpb $0x20, %al
ja 0x5755
movzbl %al, %eax
btq %rax, %r14
jae 0x5755
movq %rbx, %rdi
callq 0x274b
jmp 0x5736
movq %rbx, %rdi
callq 0x2818
cmpl $0xa, %eax
jne 0x576a
movq %rbx, %rdi
callq 0x274b
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq