// File: menhits[P]phplus/src/PhplusStdLib.cpp
// Function: addToProgAsciiToStr(CppProgram*)
void addToProgAsciiToStr(CppProgram * prog)
{
	if (!prog->hasFunc("$asciiToStr"))
	{
		string strType=prog->getTypeCode(String);
		
		prog->addFunc("$asciiToStr", {{"int", "in"}}, strType,
			"unsigned char * data = (unsigned char *)malloc(1);\n"
			"*data = in;\n"
			"return "+strType+"(1, data);\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 0x831db(%rip), %rsi     # 0xd4feb
leaq 0x1d0(%rsp), %rdi
callq 0xb4c0
jmp 0x51e1f
movq 0x78(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x2a8a0
movb %al, 0x77(%rsp)
jmp 0x51e37
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 0x51e68
jmp 0x5228b
movq 0x1f0(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0xc668c(%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 0x51ea7
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 0x8310c(%rip), %rsi     # 0xd4feb
leaq 0x168(%rsp), %rdi
callq 0xb4c0
jmp 0x51eee
leaq 0xf8(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
leaq 0x7fce0(%rip), %rsi     # 0xd1be5
leaq 0x7ff71(%rip), %rdx     # 0xd1e7d
callq 0x962a0
jmp 0x51f13
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 0x51f65
leaq 0xc8(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0xb1a0
jmp 0x51f7c
leaq 0x83074(%rip), %rsi     # 0xd4ff7
leaq 0x88(%rsp), %rdi
leaq 0x198(%rsp), %rdx
callq 0xfab0
jmp 0x51f9a
leaq 0x8309d(%rip), %rdx     # 0xd503e
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xfa60
jmp 0x51fb8
movq 0x50(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0xa8(%rsp), %r8
callq 0x2a900
jmp 0x51fe4
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 0x5203b
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x167(%rsp), %rdi
callq 0xb3f0
leaq 0x198(%rsp), %rdi
callq 0xb6e8
jmp 0x5228b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x520c5
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 0x52293
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x1a950
jmp 0x52293
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x5226f
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 0x5216e
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 0x52144
jmp 0x52262
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x52216
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x52209
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x521fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x521ef
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 0x52239
jmp 0x52262
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x167(%rsp), %rdi
callq 0xb3f0
leaq 0x198(%rsp), %rdi
callq 0xb6e8
jmp 0x52293
addq $0x1f8, %rsp            # imm = 0x1F8
retq
movq 0x1c0(%rsp), %rdi
callq 0xb680