// File: /workspace/github_c_makefile_star2_O2/jiribenes[P]scheme/src/read.c
// Function: read1
static void read1(reader_t *reader) {
    eat_whitespace(reader);

    if (reader->toktype == TOK_EOF) {
        return;
    } else if (reader->toktype == TOK_LPAREN) {
        next_char(reader);
        read_list(reader);
    } else if (reader->toktype == TOK_NUMBER) {
        read_number(reader);
    } else if (reader->toktype == TOK_STRING) {
        read_string(reader);
    } else if (reader->toktype == TOK_QUOTE) {
        read_quote(reader);
    } else if (reader->toktype == TOK_HASH) {
        if (peek_next_char(reader) == 't') {
            next_char(reader);
            next_char(reader);
            reader->tokval = TRUE_VAL;
        } else if (peek_next_char(reader) == 'f') {
            next_char(reader);
            next_char(reader);
            reader->tokval = FALSE_VAL;
        } else if (peek_next_char(reader) == '(') {
            // vector => #(elem1 elem2 elem3 ... )
            read_vector(reader);
        } else {
            error_print(reader, "Invalid token beginning with # - "
                                "only #t, #f and #(...) are supported");
        }
    } else if (reader->toktype == TOK_RPAREN) {
        error_print(reader, "Unexpected ')'");
        next_char(reader);
        return;
    } else if (reader->toktype == TOK_DOT) {
        error_print(reader, "Unexpected '.'");
        next_char(reader);
        return;
    } else if (reader->toktype == TOK_SYMBOL) {
        read_symbol(reader);
        return;
    }

    next_token(reader);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x399f
movl 0x30(%rbx), %eax
cmpq $0x9, %rax
ja 0x3989
leaq 0x31a2(%rip), %rcx      # 0x6718
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x3b10
movq %rbx, %rdi
callq 0x399f
movq %rbx, %rdi
callq 0x347e
movl 0x30(%rbx), %eax
testl %eax, %eax
je 0x3827
cmpl $0x4, %eax
je 0x3796
cmpl $0x3, %eax
jne 0x37a2
movq %rbx, %rdi
callq 0x3b10
movabsq $0x7ffc000000000001, %rax # imm = 0x7FFC000000000001
jmp 0x3748
movq %rbx, %rdi
callq 0x3b10
movq 0x10(%rbx), %r14
movsbl (%r14), %edi
callq 0x3a0d
testb %al, %al
jne 0x35cb
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
subq %rsi, %r14
movq %r14, %rdx
callq 0x42e1
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
orq %rax, %rcx
movq %rcx, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x318a(%rip), %rsi      # 0x67a7
jmp 0x36c7
movq %rbx, %rdi
callq 0x3b10
movq 0x10(%rbx), %rax
movq %rax, 0x18(%rbx)
movb (%rax), %bpl
movq %rbx, %rdi
callq 0x3b10
movq 0x10(%rbx), %rax
cmpb $0x22, %bpl
jne 0x3632
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movq %rsi, %rdx
notq %rdx
addq %rax, %rdx
callq 0x4051
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
orq %rax, %rcx
movq %rcx, 0x28(%rbx)
jmp 0x3989
movq 0x10(%rbx), %rax
cmpb $0x0, (%rax)
je 0x378a
movzbl 0x1(%rax), %eax
cmpl $0x28, %eax
je 0x3860
cmpl $0x66, %eax
je 0x383d
cmpl $0x74, %eax
jne 0x378a
movq %rbx, %rdi
callq 0x3b10
movq %rbx, %rdi
callq 0x3b10
movabsq $0x7ffc000000000001, %rax # imm = 0x7FFC000000000001
incq %rax
jmp 0x3748
leaq 0x30ef(%rip), %rsi      # 0x67b6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3a49
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3b10
movq %rbx, %rdi
callq 0x3b10
movq %rbx, %rdi
callq 0x347e
movq (%rbx), %rdi
leaq 0x2a7c(%rip), %rsi      # 0x617d
pushq $0x5
popq %rdx
callq 0x42e1
movq %rax, %r14
movq %rbx, %rdi
callq 0x354f
movq (%rbx), %r15
movq 0x28(%rbx), %rsi
movabsq $-0x4000000000000, %r12 # imm = 0xFFFC000000000000
orq %r14, %r12
movabsq $0x7ffc000000000001, %rdx # imm = 0x7FFC000000000001
movq %r15, %rdi
callq 0x434c
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x434c
movq %rax, 0x28(%rbx)
jmp 0x3989
callq 0x1040
movq %rax, %r14
andl $0x0, (%rax)
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x1070
movsd %xmm0, (%rsp)
movq 0x10(%rbx), %rax
movzbl (%rax), %eax
cmpl $0x2d, %eax
je 0x38ed
cmpl $0x2b, %eax
je 0x38ed
jmp 0x38f5
leaq 0x2fd0(%rip), %rsi      # 0x6761
jmp 0x382e
leaq 0x3045(%rip), %rsi      # 0x67e2
jmp 0x382e
movabsq $0x7ffc000000000001, %r15 # imm = 0x7FFC000000000001
movq %rbx, %rdi
callq 0x354f
movq %rbx, %rdi
callq 0x399f
movq (%rbx), %rdi
movq 0x28(%rbx), %rsi
movq %r15, %rdx
callq 0x434c
movq %rax, %r14
movabsq $0x3ffffffffffff, %r13  # imm = 0x3FFFFFFFFFFFF
movq %rax, %r12
cmpl $0x0, 0x30(%rbx)
je 0x3989
movq %rbx, %rdi
callq 0x347e
movl 0x30(%rbx), %eax
testl %eax, %eax
je 0x3827
andq %r13, %r12
cmpl $0x4, %eax
je 0x38ae
cmpl $0x3, %eax
je 0x38cf
movq %rbx, %rdi
callq 0x354f
movq (%rbx), %rdi
movq 0x28(%rbx), %rsi
movq %r15, %rdx
callq 0x434c
movq %rax, 0x18(%r12)
jmp 0x37d8
leaq 0x2f97(%rip), %rsi      # 0x67c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3a49
jmp 0x3989
movq %rbx, %rdi
callq 0x3b10
movq %rbx, %rdi
callq 0x3b10
movabsq $0x7ffc000000000001, %rax # imm = 0x7FFC000000000001
orq $0x2, %rax
jmp 0x3748
movq %rbx, %rdi
callq 0x3b10
movq %rbx, %rdi
callq 0x3b10
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x4246
movq %rax, %r14
cmpl $0x0, 0x30(%rbx)
je 0x3989
movq %rbx, %rdi
callq 0x347e
cmpl $0x3, 0x30(%rbx)
je 0x38cf
movq %rbx, %rdi
callq 0x354f
movq (%rbx), %rdi
movq 0x28(%rbx), %rdx
movq %r14, %rsi
callq 0x441f
jmp 0x387d
movq %rbx, %rdi
callq 0x3b10
movq %rbx, %rdi
callq 0x347e
movq %rbx, %rdi
callq 0x354f
movq 0x28(%rbx), %rax
movq %rax, 0x18(%r12)
movabsq $-0x4000000000000, %rax # imm = 0xFFFC000000000000
orq %rax, %r14
movq %r14, 0x28(%rbx)
movq %rbx, %rdi
callq 0x3b10
jmp 0x3989
movq %rbx, %rdi
callq 0x3b10
movq 0x10(%rbx), %rcx
movb (%rcx), %al
leal -0x30(%rax), %edx
cmpb $0xa, %dl
jb 0x38ed
cmpb $0x2e, %al
jne 0x3926
movb 0x1(%rcx), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x395e
movq %rbx, %rdi
callq 0x3b10
movq 0x10(%rbx), %rax
movb (%rax), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x3910
movzbl %al, %eax
orl $0x20, %eax
cmpl $0x65, %eax
jne 0x395e
movq %rbx, %rdi
callq 0x3b10
movq 0x10(%rbx), %rax
movzbl (%rax), %eax
cmpl $0x2d, %eax
je 0x394a
cmpl $0x2b, %eax
jne 0x3952
movq %rbx, %rdi
callq 0x3b10
movq 0x10(%rbx), %rax
movb (%rax), %al
addb $-0x30, %al
cmpb $0xa, %al
jb 0x394a
cmpl $0x22, (%r14)
movsd (%rsp), %xmm0
jne 0x3984
movq 0x18(%rbx), %rax
movsbl (%rax), %edx
leaq 0x2e82(%rip), %rsi      # 0x67f9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3a49
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x347e