// File: /workspace/github_cpp_makefile_star2_O3/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, 0x765e9(%rip)     # 0x11e288
movq 0x10(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0xa7cf3
movq %rsi, %rbx
cmpl $0x1, 0x8(%rdi)
jne 0xa7d2c
movl 0x28(%rdi), %edx
leal -0x1a(%rdx), %ecx
cmpl $0x3, %ecx
ja 0xa7d08
leaq 0x2810c(%rip), %rdx     # 0xcfdd0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x100(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa7e3b
cmpb $0x0, 0xc(%rcx)
jne 0xa7cd4
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
jmp 0xa7e4c
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 0xa7d2c
leaq 0x100(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa7d8d
cmpb $0x0, 0xc(%rcx)
jne 0xa7d14
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
jmp 0xa7d9e
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 0xa7dd1
cmpb $0x0, 0xc(%rcx)
jne 0xa7d4f
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
jmp 0xa7de2
leaq 0x100(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xa7e06
cmpb $0x0, 0xc(%rcx)
jne 0xa7d6e
movb $0x1, 0xc(%rcx)
movl 0x8(%rcx), %r14d
jmp 0xa7e17
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 0x99588
movq 0xe8(%rbx), %rdi
movl %r14d, %esi
callq 0x99a8e
jmp 0xa7cf6
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 0x99c6c
jmp 0xa7cf6
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 0x99c02
jmp 0xa7cf6
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 0x13f2f(%rip), %rsi     # 0xbbd9f
leaq 0x13f2d(%rip), %rdx     # 0xbbda4
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x27370
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq %r12, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x99cd6
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xa7eb8
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0xa7ecf
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0xe8(%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x9951e
jmp 0xa7cf6
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xa7efe
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x1208c
movq %rbx, %rdi
callq 0x11580
nop