// File: menhits[P]phplus/src/Namespace.cpp
// Function: NamespaceData::addVar(std::shared_ptr<TypeBase>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Action NamespaceData::addVar(Type type, string name)
{
	size_t offset=stackFrame->getSize();
	stackFrame->addMember(type);
	
	Action getAction;
	Action setAction;
	Action copyAction;
	
	Namespace top=shared_from_this();
	
	while(top->parent)
	{
		top=top->parent;
	}
	
	if (stackFrame!=top->stackFrame)
	{
		getAction=varGetAction(offset, type, name);
		setAction=varSetAction(offset, type, name);
	}
	else
	{
		getAction=globalGetAction(offset, type, name);
		setAction=globalSetAction(offset, type, name);
	}
	
	copyAction=getCopier(type);
	
	if (copyAction)
	{
		dynamicActions.add(name, AstActionWrapper::make(branchAction(voidAction, copyAction, getAction)));
	}
	else
	{
		dynamicActions.add(name, AstActionWrapper::make(getAction));
	}
	
	dynamicActions.add(name, AstActionWrapper::make(setAction));
	
	Action destructor=getDestroyer(type);
	
	if (destructor)
	{
		destructorActions.push_back(branchAction(voidAction, destructor, getAction));
	}
	
	return setAction;
}

// Assembly:
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rcx, 0xc8(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rdi, 0xd0(%rsp)
movq %rdi, %rax
movq %rax, 0xd8(%rsp)
movq %rdi, 0x3f0(%rsp)
movq %rsi, 0x3e8(%rsp)
movq %rdx, 0x3e0(%rsp)
movq %rcx, 0x3d8(%rsp)
movq 0x3e8(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
addq $0x40, %rdi
movq %rdi, 0xe8(%rsp)
callq 0x3ea80
movq %rax, %rdi
callq 0x3ed10
movq 0xe8(%rsp), %rdi
movq %rax, 0x3d0(%rsp)
callq 0x3ea80
movq 0xf0(%rsp), %rsi
movq %rax, 0xf8(%rsp)
leaq 0x3c0(%rsp), %rdi
movq %rdi, 0x100(%rsp)
callq 0x1a920
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rsi
callq 0x9ba90
jmp 0x3b4c4
leaq 0x3c0(%rsp), %rdi
callq 0x1a950
leaq 0x3a0(%rsp), %rdi
callq 0x1bcc0
movq 0xd0(%rsp), %rdi
movb $0x0, 0x39f(%rsp)
callq 0x1bcc0
leaq 0x388(%rsp), %rdi
callq 0x1bcc0
movq 0xe0(%rsp), %rsi
leaq 0x378(%rsp), %rdi
callq 0x3e990
jmp 0x3b517
jmp 0x3b519
leaq 0x378(%rsp), %rdi
callq 0x1a6a0
movq %rax, %rdi
addq $0x30, %rdi
callq 0x1d730
testb $0x1, %al
jne 0x3b538
jmp 0x3b59a
leaq 0x378(%rsp), %rdi
callq 0x1a6a0
movq %rax, %rsi
addq $0x30, %rsi
leaq 0x378(%rsp), %rdi
callq 0x1a540
jmp 0x3b519
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x3c0(%rsp), %rdi
callq 0x1a950
jmp 0x3c0cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3c07c
movq 0xe0(%rsp), %rax
addq $0x40, %rax
movq %rax, 0xc0(%rsp)
leaq 0x378(%rsp), %rdi
callq 0x1a6a0
movq 0xc0(%rsp), %rdi
movq %rax, %rsi
addq $0x40, %rsi
callq 0x3ed20
testb $0x1, %al
jne 0x3b5d8
jmp 0x3b7b5
movq 0xf0(%rsp), %rsi
movq 0x3d0(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0x358(%rsp), %rdi
callq 0x1a920
movq 0xc8(%rsp), %rsi
leaq 0x338(%rsp), %rdi
callq 0xb1a0
jmp 0x3b614
movq 0xb8(%rsp), %rsi
leaq 0x368(%rsp), %rdi
leaq 0x358(%rsp), %rdx
leaq 0x338(%rsp), %rcx
callq 0xc4b90
jmp 0x3b63b
leaq 0x3a0(%rsp), %rdi
leaq 0x368(%rsp), %rsi
movq %rsi, 0xa8(%rsp)
callq 0x1ac90
movq 0xa8(%rsp), %rdi
callq 0x1acc0
leaq 0x338(%rsp), %rdi
callq 0xb6e8
leaq 0x358(%rsp), %rdi
callq 0x1a950
movq 0xf0(%rsp), %rsi
movq 0x3d0(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x318(%rsp), %rdi
callq 0x1a920
movq 0xc8(%rsp), %rsi
leaq 0x2f8(%rsp), %rdi
callq 0xb1a0
jmp 0x3b6bb
movq 0xb0(%rsp), %rsi
leaq 0x328(%rsp), %rdi
leaq 0x318(%rsp), %rdx
leaq 0x2f8(%rsp), %rcx
callq 0xc4cc0
jmp 0x3b6e2
movq 0xd0(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0x1ac90
leaq 0x328(%rsp), %rdi
callq 0x1acc0
leaq 0x2f8(%rsp), %rdi
callq 0xb6e8
leaq 0x318(%rsp), %rdi
callq 0x1a950
jmp 0x3b992
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3b75a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x338(%rsp), %rdi
callq 0xb6e8
leaq 0x358(%rsp), %rdi
callq 0x1a950
jmp 0x3c06f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3b7a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0xb6e8
leaq 0x318(%rsp), %rdi
callq 0x1a950
jmp 0x3c06f
movq 0xf0(%rsp), %rsi
movq 0x3d0(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0x1a920
movq 0xc8(%rsp), %rsi
leaq 0x2b8(%rsp), %rdi
callq 0xb1a0
jmp 0x3b7f1
movq 0xa0(%rsp), %rsi
leaq 0x2e8(%rsp), %rdi
leaq 0x2d8(%rsp), %rdx
leaq 0x2b8(%rsp), %rcx
callq 0xc4df0
jmp 0x3b818
leaq 0x3a0(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
movq %rsi, 0x90(%rsp)
callq 0x1ac90
movq 0x90(%rsp), %rdi
callq 0x1acc0
leaq 0x2b8(%rsp), %rdi
callq 0xb6e8
leaq 0x2d8(%rsp), %rdi
callq 0x1a950
movq 0xf0(%rsp), %rsi
movq 0x3d0(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x298(%rsp), %rdi
callq 0x1a920
movq 0xc8(%rsp), %rsi
leaq 0x278(%rsp), %rdi
callq 0xb1a0
jmp 0x3b898
movq 0x98(%rsp), %rsi
leaq 0x2a8(%rsp), %rdi
leaq 0x298(%rsp), %rdx
leaq 0x278(%rsp), %rcx
callq 0xc4f20
jmp 0x3b8bf
movq 0xd0(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x1ac90
leaq 0x2a8(%rsp), %rdi
callq 0x1acc0
leaq 0x278(%rsp), %rdi
callq 0xb6e8
leaq 0x298(%rsp), %rdi
callq 0x1a950
jmp 0x3b992
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3b937
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0xb6e8
leaq 0x2d8(%rsp), %rdi
callq 0x1a950
jmp 0x3c06f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3b980
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x278(%rsp), %rdi
callq 0xb6e8
leaq 0x298(%rsp), %rdi
callq 0x1a950
jmp 0x3c06f
movq 0xf0(%rsp), %rsi
leaq 0x258(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x1a920
movq 0xe0(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x268(%rsp), %rdi
callq 0x3c0e0
jmp 0x3b9ce
leaq 0x388(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x1ac90
leaq 0x268(%rsp), %rdi
callq 0x1acc0
leaq 0x258(%rsp), %rdi
callq 0x1a950
leaq 0x388(%rsp), %rdi
callq 0x1be40
testb $0x1, %al
jne 0x3ba13
jmp 0x3bc37
movq 0xc8(%rsp), %rsi
movq 0xe0(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x80(%rsp)
leaq 0x238(%rsp), %rdi
callq 0xb1a0
jmp 0x3ba40
leaq 0xdc9d1(%rip), %rsi     # 0x118418
leaq 0x208(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x1ac60
leaq 0x1f8(%rsp), %rdi
movq %rdi, 0x70(%rsp)
leaq 0x388(%rsp), %rsi
callq 0x1ac60
leaq 0x1e8(%rsp), %rdi
movq %rdi, 0x78(%rsp)
leaq 0x3a0(%rsp), %rsi
callq 0x1ac60
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
leaq 0x218(%rsp), %rdi
callq 0xb3840
jmp 0x3baab
leaq 0x228(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0x3ea90
jmp 0x3bac2
leaq 0x230(%rsp), %rdi
movq %rdi, 0x60(%rsp)
leaq 0x228(%rsp), %rsi
callq 0x3ec50
movq 0x80(%rsp), %rdi
movq 0x60(%rsp), %rdx
leaq 0x238(%rsp), %rsi
callq 0x399a0
jmp 0x3baf8
leaq 0x230(%rsp), %rdi
callq 0x1b3f0
leaq 0x228(%rsp), %rdi
callq 0x3ecb0
leaq 0x218(%rsp), %rdi
callq 0x1acc0
leaq 0x1e8(%rsp), %rdi
callq 0x1acc0
leaq 0x1f8(%rsp), %rdi
callq 0x1acc0
leaq 0x208(%rsp), %rdi
callq 0x1acc0
leaq 0x238(%rsp), %rdi
callq 0xb6e8
jmp 0x3bd5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x1a950
jmp 0x3c06f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3c06f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3bbfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3bbf1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x230(%rsp), %rdi
callq 0x1b3f0
leaq 0x228(%rsp), %rdi
callq 0x3ecb0
leaq 0x218(%rsp), %rdi
callq 0x1acc0
leaq 0x1e8(%rsp), %rdi
callq 0x1acc0
leaq 0x1f8(%rsp), %rdi
callq 0x1acc0
leaq 0x208(%rsp), %rdi
callq 0x1acc0
leaq 0x238(%rsp), %rdi
callq 0xb6e8
jmp 0x3c06f
movq 0xc8(%rsp), %rsi
movq 0xe0(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x58(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0xb1a0
jmp 0x3bc61
leaq 0x1a8(%rsp), %rdi
movq %rdi, 0x50(%rsp)
leaq 0x3a0(%rsp), %rsi
callq 0x1ac60
movq 0x50(%rsp), %rsi
leaq 0x1b8(%rsp), %rdi
callq 0x3ea90
jmp 0x3bc8f
leaq 0x1c0(%rsp), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x1b8(%rsp), %rsi
callq 0x3ec50
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0x1c8(%rsp), %rsi
callq 0x399a0
jmp 0x3bcc2
leaq 0x1c0(%rsp), %rdi
callq 0x1b3f0
leaq 0x1b8(%rsp), %rdi
callq 0x3ecb0
leaq 0x1a8(%rsp), %rdi
callq 0x1acc0
leaq 0x1c8(%rsp), %rdi
callq 0xb6e8
jmp 0x3bd5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3bd3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x1b3f0
leaq 0x1b8(%rsp), %rdi
callq 0x3ecb0
leaq 0x1a8(%rsp), %rdi
callq 0x1acc0
leaq 0x1c8(%rsp), %rdi
callq 0xb6e8
jmp 0x3c06f
movq 0xc8(%rsp), %rsi
movq 0xe0(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x40(%rsp)
leaq 0x188(%rsp), %rdi
callq 0xb1a0
jmp 0x3bd85
movq 0xd0(%rsp), %rsi
leaq 0x168(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x1ac60
movq 0x38(%rsp), %rsi
leaq 0x178(%rsp), %rdi
callq 0x3ea90
jmp 0x3bdb3
leaq 0x180(%rsp), %rdi
movq %rdi, 0x30(%rsp)
leaq 0x178(%rsp), %rsi
callq 0x3ec50
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x188(%rsp), %rsi
callq 0x399a0
jmp 0x3bde6
leaq 0x180(%rsp), %rdi
callq 0x1b3f0
leaq 0x178(%rsp), %rdi
callq 0x3ecb0
leaq 0x168(%rsp), %rdi
callq 0x1acc0
leaq 0x188(%rsp), %rdi
callq 0xb6e8
movq 0xf0(%rsp), %rsi
leaq 0x148(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x1a920
movq 0xe0(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x158(%rsp), %rdi
callq 0x3c2d0
jmp 0x3be50
leaq 0x148(%rsp), %rdi
callq 0x1a950
leaq 0x158(%rsp), %rdi
callq 0x1be40
testb $0x1, %al
jne 0x3be73
jmp 0x3c034
movq 0xe0(%rsp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, 0x8(%rsp)
leaq 0xdc58b(%rip), %rsi     # 0x118418
leaq 0x128(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1ac60
leaq 0x118(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0x158(%rsp), %rsi
callq 0x1ac60
leaq 0x108(%rsp), %rdi
movq %rdi, 0x20(%rsp)
leaq 0x3a0(%rsp), %rsi
callq 0x1ac60
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0x138(%rsp), %rdi
callq 0xb3840
jmp 0x3bef1
movq 0x8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x1be60
jmp 0x3bf05
leaq 0x138(%rsp), %rdi
callq 0x1acc0
leaq 0x108(%rsp), %rdi
callq 0x1acc0
leaq 0x118(%rsp), %rdi
callq 0x1acc0
leaq 0x128(%rsp), %rdi
callq 0x1acc0
jmp 0x3c034
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3bf82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x1b3f0
leaq 0x178(%rsp), %rdi
callq 0x3ecb0
leaq 0x168(%rsp), %rdi
callq 0x1acc0
leaq 0x188(%rsp), %rdi
callq 0xb6e8
jmp 0x3c06f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x1a950
jmp 0x3c06f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x3bffe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x1acc0
leaq 0x108(%rsp), %rdi
callq 0x1acc0
leaq 0x118(%rsp), %rdi
callq 0x1acc0
leaq 0x128(%rsp), %rdi
callq 0x1acc0
leaq 0x158(%rsp), %rdi
callq 0x1acc0
jmp 0x3c06f
movb $0x1, 0x39f(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x1acc0
leaq 0x378(%rsp), %rdi
callq 0x1a6e0
leaq 0x388(%rsp), %rdi
callq 0x1acc0
testb $0x1, 0x39f(%rsp)
jne 0x3c0b2
jmp 0x3c0a5
leaq 0x378(%rsp), %rdi
callq 0x1a6e0
leaq 0x388(%rsp), %rdi
callq 0x1acc0
movq 0xd0(%rsp), %rdi
callq 0x1acc0
leaq 0x3a0(%rsp), %rdi
callq 0x1acc0
jmp 0x3c0cf
movq 0xd0(%rsp), %rdi
callq 0x1acc0
leaq 0x3a0(%rsp), %rdi
callq 0x1acc0
movq 0xd8(%rsp), %rax
addq $0x3f8, %rsp            # imm = 0x3F8
retq
movq 0x3b8(%rsp), %rdi
callq 0xb680
nopl (%rax)