// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x1, %r12b
callq 0x1180
movq %rax, %r15
movq (%r15), %r13
movq %rbx, %rdi
callq 0x24cc
cltq
testb $0x20, 0x1(%r13,%rax,2)
sete %bpl
jne 0x482a
testb $0x1, %r12b
movl %ebp, %r12d
je 0x47ec
movq %rbx, %rdi
callq 0x24cc
cmpl $0x3b, %eax
jne 0x4837
movq %rbx, %rdi
callq 0x2404
cmpl $0xa, %eax
jne 0x481b
jmp 0x4832
movq %rbx, %rdi
callq 0x2404
movl %ebp, %r12d
jmp 0x47ec
movq %rbx, %rdi
callq 0x2404
movl %eax, %r15d
leal -0x22(%r15), %eax
cmpl $0xa, %eax
ja 0x48da
leaq 0x1916(%rip), %rcx      # 0x616c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x7
popq %rbp
leaq 0x192f(%rip), %r13      # 0x6198
pushq $0x9
popq %r15
pushq $0xb
popq %r12
movq %rbx, %rdi
callq 0x2404
cmpl $0x5c, %eax
je 0x4888
cmpl $0x22, %eax
jne 0x48d2
jmp 0x498b
movq %rbx, %rdi
callq 0x2404
movl %eax, %ecx
leal -0x6e(%rcx), %eax
cmpl $0x8, %eax
ja 0x48a8
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
pushq $0xa
jmp 0x48d1
movl %ebp, %eax
cmpl $0x61, %ecx
je 0x48d2
cmpl $0x66, %ecx
je 0x48cf
cmpl $0x62, %ecx
jne 0x48bd
pushq $0x8
jmp 0x48d1
movl %ecx, %eax
jmp 0x48d2
pushq $0xd
jmp 0x48d1
movl %r12d, %eax
jmp 0x48d2
movl %r15d, %eax
jmp 0x48d2
pushq $0xc
popq %rax
movb %al, (%r14)
incq %r14
jmp 0x4871
cmpl $-0x1, %r15d
je 0x4a20
cmpl $0x60, %r15d
jne 0x48f1
pushq $0xc
jmp 0x4a3e
xorl %edi, %edi
movl %r15d, %esi
callq 0x4ac0
movl %eax, %ebp
movb %r15b, (%r14)
incq %r14
leaq 0x1d6a(%rip), %r15      # 0x6674
pushq $0xb
popq %r12
movq %rbx, %rdi
callq 0x24cc
movq %r15, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x10c0
testq %rax, %rax
jne 0x4951
movq %rbx, %rdi
callq 0x24cc
cmpl $-0x1, %eax
je 0x4951
movq %rbx, %rdi
callq 0x2404
movb %al, (%r14)
movsbl %al, %esi
movl %ebp, %edi
callq 0x4ac0
movl %eax, %ebp
incq %r14
jmp 0x490e
movq %rbx, %rdi
callq 0x24cc
movl %ebp, %edi
movl %eax, %esi
callq 0x4ac0
cmpl $0x2, %eax
je 0x4a30
cmpl $0x3, %eax
je 0x4a2c
cmpl $0x4, %eax
jne 0x4a24
pushq $0xa
jmp 0x4a3e
pushq $0x1
jmp 0x4a3e
pushq $0x7
jmp 0x4a3e
movq %rbx, %rdi
callq 0x2404
cmpl $0x28, %eax
je 0x4a3c
cmpl $0x74, %eax
je 0x4a34
cmpl $0x66, %eax
je 0x4a38
cmpl $0x5c, %eax
jne 0x4a24
leaq 0x1cb3(%rip), %r15      # 0x6674
pushq $0xb
popq %r12
pushq $0x8
popq %rbp
movq %rbx, %rdi
callq 0x24cc
movq %r15, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x10c0
testq %rax, %rax
jne 0x4a3f
movq %rbx, %rdi
callq 0x24cc
cmpl $-0x1, %eax
je 0x4a3f
movq %rbx, %rdi
callq 0x2404
movb %al, (%r14)
incq %r14
jmp 0x49c8
pushq $0x3
jmp 0x4a3e
pushq $0xb
jmp 0x4a3e
movq %rbx, %rdi
callq 0x24cc
cmpl $0x40, %eax
jne 0x4a28
movq %rbx, %rdi
callq 0x2404
pushq $0xe
jmp 0x4a3e
xorl %ebp, %ebp
jmp 0x4a3f
pushq $0xf
jmp 0x4a3e
pushq $0xd
jmp 0x4a3e
pushq $0x9
jmp 0x4a3e
pushq $0x4
jmp 0x4a3e
pushq $0x5
jmp 0x4a3e
pushq $0x6
jmp 0x4a3e
pushq $0x2
popq %rbp
movb $0x0, (%r14)
movabsq $0x100000201, %r14      # imm = 0x100000201
movq %rbx, %rdi
callq 0x24cc
cmpb $0x20, %al
ja 0x4a6c
movzbl %al, %eax
btq %rax, %r14
jae 0x4a6c
movq %rbx, %rdi
callq 0x2404
jmp 0x4a4d
movq %rbx, %rdi
callq 0x24cc
cmpl $0xa, %eax
jne 0x4a81
movq %rbx, %rdi
callq 0x2404
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq