// File: /workspace/github_cpp_makefile_star2_O3/metopa[P]HTTP_Server/src/network/CSocketIO.cpp
// Function: CSocketIO::recvData[abi:cxx11]() const
string CSocketIO::recvData() const {
	char buf[1024];
	ssize_t bytesRecvd;
	int errNo;
	string data;

	while ( 1 ) {
		bytesRecvd = recv( sockfd_m, buf, sizeof( buf ), 0 );

		errNo = errno;
		if ( bytesRecvd == 0 )
			break;
		else if ( bytesRecvd < 0 ) {
			if ( errNo == EINTR )
				continue;
			else
				throw SocketReceiverException( "recv()", strerror( errNo ), port_m, sockfd_m );
		}

		data.insert( data.end(), buf, buf + bytesRecvd );

		if ( data.size() >= 4 &&
			 data[data.size() - 4] == 13 &&
			 data[data.size() - 3] == 10 &&
			 data[data.size() - 2] == 13 &&
			 data[data.size() - 1] == 10 )
			break;

		/** An RFC2616 recommendation since someone may want to break the standard.*/
		if ( data.size() >= 2 &&
			 data[data.size() - 2] == 10 &&
			 data[data.size() - 1] == 10 )
			break;


	}

	if ( data.size() == 0 )
		throw EmptyDataException();

	return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x50(%rsp), %r14
movl (%r15), %edi
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x5190
movq %rax, %r12
callq 0x5060
testq %r12, %r12
je 0x1396a
js 0x1394b
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movq %r14, %rcx
movq %r12, %r8
callq 0x5440
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq $0x4, %rcx
jb 0x13954
cmpb $0xd, -0x4(%rax,%rcx)
jne 0x1395a
cmpb $0xa, -0x3(%rax,%rcx)
jne 0x1395a
cmpb $0xd, -0x2(%rax,%rcx)
jne 0x1395a
cmpb $0xa, -0x1(%rax,%rcx)
jne 0x1395a
jmp 0x13975
movl (%rax), %ebp
cmpl $0x4, %ebp
je 0x138eb
jmp 0x1398a
cmpq $0x2, %rcx
jb 0x138eb
cmpb $0xa, -0x2(%rax,%rcx)
jne 0x138eb
cmpb $0xa, -0x1(%rax,%rcx)
jne 0x138eb
jmp 0x13975
cmpq $0x0, 0x8(%rbx)
je 0x13a12
movq %rbx, %rax
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x50, %edi
callq 0x5200
movq %rax, %r14
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5179(%rip), %rsi      # 0x18b21
leaq 0x5178(%rip), %rdx      # 0x18b27
leaq 0x10(%rsp), %rdi
callq 0x8e2c
movl %ebp, %edi
callq 0x51b0
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x7ae4
movl (%r15), %r8d
movl 0x4(%r15), %ecx
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x1344a
leaq 0xe0ab(%rip), %rax      # 0x21aa0
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xe02f(%rip), %rsi      # 0x21a30
leaq -0xd84(%rip), %rdx      # 0x12c84
movq %r14, %rdi
callq 0x56f0
jmp 0x13a3c
movl $0x8, %edi
callq 0x5200
leaq 0xe0ad(%rip), %rcx      # 0x21ad0
movq %rcx, (%rax)
leaq 0xe01b(%rip), %rsi      # 0x21a48
leaq 0x1c6(%rip), %rdx       # 0x13bfa
movq %rax, %rdi
callq 0x56f0
jmp 0x13aa5
movq %rax, %r15
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13a5c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x53f0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x13a73
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x53f0
testb %bpl, %bpl
jne 0x13a99
jmp 0x13aa8
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x13a99
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x53f0
jmp 0x13a99
movq %rax, %r15
movq %r14, %rdi
callq 0x52e0
jmp 0x13aa8
jmp 0x13aa5
movq %rax, %r15
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x13abc
movq (%r13), %rsi
incq %rsi
callq 0x53f0
movq %r15, %rdi
callq 0x5720