// File: /workspace/github_cpp_makefile_star2_O1/menhits[P]phplus/src/Namespace.cpp
// Function: NamespaceData::addNode(std::unique_ptr<AstNodeBase, std::default_delete<AstNodeBase>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void NamespaceData::addNode(AstNode node, string id)
{
	if (node->nameHint.empty())
	{
		node->nameHint=id;
		node->nameHintSet();
	}
	
	if (node->isType())
	{
		types.add(id, move(node));
	}
	/*
	else if (id=="__destroy__")
	{
		Action action=node->getAction();
		if (action->getInRightType()->isVoid() || !action->getInLeftType()->isVoid() || !action->getReturnType()->isVoid())
		{
			throw PhplusError("incorrect type signiture for destroyer", SOURCE_ERROR, node->getToken());
		}
		destructors.add(str::ptrToUniqueStr(&*action->getInRightType(), 6), move(node));
	}
	else if (id=="__copy__")
	{
		Action action=node->getAction();
		if (action->getInRightType()->isVoid() || !action->getInLeftType()->isVoid() || action->getReturnType()!=action->getInRightType())
		{
			throw PhplusError("incorrect type signiture for copier", SOURCE_ERROR, node->getToken());
		}
		copiers.add(str::ptrToUniqueStr(&*action->getReturnType(), 6), move(node));
	}
	*/
	else
	{
		// if the left or the right is a Whatev and the types match up
		if (node->canBeWhatev())
		{
			whatevActions.add(id, move(node));
		}
		else
		{
			actions.add(id, move(node));
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
cmpq $0x0, 0x10(%rdi)
jne 0x22f6b
addq $0x8, %rdi
movq %r15, %rsi
callq 0xa1d0
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testb %al, %al
je 0x22fe4
addq $0xf8, %rbx
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0xdde2
movq (%r14), %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq $0x0, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x218f4
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x22fd1
leaq 0x10(%rsp), %rdi
callq 0x168f8
movq $0x0, 0x10(%rsp)
movq 0x58(%rsp), %rdi
jmp 0x230b8
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0x2305a
addq $0xc0, %rbx
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0xdde2
movq (%r14), %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq $0x0, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x218f4
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x2304a
leaq 0x8(%rsp), %rdi
callq 0x168f8
movq $0x0, 0x8(%rsp)
movq 0x38(%rsp), %rdi
jmp 0x230b8
addq $0x50, %rbx
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0xdde2
movq (%r14), %rax
movq %rsp, %rdx
movq %rax, (%rdx)
movq $0x0, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x218f4
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x230ab
movq %rsp, %rdi
callq 0x168f8
movq $0x0, (%rsp)
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x230c2
callq 0xa2b0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x230e2
movq %rsp, %rdi
callq 0x168f8
movq $0x0, (%rsp)
movq 0x18(%rsp), %rdi
jmp 0x2313d
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x23108
leaq 0x8(%rsp), %rdi
callq 0x168f8
movq $0x0, 0x8(%rsp)
movq 0x38(%rsp), %rdi
jmp 0x2313d
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x2312f
leaq 0x10(%rsp), %rdi
callq 0x168f8
movq $0x0, 0x10(%rsp)
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x23147
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510
nop