// File: /workspace/github_cpp_makefile_star2_O3/enbock[P]Warp10Server/warp10server/src/Network/WebConnection.cpp
// Function: Warp10::Network::WebConnection::read(u::Object*)
void WebConnection::read(Object* arg)
{
	lock();
	if(_isReading == true)
	{
		unlock();
		return;
	}

	ByteArray* buffer = new ByteArray();
	_isReading = true;
	Socket* socket = _socket;
	unlock();

	trace(className() + ":read: Start reading.");
	int64 l;
	do {
		l = _socket->read(buffer);
	} while(l != 0);
	trace(className() + "::read: Done.");

	lock();
	_isReading = false;
	unlock();

	decodeBuffer(buffer);

	buffer->destroy();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
callq 0x410226
cmpb $0x1, 0x88(%rbx)
jne 0x407b33
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4101de
movl $0x58, %edi
callq 0x427e10
movq %rax, %r14
movq %rax, %rdi
callq 0x40ace4
movb $0x1, 0x88(%rbx)
movq %rbx, %rdi
callq 0x4101de
movq $0x653c40, %rdi         # imm = 0x653C40
leaq 0x1c652c(%rip), %rsi    # 0x5ce091
movl $0x4, %edx
callq 0x490910
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x1c67b0(%rip), %rsi    # 0x5ce339
callq 0x4a24f0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x407bb6
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x407bbe
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq $0x653c40, %rdi         # imm = 0x653C40
callq 0x490910
movq %rax, %r15
leaq 0x1c64b5(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490910
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x471a60
movsbl %al, %esi
movq %r15, %rdi
callq 0x490410
movq %rax, %rdi
callq 0x48f9e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x407c41
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x70(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x407c5c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x28(%rsp), %rdi
callq 0x410332
movq 0x90(%rbx), %rdi
movq %r14, %rsi
callq 0x41359a
testq %rax, %rax
jne 0x407c66
movq $0x653c40, %rdi         # imm = 0x653C40
leaq 0x1c6409(%rip), %rsi    # 0x5ce091
movl $0x4, %edx
callq 0x490910
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x1c66a3(%rip), %rsi    # 0x5ce34f
callq 0x4a24f0
movq %r12, 0x8(%rsp)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x407cd4
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x407cdf
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %r12, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq $0x653c40, %rdi         # imm = 0x653C40
callq 0x490910
movq %rax, %r15
leaq 0x1c639e(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490910
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x471a60
movsbl %al, %esi
movq %r15, %rdi
callq 0x490410
movq %rax, %rdi
callq 0x48f9e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x407d58
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426e30
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x407d6f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x28(%rsp), %rdi
callq 0x410332
movq %rbx, %rdi
callq 0x410226
movb $0x0, 0x88(%rbx)
movq %rbx, %rdi
callq 0x4101de
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x40(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x407db7
movq %rax, %rbx
jmp 0x407dea
movq %rax, %rbx
movl $0x58, %esi
movq %r14, %rdi
callq 0x426e30
jmp 0x407df4
jmp 0x407dd0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x407dea
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x28(%rsp), %rdi
callq 0x40512c
movq %rbx, %rdi
callq 0x4d10c0