// File: /workspace/github_c_makefile_star2_O1/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 0x3e2b
xorl %eax, %eax
movl %eax, 0x63ce(%rip)      # 0x9db4
movl %eax, 0x63cc(%rip)      # 0x9db8
leaq 0x63c1(%rip), %r14      # 0x9db4
leaq 0x63be(%rip), %r15      # 0x9db8
movzbl 0x6383(%rip), %ecx      # 0x9d84
movl $0x1, %eax
cmpl $0x20, %ecx
je 0x3a1a
cmpl $0xa, %ecx
je 0x3a1f
cmpl $0x9, %ecx
jne 0x3a3b
movl $0x5, %eax
movq %r14, %rcx
jmp 0x3a2c
movl $0x0, 0x638b(%rip)      # 0x9db4
movq %r15, %rcx
addl %eax, (%rcx)
callq 0x3d6d
movb %al, 0x634b(%rip)       # 0x9d84
jmp 0x39fa
movsbq %cl, %rax
leaq 0x637a(%rip), %r14      # 0x9dc0
movl (%r14,%rax,4), %eax
cmpl $0x23, %eax
jle 0x3add
cmpl $0x24, %eax
je 0x3b18
cmpl $0x26, %eax
je 0x3bcd
cmpl $0x25, %eax
jne 0x3c19
xorl %r15d, %r15d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leal (%r15,%r15,4), %eax
movsbl 0x6303(%rip), %ecx      # 0x9d84
leal (%rcx,%rax,2), %r15d
addl $-0x30, %r15d
callq 0x3d6d
movb %al, 0x62f0(%rip)       # 0x9d84
movsbq %al, %rax
incl %ebp
cmpl $0x25, (%r14,%rax,4)
je 0x3a76
cmpl $0xe, %ebp
jb 0x3ace
movq 0x62cb(%rip), %rdi      # 0x9d78
leaq 0x1901(%rip), %rsi      # 0x53b5
leaq 0x1913(%rip), %rdx      # 0x53ce
leaq 0x19cd(%rip), %rcx      # 0x548f
xorl %eax, %eax
callq 0x2110
callq 0x37b4
movl $0x21, (%rbx)
movl %r15d, 0x4(%rbx)
jmp 0x3c59
cmpl $0x16, %eax
je 0x3bef
cmpl $0x17, %eax
jne 0x3c19
callq 0x3d6d
movb %al, 0x628a(%rip)       # 0x9d84
cmpb $0x3d, %al
jne 0x3c38
callq 0x3d6d
movb %al, 0x6277(%rip)       # 0x9d84
movl $0x1a, (%rbx)
jmp 0x3c59
xorl %r15d, %r15d
cmpq $0x1e, %r15
ja 0x3b2b
movb 0x625d(%rip), %al       # 0x9d84
movb %al, (%rsp,%r15)
incq %r15
callq 0x3d6d
movb %al, 0x624b(%rip)       # 0x9d84
movsbq %al, %rax
movl (%r14,%rax,4), %eax
andl $-0x2, %eax
cmpl $0x24, %eax
je 0x3b1b
leaq -0x1(%r15), %rax
cmpq $0x1e, %rax
jb 0x3b81
movq 0x621e(%rip), %rdi      # 0x9d78
leaq 0x1854(%rip), %rsi      # 0x53b5
leaq 0x1866(%rip), %rdx      # 0x53ce
leaq 0x1917(%rip), %rcx      # 0x5486
xorl %eax, %eax
callq 0x2110
callq 0x37b4
movl $0x1e, %r15d
movslq %r15d, %rax
movb $0x0, (%rsp,%rax)
movl $0x8, %r15d
leaq 0x403b(%rip), %r12      # 0x7bd0
movq %rsp, %r14
movq -0x8(%r15,%r12), %rsi
movq %r14, %rdi
callq 0x20f0
testl %eax, %eax
je 0x3c28
addq $0x10, %r15
cmpq $0xe8, %r15
jne 0x3b98
movl $0x20, (%rbx)
leaq 0x4(%rbx), %rdi
movq %rsp, %rsi
callq 0x2050
jmp 0x3c59
callq 0x3d6d
movb %al, 0x61ac(%rip)       # 0x9d84
cmpb $0x3d, %al
jne 0x3c30
callq 0x3d6d
movb %al, 0x619d(%rip)       # 0x9d84
movl $0x1e, (%rbx)
jmp 0x3c59
callq 0x3d6d
movb %al, 0x618a(%rip)       # 0x9d84
cmpb $0x3e, %al
je 0x3c40
movzbl %al, %eax
cmpl $0x3d, %eax
jne 0x3c53
callq 0x3d6d
movb %al, 0x6173(%rip)       # 0x9d84
movl $0x19, (%rbx)
jmp 0x3c59
movl %eax, (%rbx)
callq 0x3d6d
movb %al, 0x615e(%rip)       # 0x9d84
jmp 0x3c59
movl (%r15,%r12), %eax
movl %eax, (%rbx)
jmp 0x3c59
movl $0x22, (%rbx)
jmp 0x3c59
movl $0x17, (%rbx)
jmp 0x3c59
callq 0x3d6d
movb %al, 0x6139(%rip)       # 0x9d84
movl $0x18, (%rbx)
jmp 0x3c59
movl $0x16, (%rbx)
movl 0x20(%rbx), %eax
movl %eax, 0x614a(%rip)      # 0x9dac
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x612c(%rip)     # 0x9d9c
movups %xmm0, 0x6115(%rip)     # 0x9d8c
movb $0x0, 0x610a(%rip)      # 0x9d88
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq