// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rcx, 0x38(%rsp)
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movq 0x40(%rsi), %r14
movq 0x18(%r14), %rbp
leaq 0x188(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x12c0a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3c6cc
leaq 0x190(%rsp), %rdi
callq 0xc984
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movups %xmm0, (%r13)
movaps %xmm0, 0x60(%rsp)
leaq 0x78(%rsp), %rdi
movq %r15, %rsi
callq 0x1eb38
leaq 0x18(%rsp), %rbx
leaq 0x78(%rsp), %r14
movq 0x78(%rsp), %rsi
cmpq $0x0, 0x30(%rsi)
je 0x1c2cd
addq $0x30, %rsi
movq %r14, %rdi
callq 0x12bda
jmp 0x1c2b3
movq 0x40(%r15), %rax
cmpq 0x40(%rsi), %rax
movq %rbx, 0x40(%rsp)
je 0x1c3c3
leaq 0xd8(%rsp), %rdi
movq %r12, %rsi
callq 0x12c0a
leaq 0x218(%rsp), %rdi
movq 0x38(%rsp), %r14
movq %r14, %rsi
callq 0xa3b0
leaq 0x10(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
leaq 0x218(%rsp), %rcx
movq %rbp, %rsi
callq 0x4e170
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x13816
leaq 0x18(%rsp), %rdi
callq 0xc984
leaq 0x218(%rsp), %rdi
callq 0xa558
leaq 0xe0(%rsp), %rdi
callq 0xc984
leaq 0xc8(%rsp), %rdi
movq %r12, %rsi
callq 0x12c0a
leaq 0x1f8(%rsp), %rdi
movq %r14, %rsi
callq 0xa3b0
leaq 0x10(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
leaq 0x1f8(%rsp), %rcx
movq %rbp, %rsi
callq 0x4e237
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x13816
leaq 0x18(%rsp), %rdi
callq 0xc984
leaq 0x1f8(%rsp), %rdi
callq 0xa558
leaq 0xd0(%rsp), %rdi
jmp 0x1c4a1
leaq 0xb8(%rsp), %rdi
movq %r12, %rsi
callq 0x12c0a
leaq 0x1d8(%rsp), %rdi
movq 0x38(%rsp), %r14
movq %r14, %rsi
callq 0xa3b0
leaq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
leaq 0x1d8(%rsp), %rcx
movq %rbp, %rsi
callq 0x4e2fe
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x13816
leaq 0x18(%rsp), %rdi
callq 0xc984
leaq 0x1d8(%rsp), %rdi
callq 0xa558
leaq 0xc0(%rsp), %rdi
callq 0xc984
leaq 0xa8(%rsp), %rdi
movq %r12, %rsi
callq 0x12c0a
leaq 0x1b8(%rsp), %rdi
movq %r14, %rsi
callq 0xa3b0
leaq 0x10(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
leaq 0x1b8(%rsp), %rcx
movq %rbp, %rsi
callq 0x4e3c5
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x13816
leaq 0x18(%rsp), %rdi
callq 0xc984
leaq 0x1b8(%rsp), %rdi
callq 0xa558
leaq 0xb0(%rsp), %rdi
callq 0xc984
leaq 0x178(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12c0a
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ca78
leaq 0x60(%rsp), %rbx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x13816
leaq 0x18(%rsp), %rdi
callq 0xc984
leaq 0x180(%rsp), %rdi
callq 0xc984
leaq 0x88(%r15), %rbp
cmpq $0x0, (%rbx)
je 0x1c5f1
leaq 0x258(%rsp), %rdi
movq %r14, %rsi
callq 0xa3b0
movq %r13, 0x8(%rsp)
leaq 0x5de31(%rip), %rsi     # 0x7a350
leaq 0x168(%rsp), %rbx
movq %rbx, %rdi
callq 0x12c1e
leaq 0x158(%rsp), %r14
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0x12c1e
leaq 0x148(%rsp), %r13
leaq 0x20(%rsp), %rsi
movq %r13, %rdi
callq 0x12c1e
leaq 0x98(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x4658c
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1df64
movq 0x10(%rsp), %rax
andq $0x0, 0x10(%rsp)
leaq 0x58(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x258(%rsp), %r14
movq %rbp, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %r13
callq 0x1b27c
leaq 0x58(%rsp), %rdi
callq 0x11c58
leaq 0x10(%rsp), %rdi
callq 0x1e016
leaq 0xa0(%rsp), %rdi
callq 0xc984
leaq 0x150(%rsp), %rdi
callq 0xc984
leaq 0x160(%rsp), %rdi
callq 0xc984
leaq 0x170(%rsp), %rdi
jmp 0x1c665
leaq 0x238(%rsp), %rdi
movq %r14, %rsi
callq 0xa3b0
leaq 0x138(%rsp), %rbx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x12c1e
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1df64
movq 0x10(%rsp), %rax
andq $0x0, 0x10(%rsp)
leaq 0x50(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x238(%rsp), %r14
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1b27c
leaq 0x50(%rsp), %rdi
callq 0x11c58
leaq 0x10(%rsp), %rdi
callq 0x1e016
leaq 0x140(%rsp), %rdi
callq 0xc984
movq %r14, %rdi
callq 0xa558
leaq 0x198(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xa3b0
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x12c1e
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1df64
movq 0x10(%rsp), %rax
andq $0x0, 0x10(%rsp)
leaq 0x48(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x198(%rsp), %rsi
movq %rbp, %rdi
callq 0x1b27c
leaq 0x48(%rsp), %rdi
callq 0x11c58
leaq 0x10(%rsp), %rdi
callq 0x1e016
leaq 0x130(%rsp), %rdi
callq 0xc984
leaq 0x198(%rsp), %rdi
callq 0xa558
leaq 0x118(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12c0a
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1cb90
leaq 0x120(%rsp), %rdi
callq 0xc984
cmpq $0x0, 0x10(%rsp)
je 0x1c7d3
leaq 0x5dc18(%rip), %rsi     # 0x7a350
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
callq 0x12c1e
leaq 0xf8(%rsp), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x12c1e
leaq 0xe8(%rsp), %r12
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x12c1e
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x4658c
addq $0x130, %r15            # imm = 0x130
leaq 0x88(%rsp), %rsi
movq %r15, %rdi
callq 0x13ae2
leaq 0x90(%rsp), %rdi
callq 0xc984
leaq 0xf0(%rsp), %rdi
callq 0xc984
leaq 0x100(%rsp), %rdi
callq 0xc984
leaq 0x110(%rsp), %rdi
callq 0xc984
leaq 0x18(%rsp), %rdi
callq 0xc984
leaq 0x80(%rsp), %rdi
callq 0xc984
leaq 0x68(%rsp), %rdi
callq 0xc984
leaq 0x28(%rsp), %rdi
callq 0xc984
movq %r13, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0x11c58
leaq 0x10(%rsp), %rdi
callq 0x1e016
jmp 0x1c839
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x140(%rsp), %rdi
callq 0xc984
leaq 0x238(%rsp), %rdi
jmp 0x1ca04
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x1b8(%rsp), %rdi
callq 0xa558
jmp 0x1c872
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0xb0(%rsp), %rdi
jmp 0x1ca1b
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x1d8(%rsp), %rdi
callq 0xa558
jmp 0x1c89e
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0xc0(%rsp), %rdi
jmp 0x1ca1b
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x90(%rsp), %rdi
callq 0xc984
jmp 0x1c8ca
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0xf0(%rsp), %rdi
callq 0xc984
leaq 0x100(%rsp), %rdi
callq 0xc984
leaq 0x110(%rsp), %rdi
callq 0xc984
jmp 0x1c9c2
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x11c58
leaq 0x10(%rsp), %rdi
callq 0x1e016
jmp 0x1c912
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0xc984
jmp 0x1c924
movq %rax, %r15
leaq 0x150(%rsp), %rdi
callq 0xc984
leaq 0x160(%rsp), %rdi
callq 0xc984
leaq 0x170(%rsp), %rdi
callq 0xc984
leaq 0x258(%rsp), %rdi
jmp 0x1ca04
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x1f8(%rsp), %rdi
callq 0xa558
jmp 0x1c977
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0xd0(%rsp), %rdi
jmp 0x1ca1b
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x218(%rsp), %rdi
callq 0xa558
jmp 0x1c9a3
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0xe0(%rsp), %rdi
jmp 0x1ca1b
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x120(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
jmp 0x1ca1b
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x48(%rsp), %rdi
callq 0x11c58
leaq 0x10(%rsp), %rdi
callq 0x1e016
jmp 0x1c9ef
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x130(%rsp), %rdi
callq 0xc984
leaq 0x198(%rsp), %rdi
callq 0xa558
jmp 0x1ca41
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x180(%rsp), %rdi
callq 0xc984
jmp 0x1ca41
movq %r13, 0x8(%rsp)
movq %rax, %r15
jmp 0x1ca4e
movq %rax, %r15
leaq 0x190(%rsp), %rdi
jmp 0x1ca6b
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0xc984
leaq 0x68(%rsp), %rdi
callq 0xc984
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0xc984
leaq 0x28(%rsp), %rdi
callq 0xc984
movq %r15, %rdi
callq 0xa500