// File: /workspace/github_cpp_makefile_star2_O1/Heptagon196[P]Gos/GosASTCompiler.cpp
// Function: Gos::AST::Unary::CompileAST(Gos::Compiler::VMCompiler&)
Compile(Unary) {
    START();
    if (branch == 1) {
        if (token.type == ADD) {
            return SUB(0);
        } else if (token.type == SUB) {
            int tmp = code.GetTmpVar();
            vm.WriteCommandCall(SUB(0), "__unm", {});
            vm.WriteCommandRef(tmp, 0);
            return tmp;
        } else if (token.type == NOT) {
            int tmp = code.GetTmpVar();
            vm.WriteCommandClone(tmp, SUB(0));
            vm.WriteCommandNot(tmp);
            return tmp;
        } else if (token.type == MUL) {
            // unbox
            int tmp = code.GetTmpVar();
            vm.WriteCommandUnbox(tmp, SUB(0));
            return tmp;
        } else if (token.type == ADDR) {
            // box
            int tmp = code.GetTmpVar();
            vm.WriteCommandBox(tmp, SUB(0));
            return tmp;
        }
    }
    return SUB(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl 0x2c(%rdi), %eax
movl %eax, 0x76871(%rip)     # 0x11f288
movq 0x10(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0xa8b1f
movq %rsi, %rbx
cmpl $0x1, 0x8(%rdi)
jne 0xa8ba1
movl 0x28(%rdi), %edx
leal -0x1a(%rdx), %ecx
cmpl $0x3, %ecx
ja 0xa8b34
leaq 0x283b8(%rip), %rdx     # 0xd0e00
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x100(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa8a73
movb 0xc(%rcx), %dl
testb %dl, %dl
jne 0xa8a6f
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
testb %dl, %dl
jne 0xa8a58
testq %rcx, %rcx
jne 0xa8a89
movl 0xe0(%rbx), %r14d
leal 0x1(%r14), %ecx
movl %ecx, 0xe0(%rbx)
movq 0xe8(%rbx), %r12
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
movl %eax, %ebp
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x14322(%rip), %rsi     # 0xbcdcf
leaq 0x14320(%rip), %rdx     # 0xbcdd4
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x27dc8
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq %r12, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x9a924
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xa8af5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0xa8b0c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0xe8(%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x9a158
jmp 0xa8b22
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x27, %edx
jne 0xa8ba1
leaq 0x100(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa8b5b
movb 0xc(%rcx), %dl
testb %dl, %dl
jne 0xa8b57
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
testb %dl, %dl
jne 0xa8b40
testq %rcx, %rcx
jne 0xa8b71
movl 0xe0(%rbx), %r14d
leal 0x1(%r14), %ecx
movl %ecx, 0xe0(%rbx)
movq 0xe8(%rbx), %r15
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x9a1c2
movq 0xe8(%rbx), %rdi
movl %r14d, %esi
callq 0x9a6c8
jmp 0xa8b22
movq (%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movq %rbx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
leaq 0x100(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa8bdf
movb 0xc(%rcx), %dl
testb %dl, %dl
jne 0xa8bdb
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
testb %dl, %dl
jne 0xa8bc4
testq %rcx, %rcx
jne 0xa8bf5
movl 0xe0(%rbx), %r14d
leal 0x1(%r14), %ecx
movl %ecx, 0xe0(%rbx)
movq 0xe8(%rbx), %r15
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x9a8ba
jmp 0xa8b22
leaq 0x100(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa8c3b
movb 0xc(%rcx), %dl
testb %dl, %dl
jne 0xa8c37
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
testb %dl, %dl
jne 0xa8c20
testq %rcx, %rcx
jne 0xa8c51
movl 0xe0(%rbx), %r14d
leal 0x1(%r14), %ecx
movl %ecx, 0xe0(%rbx)
movq 0xe8(%rbx), %r15
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x9a850
jmp 0xa8b22
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xa8c8e
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x12082
movq %rbx, %rdi
callq 0x11580
nop