// File: /workspace/github_cpp_makefile_star2_O2/Heptagon196[P]Gos/GosVM.cpp
// Function: GosVM::VMProgram::Read(std::istream&, bool)
void GosVM::VMProgram::Read(std::istream& input, bool prettified) {
    startPos = 0;
    if (prettified) {
        std::string command;
        IRTokenizer tokenizer(input);
        content = "";
        while (!tokenizer.IsEOF()) {
            command = tokenizer.GetToken();
            int op = 0;
            for (int i = 0; i < operatorsCount; i++) {
                if (operatorInfos[i].name == command) {
                    op = i;
                    break;
                }
            }
            AddOperation(op);
            if (op == DEF_CLASS) {
                AddParamString(tokenizer.GetToken());
                int len = tokenizer.GetToken<int>();
                AddParamInt(len);
                while (len--) {
                    AddParamString(tokenizer.GetToken());
                }
            } else if (op == ATTR) {
                AddParamString(tokenizer.GetToken());
                int len = tokenizer.GetToken<int>();
                AddParamInt(len);
                while (len--) {
                    AddParamString(tokenizer.GetToken());
                }
            } else if (op == DEF_MEMBER_VAR) {
                AddParamString(tokenizer.GetToken());
                AddParamString(tokenizer.GetToken());
            } else if (op == DEF_MEMBER_FUNC) {
                AddParamString(tokenizer.GetToken());
                AddParamString(tokenizer.GetToken());
                int len = tokenizer.GetToken<int>();
                AddParamInt(len);
                while (len--) {
                    AddParamString(tokenizer.GetToken());
                }
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == DEF_STATIC_VAR) {
                AddParamString(tokenizer.GetToken());
                AddParamString(tokenizer.GetToken());
            } else if (op == DEF_STATIC_FUNC) {
                AddParamString(tokenizer.GetToken());
                AddParamString(tokenizer.GetToken());
                int len = tokenizer.GetToken<int>();
                AddParamInt(len);
                while (len--) {
                    AddParamString(tokenizer.GetToken());
                }
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == ALLOC) {
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == STR) {
                int id = tokenizer.GetToken<int>();
                [[maybe_unused]] int len = tokenizer.GetToken<int>();
                std::string s = tokenizer.GetToken();
                cst->setStrID(s, id);
            } else if (op == NUM) {
                int id = tokenizer.GetToken<int>();
                RTConstNum num;
                num.data.i64 = tokenizer.GetToken<int64_t>();
                cst->setNumID(num, id);
            } else if (op == NS) {
                AddParamString(tokenizer.GetToken());
            } else if (op == NEW) {
                AddParamString(tokenizer.GetToken());
                AddParamInt(tokenizer.GetToken<int>());
                int len = tokenizer.GetToken<int>();
                AddParamInt(len);
                while (len--) {
                    AddParamInt(tokenizer.GetToken<int>());
                }
            } else if (op == NEW_STR) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamString(tokenizer.GetToken());
            } else if (op == NEW_NUM) {
                int8_t type = tokenizer.GetToken<int>();
                AddParamByte(type);
                AddParamInt(tokenizer.GetToken<int>());
                RTConstNum num;
                num.data.i64 = 0;
                std::stringstream ss;
                ss << tokenizer.GetToken();
                switch (type) {
                    case 0: ss >> num.data.i32; break;
                    case 1: ss >> num.data.i32; break;
                    case 2: ss >> num.data.i64; break;
                    case 3: ss >> num.data.f; break;
                    case 4: ss >> num.data.d; break;
                }
                AddParamInt(cst->getNumID(num));
            } else if (op == MOV) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == REF) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == CLONE) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == ARG) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == GET_FIELD) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
                AddParamString(tokenizer.GetToken());
            } else if (op == ADD) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == SUB) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == MUL) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == DIV) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == REM) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == AND) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == OR) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == XOR) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == NOT) {
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == RET) {
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == JMP) {
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == IF) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == BOX) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == UNBOX) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamInt(tokenizer.GetToken<int>());
            } else if (op == CALL) {
                AddParamInt(tokenizer.GetToken<int>());
                AddParamString(tokenizer.GetToken());
                int cnt = tokenizer.GetToken<int>();
                AddParamInt(cnt);
                for (int i = 0; i < cnt; i++) {
                    AddParamInt(tokenizer.GetToken<int>());
                }
            }
        }
    } else {
        std::stringstream buffer;
        buffer << input.rdbuf();
        content = buffer.str();
    }
    endPos = content.size() - 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rsi, %r14
movq %rdi, %rbx
andl $0x0, 0x10(%rdi)
testl %edx, %edx
je 0x77d90
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, 0x18(%rsp)
leaq 0x20(%rbx), %rdi
leaq 0x320b0(%rip), %rsi     # 0xa97b6
movq %rdi, 0x8(%rsp)
callq 0x664c4
leaq 0x2c0(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x20(%rsp), %rbp
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x2, 0x20(%rax,%rcx)
jne 0x77df3
movq %r12, %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbp, %rdi
movq %r12, %rsi
callq 0x2dc3c
movq %r12, %rdi
callq 0x209be
leaq 0x8eea2(%rip), %r15     # 0x106600
xorl %r14d, %r14d
cmpq $0x22, %r14
je 0x7777f
movq %r15, %rdi
movq %rbp, %rsi
callq 0x51ab0
testb %al, %al
jne 0x77782
incq %r14
addq $0x20, %r15
jmp 0x77761
xorl %r14d, %r14d
movsbl %r14b, %esi
movq 0x8(%rsp), %rdi
callq 0x537e8
decl %r14d
cmpl $0x20, %r14d
ja 0x77722
leaq 0x3178c(%rip), %rcx     # 0xa8f2c
movslq (%rcx,%r14,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
jmp 0x77722
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x80(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
jmp 0x7793c
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %r13, %rdi
callq 0x799cc
movq 0x60(%rbx), %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x75a1a
jmp 0x77722
leaq 0x140(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x140(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
leaq 0x120(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x120(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
jmp 0x7793c
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x60(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
jmp 0x7793c
leaq 0xc0(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0xc0(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
jmp 0x7793c
leaq 0x1c0(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x1c0(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
leaq 0x1a0(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x1a0(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
jmp 0x77722
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movsbl %r15b, %esi
movq 0x8(%rsp), %rdi
callq 0x537e8
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
andq $0x0, (%rsp)
movq %r12, %rdi
callq 0x11270
leaq 0x220(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x75ab8
leaq 0x2d0(%rsp), %rdi
movq %r14, %rsi
callq 0x11320
movq %r14, %rdi
callq 0x209be
movsbl %r15b, %eax
cmpl $0x4, %eax
ja 0x77d6c
leaq 0x315f0(%rip), %rcx     # 0xa8fb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r12, %rdi
movq %rsp, %rsi
callq 0x111f0
jmp 0x77d6c
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x40(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
testl %r15d, %r15d
movl $0x0, %eax
cmovlel %eax, %r15d
subl $0x1, %r15d
jb 0x77722
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
jmp 0x77a31
leaq 0x180(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x180(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
leaq 0x160(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x160(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
subl $0x1, %r15d
jb 0x77d19
leaq 0x260(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
jmp 0x77aba
leaq 0x200(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x200(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
subl $0x1, %r15d
jb 0x77722
leaq 0x2a0(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
jmp 0x77b2c
leaq 0x1e0(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x1e0(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
subl $0x1, %r15d
jb 0x77722
leaq 0x280(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
jmp 0x77b9e
leaq 0x100(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0x100(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
leaq 0xe0(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0xe0(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
subl $0x1, %r15d
jb 0x77d30
leaq 0x240(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
jmp 0x77c3b
leaq 0xa0(%rsp), %rdi
movq %r13, %rsi
callq 0x75ab8
movq %rbx, %rdi
leaq 0xa0(%rsp), %r14
movq %r14, %rsi
callq 0x75d30
movq %r14, %rdi
callq 0x209be
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
incl %r15d
decl %r15d
je 0x77722
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
jmp 0x77cc2
movq %r13, %rdi
callq 0x7998c
movl %eax, %r15d
movq %r13, %rdi
callq 0x7998c
movq %r12, %rdi
movq %r13, %rsi
callq 0x75ab8
movq 0x60(%rbx), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x758c6
movq %r12, %rdi
callq 0x209be
jmp 0x77722
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
jmp 0x77722
movq %r13, %rdi
callq 0x7998c
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
jmp 0x77722
movq %r12, %rdi
movq %rsp, %rsi
callq 0x11240
jmp 0x77d6c
movq %r12, %rdi
movq %rsp, %rsi
callq 0x11370
jmp 0x77d6c
movq %r12, %rdi
movq %rsp, %rsi
callq 0x115c0
movq 0x60(%rbx), %rdi
movq (%rsp), %rsi
callq 0x759a0
movq %rbx, %rdi
movl %eax, %esi
callq 0x75cae
movq %r12, %rdi
callq 0x112c0
jmp 0x77722
leaq 0x2c0(%rsp), %rdi
callq 0x11270
leaq 0x2d0(%rsp), %rdi
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0xe8(%r14,%rax), %rsi
callq 0x110b0
leaq 0x2d8(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x112a0
leaq 0x20(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2dc3c
movq %r14, %rdi
callq 0x209be
leaq 0x2c0(%rsp), %rdi
callq 0x112c0
jmp 0x77dfd
leaq 0x20(%rsp), %rdi
callq 0x209be
movl 0x28(%rbx), %eax
decl %eax
movl %eax, 0x14(%rbx)
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x2c0(%rsp), %rdi
jmp 0x77fb0
jmp 0x77fbd
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
jmp 0x77fb0
jmp 0x77f5e
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
jmp 0x77fb0
jmp 0x77fbd
jmp 0x77fbd
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x1a0(%rsp), %rdi
jmp 0x77fb0
jmp 0x77fbd
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x220(%rsp), %rdi
callq 0x209be
jmp 0x77f61
jmp 0x77fbd
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x77fb0
jmp 0x77f40
movq %rax, %rbx
leaq 0x2c0(%rsp), %rdi
callq 0x112c0
jmp 0x77fca
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
movq %rax, %rbx
leaq 0x2c0(%rsp), %rdi
callq 0x112c0
jmp 0x77fc0
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x280(%rsp), %rdi
jmp 0x77fb0
movq %rax, %rbx
leaq 0x2a0(%rsp), %rdi
jmp 0x77fb0
jmp 0x77fbd
jmp 0x77fbd
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x209be
jmp 0x77fc0
jmp 0x77fbd
jmp 0x77fbd
jmp 0x77fbd
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x209be
movq %rbx, %rdi
callq 0x11570