// File: /workspace/github_cpp_makefile_star2_O3/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 0x231f2
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 0x23268
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 0xde0c
movq (%r14), %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq $0x0, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21b98
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x23255
leaq 0x10(%rsp), %rdi
callq 0x16b80
movq $0x0, 0x10(%rsp)
movq 0x58(%rsp), %rdi
jmp 0x2333c
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0x232de
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 0xde0c
movq (%r14), %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq $0x0, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21b98
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x232ce
leaq 0x8(%rsp), %rdi
callq 0x16b80
movq $0x0, 0x8(%rsp)
movq 0x38(%rsp), %rdi
jmp 0x2333c
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 0xde0c
movq (%r14), %rax
movq %rsp, %rdx
movq %rax, (%rdx)
movq $0x0, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21b98
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x2332f
movq %rsp, %rdi
callq 0x16b80
movq $0x0, (%rsp)
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x23346
callq 0xa2b0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x23366
movq %rsp, %rdi
callq 0x16b80
movq $0x0, (%rsp)
movq 0x18(%rsp), %rdi
jmp 0x233c1
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x2338c
leaq 0x8(%rsp), %rdi
callq 0x16b80
movq $0x0, 0x8(%rsp)
movq 0x38(%rsp), %rdi
jmp 0x233c1
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x233b3
leaq 0x10(%rsp), %rdi
callq 0x16b80
movq $0x0, 0x10(%rsp)
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x233cb
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510
nop