// File: /workspace/github_cpp_makefile_star2_O1/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 0x5f002(%rip), %rsi     # 0x76945
movq %rdx, %rdi
callq 0xa0e0
testl %eax, %eax
je 0x179b8
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x17a20
leaq 0x110(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
addq %rsi, %rdx
leaq 0x100(%rsp), %rdi
callq 0xdde2
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x17644
leaq 0x20(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xa370
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x179ae
callq 0xa2b0
movq 0x100(%rsp), %rdi
jmp 0x17a16
leaq 0x130(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0xdde2
movq %rsp, %rdi
leaq 0x120(%rsp), %rsi
callq 0x17644
leaq 0x20(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xa370
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17a0e
callq 0xa2b0
movq 0x120(%rsp), %rdi
cmpq %r12, %rdi
je 0x17a20
callq 0xa2b0
leaq 0x38(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e89c
leaq 0x40(%rbx), %rcx
cmpq %rcx, %rax
jne 0x17c1f
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x17b05
leaq 0xb0(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rsp), %rsi
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0xdde2
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rbx, (%rdx)
leaq 0x65fd(%rip), %rax      # 0x1e096
movq %rax, 0x18(%rdx)
leaq 0x6684(%rip), %rax      # 0x1e128
movq %rax, 0x10(%rdx)
leaq 0x40(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
xorl %ecx, %ecx
callq 0x5dc3d
movq %rsp, %rdi
leaq 0x40(%rsp), %r12
movq %r12, %rsi
callq 0xa370
movq (%r12), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17adf
callq 0xa2b0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x17af8
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa0(%rsp), %rdi
jmp 0x17bb8
leaq 0xd0(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x5eea7(%rip), %rsi     # 0x769bf
leaq 0x5eea2(%rip), %rdx     # 0x769c1
leaq 0xc0(%rsp), %rdi
callq 0xdf6a
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rbx, (%rdx)
leaq 0x6496(%rip), %rax      # 0x1dfde
movq %rax, 0x18(%rdx)
leaq 0x651d(%rip), %rax      # 0x1e070
movq %rax, 0x10(%rdx)
leaq 0x40(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl $0x1, %ecx
callq 0x5dc3d
movq %rsp, %rdi
leaq 0x40(%rsp), %r12
movq %r12, %rsi
callq 0xa370
movq (%r12), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17b91
callq 0xa2b0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x17bb0
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0x17bc2
callq 0xa2b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e18e
movq %rsp, %rsi
movq %rax, %rdi
callq 0xa1d0
leaq 0x40(%rsp), %rdx
movq %rbx, (%rdx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1ec52
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x17bf9
callq 0xa2b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x17c0d
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 0x5ed38(%rip), %rsi     # 0x7696b
movq %rsp, %rdi
movq %r14, %rdx
callq 0xdbef
leaq 0x5ed35(%rip), %rsi     # 0x7697a
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 0x17c71
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x17c84
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 0x200e4
xorl %ebp, %ebp
leaq 0x7e96e(%rip), %rsi     # 0x96638
leaq -0x33d9(%rip), %rdx     # 0x148f8
movq %r15, %rdi
callq 0xa4f0
jmp 0x17dbc
movq %rax, %rbx
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x17cf3
callq 0xdcba
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x17d0d
callq 0xa2b0
jmp 0x17d0d
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17d7d
callq 0xa2b0
jmp 0x17d7d
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x17d44
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xc0(%rsp), %rdi
jmp 0x17db0
jmp 0x17dbc
jmp 0x17dcb
movq %rax, %rbx
movq 0x120(%rsp), %rdi
jmp 0x17d6e
jmp 0x17dc6
jmp 0x17dbc
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
jne 0x17dd7
jmp 0x17ddc
jmp 0x17dc6
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17ddc
movq %r15, %rdi
callq 0xa240
jmp 0x17ddc
movq %rax, %rbx
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x17da8
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x17dce
callq 0xa2b0
jmp 0x17dce
movq %rax, %rdi
callq 0xdcaf
jmp 0x17dcb
movq %rax, %rbx
jmp 0x17ddc
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x17ddc
callq 0xa2b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x17df0
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510