// File: /workspace/github_c_makefile_star2_O2/tyabu12[P]pl0compiler/getSource.c
// Function: nextToken
Token nextToken() {             /* 次のトークンを読んで返す関数         */
    int i = 0;
    int num;
    KeyId cc;
    Token temp;
    char ident[MAXNAME];
    printcToken();              /* 前のトークンを印字                   */
    spaces = 0; CR = 0;
    while (1) {                 /* 次のトークンまでの空白や改行をカウント */
        if (ch == ' ')
            spaces++;
        else if (ch == '\t')
            spaces+=TAB;
        else if (ch == '\n'){
            spaces = 0;  CR++;
        }
        else break;
        ch = nextChar();
    }
    switch (cc = charClassT[(int)ch]) {
    case letter:                /* identifier                           */
        do {
            if (i < MAXNAME)
                ident[i] = ch;
            i++; ch = nextChar();
        } while (  charClassT[(int)ch] == letter
                || charClassT[(int)ch] == digit );
        if (i >= MAXNAME){
            errorMessage("too long");
            i = MAXNAME - 1;
        }
        ident[i] = '\0';
        for (i=0; i<end_of_KeyWd; i++)
            if (strcmp(ident, KeyWdT[i].word) == 0) {
                temp.kind = KeyWdT[i].keyId; /* 予約語の場合            */
                cToken = temp; printed = 0;
                return temp;
            }
        temp.kind = Id;         /* ユーザの宣言した名前の場合           */
        strcpy(temp.u.id, ident);
        break;
    case digit:                 /* number                               */
        num = 0;
        do {
            num = 10*num+(ch-'0');
            i++; ch = nextChar();
        } while (charClassT[(int)ch] == digit);
            if (i>MAXNUM)
                errorMessage("too large");
            temp.kind = Num;
        temp.u.value = num;
        break;
    case colon:
        if ((ch = nextChar()) == '=') {
            ch = nextChar();
            temp.kind = Assign; /* ":=" */
            break;
        } else {
            temp.kind = nul;
            break;
        }
    case Lss:
        if ((ch = nextChar()) == '=') {
            ch = nextChar();
            temp.kind = LssEq;  /* "<="                                 */
            break;
        } else if (ch == '>') {
            ch = nextChar();
            temp.kind = NotEq;  /* "<>"                                 */
            break;
        } else {
            temp.kind = Lss;
            break;
        }
    case Gtr:
        if ((ch = nextChar()) == '=') {
            ch = nextChar();
            temp.kind = GtrEq;  /* ">="                                 */
            break;
        } else {
            temp.kind = Gtr;
            break;
        }
    default:
        temp.kind = cc;
        ch = nextChar(); break;
    }
    cToken = temp; printed = 0;
    return temp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x3b10
andl $0x0, 0x5630(%rip)      # 0x8db4
andl $0x0, 0x562d(%rip)      # 0x8db8
movb 0x55f3(%rip), %al       # 0x8d84
pushq $0x1
popq %rbp
leaq 0x5619(%rip), %r14      # 0x8db4
leaq 0x5616(%rip), %r15      # 0x8db8
pushq $0x5
popq %r12
movq %r14, %rcx
movl %ebp, %edx
cmpb $0x20, %al
je 0x37d0
movzbl %al, %ecx
cmpl $0xa, %ecx
je 0x37c4
cmpl $0x9, %ecx
jne 0x37df
movq %r14, %rcx
movl %r12d, %edx
jmp 0x37d0
andl $0x0, 0x55e9(%rip)      # 0x8db4
movq %r15, %rcx
movl %ebp, %edx
addl %edx, (%rcx)
callq 0x3a5f
movb %al, 0x55a7(%rip)       # 0x8d84
jmp 0x37a6
movsbq %al, %rcx
leaq 0x55d6(%rip), %r14      # 0x8dc0
movl (%r14,%rcx,4), %ecx
cmpl $0x16, %ecx
je 0x393e
cmpl $0x17, %ecx
je 0x385e
cmpl $0x24, %ecx
je 0x38b0
cmpl $0x26, %ecx
je 0x3887
cmpl $0x25, %ecx
jne 0x392f
xorl %ebp, %ebp
pushq $-0x1
popq %r15
imull $0xa, %ebp, %ecx
movsbl %al, %eax
leal (%rcx,%rax), %ebp
addl $-0x30, %ebp
callq 0x3a5f
movb %al, 0x5554(%rip)       # 0x8d84
movsbq %al, %rcx
incl %r15d
cmpl $0x25, (%r14,%rcx,4)
je 0x3819
cmpl $0xe, %r15d
jb 0x3850
leaq 0xc58(%rip), %rdi       # 0x44a3
callq 0x36f1
movl $0x21, (%rbx)
movl %ebp, 0x4(%rbx)
jmp 0x39a5
callq 0x3a5f
movb %al, 0x551b(%rip)       # 0x8d84
cmpb $0x3d, %al
jne 0x397c
callq 0x3a5f
movb %al, 0x5508(%rip)       # 0x8d84
movl $0x1a, (%rbx)
jmp 0x39a5
callq 0x3a5f
movb %al, 0x54f2(%rip)       # 0x8d84
cmpb $0x3d, %al
jne 0x3984
callq 0x3a5f
movb %al, 0x54df(%rip)       # 0x8d84
movl $0x1e, (%rbx)
jmp 0x39a5
xorl %r15d, %r15d
cmpq $0x1e, %r15
ja 0x38bd
movb %al, (%rsp,%r15)
incq %r15
callq 0x3a5f
movb %al, 0x54b9(%rip)       # 0x8d84
movsbq %al, %rcx
movl (%r14,%rcx,4), %ecx
andl $-0x2, %ecx
cmpl $0x24, %ecx
je 0x38b3
leaq -0x1(%r15), %rax
cmpq $0x1e, %rax
jb 0x38f5
leaq 0xbae(%rip), %rdi       # 0x449a
callq 0x36f1
pushq $0x1e
popq %r15
movb $0x0, (%rsp,%r15)
xorl %ecx, %ecx
leaq 0x32cd(%rip), %r15      # 0x6bd0
movq %rsp, %r14
leaq 0x10(%rcx), %r12
cmpq $0xf0, %r12
je 0x3968
movq (%rcx,%r15), %rsi
movq %r14, %rdi
callq 0x20e0
movq %r12, %rcx
testl %eax, %eax
jne 0x3906
movl -0x8(%r12,%r15), %eax
movl %eax, (%rbx)
jmp 0x39a5
movl %ecx, (%rbx)
callq 0x3a5f
movb %al, 0x5448(%rip)       # 0x8d84
jmp 0x39a5
callq 0x3a5f
movb %al, 0x543b(%rip)       # 0x8d84
cmpb $0x3e, %al
je 0x398c
movzbl %al, %eax
cmpl $0x3d, %eax
jne 0x399f
callq 0x3a5f
movb %al, 0x5424(%rip)       # 0x8d84
movl $0x19, (%rbx)
jmp 0x39a5
movl $0x20, (%rbx)
leaq 0x4(%rbx), %rdi
movq %rsp, %rsi
callq 0x2050
jmp 0x39a5
movl $0x17, (%rbx)
jmp 0x39a5
movl $0x22, (%rbx)
jmp 0x39a5
callq 0x3a5f
movb %al, 0x53ed(%rip)       # 0x8d84
movl $0x18, (%rbx)
jmp 0x39a5
movl $0x16, (%rbx)
movl 0x20(%rbx), %eax
movl %eax, 0x53fe(%rip)      # 0x8dac
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x53e0(%rip)     # 0x8d9c
movups %xmm0, 0x53c9(%rip)     # 0x8d8c
movb $0x0, 0x53be(%rip)      # 0x8d88
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq