// File: /workspace/github_c_makefile_star2_O2/pedro-onate[P]eva/eva.c
// Function: es_parse
static es_val_t es_parse(es_ctx_t* ctx, es_val_t port)
{
  char buf[1024];
  switch(next(port, buf)) {
  case tk_eof:
    return es_eof_obj;
  case tk_str:
    return es_make_string(ctx, buf);
  case tk_sym:
    return es_symbol_intern(ctx, buf);
  case tk_int:
    return es_make_fixnum(atoi(buf));
  case tk_tbool:
    return es_true;
  case tk_fbool:
    return es_false;
  case tk_char:
    return es_make_char_cstr(buf);
  case tk_quot:
    return es_make_list(ctx, symbol_quote, es_parse(ctx, port), NULL);
  case tk_qquot:
    return es_make_list(ctx, symbol_quasiquote, es_parse(ctx, port), NULL);
  case tk_unquot:
    return es_make_list(ctx, symbol_unquote, es_parse(ctx, port), NULL);
  case tk_unquot_splice:
    return es_make_list(ctx, symbol_unquotesplicing, es_parse(ctx, port), NULL);
  case tk_hlpar: {
      es_val_t lst = es_nil;
      while(peek(port, buf) != tk_rpar) {
        lst = es_cons(ctx, es_parse(ctx, port), lst);
      }
      next(port, buf);
      return es_vector_from_list(ctx, reverse(lst));
    }
  case tk_lpar:
    return parse_list(ctx, port);
  default:
    return es_make_error(ctx, "Invalid syntax");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
movq %r14, %rdi
callq 0x47d0
cmpl $0xe, %eax
ja 0x21de
movl %eax, %eax
leaq 0x3f09(%rip), %rcx      # 0x607c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x3b
jmp 0x22a1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
pushq $0x32
jmp 0x22c9
pushq $0xc
jmp 0x22a1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
pushq $0x42
jmp 0x22c9
pushq $0x4
jmp 0x22a1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
pushq $0x3a
jmp 0x22c9
movq %rsp, %rdi
callq 0x1130
leal 0x1(,%rax,8), %eax
movslq %eax, %r15
jmp 0x22f8
leaq 0x4480(%rip), %rsi      # 0x6665
movq %rbx, %rdi
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f4e
pushq $0x3
popq %r15
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x4a92
cmpl $0x3, %eax
je 0x2233
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x205c
movq %rax, %r15
jmp 0x2205
movq %rsp, %rsi
movq %r14, %rdi
callq 0x47d0
pushq $0x3
popq %r14
movq %r15, %rdi
callq 0x2864
testl %eax, %eax
jne 0x225e
movq 0x18(%r15), %rax
movq %r14, 0x18(%r15)
movq %r15, %r14
movq %rax, %r15
jmp 0x2242
movq %rbx, %rdi
movq %r14, %rsi
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x290b
leaq 0x400(%rsp), %rsi
movq %r14, %rdi
callq 0x4a92
cmpl $0x3, %eax
jne 0x230d
leaq 0x400(%rsp), %rsi
movq %r14, %rdi
callq 0x47d0
pushq $0x3
popq %r15
jmp 0x22f8
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2678
jmp 0x22f5
movq %rsp, %rdi
callq 0x1edd
jmp 0x22f5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
pushq $0x2a
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30a3
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2736
movq %rax, %r15
movq %r15, %rax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
movq %rax, %r15
movq %rax, %rdi
callq 0x1fd6
testl %eax, %eax
jne 0x22f8
pushq $0x3
popq %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x205c
movq %rax, %r15
leaq 0x400(%rsp), %r13
movq %rax, %rbp
movq %r14, %rdi
movq %r13, %rsi
callq 0x4a92
cmpl $0x3, %eax
je 0x23b8
movq %r14, %rdi
movq %r13, %rsi
callq 0x4a92
cmpl $0x9, %eax
je 0x2386
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x205c
movq %rax, 0x18(%rbp)
jmp 0x2344
leaq 0x400(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x47d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2143
movq %rax, 0x18(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x4a92
cmpl $0x3, %eax
jne 0x23cd
leaq 0x400(%rsp), %rsi
movq %r14, %rdi
callq 0x47d0
jmp 0x22f8
movl 0x38(%r14), %esi
movl 0x3c(%r14), %edx
leaq 0x42a3(%rip), %rdi      # 0x667f
xorl %eax, %eax
callq 0x1080
movq %r14, %rdi
callq 0x2404
cmpl $0xa, %eax
jne 0x23e3
leaq 0x42b8(%rip), %rsi      # 0x66af
movq %rbx, %rdi
callq 0x1f4e
jmp 0x22f5