// File: /workspace/github_cpp_makefile_star2_O2/Heptagon196[P]Gos/GosASTCompiler.cpp
// Function: Gos::AST::Relation::CompileAST(Gos::Compiler::VMCompiler&)
Compile(Relation) {
    START();
    if (tokenList.size() == 0) {
        return SUB(0);
    }
    std::vector<int> bools;
    int tmp = code.GetTmpVar();
    GosVM::RTConstNum num;
    num.data.i64 = 1;
    vm.WriteCommandNew("bool", tmp, {});
    vm.WriteCommandNot(tmp);
    bools.push_back(SUB(0));
    for (int i = 0; i < tokenList.size(); i++) {
        bools.push_back(SUB(i + 1));
        const char* op = "__eq";
        if (tokenList[i].type == L) {
            op = "__lt";
        } else if (tokenList[i].type == LE) {
            op = "__le";
        } else if (tokenList[i].type == G) {
            op = "__gt";
        } else if (tokenList[i].type == GE) {
            op = "__ge";
        }
        vm.WriteCommandCall(bools[i], op, { bools[i + 1] });
        vm.WriteCommandAnd(tmp, 0);
    }
    return tmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl 0x2c(%rdi), %eax
movl %eax, 0x81500(%rip)     # 0x107278
movq 0x10(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0x85f59
movq %rsi, %rbx
movq %rdi, %r14
movq 0x68(%rdi), %rcx
cmpq 0x60(%rdi), %rcx
je 0x85f6d
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %rbx, %rdi
callq 0x85044
movl %eax, %ebp
movq 0xe8(%rbx), %r15
leaq 0x24d78(%rip), %rsi     # 0xaab38
leaq 0x30(%rsp), %rdi
leaq 0x2(%rsp), %rdx
callq 0x664f4
leaq 0x50(%rsp), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0x78c3c
leaq 0x50(%rsp), %rdi
callq 0x89956
leaq 0x30(%rsp), %rdi
callq 0x209be
movq 0xe8(%rbx), %rdi
movl %ebp, 0x4(%rsp)
movl %ebp, %esi
callq 0x79064
movq 0x10(%r14), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, 0x8(%rsp)
movq %rbx, %rsi
callq *(%rax)
leaq 0x30(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x89a6c
xorl %r15d, %r15d
leaq 0x30(%rsp), %r13
xorl %ebx, %ebx
movq 0x68(%r14), %rax
subq 0x60(%r14), %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
cmpq %rbx, %rax
jbe 0x85f49
movq 0x10(%r14), %rax
movq 0x8(%rax,%rbx,8), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
callq *(%rax)
movl %eax, 0x30(%rsp)
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x89a6c
movq 0x60(%r14), %rax
movl (%rax,%r15), %eax
leal -0x23(%rax), %ecx
cmpl $0x3, %ecx
jae 0x85ea2
movl %ecx, %eax
leaq 0x24c4f(%rip), %rcx     # 0xaaae8
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmp 0x85eb7
cmpl $0x26, %eax
leaq 0xfefc(%rip), %rsi      # 0x95da8
leaq 0xff0e(%rip), %rax      # 0x95dc1
cmoveq %rax, %rsi
movq 0x8(%rsp), %rax
movq 0xe8(%rax), %r13
movq 0x10(%rsp), %rax
movl (%rax,%rbx,4), %ebp
leaq 0x30(%rsp), %rdi
leaq 0x2(%rsp), %rdx
callq 0x664f4
movq 0x10(%rsp), %rax
movl 0x4(%rax,%rbx,4), %eax
movl %eax, 0x50(%rsp)
leaq 0x70(%rsp), %r12
movq %r12, %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x3(%rsp), %rcx
callq 0x88976
movq %r13, %rdi
movl %ebp, %esi
leaq 0x30(%rsp), %r13
movq %r13, %rdx
movq %r12, %rcx
callq 0x791c0
movq %r12, %rdi
callq 0x89956
movq %r13, %rdi
callq 0x209be
movq 0x8(%rsp), %rax
movq 0xe8(%rax), %rdi
addq $0x38, %r15
incq %rbx
movl 0x4(%rsp), %esi
xorl %edx, %edx
callq 0x79004
jmp 0x85e43
leaq 0x10(%rsp), %rdi
callq 0x89956
movl 0x4(%rsp), %eax
jmp 0x85f5b
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movq %rbx, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
jmp 0x85fbe
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x85fa6
jmp 0x85fbe
jmp 0x85fbe
jmp 0x85fbe
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x89956
jmp 0x85fb2
jmp 0x85fbe
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x209be
jmp 0x85fc1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x89956
movq %rbx, %rdi
callq 0x11570
nop