// File: Heptagon196[P]Gos/GosASTCompiler.cpp
// Function: Gos::AST::Equality::CompileAST(Gos::Compiler::VMCompiler&)
Compile(Equality) {
    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 == NE) {
            op = "__ne";
        }
        vm.WriteCommandCall(bools[i], op, { bools[i + 1] });
        vm.WriteCommandAnd(tmp, 0);
    }
    return tmp;
}

// Assembly:
subq $0x168, %rsp            # imm = 0x168
movq %rdi, 0x158(%rsp)
movq %rsi, 0x150(%rsp)
movq 0x158(%rsp), %rdi
movq %rdi, 0x58(%rsp)
movl 0x2c(%rdi), %eax
movl %eax, 0x12ab9b(%rip)    # 0x3022f8
addq $0x10, %rdi
callq 0x1d1e80
cmpq $0x0, %rax
jne 0x1d777c
movl $0x0, 0x164(%rsp)
jmp 0x1d7c27
movq 0x58(%rsp), %rdi
addq $0x60, %rdi
callq 0x1c58d0
cmpq $0x0, %rax
jne 0x1d77be
movq 0x58(%rsp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1d1e60
movq (%rax), %rdi
movq 0x150(%rsp), %rsi
movq (%rdi), %rax
callq *(%rax)
movl %eax, 0x164(%rsp)
jmp 0x1d7c27
leaq 0x138(%rsp), %rdi
callq 0x1dd1b0
movq 0x150(%rsp), %rdi
callq 0x1d5250
movl %eax, 0x134(%rsp)
movq $0x1, 0x128(%rsp)
movq 0x150(%rsp), %rax
movq 0xe8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x107(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x13570
movq 0x50(%rsp), %rdx
leaq 0x4a81e(%rip), %rsi     # 0x22203b
leaq 0x108(%rsp), %rdi
callq 0x165520
jmp 0x1d782c
movl 0x134(%rsp), %eax
movl %eax, 0x3c(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x1dd1b0
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %edx
movq 0x40(%rsp), %rcx
leaq 0x108(%rsp), %rsi
callq 0x1b0f40
jmp 0x1d787d
leaq 0xd0(%rsp), %rdi
callq 0x1dd280
leaq 0x108(%rsp), %rdi
callq 0x52f50
leaq 0x107(%rsp), %rdi
callq 0x136a0
movq 0x150(%rsp), %rax
movq 0xe8(%rax), %rdi
movl 0x134(%rsp), %esi
callq 0x1b15b0
jmp 0x1d78c1
movq 0x58(%rsp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1d1e60
movq (%rax), %rdi
movq 0x150(%rsp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
movl %eax, 0x38(%rsp)
jmp 0x1d78ec
movl 0x38(%rsp), %eax
movl %eax, 0xcc(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0x1dd2e0
jmp 0x1d790e
movl $0x0, 0xc8(%rsp)
movq 0x58(%rsp), %rdi
movslq 0xc8(%rsp), %rax
movq %rax, 0x30(%rsp)
addq $0x60, %rdi
callq 0x1c58d0
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x1d7bfb
movq 0x58(%rsp), %rdi
addq $0x10, %rdi
movl 0xc8(%rsp), %eax
incl %eax
movslq %eax, %rsi
callq 0x1d1e60
movq (%rax), %rdi
movq 0x150(%rsp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
movl %eax, 0x2c(%rsp)
jmp 0x1d7978
movl 0x2c(%rsp), %eax
movl %eax, 0xc4(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0xc4(%rsp), %rsi
callq 0x1dd2e0
jmp 0x1d799a
movq 0x58(%rsp), %rdi
leaq 0x33d62(%rip), %rax     # 0x20b708
movq %rax, 0xb8(%rsp)
addq $0x60, %rdi
movslq 0xc8(%rsp), %rsi
callq 0x1c58f0
cmpl $0x22, (%rax)
jne 0x1d7a48
leaq 0x33d3e(%rip), %rax     # 0x20b70d
movq %rax, 0xb8(%rsp)
jmp 0x1d7a48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x1d7a1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x1dd280
leaq 0x108(%rsp), %rdi
callq 0x52f50
leaq 0x107(%rsp), %rdi
callq 0x136a0
jmp 0x1d7c18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x1d7c18
movq 0x150(%rsp), %rax
movq 0xe8(%rax), %rax
movq %rax, 0x8(%rsp)
movslq 0xc8(%rsp), %rsi
leaq 0x138(%rsp), %rdi
callq 0x1b5c70
movl (%rax), %eax
movl %eax, 0x14(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x97(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x13570
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0x165520
jmp 0x1d7aaf
movl 0xc8(%rsp), %eax
incl %eax
movslq %eax, %rsi
leaq 0x138(%rsp), %rdi
callq 0x1b5c70
movl (%rax), %eax
movl %eax, 0x64(%rsp)
leaq 0x64(%rsp), %rax
movq %rax, 0x68(%rsp)
movq $0x1, 0x70(%rsp)
leaq 0x63(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5ae50
movq (%rsp), %rcx
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x78(%rsp), %rdi
callq 0x1dd1f0
jmp 0x1d7b09
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdi
leaq 0x98(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x1b1940
jmp 0x1d7b26
leaq 0x78(%rsp), %rdi
callq 0x1dd280
leaq 0x63(%rsp), %rdi
callq 0x5ae60
leaq 0x98(%rsp), %rdi
callq 0x52f50
leaq 0x97(%rsp), %rdi
callq 0x136a0
movq 0x150(%rsp), %rax
movq 0xe8(%rax), %rdi
movl 0x134(%rsp), %esi
xorl %edx, %edx
callq 0x1b1510
jmp 0x1d7b73
jmp 0x1d7b75
movl 0xc8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc8(%rsp)
jmp 0x1d7919
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x1d7bec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x1d7bd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x1dd280
leaq 0x63(%rsp), %rdi
callq 0x5ae60
leaq 0x98(%rsp), %rdi
callq 0x52f50
leaq 0x97(%rsp), %rdi
callq 0x136a0
jmp 0x1d7c18
movl 0x134(%rsp), %eax
movl %eax, 0x164(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x1dd280
jmp 0x1d7c27
leaq 0x138(%rsp), %rdi
callq 0x1dd280
jmp 0x1d7c36
movl 0x164(%rsp), %eax
addq $0x168, %rsp            # imm = 0x168
retq
movq 0xf8(%rsp), %rdi
callq 0x133f0
nopw %cs:(%rax,%rax)