// File: /workspace/github_cpp_makefile_star2_O1/RuiDGPires[P]CrimLang/src/semantic_analiser.cpp
// Function: sc_Tracker::cas(crl::Node*)
void _sc_Tracker::cas(crl::Node *node){
	Context::Item item;
	item.type = Context::Item::Type::CAS;
	item.subtype = ((crl::Leaf *)node->get_child(0))->token.str;
	item.name = ((crl::Leaf *)node->get_child(1))->token.str;

	i32 i;
	for (i = 2; node->get_child(i)->type == crl::Node::Type::ARG; i++){
		crl::Node *arg = node->get_child(i);
		std::string var_type = ((crl::Leaf *) arg->get_child(0))->token.str;

		item.args.push_back(std::pair<std::string, bool>(var_type, arg->annotation == "mut"));
	}

	node->argc = i - 2;
	this->add(item);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq -0xb0(%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 $0x2, -0x38(%rax)
movq (%rsi), %rax
movq %rsi, %rdi
xorl %esi, %esi
callq *0x18(%rax)
leaq -0xc0(%rbp), %rdi
addq $0x58, %rax
movq %rax, %rsi
callq 0x3150
movq (%r14), %rax
movq %r14, %rdi
movl $0x1, %esi
callq *0x18(%rax)
leaq -0xe0(%rbp), %rdi
addq $0x58, %rax
movq %rax, %rsi
callq 0x3150
movq %rbx, -0x50(%rbp)
xorl %r12d, %r12d
leaq -0x68(%rbp), %r13
leaq -0x78(%rbp), %rbx
leal 0x2(%r12), %r15d
movq (%r14), %rax
movq %r14, %rdi
movl %r15d, %esi
callq *0x18(%rax)
cmpl $0x12, 0x8(%rax)
jne 0x13f63
movq (%r14), %rax
movq %r14, %rdi
movl %r15d, %esi
callq *0x18(%rax)
movq %rax, %r15
movq (%rax), %rax
movq %r15, %rdi
xorl %esi, %esi
callq *0x18(%rax)
leaq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x4d4a
addq $0x30, %r15
movq %r15, %rdi
leaq 0x7558(%rip), %rsi      # 0x1b450
callq 0x30a0
movl %eax, %r15d
movq %r13, -0x78(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x4d4a
testl %r15d, %r15d
sete -0x58(%rbp)
leaq -0x90(%rbp), %rdi
movq %rbx, %rsi
callq 0x18bac
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0x13f42
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x13f5b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3230
incl %r12d
jmp 0x13e99
movl %r12d, 0x50(%r14)
movl -0xe8(%rbp), %eax
leaq -0x150(%rbp), %rdi
movl %eax, -0x8(%rdi)
leaq -0x140(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x4d4a
leaq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
addq %rsi, %rdx
callq 0x4d4a
leaq -0xa0(%rbp), %rcx
movb 0x8(%rcx), %al
leaq -0x100(%rbp), %rdi
movb %al, -0x8(%rdi)
movq (%rcx), %rax
movq %rax, -0x10(%rdi)
leaq -0x90(%rbp), %rsi
callq 0x4ad0
leaq -0x158(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x13bf4
leaq -0x158(%rbp), %rdi
callq 0x4816
leaq -0xe8(%rbp), %rdi
callq 0x4816
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
callq 0x4816
jmp 0x140ad
movq %rax, %rbx
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x14055
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x14055
movq %rax, %rbx
movq -0x150(%rbp), %rdi
cmpq %r14, %rdi
je 0x140ad
movq -0x140(%rbp), %rsi
jmp 0x1409c
jmp 0x140aa
jmp 0x140aa
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0x1408b
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x1408b
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x140ad
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x140ad
jmp 0x140aa
jmp 0x140aa
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x4816
movq %rbx, %rdi
callq 0x33f0
nop