// File: /workspace/github_cpp_makefile_star2_O2/Heptagon196[P]Gos/GosTokenizer.cpp
// Function: Gos::GosTokenizer::ReadToken()
Gos::GosToken Gos::GosTokenizer::ReadToken() {
    char ch = 0;
    while (!ch) {
        ch = fin.get();
    }
    while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') {
        if (ch == '\n') {
            lineCount++;
        }
        ch = fin.get();
    }
    if (ch == EOF) {
        return { NONE, lineCount };
    }
    if (isdigit(ch) || ch == '+' || ch == '-' || ch == '.') {
        std::stringstream ss;
        ss << ch;
        char start = ch;
        bool startWithSign = ch == '+' || ch == '-';
        bool hasDot = ch == '.';
        ch = fin.get();
        if (startWithSign && !isdigit(ch)) {
            if (start == '+') {
                if (ch == '=') {
                    return { ASSIGN_ADD, lineCount };
                } else if (ch == '+') {
                    return { INC, lineCount };
                } else {
                    fin.unget();
                    return { ADD, lineCount };
                }
            } else {
                if (ch == '=') {
                    return { ASSIGN_SUB, lineCount };
                } else if (ch == '-') {
                    return { DEC, lineCount };
                } else {
                    fin.unget();
                    return { SUB, lineCount };
                }
            }
        }
        if (hasDot && !isdigit(ch)) {
            fin.unget();
            return { DOT, lineCount };
        }
        while (isdigit(ch) || ch == '.') {
            if (ch == '.') {
                if (hasDot) {
                    std::cerr << "Error: " << inputName << ": " << lineCount << ": illegal number format" << std::endl;
                }
                hasDot = true;
            }
            ss << ch;
            ch = fin.get();
        }
        int8_t numType;
        GosVM::RTConstNum num;
        num.data.i64 = 0;
        if (hasDot) {
            if (ch == 'f') {
                ss >> num.data.f;
                numType = 3;
            } else {
                fin.unget();
                ss >> num.data.d;
                numType = 4;
            }
        } else {
            numType = 1;
            if (ch == 'i') {
                ss >> num.data.i64;
                ch = fin.get();
                if (ch == '8') {
                    numType = 0;
                } else if (ch == '3') {
                    fin.get();
                    numType = 1;
                } else if (ch == '6') {
                    fin.get();
                    numType = 2;
                }
            } else if (ch == 'l') {
                ss >> num.data.i64;
                numType = 2;
            } else if (ch == 'f') {
                ss >> num.data.f;
                numType = 3;
            } else if (ch == 'd') {
                ss >> num.data.d;
                numType = 4;
            } else {
                ss >> num.data.i64;
                fin.unget();
            }
        }
        return { NUMBER, numType, num, lineCount };
    } else if (ch == '*') {
        TRY_GET(ASSIGN_MUL, MUL);
    } else if (ch == '#') {
        while (ch != '\n' && ch != '\r' && ch != EOF) {
            ch = fin.get();
        }
        return ReadToken();
    } else if (ch == '/') {
        ch = fin.get();
        if (ch == '/') {
            while (ch != '\n' && ch != '\r' && ch != EOF) {
                ch = fin.get();
            }
            return ReadToken();
        } else if (ch == '=') {
            return { ASSIGN_DIV, lineCount };
        } else {
            fin.unget();
            return { DIV, lineCount };
        }
    } else if (ch == '%') {
        TRY_GET(ASSIGN_REM, REM);
    } else if (ch == '^') {
        TRY_GET(ASSIGN_XOR, XOR);
    } else if (ch == '=') {
        TRY_GET(E, ASSIGN);
    } else if (ch == '!') {
        TRY_GET(NE, NOT);
    } else if (ch == '<') {
        TRY_GET(LE, L);
    } else if (ch == '>') {
        TRY_GET(GE, G);
    } else if (ch == '&') {
        ch = fin.get();
        if (ch == '=') {
            return { ASSIGN_AND, lineCount };
        } else {
            if (ch != '&') {
                fin.unget();
                return { ADDR, lineCount };
            }
            return { AND, lineCount };
        }
    } else if (ch == '|') {
        ch = fin.get();
        if (ch == '=') {
            return { ASSIGN_OR, lineCount };
        } else {
            if (ch != '|') {
                fin.unget();
            }
            return { OR, lineCount };
        }
    } else if (ch == ',') {
        return { COM, lineCount };
    } else if (ch == ';') {
        return { SEM, lineCount };
    } else if (ch == ':') {
        return { COLON, lineCount };
    } else if (ch == '?') {
        return { QUESTION, lineCount };
    } else if (ch == '(') {
        return { L_ROUND, lineCount };
    } else if (ch == ')') {
        return { R_ROUND, lineCount };
    } else if (ch == '[') {
        return { L_SQUARE, lineCount };
    } else if (ch == ']') {
        return { R_SQUARE, lineCount };
    } else if (ch == '{') {
        return { L_CURLY, lineCount };
    } else if (ch == '}') {
        return { R_CURLY, lineCount };
    } else if (ch == '\"') {
        int line = lineCount;
        std::string content = "";
        bool convNext = false;
        ch = fin.get();
        while (convNext || ch != '\"') {
            if (convNext) {
                if (ch == 'n') {
                    content += '\n';
                } else if (ch == 't') {
                    content += '\t';
                } else {
                    if (ch == '\n') {
                        lineCount++;
                    }
                    content += ch;
                }
                convNext = false;
            } else {
                if (ch == '\\') {
                    convNext = true;
                } else {
                    if (ch == '\n') {
                        lineCount++;
                    }
                    content += ch;
                }
            }
            ch = fin.get();
        }
        return { STRING, content, line };
    } else {
        std::string symbol = "";
        symbol += ch;
        ch = fin.get();
        bool prevColon = false;
        while (isalnum(ch) || ch == ':' || ch == '_') {
            if (prevColon && ch != ':') {
                fin.unget();
                symbol.pop_back();
                break;
            }
            prevColon = ch == ':' && !prevColon;
            symbol += ch;
            ch = fin.get();
        }
        if (prevColon) {
            symbol.pop_back();
            fin.unget();
        }
        fin.unget();
        TokenType type = SYMBOL;
        for (int i = 0; i < RESERVED_WORD_COUNT; i++) {
            if (GosToken::TokenName[i] == symbol) {
                type = (TokenType)i;
                break;
            }
        }
        if (type == SYMBOL) {
            return { type, symbol, lineCount };
        } else {
            return { type, lineCount };
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0x2bd90(%rip), %r15     # 0xa9540
testb %bpl, %bpl
je 0x7d83e
cmpb $0x9, %bpl
je 0x7d7db
movzbl %bpl, %r13d
cmpl $0xa, %r13d
je 0x7d7d7
cmpl $0xd, %r13d
je 0x7d7db
cmpl $0x20, %r13d
je 0x7d7db
jmp 0x7d7e7
incl 0x8(%r14)
movq (%r14), %rdi
callq 0x113e0
movl %eax, %ebp
jmp 0x7d7b9
cmpl $0xff, %r13d
je 0x7d881
movsbl %bpl, %r12d
leal -0x30(%r12), %eax
cmpl $0xa, %eax
jb 0x7d8fc
leal -0x21(%r13), %eax
cmpl $0x1e, %eax
ja 0x7d8b4
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
cmpb $0xa, %bpl
je 0x7d87a
movzbl %bpl, %eax
cmpl $0xd, %eax
je 0x7d87a
cmpl $0xff, %eax
je 0x7d87a
movq (%r14), %rdi
callq 0x113e0
movl %eax, %ebp
jmp 0x7d81c
movq (%r14), %rdi
callq 0x113e0
movl %eax, %ebp
jmp 0x7d7b0
movq (%r14), %rdi
callq 0x113e0
cmpb $0x2f, %al
jne 0x7da4f
cmpb $0xa, %al
je 0x7d87a
movzbl %al, %eax
cmpl $0xd, %eax
je 0x7d87a
cmpl $0xff, %eax
je 0x7d87a
movq (%r14), %rdi
callq 0x113e0
jmp 0x7d85d
xorl %ebp, %ebp
jmp 0x7d7b0
movl 0x8(%r14), %eax
movl $0x38, (%rbx)
movl %eax, 0x4(%rbx)
leaq 0x28(%rbx), %rax
movq %rax, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movb $0x0, 0x28(%rbx)
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x5b, %r13d
je 0x7de4c
cmpl $0x5d, %r13d
je 0x7de3d
cmpl $0x5e, %r13d
je 0x7dde4
cmpl $0x7b, %r13d
je 0x7de2e
cmpl $0x7c, %r13d
je 0x7de03
cmpl $0x7d, %r13d
jne 0x7daa1
movl 0x8(%r14), %eax
movl $0x37, (%rbx)
jmp 0x7d88b
leaq 0x10(%rsp), %rdi
callq 0x11270
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0x113d0
cmpb $0x2e, %bpl
sete %r12b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x2d, %bpl
je 0x7d932
cmpl $0x2b, %r13d
jne 0x7d96f
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x7d984
shll $0x18, %eax
cmpb $0x2b, %bpl
jne 0x7dda8
cmpl $0x2b000000, %eax       # imm = 0x2B000000
je 0x7dff7
cmpl $0x3d000000, %eax       # imm = 0x3D000000
jne 0x7e00f
movl 0x8(%r14), %eax
movl $0x10, (%rbx)
jmp 0x7e035
cmpb $0x2e, %bpl
jne 0x7d984
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x7df2f
leaq 0x10(%r14), %rcx
movq %rcx, 0x8(%rsp)
movl %eax, %ecx
shll $0x18, %ecx
movsbl %al, %r13d
cmpl $0x2e000000, %ecx       # imm = 0x2E000000
je 0x7d9ab
leal -0x30(%r13), %eax
cmpl $0x9, %eax
ja 0x7da2e
cmpl $0x2e000000, %ecx       # imm = 0x2E000000
jne 0x7da10
movb $0x1, %bpl
testb $0x1, %r12b
je 0x7da13
movq 0x8862d(%rip), %rdi     # 0x105ff0
leaq 0x2bccf(%rip), %rsi     # 0xa9699
callq 0x11340
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x11320
movq %rax, %rdi
leaq 0x19ab1(%rip), %rsi     # 0x97497
callq 0x11340
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x11540
movq %rax, %rdi
leaq 0x2bccc(%rip), %rsi     # 0xa96cd
callq 0x11340
movq %rax, %rdi
callq 0x111b0
jmp 0x7da13
movl %r12d, %ebp
movq %r15, %rdi
movl %r13d, %esi
callq 0x113d0
movq (%r14), %rdi
callq 0x113e0
movl %ebp, %r12d
jmp 0x7d98d
andq $0x0, (%rsp)
testb $0x1, %r12b
je 0x7da6a
cmpl $0x66000000, %ecx       # imm = 0x66000000
je 0x7db38
movq (%r14), %rdi
callq 0x11120
jmp 0x7da8c
movzbl %al, %eax
cmpl $0x3d, %eax
jne 0x7ddcd
movl 0x8(%r14), %eax
movl $0x13, (%rbx)
jmp 0x7d88b
addl $0x9c000000, %ecx       # imm = 0x9C000000
shrl $0x18, %ecx
cmpl $0x8, %ecx
ja 0x7dfb4
leaq 0x2bb39(%rip), %rax     # 0xa95bc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0x4, %bpl
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x11240
jmp 0x7e074
leaq 0x2bd0e(%rip), %rsi     # 0xa97b6
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
callq 0x664f4
leaq 0x10(%rsp), %rdi
movl %r12d, %esi
callq 0x537e8
movq (%r14), %rdi
callq 0x113e0
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
movl %eax, %r13d
shll $0x18, %r13d
movsbl %al, %ebp
movl %ebp, %edi
callq 0x11380
testl %eax, %eax
jne 0x7dafd
cmpl $0x5f000000, %r13d      # imm = 0x5F000000
je 0x7dafd
cmpl $0x3a000000, %r13d      # imm = 0x3A000000
jne 0x7e051
cmpl $0x3a000000, %r13d      # imm = 0x3A000000
sete %al
movl %r12d, %ecx
notb %cl
orb %al, %cl
testb $0x1, %cl
je 0x7db4d
movq %r15, %rdi
movl %ebp, %esi
callq 0x537e8
cmpl $0x3a000000, %r13d      # imm = 0x3A000000
sete %al
xorb $0x1, %r12b
andb %al, %r12b
movq (%r14), %rdi
callq 0x113e0
jmp 0x7dad2
movb $0x3, %bpl
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x115c0
jmp 0x7e074
movq (%r14), %rdi
callq 0x11120
leaq 0x10(%rsp), %rdi
callq 0x54160
leaq 0x10(%rsp), %rdi
callq 0x54160
movq (%r14), %rdi
callq 0x11120
movq (%r14), %rdi
callq 0x11120
leaq 0x88ee0(%rip), %r15     # 0x106a60
xorl %r13d, %r13d
leaq 0x10(%rsp), %r12
cmpq $0xf, %r13
je 0x7de5b
movq %r15, %rdi
movq %r12, %rsi
callq 0x51ab0
testb %al, %al
jne 0x7de7b
incq %r13
addq $0x20, %r15
jmp 0x7db88
movl 0x8(%r14), %eax
movl $0x2e, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x3d, %al
jne 0x7dea5
movl 0x8(%r14), %eax
movl $0x25, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x32, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x26, %al
je 0x7dfd1
movzbl %al, %eax
cmpl $0x3d, %eax
jne 0x7dfe0
movl 0x8(%r14), %eax
movl $0x16, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x3d, %al
jne 0x7debc
movl 0x8(%r14), %eax
movl $0x12, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x3d, %al
jne 0x7ded3
movl 0x8(%r14), %eax
movl $0x14, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x3d, %al
jne 0x7deea
movl 0x8(%r14), %eax
movl $0x26, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x3d, %al
jne 0x7df01
movl 0x8(%r14), %eax
movl $0x22, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x30, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %ebp
leaq 0x2bb0a(%rip), %rsi     # 0xa97b6
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
callq 0x664f4
movq (%r14), %rdi
callq 0x113e0
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0x22000000, %ecx       # imm = 0x22000000
sete %dl
movl %r12d, %esi
notb %sil
testb %dl, %sil
jne 0x7dd89
testb $0x1, %r12b
je 0x7dd08
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0x7dd18
cmpl $0x74000000, %ecx       # imm = 0x74000000
je 0x7dd23
cmpl $0x6e000000, %ecx       # imm = 0x6E000000
jne 0x7dd25
movb $0xa, %al
jmp 0x7dd25
cmpl $0x5c000000, %ecx       # imm = 0x5C000000
je 0x7dd1e
cmpl $0xa000000, %ecx        # imm = 0xA000000
jne 0x7dd25
incl 0x8(%r14)
jmp 0x7dd25
movb $0x1, %r12b
jmp 0x7dd33
movb $0x9, %al
movsbl %al, %esi
movq %r15, %rdi
callq 0x537e8
xorl %r12d, %r12d
movq (%r14), %rdi
callq 0x113e0
jmp 0x7dcc9
movl 0x8(%r14), %eax
movl $0x31, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x33, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x3d, %al
jne 0x7df18
movl 0x8(%r14), %eax
movl $0x21, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x2d, (%rbx)
jmp 0x7d88b
movl $0x2c, (%rbx)
movl %ebp, 0x4(%rbx)
movq %rbx, %rdi
addq $0x18, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2b71e
jmp 0x7de96
cmpl $0x2d000000, %eax       # imm = 0x2D000000
je 0x7e003
cmpl $0x3d000000, %eax       # imm = 0x3D000000
jne 0x7e023
movl 0x8(%r14), %eax
movl $0x11, (%rbx)
jmp 0x7e035
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x1e, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x3d, %al
jne 0x7df46
movl 0x8(%r14), %eax
movl $0x15, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x113e0
cmpb $0x7c, %al
je 0x7e042
movzbl %al, %eax
cmpl $0x3d, %eax
jne 0x7e03a
movl 0x8(%r14), %eax
movl $0x17, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x36, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x35, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x34, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x2a, (%rbx)
movl %eax, 0x4(%rbx)
movq %rbx, %rdi
addq $0x18, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2b71e
jmp 0x7de96
movl 0x8(%r14), %eax
movl %r13d, (%rbx)
movl %eax, 0x4(%rbx)
leaq 0x28(%rbx), %rax
movq %rax, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movb $0x0, 0x28(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x209be
jmp 0x7d89f
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x23, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x1c, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x1f, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x24, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x27, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0xf, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x2f, (%rbx)
jmp 0x7e035
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x20, (%rbx)
jmp 0x7d88b
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x11370
movq (%r14), %rdi
callq 0x113e0
cmpb $0x38, %al
je 0x7e06d
movzbl %al, %eax
cmpl $0x36, %eax
je 0x7e060
cmpl $0x33, %eax
jne 0x7e071
movq (%r14), %rdi
movb $0x1, %bpl
callq 0x113e0
jmp 0x7e074
movb $0x2, %bpl
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x11370
jmp 0x7e074
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x11370
movq (%r14), %rdi
movb $0x1, %bpl
callq 0x11120
jmp 0x7e074
movl 0x8(%r14), %eax
movl $0x28, (%rbx)
jmp 0x7d88b
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x1d, (%rbx)
jmp 0x7d88b
movl 0x8(%r14), %eax
movl $0x18, (%rbx)
jmp 0x7e035
movl 0x8(%r14), %eax
movl $0x19, (%rbx)
jmp 0x7e035
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x1a, (%rbx)
jmp 0x7e035
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x1b, (%rbx)
movl %eax, 0x4(%rbx)
jmp 0x7e08d
movq (%r14), %rdi
callq 0x11120
movl 0x8(%r14), %eax
movl $0x29, (%rbx)
jmp 0x7d88b
testb $0x1, %r12b
jne 0x7db5f
jmp 0x7db71
movq (%r14), %rdi
movb $0x2, %bpl
callq 0x113e0
jmp 0x7e074
xorl %ebp, %ebp
jmp 0x7e074
movb $0x1, %bpl
movq (%rsp), %rax
movl 0x8(%r14), %ecx
movl $0x2b, (%rbx)
movl %ecx, 0x4(%rbx)
movb %bpl, 0x8(%rbx)
movq %rax, 0x10(%rbx)
leaq 0x28(%rbx), %rax
movq %rax, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movb $0x0, 0x28(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x112c0
jmp 0x7d89f
jmp 0x7e0c4
jmp 0x7e0b1
movq %rax, %rbx
jmp 0x7e0e0
jmp 0x7e0c4
jmp 0x7e0c4
jmp 0x7e0c4
jmp 0x7e0d3
jmp 0x7e0d3
jmp 0x7e0d3
jmp 0x7e0c4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x209be
jmp 0x7e0e0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x112c0
movq %rbx, %rdi
callq 0x11570