// File: /workspace/github_c_makefile_star2_O0/afi-lambda[P]a_little_smalltalk/src/lex.c
// Function: nextToken
tokentype nextToken()
{
    char *tp;
    boolean sign;

    /* skip over blanks and comments */
    while (nextChar() && (isspace(cc) || (cc == '"')))
        if (cc == '"')
        {
            /* read comment */
            while (nextChar() && (cc != '"'))
                ;
            if (!cc)
                break; /* break if we run into eof */
        }

    tp = tokenString;
    *tp++ = cc;

    if (!cc) /* end of input */
        token = inputend;

    else if (isalpha(cc))   /* identifier */
    {
        while (nextChar() && isalnum(cc))
            *tp++ = cc;
        if (cc == ':')
        {
            *tp++ = cc;
            token = namecolon;
        }
        else
        {
            pushBack(cc);
            token = nameconst;
        }
    }

    else if (isdigit(cc))   /* number */
    {
        longresult = cc - '0';
        while (nextChar() && isdigit(cc))
        {
            *tp++ = cc;
            longresult = (longresult * 10) + (cc - '0');
        }
        if (longCanBeInt(longresult))
        {
            tokenInteger = longresult;
            token = intconst;
        }
        else
        {
            token = floatconst;
            tokenFloat = (double) longresult;
        }
        if (cc == '.')   /* possible float */
        {
            if (nextChar() && isdigit(cc))
            {
                *tp++ = '.';
                do
                    *tp++ = cc;
                while (nextChar() && isdigit(cc));
                if (cc)
                    pushBack(cc);
                token = floatconst;
                *tp = '\0';
                tokenFloat = atof(tokenString);
            }
            else
            {
                /* nope, just an ordinary period */
                if (cc)
                    pushBack(cc);
                pushBack('.');
            }
        }
        else
            pushBack(cc);

        if (nextChar() && cc == 'e')   /* possible float */
        {
            if (nextChar() && cc == '-')
            {
                sign = true;
                nextChar();
            }
            else
                sign = false;
            if (cc && isdigit(cc))   /* yep, its a float */
            {
                *tp++ = 'e';
                if (sign)
                    *tp++ = '-';
                while (cc && isdigit(cc))
                {
                    *tp++ = cc;
                    nextChar();
                }
                if (cc)
                    pushBack(cc);
                *tp = '\0';
                token = floatconst;
                tokenFloat = atof(tokenString);
            }
            else     /* nope, wrong again */
            {
                if (cc)
                    pushBack(cc);
                if (sign)
                    pushBack('-');
                pushBack('e');
            }
        }
        else if (cc)
            pushBack(cc);
    }

    else if (cc == '$')   /* character constant */
    {
        tokenInteger = (int) nextChar();
        token = charconst;
    }

    else if (cc == '#')   /* symbol */
    {
        tp--; /* erase pound sign */
        if (nextChar() == '(')
            token = arraybegin;
        else
        {
            pushBack(cc);
            while (nextChar() && isSymbolChar(cc))
                *tp++ = cc;
            pushBack(cc);
            token = symconst;
        }
    }

    else if (cc == '\'')   /* string constant */
    {
        tp--; /* erase pound sign */
strloop:
        while (nextChar() && (cc != '\''))
            *tp++ = cc;
        /* check for nested quote marks */
        if (cc && nextChar() && (cc == '\''))
        {
            *tp++ = cc;
            goto strloop;
        }
        pushBack(cc);
        token = strconst;
    }

    else if (isClosing(cc)) /* closing expressions */
        token = closing;

    else if (singleBinary(cc))   /* single binary expressions */
    {
        token = binary;
    }

    else   /* anything else is binary */
    {
        if (nextChar() && binarySecond(cc))
            *tp++ = cc;
        else
            pushBack(cc);
        token = binary;
    }

    *tp = '\0';
    return (token);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x90e0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xd(%rbp)
je 0x8766
callq 0x2220
movq (%rax), %rax
movsbl 0x21da7(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xe(%rbp)
jne 0x8760
movsbl 0x21d89(%rip), %eax     # 0x2a4e0
cmpl $0x22, %eax
sete %al
movb %al, -0xe(%rbp)
movb -0xe(%rbp), %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x876f
jmp 0x87bc
movsbl 0x21d6a(%rip), %eax     # 0x2a4e0
cmpl $0x22, %eax
jne 0x87b7
jmp 0x877d
callq 0x90e0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xf(%rbp)
je 0x879f
movsbl 0x21d4a(%rip), %eax     # 0x2a4e0
cmpl $0x22, %eax
setne %al
movb %al, -0xf(%rbp)
movb -0xf(%rbp), %al
testb $0x1, %al
jne 0x87a8
jmp 0x87aa
jmp 0x877d
cmpb $0x0, 0x21d2f(%rip)     # 0x2a4e0
jne 0x87b5
jmp 0x87bc
jmp 0x87b7
jmp 0x8718
leaq 0x21d2d(%rip), %rax     # 0x2a4f0
movq %rax, -0x8(%rbp)
movb 0x21d13(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
cmpb $0x0, 0x21cfb(%rip)     # 0x2a4e0
jne 0x87f6
movl $0xb, 0x21d4f(%rip)     # 0x2a540
jmp 0x8e81
callq 0x2220
movq (%rax), %rax
movsbl 0x21cdb(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x88bc
jmp 0x881c
callq 0x90e0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x10(%rbp)
je 0x8850
callq 0x2220
movq (%rax), %rax
movsbl 0x21ca3(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x10(%rbp)
movb -0x10(%rbp), %al
testb $0x1, %al
jne 0x8859
jmp 0x8872
movb 0x21c81(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
jmp 0x881c
movsbl 0x21c67(%rip), %eax     # 0x2a4e0
cmpl $0x3a, %eax
jne 0x88a1
movb 0x21c5c(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl $0x2, 0x21ca1(%rip)     # 0x2a540
jmp 0x88b7
movsbl 0x21c38(%rip), %edi     # 0x2a4e0
callq 0x8ec0
movl $0x1, 0x21c89(%rip)     # 0x2a540
jmp 0x8e7f
callq 0x2220
movq (%rax), %rax
movsbl 0x21c15(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x8c60
movsbl 0x21bf9(%rip), %eax     # 0x2a4e0
subl $0x30, %eax
cltq
movq %rax, 0x21c55(%rip)     # 0x2a548
callq 0x90e0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x8929
callq 0x2220
movq (%rax), %rax
movsbl 0x21bcc(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x8932
jmp 0x896a
movb 0x21ba8(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
imulq $0xa, 0x21bf7(%rip), %rax # 0x2a548
movsbl 0x21b88(%rip), %ecx     # 0x2a4e0
subl $0x30, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x21be0(%rip)     # 0x2a548
jmp 0x88f3
cmpq $-0x3fff, 0x21bd3(%rip) # imm = 0xC001
jl 0x899d
cmpq $0x3fff, 0x21bc6(%rip) # imm = 0x3FFF
jg 0x899d
movq 0x21bbd(%rip), %rax     # 0x2a548
movl %eax, 0x21bbf(%rip)     # 0x2a550
movl $0x3, 0x21ba5(%rip)     # 0x2a540
jmp 0x89b8
movl $0x4, 0x21b99(%rip)     # 0x2a540
cvtsi2sdq 0x21b98(%rip), %xmm0 # 0x2a548
movsd %xmm0, 0x21ba0(%rip)    # 0x2a558
movsbl 0x21b21(%rip), %eax     # 0x2a4e0
cmpl $0x2e, %eax
jne 0x8ac0
callq 0x90e0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x8a9f
callq 0x2220
movq (%rax), %rax
movsbl 0x21af8(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x8a9f
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x2e, (%rax)
movb 0x21acb(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
callq 0x90e0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x12(%rbp)
je 0x8a5c
callq 0x2220
movq (%rax), %rax
movsbl 0x21a99(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
setne %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
testb $0x1, %al
jne 0x8a0f
cmpb $0x0, 0x21a76(%rip)     # 0x2a4e0
je 0x8a78
movsbl 0x21a6d(%rip), %edi     # 0x2a4e0
callq 0x8ec0
movl $0x4, 0x21abe(%rip)     # 0x2a540
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
leaq 0x21a60(%rip), %rdi     # 0x2a4f0
callq 0x2070
movsd %xmm0, 0x21abb(%rip)    # 0x2a558
jmp 0x8abe
cmpb $0x0, 0x21a3a(%rip)     # 0x2a4e0
je 0x8ab4
movsbl 0x21a31(%rip), %edi     # 0x2a4e0
callq 0x8ec0
movl $0x2e, %edi
callq 0x8ec0
jmp 0x8acc
movsbl 0x21a19(%rip), %edi     # 0x2a4e0
callq 0x8ec0
callq 0x90e0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x8c44
movsbl 0x219fc(%rip), %eax     # 0x2a4e0
cmpl $0x65, %eax
jne 0x8c44
callq 0x90e0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x8b14
movsbl 0x219df(%rip), %eax     # 0x2a4e0
cmpl $0x2d, %eax
jne 0x8b14
movl $0x1, -0xc(%rbp)
callq 0x90e0
jmp 0x8b1b
movl $0x0, -0xc(%rbp)
movsbl 0x219be(%rip), %eax     # 0x2a4e0
cmpl $0x0, %eax
je 0x8c13
callq 0x2220
movq (%rax), %rax
movsbl 0x219a6(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x8c13
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x65, (%rax)
cmpl $0x0, -0xc(%rbp)
je 0x8b79
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x2d, (%rax)
jmp 0x8b7b
movsbl 0x2195e(%rip), %ecx     # 0x2a4e0
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x13(%rbp)
je 0x8bb0
callq 0x2220
movq (%rax), %rax
movsbl 0x21945(%rip), %ecx     # 0x2a4e0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
setne %al
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
testb $0x1, %al
jne 0x8bb9
jmp 0x8bd7
movb 0x21921(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
callq 0x90e0
jmp 0x8b7b
cmpb $0x0, 0x21902(%rip)     # 0x2a4e0
je 0x8bec
movsbl 0x218f9(%rip), %edi     # 0x2a4e0
callq 0x8ec0
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movl $0x4, 0x21943(%rip)     # 0x2a540
leaq 0x218ec(%rip), %rdi     # 0x2a4f0
callq 0x2070
movsd %xmm0, 0x21947(%rip)    # 0x2a558
jmp 0x8c42
cmpb $0x0, 0x218c6(%rip)     # 0x2a4e0
je 0x8c28
movsbl 0x218bd(%rip), %edi     # 0x2a4e0
callq 0x8ec0
cmpl $0x0, -0xc(%rbp)
je 0x8c38
movl $0x2d, %edi
callq 0x8ec0
movl $0x65, %edi
callq 0x8ec0
jmp 0x8c5b
cmpb $0x0, 0x21895(%rip)     # 0x2a4e0
je 0x8c59
movsbl 0x2188c(%rip), %edi     # 0x2a4e0
callq 0x8ec0
jmp 0x8c5b
jmp 0x8e7d
movsbl 0x21879(%rip), %eax     # 0x2a4e0
cmpl $0x24, %eax
jne 0x8c89
callq 0x90e0
movsbl %al, %eax
movl %eax, 0x218d6(%rip)     # 0x2a550
movl $0x5, 0x218bc(%rip)     # 0x2a540
jmp 0x8e7b
movsbl 0x21850(%rip), %eax     # 0x2a4e0
cmpl $0x23, %eax
jne 0x8d2e
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
callq 0x90e0
movsbl %al, %eax
cmpl $0x28, %eax
jne 0x8cbe
movl $0x7, 0x21884(%rip)     # 0x2a540
jmp 0x8d29
movsbl 0x2181b(%rip), %edi     # 0x2a4e0
callq 0x8ec0
callq 0x90e0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x14(%rbp)
je 0x8cf1
movsbl 0x217fd(%rip), %edi     # 0x2a4e0
callq 0x8ef0
cmpl $0x0, %eax
setne %al
movb %al, -0x14(%rbp)
movb -0x14(%rbp), %al
testb $0x1, %al
jne 0x8cfa
jmp 0x8d13
movb 0x217e0(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
jmp 0x8cca
movsbl 0x217c6(%rip), %edi     # 0x2a4e0
callq 0x8ec0
movl $0x6, 0x21817(%rip)     # 0x2a540
jmp 0x8e79
movsbl 0x217ab(%rip), %eax     # 0x2a4e0
cmpl $0x27, %eax
jne 0x8dec
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x8d4c
callq 0x90e0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x15(%rbp)
je 0x8d6e
movsbl 0x2177b(%rip), %eax     # 0x2a4e0
cmpl $0x27, %eax
setne %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x8d77
jmp 0x8d90
movb 0x21763(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
jmp 0x8d4c
movsbl 0x21749(%rip), %eax     # 0x2a4e0
cmpl $0x0, %eax
je 0x8dd1
callq 0x90e0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x8dd1
movsbl 0x21730(%rip), %eax     # 0x2a4e0
cmpl $0x27, %eax
jne 0x8dd1
movb 0x21725(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
jmp 0x8d4a
movsbl 0x21708(%rip), %edi     # 0x2a4e0
callq 0x8ec0
movl $0x8, 0x21759(%rip)     # 0x2a540
jmp 0x8e77
movsbl 0x216ed(%rip), %edi     # 0x2a4e0
callq 0x8f90
cmpl $0x0, %eax
je 0x8e09
movl $0xa, 0x21739(%rip)     # 0x2a540
jmp 0x8e75
movsbl 0x216d0(%rip), %edi     # 0x2a4e0
callq 0x8ff0
cmpl $0x0, %eax
je 0x8e26
movl $0x9, 0x2171c(%rip)     # 0x2a540
jmp 0x8e73
callq 0x90e0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x8e5d
movsbl 0x216a6(%rip), %edi     # 0x2a4e0
callq 0x9040
cmpl $0x0, %eax
je 0x8e5d
movb 0x21696(%rip), %cl      # 0x2a4e0
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
jmp 0x8e69
movsbl 0x2167c(%rip), %edi     # 0x2a4e0
callq 0x8ec0
movl $0x9, 0x216cd(%rip)     # 0x2a540
jmp 0x8e75
jmp 0x8e77
jmp 0x8e79
jmp 0x8e7b
jmp 0x8e7d
jmp 0x8e7f
jmp 0x8e81
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movl 0x216b2(%rip), %eax     # 0x2a540
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)