// File: /workspace/github_cpp_makefile_star2_O2/RuiDGPires[P]CrimLang/src/semantic_analiser.cpp
// Function: sc_Tracker::var_declaration(crl::Node*)
void _sc_Tracker::var_declaration(crl::Node *node){
	Context::Item item;
	item.type = Context::Item::Type::VAR;
	if (node->get_child(0)->type == crl::Node::Type::VECTOR){
		item.subtype = ((crl::Leaf *) node->get_child(0)->get_child(0))->token.str;
		item._is_vector = true;
		item.vec_size = atoi(((crl::Leaf *) node->get_child(0)->get_child(1))->token.str.c_str());
	}else
		item.subtype = ((crl::Leaf *) node->get_child(0))->token.str;
	item.name = ((crl::Leaf *) node->get_child(1))->token.str;

	if (node->annotation == "mut")
		item._mutable = true;


	if (node->children.size() == 3){
		ASSERT(node->get_child(2)->type == crl::Node::Type::ASSIGN, "Must be assign if children size is 3");
		ASSERT(node->get_child(2)->get_child(0)->type == crl::Node::Type::EXPRESSION, "Must assign an expression");
		this->expression(node->get_child(2)->get_child(0), item.subtype);
	}
	this->add(item);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movb %cl, 0x10(%rax)
andl $0x0, 0x14(%rax)
movb %cl, 0x18(%rax)
andq $0x0, 0x30(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movl $0x3, -0x38(%rax)
movq (%rsi), %rax
movq %rsi, %rdi
xorl %esi, %esi
callq *0x18(%rax)
leaq -0xc8(%rbp), %r15
cmpl $0x19, 0x8(%rax)
movq (%r14), %rax
movq 0x18(%rax), %rax
jne 0xfe1c
movq %r14, %rdi
xorl %esi, %esi
callq *%rax
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
addq $0x58, %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x3160
movb $0x1, -0xa8(%rbp)
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x18(%rax)
movq (%rax), %rcx
pushq $0x1
popq %rsi
movq %rax, %rdi
callq *0x18(%rcx)
movq 0x58(%rax), %rdi
callq 0x3350
movl %eax, -0xa4(%rbp)
jmp 0xfe32
movq %r14, %rdi
xorl %esi, %esi
callq *%rax
addq $0x58, %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x3160
movq (%r14), %rax
pushq $0x1
popq %rsi
movq %r14, %rdi
callq *0x18(%rax)
leaq -0xe8(%rbp), %rdi
addq $0x58, %rax
movq %rax, %rsi
callq 0x3160
leaq 0x30(%r14), %rdi
leaq 0x55f4(%rip), %rsi      # 0x15450
callq 0x410a
testb %al, %al
je 0xfe6c
movb $0x1, -0xa0(%rbp)
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
cmpq $0x18, %rax
jne 0xfeef
movq (%r14), %rax
pushq $0x2
popq %rsi
movq %r14, %rdi
callq *0x18(%rax)
cmpl $0x6, 0x8(%rax)
jne 0xff37
movq (%r14), %rax
pushq $0x2
popq %rsi
movq %r14, %rdi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
cmpl $0xd, 0x8(%rax)
jne 0xff85
movq (%r14), %rax
pushq $0x2
popq %rsi
movq %r14, %rdi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
movq %rax, %r14
leaq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x32f0
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10032
leaq -0x40(%rbp), %rdi
callq 0x3110
leaq -0x160(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x4444
leaq -0x160(%rbp), %rsi
movq %rbx, %rdi
callq 0xf562
leaq -0x160(%rbp), %rdi
callq 0x44c8
leaq -0xf0(%rbp), %rdi
callq 0x44c8
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x50
popq %rdi
callq 0x3140
movq %rax, %r14
leaq 0x59ea(%rip), %rsi      # 0x15933
leaq -0x80(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x3be4
movb $0x1, %r15b
pushq $-0x1
popq %rdx
leaq -0x80(%rbp), %rcx
movq %r14, %rdi
movl %edx, %esi
callq 0x4e88
xorl %r15d, %r15d
leaq 0xde1c(%rip), %rsi      # 0x1dd90
leaq -0xb043(%rip), %rdx     # 0x4f38
movq %r14, %rdi
callq 0x33f0
jmp 0xffd1
pushq $0x50
popq %rdi
callq 0x3140
movq %rax, %r14
leaq 0x59c1(%rip), %rsi      # 0x15958
leaq -0x60(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x3be4
movb $0x1, %r15b
pushq $-0x1
popq %rdx
leaq -0x60(%rbp), %rcx
movq %r14, %rdi
movl %edx, %esi
callq 0x4e88
xorl %r15d, %r15d
leaq 0xddce(%rip), %rsi      # 0x1dd90
leaq -0xb091(%rip), %rdx     # 0x4f38
movq %r14, %rdi
callq 0x33f0
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0xffe3
jmp 0xffef
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x3110
testb %r15b, %r15b
jne 0xfff2
jmp 0x1001e
movq %rax, %rbx
movq %r14, %rdi
callq 0x31b0
jmp 0x1001e
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3110
jmp 0x1001e
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0x44c8
jmp 0x1001e
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x44c8
movq %rbx, %rdi
callq 0x3410