// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
movb %cl, 0x10(%rax)
movl $0x0, 0x14(%rax)
movb %cl, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movq %rcx, 0x30(%rax)
movl $0x3, -0x38(%rax)
movq (%rsi), %rax
movq %rsi, %rdi
xorl %esi, %esi
callq *0x18(%rax)
leaq -0x88(%rbp), %r15
cmpl $0x19, 0x8(%rax)
movq (%r14), %rax
movq 0x18(%rax), %rax
jne 0x14883
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 0x3150
movb $0x1, -0x68(%rbp)
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
movl $0x1, %esi
callq *0x18(%rcx)
movq 0x58(%rax), %rdi
callq 0x3350
movl %eax, -0x64(%rbp)
jmp 0x14899
movq %r14, %rdi
xorl %esi, %esi
callq *%rax
addq $0x58, %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x3150
movq (%r14), %rax
movq %r14, %rdi
movl $0x1, %esi
callq *0x18(%rax)
leaq -0xa8(%rbp), %rdi
addq $0x58, %rax
movq %rax, %rsi
callq 0x3150
leaq 0x30(%r14), %rdi
leaq 0x6b8b(%rip), %rsi      # 0x1b450
callq 0x30a0
testl %eax, %eax
jne 0x148d2
movb $0x1, -0x60(%rbp)
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
cmpq $0x18, %rax
jne 0x1497e
movq (%r14), %rax
movq %r14, %rdi
movl $0x2, %esi
callq *0x18(%rax)
cmpl $0x6, 0x8(%rax)
jne 0x14a2c
movq (%r14), %rax
movq %r14, %rdi
movl $0x2, %esi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
cmpl $0xd, 0x8(%rax)
jne 0x14a95
movq (%r14), %rax
movq %r14, %rdi
movl $0x2, %esi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
movq %rax, %r14
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %rdi
callq 0x4d52
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14bc2
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x1497e
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x3230
movl -0xb0(%rbp), %eax
leaq -0x158(%rbp), %rdi
movl %eax, -0x8(%rdi)
leaq -0x148(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
callq 0x4d52
leaq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
callq 0x4d52
leaq -0x68(%rbp), %rax
leaq -0x58(%rbp), %rsi
movb 0x8(%rax), %cl
leaq -0x108(%rbp), %rdi
movb %cl, -0x8(%rdi)
movq (%rax), %rax
movq %rax, -0x10(%rdi)
callq 0x4ade
leaq -0x160(%rbp), %rsi
movq %rbx, %rdi
callq 0x13b00
leaq -0x160(%rbp), %rdi
callq 0x4824
leaq -0xb0(%rbp), %rdi
callq 0x4824
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
leaq -0xe0(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x6f28(%rip), %rsi      # 0x1b973
leaq 0x6f45(%rip), %rdx      # 0x1b997
leaq -0xf0(%rbp), %rdi
callq 0x4336
movb $0x1, %r12b
leaq -0xf0(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r12d, %r12d
leaq 0xe2f4(%rip), %rsi      # 0x22d78
leaq -0xf4a5(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x14afc
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
leaq -0xc0(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x6ee4(%rip), %rsi      # 0x1b998
leaq 0x6ef6(%rip), %rdx      # 0x1b9b1
leaq -0xd0(%rbp), %rdi
callq 0x4336
movb $0x1, %r12b
leaq -0xd0(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r12d, %r12d
leaq 0xe28b(%rip), %rsi      # 0x22d78
leaq -0xf50e(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
je 0x14b34
movq -0xc0(%rbp), %rsi
jmp 0x14b2c
jmp 0x14b3b
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r15, %rdi
je 0x14b34
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x3230
testb %r12b, %r12b
jne 0x14b3e
jmp 0x14bae
movq %rax, %rbx
movq %r14, %rdi
callq 0x31a0
jmp 0x14bae
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x14bae
movq -0x30(%rbp), %rsi
jmp 0x14ba1
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0x4824
jmp 0x14bae
movq %rax, %rbx
movq -0x138(%rbp), %rdi
cmpq %r15, %rdi
je 0x14b8e
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x14b8e
movq %rax, %rbx
movq -0x158(%rbp), %rdi
cmpq %r14, %rdi
je 0x14bae
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x14bae
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x4824
movq %rbx, %rdi
callq 0x33f0