// File: /workspace/github_c_makefile_star2_O3/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 0x409b
xorl %eax, %eax
movl %eax, 0x6148(%rip)      # 0x9db4
movl %eax, 0x6146(%rip)      # 0x9db8
movb 0x610c(%rip), %al       # 0x9d84
leaq 0x6135(%rip), %r14      # 0x9db4
leaq 0x6132(%rip), %r15      # 0x9db8
movl $0x1, %ecx
cmpb $0x20, %al
je 0x3ca1
movzbl %al, %edx
cmpl $0xa, %edx
je 0x3ca6
cmpl $0x9, %edx
jne 0x3cc2
movl $0x5, %ecx
movq %r14, %rax
jmp 0x3cb3
movl $0x0, 0x6104(%rip)      # 0x9db4
movq %r15, %rax
addl %ecx, (%rax)
callq 0x3fe8
movb %al, 0x60c4(%rip)       # 0x9d84
jmp 0x3c86
movsbq %al, %rcx
leaq 0x60f3(%rip), %r14      # 0x9dc0
movl (%r14,%rcx,4), %ecx
cmpl $0x23, %ecx
jle 0x3d60
cmpl $0x24, %ecx
je 0x3d9b
cmpl $0x26, %ecx
je 0x3e48
cmpl $0x25, %ecx
jne 0x3e94
xorl %r15d, %r15d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leal (%r15,%r15,4), %ecx
movsbl %al, %eax
leal (%rax,%rcx,2), %r15d
addl $-0x30, %r15d
callq 0x3fe8
movb %al, 0x606d(%rip)       # 0x9d84
movsbq %al, %rcx
incl %ebp
cmpl $0x25, (%r14,%rcx,4)
je 0x3cfd
cmpl $0xe, %ebp
jb 0x3d51
movq 0x6048(%rip), %rdi      # 0x9d78
leaq 0x16f2(%rip), %rsi      # 0x5429
leaq 0x1704(%rip), %rdx      # 0x5442
leaq 0x17be(%rip), %rcx      # 0x5503
xorl %eax, %eax
callq 0x2110
callq 0x3a3a
movl $0x21, (%rbx)
movl %r15d, 0x4(%rbx)
jmp 0x3ed4
cmpl $0x16, %ecx
je 0x3e6a
cmpl $0x17, %ecx
jne 0x3e94
callq 0x3fe8
movb %al, 0x6007(%rip)       # 0x9d84
cmpb $0x3d, %al
jne 0x3eb3
callq 0x3fe8
movb %al, 0x5ff4(%rip)       # 0x9d84
movl $0x1a, (%rbx)
jmp 0x3ed4
xorl %r15d, %r15d
cmpq $0x1e, %r15
ja 0x3da8
movb %al, (%rsp,%r15)
incq %r15
callq 0x3fe8
movb %al, 0x5fce(%rip)       # 0x9d84
movsbq %al, %rcx
movl (%r14,%rcx,4), %ecx
andl $-0x2, %ecx
cmpl $0x24, %ecx
je 0x3d9e
leaq -0x1(%r15), %rax
cmpq $0x1e, %rax
jb 0x3dfe
movq 0x5fa1(%rip), %rdi      # 0x9d78
leaq 0x164b(%rip), %rsi      # 0x5429
leaq 0x165d(%rip), %rdx      # 0x5442
leaq 0x170e(%rip), %rcx      # 0x54fa
xorl %eax, %eax
callq 0x2110
callq 0x3a3a
movl $0x1e, %r15d
movb $0x0, (%rsp,%r15)
movl $0x8, %r15d
leaq 0x3dc0(%rip), %r12      # 0x7bd0
movq %rsp, %r14
movq -0x8(%r15,%r12), %rsi
movq %r14, %rdi
callq 0x20f0
testl %eax, %eax
je 0x3ea3
addq $0x10, %r15
cmpq $0xe8, %r15
jne 0x3e13
movl $0x20, (%rbx)
leaq 0x4(%rbx), %rdi
movq %rsp, %rsi
callq 0x2050
jmp 0x3ed4
callq 0x3fe8
movb %al, 0x5f31(%rip)       # 0x9d84
cmpb $0x3d, %al
jne 0x3eab
callq 0x3fe8
movb %al, 0x5f22(%rip)       # 0x9d84
movl $0x1e, (%rbx)
jmp 0x3ed4
callq 0x3fe8
movb %al, 0x5f0f(%rip)       # 0x9d84
cmpb $0x3e, %al
je 0x3ebb
movzbl %al, %eax
cmpl $0x3d, %eax
jne 0x3ece
callq 0x3fe8
movb %al, 0x5ef8(%rip)       # 0x9d84
movl $0x19, (%rbx)
jmp 0x3ed4
movl %ecx, (%rbx)
callq 0x3fe8
movb %al, 0x5ee3(%rip)       # 0x9d84
jmp 0x3ed4
movl (%r15,%r12), %eax
movl %eax, (%rbx)
jmp 0x3ed4
movl $0x22, (%rbx)
jmp 0x3ed4
movl $0x17, (%rbx)
jmp 0x3ed4
callq 0x3fe8
movb %al, 0x5ebe(%rip)       # 0x9d84
movl $0x18, (%rbx)
jmp 0x3ed4
movl $0x16, (%rbx)
movl 0x20(%rbx), %eax
movl %eax, 0x5ecf(%rip)      # 0x9dac
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x5eb1(%rip)     # 0x9d9c
movups %xmm0, 0x5e9a(%rip)     # 0x9d8c
movb $0x0, 0x5e8f(%rip)      # 0x9d88
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq