// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/PhplusStdLib.cpp
// Function: addToProgSubStr(CppProgram*)
void addToProgSubStr(CppProgram * prog)
{
	if (!prog->hasFunc("$subStr"))
	{
		string strType=prog->getTypeCode(String);
		
		prog->addFunc("$subStr", {{strType, "in"}, {"int", "a"}, {"int", "b"}}, strType,
			"int size = b - a;\n"
			"unsigned char * data = (unsigned char *)malloc(size);\n"
			"memcpy(data, in._data + a, size);\n"
			"return "+strType+"(size, data);\n"
		);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdi, %rbx
leaq 0xe0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4bba3(%rip), %rsi     # 0x7a089
leaq 0x4bba3(%rip), %rdx     # 0x7a090
leaq 0xd0(%rsp), %rdi
callq 0xdfa8
leaq 0xd0(%rsp), %rsi
movq %rbx, %rdi
callq 0x1cb42
movl %eax, %ebp
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e51e
callq 0xa2b0
testb %bpl, %bpl
jne 0x2e766
leaq 0x6bf32(%rip), %rax     # 0x9a460
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x2e559
movq 0x6ba5d(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x2e555
incl 0x8(%rax)
jmp 0x2e559
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x1aab2
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2e57a
callq 0xdce4
leaq 0xa0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4bafb(%rip), %rsi     # 0x7a089
leaq 0x4bafb(%rip), %rdx     # 0x7a090
leaq 0x90(%rsp), %rdi
callq 0xdfa8
leaq 0x49904(%rip), %rdx     # 0x77ead
leaq 0xd0(%rsp), %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x4f0d4
leaq 0x110(%rsp), %r15
leaq 0x49648(%rip), %rsi     # 0x77c15
leaq 0x4c7fe(%rip), %rdx     # 0x7add2
movq %r15, %rdi
callq 0x4f142
leaq 0x150(%rsp), %r15
leaq 0x4962a(%rip), %rsi     # 0x77c15
leaq 0x4bd89(%rip), %rdx     # 0x7a37b
movq %r15, %rdi
callq 0x4f142
leaq 0x58(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x7(%rsp), %rcx
movl $0x3, %edx
callq 0x4f06a
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0xde0c
leaq 0x4ba51(%rip), %rsi     # 0x7a091
leaq 0xb0(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0xdc11
leaq 0x4baaa(%rip), %rsi     # 0x7a103
leaq 0xb0(%rsp), %rdi
callq 0xa560
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2e68d
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x2e694
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x38(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x90(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movq %rbx, %rdi
callq 0x1cb62
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e6d9
callq 0xa2b0
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e6ef
callq 0xa2b0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e6fe
callq 0xa2b0
leaq 0x58(%rsp), %rdi
callq 0x4f0ac
movq $-0xc0, %rbx
leaq 0x180(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x2e725
callq 0xa2b0
movq -0x30(%r14), %rdi
leaq -0x20(%r14), %rax
cmpq %rdi, %rax
je 0x2e737
callq 0xa2b0
addq $-0x40, %r14
addq $0x40, %rbx
jne 0x2e717
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e753
callq 0xa2b0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e766
callq 0xa2b0
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e78d
callq 0xa2b0
jmp 0x2e78d
movq %rax, %rbx
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e7a8
callq 0xa2b0
jmp 0x2e7a8
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e7bc
callq 0xa2b0
jmp 0x2e7bc
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4f0ac
jmp 0x2e7cb
movq %rax, %rbx
movl $0x80, %r14d
leaq (%rsp,%r14), %rdi
addq $0xd0, %rdi
callq 0x4f040
addq $-0x40, %r14
cmpq $-0x40, %r14
jne 0x2e7d1
jmp 0x2e81f
movq %rax, %rbx
jmp 0x2e81f
movq %rax, %rbx
jmp 0x2e831
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2e85b
callq 0xdce4
jmp 0x2e85b
movq %rax, %rbx
addq $-0x40, %r15
movq %r15, %rdi
callq 0x4f040
cmpq %r14, %r15
jne 0x2e80e
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e831
callq 0xa2b0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e85b
callq 0xa2b0
jmp 0x2e85b
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
jne 0x2e83f
jmp 0x2e85b
movq %rax, %rbx
movq %rbx, %rdi
callq 0xa510