// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/parse.c
// Function: tokenchar
static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
    Janet ret;
    double numval;
    int32_t blen;
    if (janet_is_symbol_char(c)) {
        push_buf(p, (uint8_t) c);
        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
        return 1;
    }
    /* Token finished */
    blen = (int32_t) p->bufcount;
    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
    if (p->buf[0] == ':') {
        /* Don't do full utf-8 check unless we have seen non ascii characters. */
        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
        if (!valid) {
            p->error = "invalid utf-8 in keyword";
            return 0;
        }
        ret = janet_keywordv(p->buf + 1, blen - 1);
#ifdef JANET_INT_TYPES
    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
        (void) numval;
#else
    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
        ret = janet_wrap_number(numval);
#endif
    } else if (!check_str_const("nil", p->buf, blen)) {
        ret = janet_wrap_nil();
    } else if (!check_str_const("false", p->buf, blen)) {
        ret = janet_wrap_false();
    } else if (!check_str_const("true", p->buf, blen)) {
        ret = janet_wrap_true();
    } else {
        if (start_dig) {
            p->error = "symbol literal cannot start with a digit";
            return 0;
        } else {
            /* Don't do full utf-8 check unless we have seen non ascii characters. */
            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
            if (!valid) {
                p->error = "invalid utf-8 in symbol";
                return 0;
            }
            ret = janet_symbolv(p->buf, blen);
        }
    }
    p->bufcount = 0;
    popstate(p, ret);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %edi
callq 0x4f7b0
cmpl $0x0, %eax
je 0x50cb3
movq -0x10(%rbp), %rdi
movzbl -0x19(%rbp), %esi
callq 0x52810
movzbl -0x19(%rbp), %eax
cmpl $0x7f, %eax
jle 0x50ca7
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x50f91
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x71(%rbp)
jl 0x50ce7
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x38(%rbp)
movb $0x1, %al
cmpl $0x0, -0x38(%rbp)
movb %al, -0x72(%rbp)
jne 0x50d3b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2d, %ecx
movb %al, -0x72(%rbp)
je 0x50d3b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2b, %ecx
movb %al, -0x72(%rbp)
je 0x50d3b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
sete %al
movb %al, -0x72(%rbp)
movb -0x72(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x50def
movq -0x18(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x4(%rcx)
movb %al, -0x73(%rbp)
je 0x50d89
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x1, %rdi
movl -0x34(%rbp), %esi
subl $0x1, %esi
callq 0x4f7f0
cmpl $0x0, %eax
setne %al
movb %al, -0x73(%rbp)
movb -0x73(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jne 0x50db5
movq -0x10(%rbp), %rax
leaq 0x43ca1(%rip), %rcx     # 0x94a46
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x50f91
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x1, %rdi
movl -0x34(%rbp), %esi
subl $0x1, %esi
callq 0x68bf0
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x50f71
cmpl $0x0, -0x3c(%rbp)
je 0x50e13
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x34(%rbp), %esi
leaq -0x28(%rbp), %rdx
callq 0x67040
cmpl $0x0, %eax
jne 0x50e13
jmp 0x50f6f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x34(%rbp), %edx
leaq 0x3b92c(%rip), %rdi     # 0x8c751
callq 0x52d10
cmpl $0x0, %eax
jne 0x50e4f
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x50f6d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x34(%rbp), %edx
leaq 0x4517b(%rip), %rdi     # 0x95fdc
callq 0x52d10
cmpl $0x0, %eax
jne 0x50e8b
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
callq 0x7b460
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x50f6b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x34(%rbp), %edx
leaq 0x45137(%rip), %rdi     # 0x95fd4
callq 0x52d10
cmpl $0x0, %eax
jne 0x50ec7
movabsq $-0x6ffffffffffff, %rdi # imm = 0xFFF9000000000001
callq 0x7b460
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x50f69
cmpl $0x0, -0x38(%rbp)
je 0x50ee8
movq -0x10(%rbp), %rax
leaq 0x43b87(%rip), %rcx     # 0x94a5f
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x50f91
movq -0x18(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x4(%rcx)
movb %al, -0x74(%rbp)
je 0x50f10
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x34(%rbp), %esi
callq 0x4f7f0
cmpl $0x0, %eax
setne %al
movb %al, -0x74(%rbp)
movb -0x74(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jne 0x50f39
movq -0x10(%rbp), %rax
leaq 0x43b5c(%rip), %rcx     # 0x94a88
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x50f91
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x34(%rbp), %esi
callq 0x68bf0
movq %rax, %rdi
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
callq 0x7b550
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x50f69
jmp 0x50f6b
jmp 0x50f6d
jmp 0x50f6f
jmp 0x50f71
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x51fe0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)