// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movl 0x2c(%rdi), %eax
movl %eax, 0x75f86(%rip)     # 0x11e288
movq 0x10(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0xa834e
movq %rsi, %r14
movq 0x68(%rdi), %rcx
cmpq 0x60(%rdi), %rcx
je 0xa8355
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x100(%r14), %rax
movq %rdi, 0x50(%rsp)
movq (%rax), %rax
testq %rax, %rax
je 0xa8374
cmpb $0x0, 0xc(%rax)
jne 0xa8336
movb $0x1, 0xc(%rax)
movl 0x8(%rax), %r12d
jmp 0xa8387
xorl %eax, %eax
jmp 0xa85da
movq (%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movq %r14, %rsi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movl 0xe0(%r14), %r12d
leal 0x1(%r12), %eax
movl %eax, 0xe0(%r14)
movq 0xe8(%r14), %r15
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x27d56(%rip), %rsi     # 0xd00f4
leaq 0x27d53(%rip), %rdx     # 0xd00f8
leaq 0x10(%rsp), %rdi
callq 0x27370
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movl %r12d, %edx
callq 0x99248
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xa83e9
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa8405
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0xe8(%r14), %rdi
movl %r12d, %esi
callq 0x99a8e
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
movl %eax, 0x10(%rsp)
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0xa8445
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%rsp)
jmp 0xa8454
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xad1be
movq %r12, 0x58(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x50(%rsp), %rdx
movq 0x68(%rdx), %rax
subq 0x60(%rdx), %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq %r13, %rax
jbe 0xa85be
movq 0x10(%rdx), %rax
movq 0x8(%rax,%r13,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
movl %eax, 0x10(%rsp)
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0xa84b4
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%rsp)
jmp 0xa84c3
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xad1be
movq 0x50(%rsp), %rax
movq 0x60(%rax), %rax
movl (%rax,%rbp), %eax
leal -0x23(%rax), %ecx
cmpl $0x3, %ecx
jae 0xa84e9
movl %ecx, %eax
leaq 0x27bc4(%rip), %rcx     # 0xd00a4
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmp 0xa84fe
cmpl $0x26, %eax
leaq 0x1388e(%rip), %rsi     # 0xbbd81
leaq 0x138a0(%rip), %rax     # 0xbbd9a
cmoveq %rax, %rsi
movq 0xe8(%r14), %r12
movq 0x30(%rsp), %rax
movl (%rax,%r13,4), %r15d
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x4(%rsi), %rdx
leaq 0x10(%rsp), %rdi
callq 0x27370
movq 0x30(%rsp), %rax
movl 0x4(%rax,%r13,4), %eax
movl %eax, 0x60(%rsp)
movl $0x1, %edx
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
leaq 0xf(%rsp), %rcx
callq 0xac002
movq %r12, %rdi
movl %r15d, %esi
leaq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0x99cd6
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xa8583
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa859f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0xe8(%r14), %rdi
addq $0x38, %rbp
incq %r13
movq 0x58(%rsp), %rsi
xorl %edx, %edx
callq 0x999ba
jmp 0xa845e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xa85d5
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x58(%rsp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa864d
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xa862f
movq 0x70(%rsp), %rsi
jmp 0xa8620
jmp 0xa864d
jmp 0xa864d
jmp 0xa864d
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xa862f
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
jmp 0xa862f
jmp 0xa864d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa8650
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11360
jmp 0xa8650
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xa8667
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11580
nop