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

    if ((*reader->cur) == '(') {
        reader->toktype = TOK_LPAREN;
        reader->tokstart = reader->cur;
    } else if ((*reader->cur) == ')') {
        reader->toktype = TOK_RPAREN;
        reader->tokstart = reader->cur;
    } else if ((*reader->cur) == '#') {
        reader->toktype = TOK_HASH;
        reader->tokstart = reader->cur;
    } else if ((*reader->cur) == '.') {
        reader->toktype = TOK_DOT;
        reader->tokstart = reader->cur;
    } else if ((*reader->cur) == '\'') {
        reader->toktype = TOK_QUOTE;
        reader->tokstart = reader->cur;
    } else if ((*reader->cur) == '\"') {
        reader->toktype = TOK_STRING;
        reader->tokstart = reader->cur;
    } else if (is_digit(*reader->cur)) {
        reader->toktype = TOK_NUMBER;
        reader->tokstart = reader->cur;
    } else if (((*reader->cur) == '-') && is_digit(peek_next_char(reader))) {
        reader->toktype = TOK_NUMBER;
        reader->tokstart = reader->cur;
    } else if (((*reader->cur) == '+') && is_digit(peek_next_char(reader))) {
        reader->toktype = TOK_NUMBER;
        reader->tokstart = reader->cur;
    } else if ((*reader->cur) == '\0') {
        reader->toktype = TOK_EOF;
        reader->tokstart = reader->cur;
    } else if (is_symbol(*reader->cur)) {
        reader->toktype = TOK_SYMBOL;
        reader->tokstart = reader->cur;
    } else {
        error_print(reader, "Unknown token (starts with '%c')",
                    *reader->tokstart);
    }
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0x52f0
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x4ede
movq (%rsp), %rax
movl $0x2, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5123
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
jne 0x4f0e
movq (%rsp), %rax
movl $0x3, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5121
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x4f3e
movq (%rsp), %rax
movl $0x8, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x511f
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x4f6e
movq (%rsp), %rax
movl $0x4, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x511d
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x4f9e
movq (%rsp), %rax
movl $0x5, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x511b
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x4fce
movq (%rsp), %rax
movl $0x6, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5119
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %edi
callq 0x53d0
testb $0x1, %al
jne 0x4fe4
jmp 0x5004
movq (%rsp), %rax
movl $0x9, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5117
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x504b
movq (%rsp), %rdi
callq 0x5400
movsbl %al, %edi
callq 0x53d0
testb $0x1, %al
jne 0x502b
jmp 0x504b
movq (%rsp), %rax
movl $0x9, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5115
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x5092
movq (%rsp), %rdi
callq 0x5400
movsbl %al, %edi
callq 0x53d0
testb $0x1, %al
jne 0x5072
jmp 0x5092
movq (%rsp), %rax
movl $0x9, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5113
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x50bf
movq (%rsp), %rax
movl $0x0, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5111
movq (%rsp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %edi
callq 0x5440
testb $0x1, %al
jne 0x50d5
jmp 0x50f2
movq (%rsp), %rax
movl $0x7, 0x30(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x510f
movq (%rsp), %rdi
movq (%rsp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %edx
leaq 0x55e2(%rip), %rsi      # 0xa6ea
movb $0x0, %al
callq 0x55b0
jmp 0x5111
jmp 0x5113
jmp 0x5115
jmp 0x5117
jmp 0x5119
jmp 0x511b
jmp 0x511d
jmp 0x511f
jmp 0x5121
jmp 0x5123
popq %rax
retq
nopw %cs:(%rax,%rax)