// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r12
movl 0x2c(%rdi), %eax
movl %eax, 0x7707b(%rip)     # 0x11e288
leaq 0x40(%rdi), %r14
leaq 0x28ed1(%rip), %rsi     # 0xd00e9
movq %r14, %rdi
callq 0x27854
testl %eax, %eax
je 0xa737f
leaq 0x28ebf(%rip), %rsi     # 0xd00ee
movq %r14, %rdi
callq 0x27854
testl %eax, %eax
je 0xa737f
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28327(%rip), %rdx     # 0xcf576
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x27370
movq 0xd0(%rbx), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0xa6cfc
cmpq $0x0, 0x10(%rsp)
je 0xa749f
movl %eax, 0x2c(%rsp)
movq 0xd0(%rbx), %r15
testq %r15, %r15
je 0xa72af
movq %r15, %rbp
leaq 0x98(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x9b13a
testq %rax, %rax
jne 0xa72ca
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0xa728f
addq $0x98, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x9b46a
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %r15, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x9b46a
movl (%rax), %r15d
cmpl $-0x1, %r15d
jne 0xa74a2
movq %rax, 0x30(%rsp)
movq 0x76f52(%rip), %rbp     # 0x11e240
movq 0x76f53(%rip), %r13     # 0x11e248
cmpq %r13, %rbp
je 0xa7333
movq 0x40(%r12), %r15
movq 0x48(%r12), %r12
cmpq %r12, 0x8(%rbp)
jne 0xa732a
testq %r12, %r12
je 0xa74b3
movq (%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x11390
testl %eax, %eax
je 0xa74b3
addq $0x20, %rbp
cmpq %r13, %rbp
jne 0xa7304
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x75cac(%rip), %rdi     # 0x11cff0
callq 0x113c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x11340
movsbl %al, %esi
movq %rbx, %rdi
callq 0x11040
movq %rax, %rdi
callq 0x11260
movl 0x2c(%rsp), %eax
movl %eax, %r15d
jmp 0xa74a2
leaq 0x100(%rbx), %rax
movq %rax, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa73a1
cmpb $0x0, 0xc(%rcx)
jne 0xa7389
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r12d
jmp 0xa73b3
movl 0xe0(%rbx), %r12d
leal 0x1(%r12), %ecx
movl %ecx, 0xe0(%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0xa73cb
cmpb $0x0, 0xc(%rax)
jne 0xa73b3
movb $0x1, 0xc(%rax)
movl 0x8(%rax), %r15d
jmp 0xa73dc
movl 0xe0(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0xe0(%rbx)
leaq 0x28d06(%rip), %rsi     # 0xd00e9
movq %r14, %rdi
callq 0x27854
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq 0xe8(%rbx), %rdi
movl $0x1, %esi
movl %r12d, %edx
callq 0x9942a
movq 0xe8(%rbx), %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x28cd7(%rip), %rsi     # 0xd00f4
leaq 0x28cd4(%rip), %rdx     # 0xd00f8
leaq 0x8(%rsp), %rdi
callq 0x27370
leaq 0x54(%rsp), %rsi
movl %r12d, (%rsi)
leaq 0x38(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movl $0x1, %edx
callq 0xac002
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
movl %r15d, %edx
callq 0x99248
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xa7476
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xa748d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11360
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r15d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
jne 0xa7480
jmp 0xa748d
leaq 0x100(%rbx), %rax
movq 0x30(%rsp), %r12
movq (%rax), %rax
testq %rax, %rax
je 0xa74d7
cmpb $0x0, 0xc(%rax)
jne 0xa74bf
movb $0x1, 0xc(%rax)
movl 0x8(%rax), %r15d
jmp 0xa74e8
movl 0xe0(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0xe0(%rbx)
movq 0xe8(%rbx), %rdi
movl %r15d, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x9965c
movl %r15d, (%r12)
jmp 0xa74a2
jmp 0xa753d
jmp 0xa753d
jmp 0xa7536
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xa752a
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
jmp 0xa752a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0xa754f
jmp 0xa755c
movq %rax, %rbx
jmp 0xa755c
jmp 0xa753d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa755c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11580