// File: /workspace/github_cpp_makefile_star2_O1/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 0x410246
cmpb $0x1, 0x88(%rbx)
jne 0x407b57
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4101fe
movl $0x58, %edi
callq 0x427f00
movq %rax, %r14
movq %rax, %rdi
callq 0x40ad64
movb $0x1, 0x88(%rbx)
movq %rbx, %rdi
callq 0x4101fe
movq $0x653c40, %rdi         # imm = 0x653C40
leaq 0x1c6508(%rip), %rsi    # 0x5ce091
movl $0x4, %edx
callq 0x490a00
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x1c678c(%rip), %rsi    # 0x5ce339
callq 0x4a25e0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x407bda
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x407be2
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 0x490a00
movq %rax, %r15
leaq 0x1c6491(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490a00
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x471b50
movsbl %al, %esi
movq %r15, %rdi
callq 0x490500
movq %rax, %rdi
callq 0x48fad0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x407c65
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x70(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x407c80
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x28(%rsp), %rdi
callq 0x410354
movq 0x90(%rbx), %rdi
movq %r14, %rsi
callq 0x4135d6
testq %rax, %rax
jne 0x407c8a
movq $0x653c40, %rdi         # imm = 0x653C40
leaq 0x1c63e5(%rip), %rsi    # 0x5ce091
movl $0x4, %edx
callq 0x490a00
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x1c667f(%rip), %rsi    # 0x5ce34f
callq 0x4a25e0
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x407cf8
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x407d00
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 0x490a00
movq %rax, %r15
leaq 0x1c6373(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490a00
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x471b50
movsbl %al, %esi
movq %r15, %rdi
callq 0x490500
movq %rax, %rdi
callq 0x48fad0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x407d83
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426f20
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x407d9a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x28(%rsp), %rdi
callq 0x410354
movq %rbx, %rdi
callq 0x410246
movb $0x0, 0x88(%rbx)
movq %rbx, %rdi
callq 0x4101fe
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 0x407de2
movq %rax, %rbx
jmp 0x407e15
movq %rax, %rbx
movl $0x58, %esi
movq %r14, %rdi
callq 0x426f20
jmp 0x407e1f
jmp 0x407dfb
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x407e15
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x28(%rsp), %rdi
callq 0x40512a
movq %rbx, %rdi
callq 0x4d11b0
nop