// File: /workspace/github_cpp_makefile_star2_O2/Heptagon196[P]Gos/GosASTCompiler.cpp
// Function: Gos::AST::Symbol::CompileAST(Gos::Compiler::VMCompiler&)
Compile(Symbol) { 
    compilingLine = token.line;
    if (token.str == "true" || token.str == "false") {
        int num = code.GetTmpVar();
        int tmp = code.GetTmpVar();
        GosVM::RTConstNum val;
        val.data.i32 = token.str == "true" ? 1 : 0;
        vm.WriteCommandNewNum(1, num, val);
        vm.WriteCommandNew("bool", tmp, { num });
        return tmp;
    }
    std::string errorInfo = "";
    int ret = code.currentScope->GetVarID(token.str, errorInfo);
    if (errorInfo.size() > 0) {
        int& cache = GetFieldCache(code.currentScope, token.str);
        if (cache != -1) {
            return cache;
        }
        for (std::string& s : compilingClassVars) {
            if (s == token.str) {
                int tmp = code.GetTmpVar();
                vm.WriteCommandGetField(tmp, 1, token.str);
                cache = tmp;
                return tmp;
            }
        }
        std::cerr << errorInfo << std::endl;
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x2c(%rdi), %eax
movl %eax, 0x82129(%rip)     # 0x107278
addq $0x40, %r14
leaq 0x259d3(%rip), %rsi     # 0xaab2d
movq %r14, %rdi
callq 0x21c5b
testb %al, %al
jne 0x8517d
leaq 0x259c5(%rip), %rsi     # 0xaab32
movq %r14, %rdi
callq 0x21c5b
testb %al, %al
je 0x85226
movq %rbx, %rdi
callq 0x85044
movl %eax, %r15d
movq %rbx, %rdi
callq 0x85044
movl %eax, %ebp
leaq 0x25994(%rip), %rsi     # 0xaab2d
movq %r14, %rdi
callq 0x21c5b
movq 0xe8(%rbx), %rdi
movzbl %al, %ecx
pushq $0x1
popq %rsi
movl %r15d, %edx
callq 0x78d52
movq 0xe8(%rbx), %rbx
leaq 0x25974(%rip), %rsi     # 0xaab38
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x664f4
leaq 0x2c(%rsp), %rsi
movl %r15d, (%rsi)
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rdx
leaq 0x6(%rsp), %rcx
callq 0x88976
leaq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %edx
callq 0x78c3c
leaq 0x30(%rsp), %rdi
callq 0x89956
leaq 0x8(%rsp), %rdi
callq 0x209be
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24589(%rip), %rsi     # 0xa97b6
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x664f4
movq 0xd0(%rbx), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x84d7c
movl %eax, %r15d
cmpq $0x0, 0x10(%rsp)
je 0x852c1
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
callq 0x8531b
movq %rax, %r12
movl (%rax), %ebp
cmpl $-0x1, %ebp
jne 0x8520b
movq 0x81fb5(%rip), %r13     # 0x107230
movq 0x81fb6(%rip), %rbp     # 0x107238
cmpq %rbp, %r13
je 0x852c9
movq %r13, %rdi
movq %r14, %rsi
callq 0x51ab0
addq $0x20, %r13
testb %al, %al
je 0x85282
movq %rbx, %rdi
callq 0x85044
movl %eax, %ebp
movq 0xe8(%rbx), %rdi
pushq $0x1
popq %rdx
movl %eax, %esi
movq %r14, %rcx
callq 0x78e68
movl %ebp, (%r12)
jmp 0x8520b
movl %r15d, %ebp
jmp 0x8520b
movq 0x80d20(%rip), %rdi     # 0x105ff0
leaq 0x8(%rsp), %rsi
callq 0x11320
movq %rax, %rdi
callq 0x111b0
movl %r15d, %ebp
jmp 0x8520b
jmp 0x85301
jmp 0x85301
jmp 0x85301
jmp 0x85310
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x89956
jmp 0x85304
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x209be
jmp 0x85313
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11570