// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x223b8(%rip), %r15d    # 0x284b0
movq 0x223b9(%rip), %r12     # 0x284b8
leaq 0x2241a(%rip), %r14     # 0x28520
testl %r15d, %r15d
jle 0x6120
decl %r15d
movl %r15d, 0x2239b(%rip)    # 0x284b0
movb (%r15,%r14), %bpl
testb %bpl, %bpl
jne 0x6133
jmp 0x6190
movb (%r12), %bpl
testb %bpl, %bpl
je 0x6190
incq %r12
movq %r12, 0x22385(%rip)     # 0x284b8
callq 0x2240
cmpb $0x22, %bpl
je 0x6154
movq %rax, %rbx
movq (%rax), %rcx
movsbq %bpl, %rax
movzwl (%rcx,%rax,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
je 0x61c2
cmpb $0x22, %bpl
jne 0x6106
testl %r15d, %r15d
jle 0x616f
decl %r15d
movl %r15d, 0x22347(%rip)    # 0x284b0
movb (%r15,%r14), %al
jmp 0x6181
movb (%r12), %al
testb %al, %al
je 0x6190
incq %r12
movq %r12, 0x22337(%rip)     # 0x284b8
movzbl %al, %eax
cmpb $0x22, %al
je 0x6106
testl %eax, %eax
jne 0x615a
movb $0x0, 0x22329(%rip)     # 0x284c0
movl $0xb, 0x2236f(%rip)     # 0x28510
leaq 0x22319(%rip), %r13     # 0x284c1
movb $0x0, (%r13)
movl 0x2235d(%rip), %eax     # 0x28510
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb %bpl, 0x222f7(%rip)     # 0x284c0
movq (%rbx), %rcx
movzwl (%rcx,%rax,2), %edx
btl $0xa, %edx
jb 0x6225
btl $0xb, %edx
jb 0x6271
movzbl %bpl, %eax
cmpl $0x3a, %eax
jg 0x6376
addl $-0x22, %eax
cmpl $0xc, %eax
ja 0x65df
leaq 0x3680(%rip), %rdx      # 0x9880
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
testl %r15d, %r15d
jle 0x6679
decl %r15d
movl %r15d, 0x22294(%rip)    # 0x284b0
movb (%r15,%r14), %cl
jmp 0x668f
leaq 0x22295(%rip), %r13     # 0x284c1
testl %r15d, %r15d
jle 0x6245
decl %r15d
movl %r15d, 0x22275(%rip)    # 0x284b0
movb (%r15,%r14), %al
testb %al, %al
jne 0x6257
jmp 0x626d
movb (%r12), %al
testb %al, %al
je 0x626d
incq %r12
movq %r12, 0x22261(%rip)     # 0x284b8
movq (%rbx), %rcx
movsbq %al, %rdx
testb $0x8, (%rcx,%rdx,2)
je 0x62ca
movb %al, (%r13)
incq %r13
jmp 0x622c
xorl %eax, %eax
jmp 0x62e5
addq $-0x30, %rax
leaq 0x22245(%rip), %r13     # 0x284c1
testl %r15d, %r15d
jle 0x6295
decl %r15d
movl %r15d, 0x22225(%rip)    # 0x284b0
movb (%r15,%r14), %cl
testb %cl, %cl
jne 0x62a7
jmp 0x6305
movb (%r12), %cl
testb %cl, %cl
je 0x6305
incq %r12
movq %r12, 0x22211(%rip)     # 0x284b8
movq (%rbx), %rsi
movsbq %cl, %rdx
testb $0x8, 0x1(%rsi,%rdx,2)
je 0x6307
movb %dl, (%r13)
incq %r13
leaq (%rax,%rax,4), %rax
leaq (%rdx,%rax,2), %rax
addq $-0x30, %rax
jmp 0x627c
cmpb $0x3a, %al
jne 0x62e5
movb $0x3a, (%r13)
incq %r13
movl $0x2, 0x22230(%rip)     # 0x28510
jmp 0x61a8
leal 0x1(%r15), %ecx
movl %ecx, 0x221c1(%rip)     # 0x284b0
movslq %r15d, %rcx
movb %al, (%rcx,%r14)
movl $0x1, 0x22210(%rip)     # 0x28510
jmp 0x61a8
xorl %ecx, %ecx
leaq 0x3fff(%rax), %rdx
cmpq $0x7ffe, %rdx           # imm = 0x7FFE
ja 0x6324
movl %eax, 0x221f7(%rip)     # 0x28514
movl $0x3, %eax
jmp 0x6336
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x221e7(%rip)    # 0x28518
movl $0x4, %eax
movl %eax, 0x221d4(%rip)     # 0x28510
cmpb $0x2e, %cl
jne 0x635d
testl %r15d, %r15d
jle 0x6398
decl %r15d
movl %r15d, 0x22160(%rip)    # 0x284b0
movb (%r15,%r14), %al
movl %r15d, %ecx
testb %al, %al
jne 0x63aa
jmp 0x63c5
movslq %r15d, %rax
leal 0x1(%r15), %edx
movl %edx, 0x22146(%rip)     # 0x284b0
movb %cl, (%rax,%r14)
movl %edx, %r15d
jmp 0x6472
cmpl $0x3b, %eax
je 0x6389
cmpl $0x5b, %eax
je 0x63dd
cmpl $0x5d, %eax
jne 0x65df
movl $0xa, 0x2217d(%rip)     # 0x28510
jmp 0x61a1
movb (%r12), %al
testb %al, %al
je 0x63c2
incq %r12
movq %r12, 0x2210e(%rip)     # 0x284b8
movq (%rbx), %rcx
movsbq %al, %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0x63ec
movslq %r15d, %rcx
incl %r15d
movb %al, (%rcx,%r14)
movl %r15d, %ecx
leal 0x1(%rcx), %r15d
movl %r15d, 0x220e0(%rip)    # 0x284b0
movslq %ecx, %rax
movb $0x2e, (%rax,%r14)
jmp 0x6472
movl $0x9, 0x22129(%rip)     # 0x28510
jmp 0x61a1
movb $0x2e, (%r13)
addq $0x2, %r13
movq %r13, %rcx
movq %rcx, %r13
movb %al, -0x1(%rcx)
testl %r15d, %r15d
jle 0x6417
decl %r15d
movl %r15d, 0x220a3(%rip)    # 0x284b0
movb (%r15,%r14), %al
testb %al, %al
jne 0x6429
jmp 0x644f
movb (%r12), %al
testb %al, %al
je 0x644f
incq %r12
movq %r12, 0x2208f(%rip)     # 0x284b8
movq (%rbx), %rdx
movsbq %al, %rsi
leaq 0x1(%r13), %rcx
testb $0x8, 0x1(%rdx,%rsi,2)
jne 0x63f8
movslq %r15d, %rcx
leal 0x1(%r15), %edx
movl %edx, 0x22068(%rip)     # 0x284b0
movb %al, (%rcx,%r14)
movl %edx, %r15d
movl $0x4, 0x220b7(%rip)     # 0x28510
movb $0x0, (%r13)
leaq 0x2205b(%rip), %rdi     # 0x284c0
callq 0x2080
movsd %xmm0, 0x220a6(%rip)    # 0x28518
testl %r15d, %r15d
jle 0x6487
decl %r15d
movl %r15d, 0x2202f(%rip)    # 0x284b0
movb (%r15,%r14), %al
jmp 0x649d
movb (%r12), %al
testb %al, %al
je 0x61a8
incq %r12
movq %r12, 0x2201b(%rip)     # 0x284b8
testb %al, %al
je 0x61a8
movzbl %al, %ecx
cmpl $0x65, %ecx
jne 0x64c2
testl %r15d, %r15d
jle 0x64d8
decl %r15d
movl %r15d, 0x21ff4(%rip)    # 0x284b0
movb (%r15,%r14), %al
jmp 0x64ee
leal 0x1(%r15), %ecx
movl %ecx, 0x21fe4(%rip)     # 0x284b0
movslq %r15d, %rcx
movb %al, (%rcx,%r14)
jmp 0x61a8
movb (%r12), %al
testb %al, %al
je 0x6645
incq %r12
movq %r12, 0x21fca(%rip)     # 0x284b8
cmpb $0x2d, %al
jne 0x6516
testl %r15d, %r15d
jle 0x6603
decl %r15d
movl %r15d, 0x21fab(%rip)    # 0x284b0
movb (%r15,%r14), %cl
testb %cl, %cl
jne 0x6615
jmp 0x6639
testb %al, %al
je 0x6645
movq (%rbx), %rcx
movsbq %al, %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x663b
movb $0x65, (%r13)
incq %r13
movq %r13, %rdx
jmp 0x6763
leaq 0x21f79(%rip), %r13     # 0x284c0
testl %r15d, %r15d
jle 0x655c
decl %r15d
movl %r15d, 0x21f5a(%rip)    # 0x284b0
movb (%r15,%r14), %al
jmp 0x6572
movb (%r12), %al
testb %al, %al
je 0x66c9
incq %r12
movq %r12, 0x21f46(%rip)     # 0x284b8
cmpb $0x27, %al
je 0x6584
movzbl %al, %edx
movl %eax, %ecx
testl %edx, %edx
jne 0x65ba
jmp 0x66cb
testl %r15d, %r15d
jle 0x6599
decl %r15d
movl %r15d, 0x21f1d(%rip)    # 0x284b0
movb (%r15,%r14), %cl
jmp 0x65af
movb (%r12), %cl
testb %cl, %cl
je 0x66c9
incq %r12
movq %r12, 0x21f09(%rip)     # 0x284b8
movb $0x27, %al
cmpb $0x27, %cl
jne 0x66cb
movb %al, (%r13)
incq %r13
jmp 0x6547
testl %r15d, %r15d
jle 0x66ae
decl %r15d
movl %r15d, 0x21eda(%rip)    # 0x284b0
movb (%r15,%r14), %al
jmp 0x6888
testl %r15d, %r15d
jle 0x66eb
decl %r15d
movl %r15d, 0x21ebe(%rip)    # 0x284b0
movb (%r15,%r14), %al
testb %al, %al
jne 0x66fd
jmp 0x6732
movb (%r12), %cl
testb %cl, %cl
je 0x6639
incq %r12
movq %r12, 0x21ea3(%rip)     # 0x284b8
movq (%rbx), %rdx
movsbq %cl, %rsi
testb $0x8, 0x1(%rdx,%rsi,2)
jne 0x665e
leal 0x1(%r15), %edx
movslq %r15d, %rsi
movb %cl, (%rsi,%r14)
movl %edx, %r15d
cmpb $0x2d, %al
movb $0x2d, %al
jne 0x6648
jmp 0x663b
movb $0x2d, %al
movslq %r15d, %rcx
incl %r15d
movb %al, (%rcx,%r14)
movl %r15d, %edx
leal 0x1(%rdx), %eax
movl %eax, 0x21e5f(%rip)     # 0x284b0
movslq %edx, %rax
movb $0x65, (%rax,%r14)
jmp 0x61a8
movb $0x65, (%r13)
cmpb $0x2d, %al
jne 0x675b
movb $0x2d, 0x1(%r13)
addq $0x2, %r13
jmp 0x675e
movb (%r12), %cl
testb %cl, %cl
je 0x67e5
incq %r12
movq %r12, 0x21e29(%rip)     # 0x284b8
cmpb $0x28, %cl
jne 0x67e7
movl $0x7, 0x21e6e(%rip)     # 0x28510
leaq 0x21e17(%rip), %r13     # 0x284c0
jmp 0x61a8
movb (%r12), %al
testb %al, %al
je 0x6886
incq %r12
movq %r12, 0x21df4(%rip)     # 0x284b8
jmp 0x6888
xorl %ecx, %ecx
leal 0x1(%r15), %eax
movl %eax, 0x21ddb(%rip)     # 0x284b0
movslq %r15d, %rax
movb %cl, (%rax,%r14)
movl $0x8, 0x21e2a(%rip)     # 0x28510
jmp 0x61a8
movb (%r12), %al
testb %al, %al
je 0x6732
incq %r12
movq %r12, 0x21dbb(%rip)     # 0x284b8
movsbq %al, %rdx
testb $0x2c, 0x1(%rcx,%rdx,2)
jne 0x6734
movzbl %al, %ecx
addl $-0x22, %ecx
cmpl $0x3b, %ecx
ja 0x6723
movabsq $0xa000000020010e1, %rdx # imm = 0xA000000020010E1
btq %rcx, %rdx
jb 0x6734
movb %al, 0x21d98(%rip)      # 0x284c1
leaq 0x21d92(%rip), %r13     # 0x284c2
jmp 0x674c
xorl %eax, %eax
leal 0x1(%r15), %ecx
movl %ecx, 0x21d72(%rip)     # 0x284b0
movslq %r15d, %rcx
movb %al, (%rcx,%r14)
leaq 0x21d75(%rip), %r13     # 0x284c1
movl $0x9, 0x21dba(%rip)     # 0x28510
jmp 0x61a8
incq %r13
movq %r13, %rdx
movl %ecx, %eax
movq %rdx, %r13
movq (%rbx), %rcx
movsbq %al, %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x67ac
movb %al, (%r13)
testl %r15d, %r15d
jle 0x678d
decl %r15d
movl %r15d, 0x21d29(%rip)    # 0x284b0
movb (%r15,%r14), %al
jmp 0x679f
movb (%r12), %al
testb %al, %al
je 0x67a7
incq %r12
movq %r12, 0x21d19(%rip)     # 0x284b8
leaq 0x1(%r13), %rdx
testb %al, %al
jne 0x6763
incq %r13
jmp 0x67bd
leal 0x1(%r15), %ecx
movl %ecx, 0x21cfa(%rip)     # 0x284b0
movslq %r15d, %rcx
movb %al, (%rcx,%r14)
movb $0x0, (%r13)
movl $0x4, 0x21d44(%rip)     # 0x28510
leaq 0x21ced(%rip), %rdi     # 0x284c0
callq 0x2080
movsd %xmm0, 0x21d38(%rip)    # 0x28518
jmp 0x61a8
xorl %ecx, %ecx
leal 0x1(%r15), %eax
movl %eax, 0x21cbf(%rip)     # 0x284b0
movslq %r15d, %rdx
movb %cl, (%rdx,%r14)
leaq 0x21cc1(%rip), %r13     # 0x284c0
movabsq $0x8000000020010a1, %rdx # imm = 0x8000000020010A1
testl %eax, %eax
jle 0x681f
decl %eax
movl %eax, 0x21c9b(%rip)     # 0x284b0
movb (%rax,%r14), %cl
testb %cl, %cl
jne 0x6831
jmp 0x6866
movb (%r12), %cl
testb %cl, %cl
je 0x6866
incq %r12
movq %r12, 0x21c87(%rip)     # 0x284b8
movq (%rbx), %rsi
movsbq %cl, %rdi
movzwl (%rsi,%rdi,2), %esi
testl $0xc00, %esi            # imm = 0xC00
je 0x684d
movb %cl, (%r13)
incq %r13
jmp 0x6809
btl $0xd, %esi
jb 0x6868
movzbl %cl, %esi
addl $-0x22, %esi
cmpl $0x3b, %esi
ja 0x6844
btq %rsi, %rdx
jae 0x6844
jmp 0x6868
xorl %ecx, %ecx
leal 0x1(%rax), %edx
movl %edx, 0x21c3f(%rip)     # 0x284b0
cltq
movb %cl, (%rax,%r14)
movl $0x6, 0x21c8f(%rip)     # 0x28510
jmp 0x61a8
xorl %eax, %eax
movsbl %al, %eax
movl %eax, 0x21c83(%rip)     # 0x28514
movl $0x5, 0x21c75(%rip)     # 0x28510
jmp 0x61a1