// File: menhits[P]phplus/src/CppProgram.cpp
// Function: CppProgram::declareVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<TypeBase>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void CppProgram::declareVar(const string& nameIn, Type typeIn, string initialValue)
{
	/*
	CppNameContainer* names=&*activeFunc->namespaceStack.back();
	
	while (names)
	{
		if (names->hasPpMe(nameIn))
			return;
		
		names=names->getParent();
	}
	*/
	
	if (isMain())
	{
		declareGlobal(nameIn, typeIn, initialValue);
		return;
	}
	
	if (activeFunc->namespaceStack.back()->hasPp(nameIn))
	{
		return;
	}
	
	activeFunc->namespaceStack.back()->addPp(nameIn);
	activeFunc->namespaceStack[0]->reserveCpp(ppToCpp(nameIn), true);
	
	activeFunc->varDeclareSource+=getTypeCode(typeIn)+" "+ppToCpp(nameIn);
	if (!initialValue.empty())
	{
		activeFunc->varDeclareSource+=" = "+initialValue;
	}
	activeFunc->varDeclareSource+=";\n";
}

// Assembly:
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdx, 0x48(%rsp)
movq %rcx, 0x50(%rsp)
movq %rdi, 0x1b0(%rsp)
movq %rsi, 0x1a8(%rsp)
movq %rdx, 0x1a0(%rsp)
movq %rcx, 0x198(%rsp)
movq 0x1b0(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x2e0e0
testb $0x1, %al
jne 0x2a02c
jmp 0x2a0e8
movq 0x48(%rsp), %rsi
movq 0x1a8(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x1a920
movq 0x50(%rsp), %rsi
leaq 0x168(%rsp), %rdi
callq 0xb1a0
jmp 0x2a05f
movq 0x40(%rsp), %rsi
movq 0x58(%rsp), %rdi
leaq 0x188(%rsp), %rdx
leaq 0x168(%rsp), %rcx
callq 0x2a510
jmp 0x2a080
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x188(%rsp), %rdi
callq 0x1a950
jmp 0x2a4ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x2a0d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x188(%rsp), %rdi
callq 0x1a950
jmp 0x2a4f6
movq 0x58(%rsp), %rdi
addq $0xa0, %rdi
callq 0x2e100
movq %rax, %rdi
addq $0x98, %rdi
callq 0x2db60
movq %rax, %rdi
callq 0x2d6b0
movq %rax, %rdi
movq 0x1a8(%rsp), %rsi
callq 0x23c50
testb $0x1, %al
jne 0x2a126
jmp 0x2a12b
jmp 0x2a4ee
movq 0x58(%rsp), %rdi
addq $0xa0, %rdi
callq 0x2e100
movq %rax, %rdi
addq $0x98, %rdi
callq 0x2db60
movq %rax, %rdi
callq 0x2d6b0
movq %rax, 0x28(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x137(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xb690
movq 0x38(%rsp), %rdx
leaq 0xa7792(%rip), %rsi     # 0xd1915
leaq 0x138(%rsp), %rdi
callq 0xb4c0
jmp 0x2a192
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdi
leaq 0x138(%rsp), %rdx
callq 0x232f0
jmp 0x2a1ab
leaq 0x138(%rsp), %rdi
callq 0xb6e8
leaq 0x137(%rsp), %rdi
callq 0xb3f0
movq 0x58(%rsp), %rdi
addq $0xa0, %rdi
callq 0x2e100
movq %rax, %rdi
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e110
movq %rax, %rdi
callq 0x2d6b0
movq 0x58(%rsp), %rsi
movq %rax, 0x18(%rsp)
movq 0x1a8(%rsp), %rdx
leaq 0x110(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x2e130
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x23a00
jmp 0x2a22b
leaq 0x110(%rsp), %rdi
callq 0xb6e8
movq 0x48(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1a920
movq 0x58(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0x285b0
jmp 0x2a268
leaq 0xa77fd(%rip), %rdx     # 0xd1a6c
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xfa60
jmp 0x2a286
movq 0x58(%rsp), %rsi
movq 0x1a8(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x2e130
jmp 0x2a2a2
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x1bf20
jmp 0x2a2c1
movq 0x58(%rsp), %rdi
addq $0xa0, %rdi
callq 0x2e100
movq %rax, %rdi
addq $0x30, %rdi
leaq 0xf0(%rsp), %rsi
callq 0xb470
jmp 0x2a2e8
leaq 0xf0(%rsp), %rdi
callq 0xb6e8
leaq 0x80(%rsp), %rdi
callq 0xb6e8
leaq 0xd0(%rsp), %rdi
callq 0xb6e8
leaq 0xb0(%rsp), %rdi
callq 0xb6e8
leaq 0xa0(%rsp), %rdi
callq 0x1a950
movq 0x50(%rsp), %rdi
callq 0xb610
testb $0x1, %al
jne 0x2a4ca
movq 0x50(%rsp), %rdx
leaq 0xaaf20(%rip), %rsi     # 0xd5267
leaq 0x60(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xfab0
movq 0x58(%rsp), %rdi
addq $0xa0, %rdi
callq 0x2e100
movq 0x8(%rsp), %rsi
movq %rax, %rdi
addq $0x30, %rdi
callq 0xb470
jmp 0x2a37a
leaq 0x60(%rsp), %rdi
callq 0xb6e8
jmp 0x2a4ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x2a3c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xb6e8
leaq 0x137(%rsp), %rdi
callq 0xb3f0
jmp 0x2a4f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xb6e8
jmp 0x2a4f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x2a49b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x2a48e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x2a481
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x2a474
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xb6e8
leaq 0x80(%rsp), %rdi
callq 0xb6e8
leaq 0xd0(%rsp), %rdi
callq 0xb6e8
leaq 0xb0(%rsp), %rdi
callq 0xb6e8
leaq 0xa0(%rsp), %rdi
callq 0x1a950
jmp 0x2a4f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xb6e8
jmp 0x2a4f6
movq 0x58(%rsp), %rdi
addq $0xa0, %rdi
callq 0x2e100
movq %rax, %rdi
addq $0x30, %rdi
leaq 0xaaaff(%rip), %rsi     # 0xd4fe8
callq 0xb360
addq $0x1b8, %rsp            # imm = 0x1B8
retq
movq 0x160(%rsp), %rdi
callq 0xb680
nopw %cs:(%rax,%rax)