// File: /workspace/github_c_makefile_star2_O0/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 %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0x52f0
movq (%rsp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x514d
jmp 0x52e2
movq (%rsp), %rax
cmpl $0x2, 0x30(%rax)
jne 0x516e
movq (%rsp), %rdi
callq 0x5720
movq (%rsp), %rdi
callq 0x57d0
jmp 0x52d7
movq (%rsp), %rax
cmpl $0x9, 0x30(%rax)
jne 0x5186
movq (%rsp), %rdi
callq 0x59f0
jmp 0x52d5
movq (%rsp), %rax
cmpl $0x6, 0x30(%rax)
jne 0x519e
movq (%rsp), %rdi
callq 0x5ba0
jmp 0x52d3
movq (%rsp), %rax
cmpl $0x5, 0x30(%rax)
jne 0x51b6
movq (%rsp), %rdi
callq 0x5c50
jmp 0x52d1
movq (%rsp), %rax
cmpl $0x8, 0x30(%rax)
jne 0x5266
movq (%rsp), %rdi
callq 0x5400
movsbl %al, %eax
cmpl $0x74, %eax
jne 0x51fb
movq (%rsp), %rdi
callq 0x5720
movq (%rsp), %rdi
callq 0x5720
movq (%rsp), %rax
movabsq $0x7ffc000000000002, %rcx # imm = 0x7FFC000000000002
movq %rcx, 0x28(%rax)
jmp 0x5264
movq (%rsp), %rdi
callq 0x5400
movsbl %al, %eax
cmpl $0x66, %eax
jne 0x5232
movq (%rsp), %rdi
callq 0x5720
movq (%rsp), %rdi
callq 0x5720
movq (%rsp), %rax
movabsq $0x7ffc000000000003, %rcx # imm = 0x7FFC000000000003
movq %rcx, 0x28(%rax)
jmp 0x5262
movq (%rsp), %rdi
callq 0x5400
movsbl %al, %eax
cmpl $0x28, %eax
jne 0x524e
movq (%rsp), %rdi
callq 0x5d00
jmp 0x5260
movq (%rsp), %rdi
leaq 0x54b2(%rip), %rsi      # 0xa70b
movb $0x0, %al
callq 0x55b0
jmp 0x5262
jmp 0x5264
jmp 0x52cf
movq (%rsp), %rax
cmpl $0x3, 0x30(%rax)
jne 0x528d
movq (%rsp), %rdi
leaq 0x54d6(%rip), %rsi      # 0xa751
movb $0x0, %al
callq 0x55b0
movq (%rsp), %rdi
callq 0x5720
jmp 0x52e2
movq (%rsp), %rax
cmpl $0x4, 0x30(%rax)
jne 0x52b4
movq (%rsp), %rdi
leaq 0x54be(%rip), %rsi      # 0xa760
movb $0x0, %al
callq 0x55b0
movq (%rsp), %rdi
callq 0x5720
jmp 0x52e2
movq (%rsp), %rax
cmpl $0x7, 0x30(%rax)
jne 0x52c9
movq (%rsp), %rdi
callq 0x5db0
jmp 0x52e2
jmp 0x52cb
jmp 0x52cd
jmp 0x52cf
jmp 0x52d1
jmp 0x52d3
jmp 0x52d5
jmp 0x52d7
jmp 0x52d9
movq (%rsp), %rdi
callq 0x4ea0
popq %rax
retq
nopw %cs:(%rax,%rax)