// File: /workspace/github_c_makefile_star2_O1/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 0x28af
cltq
movzwl (%r12,%rax,2), %ebp
btl $0xd, %ebp
jae 0x5b7b
movq %rbx, %rdi
callq 0x27e7
movq (%r15), %r12
movq %rbx, %rdi
callq 0x28af
cltq
testb $0x20, 0x1(%r12,%rax,2)
jne 0x5b58
btl $0xd, %ebp
jb 0x5b40
movq %rbx, %rdi
callq 0x28af
cmpl $0x3b, %eax
jne 0x5b9c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x27e7
cmpl $0xa, %eax
jne 0x5b8a
cmpl $0x3b, %ebp
je 0x5b40
movq %rbx, %rdi
callq 0x27e7
movl %eax, %r15d
leal -0x22(%r15), %eax
cmpl $0xa, %eax
ja 0x5c47
leaq 0x1ad9(%rip), %rcx      # 0x7694
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1af5(%rip), %r15      # 0x76c0
movq %rbx, %rdi
callq 0x27e7
cmpl $0x5c, %eax
je 0x5be9
cmpl $0x22, %eax
je 0x5d1d
movb %al, (%r14)
incq %r14
jmp 0x5bcb
movq %rbx, %rdi
callq 0x27e7
cmpl $0x6d, %eax
jle 0x5c0e
leal -0x6e(%rax), %ecx
cmpl $0x8, %ecx
ja 0x5be1
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movl $0xa, %eax
jmp 0x5be1
cmpl $0x61, %eax
je 0x5c39
cmpl $0x62, %eax
je 0x5c40
cmpl $0x66, %eax
jne 0x5be1
movl $0xc, %eax
jmp 0x5be1
movl $0x9, %eax
jmp 0x5be1
movl $0xb, %eax
jmp 0x5be1
movl $0xd, %eax
jmp 0x5be1
movl $0x7, %eax
jmp 0x5be1
movl $0x8, %eax
jmp 0x5be1
cmpl $-0x1, %r15d
je 0x5de6
cmpl $0x60, %r15d
jne 0x5c61
movl $0xc, %ebp
jmp 0x5e1a
xorl %edi, %edi
movl %r15d, %esi
callq 0x5ed3
movl %eax, %ebp
movb %r15b, (%r14)
incq %r14
movq %rbx, %rdi
callq 0x28af
leaq 0x1f60(%rip), %rdi      # 0x7be2
movl $0xb, %edx
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
jne 0x5cdd
leaq 0x1f48(%rip), %r15      # 0x7be2
movq %rbx, %rdi
callq 0x28af
cmpl $-0x1, %eax
je 0x5cdd
movq %rbx, %rdi
callq 0x27e7
movb %al, (%r14)
movsbl %al, %esi
movl %ebp, %edi
callq 0x5ed3
movl %eax, %ebp
incq %r14
movq %rbx, %rdi
callq 0x28af
movl $0xb, %edx
movq %r15, %rdi
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
je 0x5c9a
movq %rbx, %rdi
callq 0x28af
movl %ebp, %edi
movl %eax, %esi
callq 0x5ed3
cmpl $0x4, %eax
je 0x5e07
cmpl $0x3, %eax
je 0x5e00
cmpl $0x2, %eax
jne 0x5df9
movl $0x4, %ebp
jmp 0x5e1a
movl $0x1, %ebp
jmp 0x5e1a
movl $0x7, %ebp
jmp 0x5e1a
movq %rbx, %rdi
callq 0x27e7
cmpl $0x65, %eax
jg 0x5dea
cmpl $0x28, %eax
je 0x5e0e
cmpl $0x5c, %eax
jne 0x5df9
movq %rbx, %rdi
callq 0x28af
leaq 0x1e89(%rip), %rdi      # 0x7be2
movl $0xb, %edx
movl %eax, %esi
callq 0x10d0
movl $0x8, %ebp
testq %rax, %rax
jne 0x5e1a
leaq 0x1e68(%rip), %r15      # 0x7be2
movq %rbx, %rdi
callq 0x28af
cmpl $-0x1, %eax
je 0x5e1a
movq %rbx, %rdi
callq 0x27e7
movb %al, (%r14)
incq %r14
movq %rbx, %rdi
callq 0x28af
movl $0xb, %edx
movq %r15, %rdi
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
je 0x5d7a
jmp 0x5e1a
movl $0x3, %ebp
jmp 0x5e1a
movl $0xb, %ebp
jmp 0x5e1a
movq %rbx, %rdi
callq 0x28af
movl $0xd, %ebp
cmpl $0x40, %eax
jne 0x5e1a
movq %rbx, %rdi
callq 0x27e7
movl $0xe, %ebp
jmp 0x5e1a
xorl %ebp, %ebp
jmp 0x5e1a
cmpl $0x66, %eax
je 0x5e15
movl $0x5, %ebp
cmpl $0x74, %eax
je 0x5e1a
movl $0xf, %ebp
jmp 0x5e1a
movl $0x9, %ebp
jmp 0x5e1a
movl $0xa, %ebp
jmp 0x5e1a
movl $0x2, %ebp
jmp 0x5e1a
movl $0x6, %ebp
movb $0x0, (%r14)
movq %rbx, %rdi
callq 0x28af
leaq 0x1dc0(%rip), %rdi      # 0x7bed
movl $0x3, %edx
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
je 0x5e69
leaq 0x1da8(%rip), %r14      # 0x7bed
movq %rbx, %rdi
callq 0x27e7
movq %rbx, %rdi
callq 0x28af
movl $0x3, %edx
movq %r14, %rdi
movl %eax, %esi
callq 0x10d0
testq %rax, %rax
jne 0x5e45
movq %rbx, %rdi
callq 0x28af
cmpl $0xa, %eax
jne 0x5e7e
movq %rbx, %rdi
callq 0x27e7
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq