// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/PhplusStdLib.cpp
// Function: addToProgGetInputLine(CppProgram*)
void addToProgGetInputLine(CppProgram * prog)
{
	if (!prog->hasFunc("$getInputLine"))
	{
		string strType=prog->getTypeCode(String);
		
		addToProgCStr(prog);
		
		prog->addFunc("$getInputLine", {{strType, "prompt"}}, strType,
			"fputs("+prog->ppToCpp("$cStr")+"(prompt), stdout);\n"
			"fflush(stdout);\n"
			"size_t bufferSize = 4096;\n"
			"char buffer[bufferSize];\n"
			"if (fgets(buffer, bufferSize, stdin))\n"
			"{\n"
			"	int size = strlen(buffer);\n"
			"	while (size > 0 && buffer[size - 1] == '\\n')\n"
			"		size-=1;\n"
			"	unsigned char * data = (unsigned char *)malloc(size);\n"
			"	memcpy(data, buffer, size);\n"
			"	return "+strType+"(size, data);\n"
			"}\nelse\n{\n"
			"	return "+strType+"(0, NULL);\n"
			"}"
		);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %rbx
leaq 0x188(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4a5ea(%rip), %rsi     # 0x7a71e
leaq 0x4a5f0(%rip), %rdx     # 0x7a72b
leaq 0x178(%rsp), %rdi
callq 0xdfa8
leaq 0x178(%rsp), %rsi
movq %rbx, %rdi
callq 0x1cb42
movl %eax, %ebp
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
je 0x3016c
callq 0xa2b0
testb %bpl, %bpl
jne 0x30624
leaq 0x6a2e4(%rip), %rax     # 0x9a460
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x301a7
movq 0x69e0f(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x301a3
incl 0x8(%rax)
jmp 0x301a7
lock
incl 0x8(%rax)
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
callq 0x1aab2
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x301c8
callq 0xdce4
movq %rbx, %rdi
callq 0x2e1d2
leaq 0xd0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4a53b(%rip), %rsi     # 0x7a71e
leaq 0x4a541(%rip), %rdx     # 0x7a72b
leaq 0xc0(%rsp), %rdi
callq 0xdfa8
leaq 0x4a52e(%rip), %rdx     # 0x7a72c
leaq 0x178(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4f312
leaq 0x160(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x4f06a
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0xde0c
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x49db1(%rip), %rsi     # 0x7a019
leaq 0x49daf(%rip), %rdx     # 0x7a01e
leaq 0x80(%rsp), %rdi
callq 0xdfa8
movq 0xa0(%rbx), %rsi
leaq 0x1b8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x1924a
leaq 0x4a494(%rip), %rcx     # 0x7a733
leaq 0x1b8(%rsp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0xa310
leaq 0x50(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x302dd
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x302e3
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4a434(%rip), %rsi     # 0x7a73a
callq 0xa560
leaq 0x70(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30332
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x30338
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0xa110
leaq 0xf0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30396
movq %rsi, %r15
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x3039f
movups (%rcx), %xmm0
movq %rsi, %r15
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xe0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4a4a5(%rip), %rsi     # 0x7a86a
callq 0xa560
leaq 0x110(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x303fa
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x30402
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x100(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0xa110
leaq 0x130(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30460
movq %rdx, 0x120(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x130(%rsp)
jmp 0x30467
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x120(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4a3fd(%rip), %rsi     # 0x7a88a
callq 0xa560
leaq 0x150(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x304c2
movq %rdx, 0x140(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x150(%rsp)
jmp 0x304c9
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x140(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc0(%rsp), %rsi
leaq 0x160(%rsp), %rdx
leaq 0xa0(%rsp), %rcx
movq %rbx, %rdi
callq 0x1cb62
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0x3051a
callq 0xa2b0
movq 0x120(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0xd0(%rsp), %rbp
je 0x30534
callq 0xa2b0
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x30546
callq 0xa2b0
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
leaq 0xb0(%rsp), %rbx
leaq 0x90(%rsp), %r14
leaq 0x50(%rsp), %r13
je 0x3056d
callq 0xa2b0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x30581
callq 0xa2b0
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x30590
callq 0xa2b0
leaq 0x1c8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x305a6
callq 0xa2b0
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x305b8
callq 0xa2b0
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x305ca
callq 0xa2b0
leaq 0x160(%rsp), %rdi
callq 0x4f0ac
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x305ed
callq 0xa2b0
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
je 0x305ff
callq 0xa2b0
movq 0xc0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30611
callq 0xa2b0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30624
callq 0xa2b0
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0x30650
callq 0xa2b0
jmp 0x30650
movq %rax, %rbx
movq 0x120(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30667
callq 0xa2b0
jmp 0x30667
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x3067e
callq 0xa2b0
jmp 0x3067e
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x30695
callq 0xa2b0
jmp 0x30695
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x306ae
callq 0xa2b0
jmp 0x306ae
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x306c7
callq 0xa2b0
jmp 0x306c7
movq %rax, %rbx
leaq 0x1c8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x306e2
callq 0xa2b0
jmp 0x306e2
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x30701
callq 0xa2b0
jmp 0x30701
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3071b
callq 0xa2b0
leaq 0x160(%rsp), %rdi
callq 0x4f0ac
leaq 0x178(%rsp), %rdi
callq 0x4f040
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x30765
callq 0xa2b0
jmp 0x30765
movq %rax, %rbx
jmp 0x3071b
movq %rax, %rbx
jmp 0x30728
movq %rax, %rbx
jmp 0x30735
jmp 0x30762
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x307a3
callq 0xa2b0
jmp 0x307a3
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x307a3
callq 0xdce4
jmp 0x307a3
movq %rax, %rbx
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
jne 0x30773
jmp 0x307a3
movq %rax, %rbx
movq %rbx, %rdi
callq 0xa510