// File: /workspace/github_cpp_makefile_star2_O1/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 0x498f1(%rip), %rsi     # 0x7975e
leaq 0x498f7(%rip), %rdx     # 0x7976b
leaq 0x178(%rsp), %rdi
callq 0xdf6a
leaq 0x178(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c806
movl %eax, %ebp
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
je 0x2fea5
callq 0xa2b0
testb %bpl, %bpl
jne 0x3035d
leaq 0x695ab(%rip), %rax     # 0x99460
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x2fee0
movq 0x690d6(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x2fedc
incl 0x8(%rax)
jmp 0x2fee0
lock
incl 0x8(%rax)
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
callq 0x1a7f4
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2ff01
callq 0xdcba
movq %rbx, %rdi
callq 0x2def6
leaq 0xd0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x49842(%rip), %rsi     # 0x7975e
leaq 0x49848(%rip), %rdx     # 0x7976b
leaq 0xc0(%rsp), %rdi
callq 0xdf6a
leaq 0x49835(%rip), %rdx     # 0x7976c
leaq 0x178(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4e54a
leaq 0x160(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x4e2a2
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0xdde2
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x490b8(%rip), %rsi     # 0x79059
leaq 0x490b6(%rip), %rdx     # 0x7905e
leaq 0x80(%rsp), %rdi
callq 0xdf6a
movq 0xa0(%rbx), %rsi
leaq 0x1b8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x18f84
leaq 0x4979b(%rip), %rcx     # 0x79773
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 0x30016
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x3001c
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 0x4973b(%rip), %rsi     # 0x7977a
callq 0xa560
leaq 0x70(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3006b
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x30071
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 0x300cf
movq %rsi, %r15
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x300d8
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 0x497ac(%rip), %rsi     # 0x798aa
callq 0xa560
leaq 0x110(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30133
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x3013b
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 0x30199
movq %rdx, 0x120(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x130(%rsp)
jmp 0x301a0
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 0x49704(%rip), %rsi     # 0x798ca
callq 0xa560
leaq 0x150(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x301fb
movq %rdx, 0x140(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x150(%rsp)
jmp 0x30202
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 0x1c826
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0x30253
callq 0xa2b0
movq 0x120(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0xd0(%rsp), %rbp
je 0x3026d
callq 0xa2b0
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x3027f
callq 0xa2b0
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
leaq 0xb0(%rsp), %rbx
leaq 0x90(%rsp), %r14
leaq 0x50(%rsp), %r13
je 0x302a6
callq 0xa2b0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x302ba
callq 0xa2b0
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x302c9
callq 0xa2b0
leaq 0x1c8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x302df
callq 0xa2b0
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x302f1
callq 0xa2b0
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x30303
callq 0xa2b0
leaq 0x160(%rsp), %rdi
callq 0x4e2e4
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30326
callq 0xa2b0
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
je 0x30338
callq 0xa2b0
movq 0xc0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3034a
callq 0xa2b0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3035d
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 0x30389
callq 0xa2b0
jmp 0x30389
movq %rax, %rbx
movq 0x120(%rsp), %rdi
cmpq %rbp, %rdi
je 0x303a0
callq 0xa2b0
jmp 0x303a0
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x303b7
callq 0xa2b0
jmp 0x303b7
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x303ce
callq 0xa2b0
jmp 0x303ce
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x303e7
callq 0xa2b0
jmp 0x303e7
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x30400
callq 0xa2b0
jmp 0x30400
movq %rax, %rbx
leaq 0x1c8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3041b
callq 0xa2b0
jmp 0x3041b
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3043a
callq 0xa2b0
jmp 0x3043a
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x30454
callq 0xa2b0
leaq 0x160(%rsp), %rdi
callq 0x4e2e4
leaq 0x178(%rsp), %rdi
callq 0x4e278
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x3049e
callq 0xa2b0
jmp 0x3049e
movq %rax, %rbx
jmp 0x30454
movq %rax, %rbx
jmp 0x30461
movq %rax, %rbx
jmp 0x3046e
jmp 0x3049b
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x304dc
callq 0xa2b0
jmp 0x304dc
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x304dc
callq 0xdcba
jmp 0x304dc
movq %rax, %rbx
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
jne 0x304ac
jmp 0x304dc
movq %rax, %rbx
movq %rbx, %rdi
callq 0xa510