// File: menhits[P]phplus/src/PhplusStdLib.cpp
// Function: addToProgPpStr(CppProgram*)
void addToProgPpStr(CppProgram * prog)
{
	if (!prog->hasFunc("$ppStr"))
	{
		string strType=prog->getTypeCode(String);
		
		prog->addFunc("$ppStr", {{"const char *", "in"}}, strType,
			"int size = 0;\n"
			"while (in[size]) size++;\n"
			//"unsigned char * data = (unsigned char *)malloc(size);\n"
			//"memcpy(data, in, s ize);\n"
			//"return "+strType+"(size, data);\n"
			"return "+strType+"(size, (unsigned char*)in);\n"
		);
	}
}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, 0x1f0(%rsp)
movq 0x1f0(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x1cf(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0xb690
movq 0x80(%rsp), %rdx
leaq 0x85885(%rip), %rsi     # 0xd48e5
leaq 0x1d0(%rsp), %rdi
callq 0xb4c0
jmp 0x4f06f
movq 0x78(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x2a8a0
movb %al, 0x77(%rsp)
jmp 0x4f087
movb 0x77(%rsp), %al
xorb $-0x1, %al
movb %al, 0x76(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0xb6e8
leaq 0x1cf(%rsp), %rdi
callq 0xb3f0
movb 0x76(%rsp), %al
testb $0x1, %al
jne 0x4f0b8
jmp 0x4f4db
movq 0x1f0(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0xc943c(%rip), %rsi     # 0x118508
leaq 0x188(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x1a920
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x198(%rsp), %rdi
callq 0x285b0
jmp 0x4f0f7
leaq 0x188(%rsp), %rdi
callq 0x1a950
movq 0x1f0(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x167(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xb690
movq 0x58(%rsp), %rdx
leaq 0x857b6(%rip), %rsi     # 0xd48e5
leaq 0x168(%rsp), %rdi
callq 0xb4c0
jmp 0x4f13e
leaq 0xf8(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
leaq 0x85797(%rip), %rsi     # 0xd48ec
leaq 0x82d21(%rip), %rdx     # 0xd1e7d
callq 0x95f90
jmp 0x4f163
leaq 0xf8(%rsp), %rax
movq %rax, 0x138(%rsp)
movq $0x1, 0x140(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x2f150
movq 0x48(%rsp), %rcx
movq 0x138(%rsp), %rsi
movq 0x140(%rsp), %rdx
leaq 0x148(%rsp), %rdi
callq 0x96080
jmp 0x4f1b5
leaq 0xc8(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0xb1a0
jmp 0x4f1cc
leaq 0x85726(%rip), %rsi     # 0xd48f9
leaq 0x88(%rsp), %rdi
leaq 0x198(%rsp), %rdx
callq 0xfab0
jmp 0x4f1ea
leaq 0x85737(%rip), %rdx     # 0xd4928
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xfa60
jmp 0x4f208
movq 0x50(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0xa8(%rsp), %r8
callq 0x2a900
jmp 0x4f234
leaq 0xa8(%rsp), %rdi
callq 0xb6e8
leaq 0x88(%rsp), %rdi
callq 0xb6e8
leaq 0xc8(%rsp), %rdi
callq 0xb6e8
leaq 0x148(%rsp), %rdi
callq 0x2e540
leaq 0xef(%rsp), %rdi
callq 0x33c90
leaq 0xf8(%rsp), %rax
movq %rax, 0x38(%rsp)
addq $0x40, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
addq $-0x40, %rdi
movq %rdi, 0x30(%rsp)
callq 0x2e470
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x40(%rsp)
jne 0x4f28b
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x167(%rsp), %rdi
callq 0xb3f0
leaq 0x198(%rsp), %rdi
callq 0xb6e8
jmp 0x4f4db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4f315
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0xb6e8
leaq 0x1cf(%rsp), %rdi
callq 0xb3f0
jmp 0x4f4e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x1a950
jmp 0x4f4e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4f4bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
movq 0xf0(%rsp), %rax
leaq 0xf8(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x28(%rsp)
je 0x4f3be
movq 0x28(%rsp), %rdi
addq $-0x40, %rdi
movq %rdi, 0x20(%rsp)
callq 0x2e470
movq 0x20(%rsp), %rax
leaq 0xf8(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0x4f394
jmp 0x4f4b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4f466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4f459
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4f44c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4f43f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xb6e8
leaq 0x88(%rsp), %rdi
callq 0xb6e8
leaq 0xc8(%rsp), %rdi
callq 0xb6e8
leaq 0x148(%rsp), %rdi
callq 0x2e540
leaq 0xef(%rsp), %rdi
callq 0x33c90
leaq 0xf8(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x40, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
addq $-0x40, %rdi
movq %rdi, 0x8(%rsp)
callq 0x2e470
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0x4f489
jmp 0x4f4b2
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x167(%rsp), %rdi
callq 0xb3f0
leaq 0x198(%rsp), %rdi
callq 0xb6e8
jmp 0x4f4e3
addq $0x1f8, %rsp            # imm = 0x1F8
retq
movq 0x1c0(%rsp), %rdi
callq 0xb680