// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x5fd7c(%rip), %rsi     # 0x77945
movq %rdx, %rdi
callq 0xa0e0
testl %eax, %eax
je 0x17c3e
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x17ca6
leaq 0x110(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
addq %rsi, %rdx
leaq 0x100(%rsp), %rdi
callq 0xde0c
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x178b4
leaq 0x20(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xa370
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17c34
callq 0xa2b0
movq 0x100(%rsp), %rdi
jmp 0x17c9c
leaq 0x130(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0xde0c
movq %rsp, %rdi
leaq 0x120(%rsp), %rsi
callq 0x178b4
leaq 0x20(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xa370
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17c94
callq 0xa2b0
movq 0x120(%rsp), %rdi
cmpq %r12, %rdi
je 0x17ca6
callq 0xa2b0
leaq 0x38(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ec04
leaq 0x40(%rbx), %rcx
cmpq %rcx, %rax
jne 0x17ea1
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x17d89
leaq 0x90(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rsp), %rsi
addq %rsi, %rdx
leaq 0x80(%rsp), %rdi
callq 0xde0c
leaq 0x60(%rsp), %rdx
movq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0x66df(%rip), %rax      # 0x1e3fc
movq %rax, 0x18(%rdx)
leaq 0x6766(%rip), %rax      # 0x1e48e
movq %rax, 0x10(%rdx)
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
xorl %ecx, %ecx
callq 0x5e95a
movq %rsp, %rdi
leaq 0x40(%rsp), %r12
movq %r12, %rsi
callq 0xa370
movq (%r12), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17d63
callq 0xa2b0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x17d7c
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x80(%rsp), %rdi
jmp 0x17e3a
leaq 0xd0(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x5fc23(%rip), %rsi     # 0x779bf
leaq 0x5fc1e(%rip), %rdx     # 0x779c1
leaq 0xc0(%rsp), %rdi
callq 0xdfa8
leaq 0xa0(%rsp), %rdx
movq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0x657a(%rip), %rax      # 0x1e344
movq %rax, 0x18(%rdx)
leaq 0x6601(%rip), %rax      # 0x1e3d6
movq %rax, 0x10(%rdx)
leaq 0x40(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl $0x1, %ecx
callq 0x5e95a
movq %rsp, %rdi
leaq 0x40(%rsp), %r12
movq %r12, %rsi
callq 0xa370
movq (%r12), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17e13
callq 0xa2b0
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x17e32
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0x17e44
callq 0xa2b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e4fa
movq %rsp, %rsi
movq %rax, %rdi
callq 0xa1d0
leaq 0x40(%rsp), %rdx
movq %rbx, (%rdx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1efba
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x17e7b
callq 0xa2b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x17e8f
callq 0xa2b0
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x38, %edi
callq 0xa1b0
movq %rax, %r15
leaq 0x5fab6(%rip), %rsi     # 0x7796b
movq %rsp, %rdi
movq %r14, %rdx
callq 0xdc11
leaq 0x5fab3(%rip), %rsi     # 0x7797a
movq %rsp, %rdi
callq 0xa560
leaq 0xf0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x17ef3
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x17f06
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
movq 0x8(%rax), %rdx
leaq 0xe0(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
leaq 0x140(%rsp), %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
movq %r15, %rdi
movl $0x3, %edx
callq 0x203f4
xorl %ebp, %ebp
leaq 0x7f6ec(%rip), %rsi     # 0x97638
leaq -0x342d(%rip), %rdx     # 0x14b26
movq %r15, %rdi
callq 0xa4f0
jmp 0x1804e
movq %rax, %rbx
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x17f75
callq 0xdce4
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x17f87
callq 0xa2b0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17f9a
callq 0xa2b0
testb %bpl, %bpl
jne 0x18014
jmp 0x1806e
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18014
callq 0xa2b0
jmp 0x18014
movq %rax, %rbx
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x17fde
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xc0(%rsp), %rdi
jmp 0x18042
jmp 0x1804e
jmp 0x1805d
movq %rax, %rbx
movq 0x120(%rsp), %rdi
jmp 0x18008
jmp 0x18058
jmp 0x1804e
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
jne 0x18069
jmp 0x1806e
jmp 0x18058
movq %rax, %rbx
movq %r15, %rdi
callq 0xa240
jmp 0x1806e
movq %rax, %rbx
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x1803a
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x18060
callq 0xa2b0
jmp 0x18060
movq %rax, %rdi
callq 0xdcd8
jmp 0x1805d
movq %rax, %rbx
jmp 0x1806e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1806e
callq 0xa2b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x18082
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510