// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4a8bc(%rip), %rsi     # 0x7a6bf
leaq 0x4a8c0(%rip), %rdx     # 0x7a6ca
leaq 0x98(%rsp), %rdi
callq 0xdfa8
leaq 0x98(%rsp), %rsi
movq %rbx, %rdi
callq 0x1cb42
movl %eax, %ebp
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x2fe3b
callq 0xa2b0
testb %bpl, %bpl
jne 0x30036
leaq 0x6a615(%rip), %rax     # 0x9a460
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x2fe76
movq 0x6a140(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x2fe72
incl 0x8(%rax)
jmp 0x2fe76
lock
incl 0x8(%rax)
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
callq 0x1aab2
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2fe97
callq 0xdce4
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4a815(%rip), %rsi     # 0x7a6bf
leaq 0x4a819(%rip), %rdx     # 0x7a6ca
leaq 0xd8(%rsp), %rdi
callq 0xdfa8
leaq 0x47d50(%rip), %rsi     # 0x77c15
leaq 0x47fe1(%rip), %rdx     # 0x77ead
leaq 0x98(%rsp), %rdi
callq 0x4f1b8
leaq 0x60(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x4f06a
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0xde0c
leaq 0x4a7ab(%rip), %rsi     # 0x7a6cb
leaq 0xf8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0xdc11
leaq 0x4a7d9(%rip), %rsi     # 0x7a712
leaq 0xf8(%rsp), %rdi
callq 0xa560
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2ff6d
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x2ff75
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd8(%rsp), %rsi
leaq 0x60(%rsp), %rdx
leaq 0x78(%rsp), %rcx
movq %rbx, %rdi
callq 0x1cb62
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ffba
callq 0xa2b0
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ffd0
callq 0xa2b0
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ffdf
callq 0xa2b0
leaq 0x60(%rsp), %rdi
callq 0x4f0ac
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ffff
callq 0xa2b0
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x30011
callq 0xa2b0
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x30023
callq 0xa2b0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30036
callq 0xa2b0
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x3005f
callq 0xa2b0
jmp 0x3005f
movq %rax, %rbx
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3007a
callq 0xa2b0
jmp 0x3007a
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x3008e
callq 0xa2b0
jmp 0x3008e
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x4f0ac
jmp 0x3009d
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x4f040
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x300c6
callq 0xa2b0
jmp 0x300c6
movq %rax, %rbx
jmp 0x300aa
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x300fa
jmp 0x30104
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x30104
callq 0xdce4
jmp 0x30104
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x30104
callq 0xa2b0
jmp 0x30104
movq %rax, %rbx
movq %rbx, %rdi
callq 0xa510