// File: /workspace/github_cpp_makefile_star2_O2/menhits[P]phplus/src/CppProgram.cpp
// Function: CppNameContainer::addPp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void CppNameContainer::addPp(const string& pp, const string& cppNameHint)
{
	string validCppHint;
	
	if (cppNameHint=="<- the value of that pp string please")
		validCppHint=getValidCppId(pp);
	else if (!cppNameHint.empty())
		validCppHint=getValidCppId(cppNameHint);
	
	if (ppToCppMap.find(pp)!=ppToCppMap.end())
	{
		throw PhplusError("Tried to add '"+pp+"' as a pp name to a CppNameContainer but that pp name already exists", INTERNAL_ERROR);
	}
	
	// now we need to find a unique C++ name, the Phplus name will almost always be unique, but there may be cases where Phplus treats scope differently or uses a keyword or something
	
	string cpp;
	
	if (validCppHint.empty())
	{
		cpp=getUniqueString(
				"nm",
				[this](string in) -> bool
				{
					return !hasCpp(in);
				},
				true
			);
	}
	else
	{
		cpp=getUniqueString(
				validCppHint,
				[this](string in) -> bool
				{
					return !hasCpp(in);
				},
				false
			);
	}
	
	ppToCppMap[pp]=cpp;
	cppSet.insert(cpp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40b03(%rip), %rsi     # 0x54915
movq %rdx, %rdi
callq 0x182b0
testb %al, %al
je 0x13e64
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0xa3b0
leaq 0x10(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x13bd0
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0xa350
movq %r15, %rdi
callq 0xa558
leaq 0xe0(%rsp), %rdi
jmp 0x13eaf
cmpq $0x0, 0x8(%r15)
je 0x13eb4
leaq 0xc0(%rsp), %rdi
movq %r15, %rsi
callq 0xa3b0
leaq 0x10(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x13bd0
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0xa350
movq %r15, %rdi
callq 0xa558
leaq 0xc0(%rsp), %rdi
callq 0xa558
leaq 0x38(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x18ac6
leaq 0x40(%rbx), %rcx
cmpq %rcx, %rax
jne 0x1403d
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpq $0x0, 0x38(%rsp)
je 0x13f66
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xa3b0
leaq 0x100(%rsp), %rdx
andq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0x42ff(%rip), %rax      # 0x1820e
movq %rax, 0x18(%rdx)
leaq 0x4344(%rip), %rax      # 0x1825e
movq %rax, 0x10(%rdx)
leaq 0xa0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x43e52
leaq 0x10(%rsp), %rdi
leaq 0xa0(%rsp), %r12
movq %r12, %rsi
callq 0xa350
movq %r12, %rdi
callq 0xa558
leaq 0x100(%rsp), %rdi
callq 0x182be
leaq 0x60(%rsp), %rdi
jmp 0x13fef
leaq 0x40a22(%rip), %rsi     # 0x5498f
leaq 0x80(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xa150
leaq 0x120(%rsp), %rdx
andq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0x4202(%rip), %rax      # 0x18198
movq %rax, 0x18(%rdx)
leaq 0x4247(%rip), %rax      # 0x181e8
movq %rax, 0x10(%rdx)
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
pushq $0x1
popq %rcx
callq 0x43e52
leaq 0x10(%rsp), %rdi
leaq 0xa0(%rsp), %r12
movq %r12, %rsi
callq 0xa350
movq %r12, %rdi
callq 0xa558
leaq 0x120(%rsp), %rdi
callq 0x182be
leaq 0x80(%rsp), %rdi
callq 0xa558
movq %r15, %rdi
movq %r14, %rsi
callq 0x182da
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0xa1d0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x18ec8
leaq 0x10(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0xa558
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x38
popq %rdi
callq 0xa1b0
movq %rax, %r15
leaq 0x408ec(%rip), %rsi     # 0x5493b
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0xc8a1
leaq 0x408e7(%rip), %rdx     # 0x5494a
leaq 0x140(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xc882
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0x140(%rsp), %rsi
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x19f06
xorl %ebp, %ebp
leaq 0x634f9(%rip), %rsi     # 0x77598
leaq -0x2a14(%rip), %rdx     # 0x11692
movq %r15, %rdi
callq 0xa4e0
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xc984
leaq 0x140(%rsp), %rdi
callq 0xa558
jmp 0x140d0
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0xa558
testb %bpl, %bpl
jne 0x1410f
jmp 0x14158
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x14153
jmp 0x14146
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x182be
leaq 0x80(%rsp), %rdi
jmp 0x1413d
jmp 0x1414b
movq %rax, %rbx
movq %r15, %rdi
callq 0xa230
jmp 0x14158
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x14153
jmp 0x14146
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x182be
leaq 0x60(%rsp), %rdi
callq 0xa558
jmp 0x1414e
jmp 0x1414b
movq %rax, %rbx
jmp 0x14158
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0xa558
movq %rbx, %rdi
callq 0xa500