// File: /workspace/github_cpp_makefile_star2_O1/Heptagon196[P]Gos/GosASTCompiler.cpp
// Function: Gos::AST::DefVar::CompileAST(Gos::Compiler::VMCompiler&)
Compile(DefVar) {
    START();
    std::string symbol = nodes[0]->token.str;
    std::string type = "unknown";
    int assign;
    int id = pc++;
    code.currentScope->varID[symbol] = id;
    if (branch == 1) {
        type = nodes[1]->token.str;
    } else if (branch == 2) {
        assign = SUB(1);
    } else if (branch == 3) {
        type = nodes[1]->token.str;
        assign = SUB(2);
    }
    code.currentScope->varType[symbol] = type;
    if (branch <= 1) {
        vm.WriteCommandNew(type, id, {});
    } else if (branch == 2) {
        vm.WriteCommandRef(id, assign);
    } else if (branch == 3) {
        vm.WriteCommandNew(type, id, {});
        vm.WriteCommandMov(id, assign);
    }
    return id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl 0x2c(%rdi), %eax
movl %eax, 0x7555f(%rip)     # 0x11f288
movq 0x10(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0xa9dd3
movq %rsi, %r14
movq %rdi, %r15
movq (%rax), %rax
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x37586
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x273a2(%rip), %rsi     # 0xd1111
leaq 0x273a2(%rip), %rdx     # 0xd1118
leaq 0x18(%rsp), %rdi
callq 0x27dc8
movl 0xe0(%r14), %ebx
leal 0x1(%rbx), %eax
movl %eax, 0xe0(%r14)
movq 0xd0(%r14), %rdi
addq $0x28, %rdi
leaq 0x38(%rsp), %rsi
callq 0x9c09a
movl %ebx, (%rax)
movl 0x8(%r15), %eax
cmpl $0x3, %eax
je 0xa9de1
cmpl $0x2, %eax
je 0xa9dda
cmpl $0x1, %eax
jne 0xa9e0e
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
addq $0x40, %rsi
leaq 0x18(%rsp), %rdi
callq 0x3a2e8
jmp 0xa9e0e
xorl %ebx, %ebx
jmp 0xa9f09
movl $0x8, %ebp
jmp 0xa9dfc
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
addq $0x40, %rsi
movl $0x10, %ebp
leaq 0x18(%rsp), %rdi
callq 0x3a2e8
movq 0x10(%r15), %rax
movq (%rax,%rbp), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
movl %eax, %ebp
movq 0xd0(%r14), %rdi
addq $0x60, %rdi
leaq 0x38(%rsp), %rsi
callq 0xad878
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x3a2e8
movl 0x8(%r15), %eax
cmpl $0x1, %eax
jg 0xa9e75
movq 0xe8(%r14), %rdi
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
leaq 0x18(%rsp), %rsi
movl %ebx, %edx
callq 0x99e82
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xa9edb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
jmp 0xa9edb
cmpl $0x3, %eax
je 0xa9e91
cmpl $0x2, %eax
jne 0xa9edb
movq 0xe8(%r14), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x9a158
jmp 0xa9edb
movq 0xe8(%r14), %rdi
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
leaq 0x18(%rsp), %rsi
movl %ebx, %edx
callq 0x99e82
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xa9ecb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0xe8(%r14), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x9a0ee
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0xa9ef2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xa9f09
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x11360
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa9f1c
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xa9f3f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
jmp 0xa9f3f
movq %rax, %rbx
jmp 0xa9f56
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0xa9f56
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xa9f6d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11580
nop