LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/WebService.cpp
// Function: Warp10::WebService::onListenerCreated(u::Object*)
void  WebService::onListenerCreated(Object* arg)
{
	u::Network::Event* event = ((u::Network::Event*)arg);
	if (event->networkType == type) {
		trace(className() + "::onListenerCreated: Listener ready.");
		IListener* listener = event->listener;
		listener->addEventListener(
			WebEvent::INCOMMING_CONNECTION,
			Callback(this, cb_cast(&WebService::onNewConnection))
		);
		listener->addEventListener(
			WebEvent::WILL_CLOSE,
			Callback(this, cb_cast(&WebService::onListenerClose))
		);
		listener->listen();
	}
	event->destroy();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x90(%rsi), %rdi
leaq 0x247450(%rip), %rsi    # 0x64d718
callq 0x406883
testb %al, %al
je 0x4063bc
movq $0x64ec20, %rdi         # imm = 0x64EC20
leaq 0x1c0dae(%rip), %rsi    # 0x5c7091
callq 0x489b70
movq %rax, %r15
movq (%r14), %rax
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq *0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x1c0f2e(%rip), %rdx    # 0x5c7233
movq %rsp, %rdi
callq 0x405349
movq %rsp, %rsi
movq %r15, %rdi
callq 0x49c3f0
leaq 0x1c0d8c(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
movq %rsp, %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x4050e8
movq 0x50(%rbx), %r15
leaq 0xd0(%rsp), %r12
pushq $0x41
popq %rdx
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64d748, %rsi         # imm = 0x64D748
movq %r15, %rdi
movq %r12, %rdx
callq 0x40abb6
leaq 0xd0(%rsp), %rdi
callq 0x40c544
leaq 0x78(%rsp), %r12
pushq $0x39
popq %rdx
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64d7a0, %rsi         # imm = 0x64D7A0
movq %r15, %rdi
movq %r12, %rdx
callq 0x40abb6
leaq 0x78(%rsp), %rdi
callq 0x40c544
movq (%r15), %rax
movq %r15, %rdi
callq *0x20(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x4063e8
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x40c544
jmp 0x406409
movq %rax, %rbx
jmp 0x4063ff
movq %rax, %rbx
movq %rsp, %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/WebService.cpp
// Function: Warp10::WebService::registerNetwork()
void WebService::registerNetwork()
{
	u::Network::Event registerNetwork(
		u::Network::Event::REGISTER_NETWORK, type, &_builder
	);
	lock();
	_manager->dispatchEvent(&registerNetwork);
	unlock();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
leaq 0x2472ba(%rip), %rsi    # 0x64d6e0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x40cb38
leaq 0x40(%rbx), %rcx
movq $0x64da88, %rsi         # imm = 0x64DA88
leaq 0x60(%rsp), %rdi
movq %r14, %rdx
callq 0x40fe3c
leaq 0x8(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x40c442
movq 0x38(%rbx), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40ad2c
movq %rbx, %rdi
callq 0x40c3fe
leaq 0x60(%rsp), %rdi
callq 0x4100e2
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4050e8
jmp 0x4064a4
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x4100e2
movq %rbx, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/WebService.cpp
// Function: Warp10::WebService::onListenerClose(u::Object*)
void WebService::onListenerClose(Object* arg)
{
	WebEvent* event = ((WebEvent*)arg);
	IListener* listener = ((IListener*)event->target());
	listener->removeEventListener(
		WebEvent::INCOMMING_CONNECTION,
		Callback(this, cb_cast(&WebService::onNewConnection))
	);
	listener->removeEventListener(
		WebEvent::WILL_CLOSE,
		Callback(this, cb_cast(&WebService::onListenerClose))
	);
	event->destroy();

	WebEvent canClose(WebEvent::CAN_CLOSE);
	listener->dispatchEvent(&canClose);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x409f0c
movq %rax, %rbx
leaq 0x60(%rsp), %r12
pushq $0x41
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64d748, %rsi         # imm = 0x64D748
movq %rbx, %rdi
movq %r12, %rdx
callq 0x40ac48
leaq 0x60(%rsp), %rdi
callq 0x40c544
leaq 0x8(%rsp), %r12
pushq $0x39
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64d7a0, %rsi         # imm = 0x64D7A0
movq %rbx, %rdi
movq %r12, %rdx
callq 0x40ac48
leaq 0x8(%rsp), %rdi
callq 0x40c544
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movq $0x64d7f8, %rsi         # imm = 0x64D7F8
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
callq 0x407ba8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40ad2c
leaq 0xb8(%rsp), %rdi
callq 0x407b88
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x407b88
jmp 0x4065a2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x40659d
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x40c544
movq %rbx, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/WebService.cpp
// Function: Warp10::WebService::onNewConnection(u::Object*)
void WebService::onNewConnection(Object* arg)
{
	Network::WebEvent* event  = ((Network::WebEvent*)arg);
	WebConnection* connection = ((WebConnection*)event->connection);
	connection->addEventListener(
		WebEvent::REQUEST,
		Callback(this, cb_cast(&WebService::onRequest))
	);
	connection->read();
	event->destroy();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
movq 0x48(%rbx), %r14
leaq 0x8(%rsp), %r15
pushq $0x49
popq %rdx
movq %r15, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64d850, %rsi         # imm = 0x64D850
movq %r14, %rdi
movq %r15, %rdx
callq 0x40abb6
leaq 0x8(%rsp), %rdi
callq 0x40c544
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x40c544
movq %rbx, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebBuilder.cpp
// Function: Warp10::Network::WebBuilder::createListener()
IListener* WebBuilder::createListener()
{
	trace(
		className() + "::createListener: Create socket on " + _address
		+ " " + int2string(_port)
	);
	lock();
	WebListener* listener = new WebListener(
		this, new Socket(AF_INET, _address, _port)
	);
	unlock();
	return listener;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
movq $0x64ec20, %rdi         # imm = 0x64EC20
leaq 0x1c06d9(%rip), %rsi    # 0x5c7091
callq 0x489b70
movq %rax, %r14
movq (%rbx), %rax
leaq 0x130(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x168(%rsp), %rsi
leaq 0x1c08e2(%rip), %rdx    # 0x5c72c2
movq %rsp, %rdi
callq 0x405349
leaq 0x70(%rbx), %rdx
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x4068ac
leaq 0x1c14a4(%rip), %rdx    # 0x5c7ea4
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x405349
movl 0x90(%rbx), %esi
leaq 0xd8(%rsp), %rdi
callq 0x40c712
leaq 0x110(%rsp), %rdx
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x406c55
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0x49c3f0
leaq 0x1c065e(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
leaq 0x60(%rsp), %rdi
callq 0x499a70
leaq 0xd8(%rsp), %rdi
callq 0x4050e8
leaq 0x40(%rsp), %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x499a70
movq %rsp, %rdi
callq 0x499a70
leaq 0x130(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x40c442
movl $0xf0, %edi
callq 0x420b40
movq %rax, %r14
movl $0xc8, %edi
callq 0x420b40
movq %rax, %r15
leaq 0x38(%rbx), %rsi
leaq 0x80(%rsp), %rdi
callq 0x40cb38
movq 0x90(%rbx), %rcx
movb $0x1, %bpl
pushq $0x2
popq %rsi
leaq 0x80(%rsp), %rdx
pushq $0x1
popq %r8
movq %r15, %rdi
xorl %r9d, %r9d
callq 0x40d860
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x407d2c
leaq 0x80(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x40c3fe
movq %r14, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x406b62
movq %rax, %rbx
jmp 0x406b6f
movq %rax, %rbx
jmp 0x406b8b
movq %rax, %rbx
jmp 0x406b98
movq %rax, %rbx
jmp 0x406ba2
movq %rax, %rbx
jmp 0x406bac
movq %rax, %rbx
jmp 0x406bb4
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x4050e8
testb %bpl, %bpl
je 0x406b6f
movl $0xc8, %esi
movq %r15, %rdi
callq 0x41fb60
movl $0xf0, %esi
movq %r14, %rdi
callq 0x41fb60
jmp 0x406bc1
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x499a70
leaq 0xd8(%rsp), %rdi
callq 0x4050e8
leaq 0x40(%rsp), %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x499a70
movq %rsp, %rdi
callq 0x499a70
leaq 0x130(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebBuilder.cpp
// Function: Warp10::Network::WebBuilder::setupListener(u::String, long)
void WebBuilder::setupListener(String address, int64 port)
{
	lock();
	_address = address;
	_port    = port;
	unlock();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x40c442
leaq 0x38(%r15), %rdi
movq %r14, %rsi
callq 0x40cbf6
movq %rbx, 0x90(%r15)
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x40c3fe
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebConnection.cpp
// Function: Warp10::Network::WebConnection::WebConnection(u::Socket*)
WebConnection::WebConnection(Socket* socket) : IConnection()
{
	_isReading = false;
	_socket    = socket;
	_isClosed  = false;

	addEventListener(
		u::Network::Event::CLOSE
		, Callback(this, cb_cast(&WebConnection::onClose))
	);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movl $0x88, %edx
xorl %esi, %esi
callq 0x401090
movq %rbx, %rdi
callq 0x407804
leaq 0x23c1bf(%rip), %rax    # 0x642ea8
movq %rax, (%rbx)
movb %r15b, 0x88(%rbx)
movq %r14, 0x90(%rbx)
movb %r15b, 0x98(%rbx)
leaq 0x8(%rsp), %rdi
pushq $0x39
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64dbe8, %rsi         # imm = 0x64DBE8
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x40abb6
leaq 0x8(%rsp), %rdi
callq 0x40c544
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x40c544
jmp 0x406d50
movq %rax, %r14
movq %rbx, %rdi
callq 0x40c10a
movq %r14, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebConnection.cpp
// Function: Warp10::Network::WebConnection::~WebConnection()
WebConnection::~WebConnection()
{
	removeEventListener(
		u::Network::Event::CLOSE
		, Callback(this, cb_cast(&WebConnection::onClose))
	);
	_socket->destroy();
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x23c139(%rip), %rax    # 0x642ea8
movq %rax, (%rdi)
leaq 0x8(%rsp), %rdi
pushq $0x39
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64dbe8, %rsi         # imm = 0x64DBE8
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x40ac48
leaq 0x8(%rsp), %rdi
callq 0x40c544
movq 0x90(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rbx, %rdi
callq 0x40c10a
addq $0x60, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x4052dd
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x80, %rsp
movq %rdi, %rbx
callq 0x40c442
cmpb $0x1, 0x88(%rbx)
jne 0x406e71
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x40c3fe
pushq $0x58
popq %rdi
callq 0x420b40
movq %rax, %r14
movq %rax, %rdi
callq 0x408e64
movb $0x1, 0x88(%rbx)
movq %rbx, %rdi
callq 0x40c3fe
movq $0x64ec20, %rdi         # imm = 0x64EC20
leaq 0x1c01f0(%rip), %rsi    # 0x5c7091
callq 0x489b70
movq %rax, %r15
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x60(%rsp), %rsi
leaq 0x1c0476(%rip), %rdx    # 0x5c7339
leaq 0x8(%rsp), %rdi
callq 0x405349
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x49c3f0
leaq 0x1c01ca(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0x28(%rsp), %rdi
callq 0x4050e8
movq 0x90(%rbx), %rdi
movq %r14, %rsi
callq 0x40e596
testq %rax, %rax
jne 0x406f05
movq $0x64ec20, %rdi         # imm = 0x64EC20
leaq 0x1c016a(%rip), %rsi    # 0x5c7091
callq 0x489b70
movq %rax, %r15
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x60(%rsp), %rsi
leaq 0x1c0406(%rip), %rdx    # 0x5c734f
leaq 0x8(%rsp), %rdi
callq 0x405349
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x49c3f0
leaq 0x1c0144(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0x28(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x40c442
movb $0x0, 0x88(%rbx)
movq %rbx, %rdi
callq 0x40c3fe
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 %r14
popq %r15
retq
jmp 0x406fc5
movq %rax, %rbx
jmp 0x406fe9
movq %rax, %rbx
pushq $0x58
popq %rsi
movq %r14, %rdi
callq 0x41fb60
jmp 0x406ff3
jmp 0x406fdc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0x28(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebConnection.cpp
// Function: Warp10::Network::WebConnection::send(u::ByteArray*)
void WebConnection::send(ByteArray* data)
{
	lock();
	Socket* socket = _socket;
	unlock();

	data->position(0);
	while(data->available())
	{
		if(socket->send(data) == -1)
		{
			error(className()+"::send() Unable to send data.");
			error("TODO CLOSE");
			/**
			Callback cb(this, cb_cast(&NetworkDecoder::doClosed));
			ThreadSystem::create(&cb);
			*/
			return;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x40c442
movq 0x90(%rbx), %r15
movq %rbx, %rdi
callq 0x40c3fe
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x20(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
testq %rax, %rax
je 0x4070fb
movq %r15, %rdi
movq %r14, %rsi
callq 0x40e250
cmpq $-0x1, %rax
jne 0x40702d
movq $0x64eb00, %rdi         # imm = 0x64EB00
leaq 0x1c00f5(%rip), %rsi    # 0x5c7153
callq 0x489b70
movq %rax, %r14
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x60(%rsp), %rsi
leaq 0x1c02dd(%rip), %rdx    # 0x5c735d
leaq 0x8(%rsp), %rdi
callq 0x405349
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x49c3f0
leaq 0x1c000d(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0x28(%rsp), %rdi
callq 0x4050e8
movq $0x64eb00, %rdi         # imm = 0x64EB00
leaq 0x1c0083(%rip), %rsi    # 0x5c7153
callq 0x489b70
leaq 0x1c029f(%rip), %rsi    # 0x5c737b
movq %rax, %rdi
callq 0x489b70
leaq 0x1bffc0(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x40711a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0x28(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebConnection.cpp
// Function: Warp10::Network::WebConnection::onClose(u::Object*)
void WebConnection::onClose(Object *arg)
{
	u::Network::Event* event = ((u::Network::Event*)arg);
	event->destroy();

	lock();
	if (_isClosed == false) {
		_socket->close();
	} else {
		// avoid double close
		unlock();
		return;
	}
	_isClosed  = true;
	unlock();

	u::Network::Event closed(u::Network::Event::CLOSED);
	dispatchEvent(&closed);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *(%rax)
movq %rbx, %rdi
callq 0x40c442
cmpb $0x0, 0x98(%rbx)
je 0x407164
movq %rbx, %rdi
addq $0xb8, %rsp
popq %rbx
popq %r14
jmp 0x40c3fe
movq 0x90(%rbx), %rdi
callq 0x40dc58
movb $0x1, 0x98(%rbx)
movq %rbx, %rdi
callq 0x40c3fe
movq $0x64dc40, %rsi         # imm = 0x64DC40
movq %rsp, %r14
movq %r14, %rdi
callq 0x40ffe2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40ad2c
movq %rsp, %rdi
callq 0x4100e2
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4100e2
movq %rbx, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebListener.cpp
// Function: Warp10::Network::WebListener::WebListener(u::Network::IBuilder*, u::Socket*)
WebListener::WebListener(IBuilder* builder, Socket* socket) : IListener()
{
	_builder  = ((WebBuilder*)builder);
	_socket    = socket;
	_isClosed  = false;
	_closeSent = false;

	addEventListener(
		u::Network::Event::CLOSE,
		Callback(this, cb_cast(&WebListener::onClose))
	);
	addEventListener(
		WebEvent::CAN_CLOSE,
		Callback(this, cb_cast(&WebListener::onCanClose))
	);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl $0x88, %edx
xorl %esi, %esi
callq 0x401090
movq %rbx, %rdi
callq 0x4089e8
leaq 0x23b29a(%rip), %rax    # 0x642ff8
movq %rax, (%rbx)
leaq 0x98(%rbx), %r14
movq %r14, %rdi
callq 0x4089fe
movq %r12, 0x88(%rbx)
movq %r15, 0x90(%rbx)
andw $0x0, 0xe8(%rbx)
leaq 0x60(%rsp), %rdi
pushq $0x31
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64dbe8, %rsi         # imm = 0x64DBE8
leaq 0x60(%rsp), %rdx
movq %rbx, %rdi
callq 0x40abb6
leaq 0x60(%rsp), %rdi
callq 0x40c544
leaq 0x8(%rsp), %rdi
pushq $0x39
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64d7f8, %rsi         # imm = 0x64D7F8
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x40abb6
leaq 0x8(%rsp), %rdi
callq 0x40c544
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
jmp 0x407e0d
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x40c544
jmp 0x407e1c
movq %rax, %r15
jmp 0x407e24
movq %rax, %r15
movq %r14, %rdi
callq 0x408a40
movq %rbx, %rdi
callq 0x40c10a
movq %r15, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebListener.cpp
// Function: Warp10::Network::WebListener::~WebListener()
WebListener::~WebListener()
{
	_socket->destroy();
	removeEventListener(
		u::Network::Event::CLOSE,
		Callback(this, cb_cast(&WebListener::onClose))
	);
	removeEventListener(
		WebEvent::CAN_CLOSE,
		Callback(this, cb_cast(&WebListener::onCanClose))
	);
	trace(className() + "::~WebListener: Down.");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
leaq 0x23b1b0(%rip), %rax    # 0x642ff8
movq %rax, (%rdi)
movq 0x90(%rdi), %rdi
movq (%rdi), %rax
callq *(%rax)
leaq 0xd0(%rsp), %rdi
pushq $0x31
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64dbe8, %rsi         # imm = 0x64DBE8
leaq 0xd0(%rsp), %rdx
movq %rbx, %rdi
callq 0x40ac48
leaq 0xd0(%rsp), %rdi
callq 0x40c544
leaq 0x78(%rsp), %rdi
pushq $0x39
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64d7f8, %rsi         # imm = 0x64D7F8
leaq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x40ac48
leaq 0x78(%rsp), %rdi
callq 0x40c544
movq $0x64ec20, %rdi         # imm = 0x64EC20
leaq 0x1bf1bd(%rip), %rsi    # 0x5c7091
callq 0x489b70
movq %rax, %r14
movq (%rbx), %rax
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x1bf645(%rip), %rdx    # 0x5c753b
movq %rsp, %rdi
callq 0x405349
movq %rsp, %rsi
movq %r14, %rdi
callq 0x49c3f0
leaq 0x1bf19b(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
movq %rsp, %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x4050e8
leaq 0x98(%rbx), %rdi
callq 0x408a40
movq %rbx, %rdi
callq 0x40c10a
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x4052dd
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebListener.cpp
// Function: Warp10::Network::WebListener::listen()
void WebListener::listen()
{
	bool ret = _socket->listen();

	if(ret == false) {
		error(className()+"::listen: Can not etablish connection.");
		u::Network::Event close(
			u::Network::Event::CLOSE
		);
		dispatchEvent(&close);
		return;
	}

	// start incoming connections
	Callback cb(this, cb_cast(&WebListener::listenSocket));
	ThreadSystem::create(&cb);

	return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
callq 0x40dfee
testb %al, %al
je 0x407fd4
leaq 0x20(%rsp), %r14
pushq $0x41
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq %r14, %rdi
callq 0x40edd0
leaq 0x20(%rsp), %rdi
callq 0x40c544
jmp 0x408069
movq $0x64eb00, %rdi         # imm = 0x64EB00
leaq 0x1bf171(%rip), %rsi    # 0x5c7153
callq 0x489b70
movq %rax, %r14
movq (%rbx), %rax
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x1bf56a(%rip), %rdx    # 0x5c756e
movq %rsp, %rdi
callq 0x405349
movq %rsp, %rsi
movq %r14, %rdi
callq 0x49c3f0
leaq 0x1bf08d(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
movq %rsp, %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x4050e8
movq $0x64dbe8, %rsi         # imm = 0x64DBE8
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x40ffe2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40ad2c
leaq 0x20(%rsp), %rdi
callq 0x4100e2
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4100e2
jmp 0x4080ac
movq %rax, %rbx
jmp 0x4080a2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x40c544
jmp 0x4080ac
movq %rax, %rbx
movq %rsp, %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebListener.cpp
// Function: Warp10::Network::WebListener::onClose(u::Object*)
void WebListener::onClose(Object* arg)
{
	bool sendWillClose = false;
	arg->destroy();
	lock();
	if(_isClosed == false) {

		_socket->close();
		
		int64 i = 0, l = _connections.length();
		for(; i < l; i++)
		{
			u::Network::Event close(u::Network::Event::CLOSE);
			IConnection* connection = _connections[i];
			connection->dispatchEvent(&close);
		}

		sendWillClose = true;
	}
	_isClosed = true;
	unlock();

	checkClosed();

	if(sendWillClose == true) {
		WebEvent willClose(WebEvent::WILL_CLOSE);
		dispatchEvent(&willClose);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *(%rax)
movq %rbx, %rdi
callq 0x40c442
cmpb $0x0, 0xe8(%rbx)
je 0x40810a
movb $0x1, 0xe8(%rbx)
movq %rbx, %rdi
callq 0x40c3fe
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x28(%rax)
movq 0x90(%rbx), %rdi
callq 0x40dc58
movq 0xd8(%rbx), %rbp
subq 0xd0(%rbx), %rbp
leaq 0x98(%rbx), %r14
sarq $0x3, %rbp
xorl %r15d, %r15d
testq %rbp, %rbp
cmovleq %r15, %rbp
movq $0x64dbe8, %r12         # imm = 0x64DBE8
leaq 0x8(%rsp), %r13
cmpq %r15, %rbp
je 0x408178
movq %r13, %rdi
movq %r12, %rsi
callq 0x40ffe2
movq %r14, %rdi
movq %r15, %rsi
callq 0x408a56
movq %rax, %rdi
movq %r13, %rsi
callq 0x40ad2c
movq %r13, %rdi
callq 0x4100e2
incq %r15
jmp 0x408145
movb $0x1, 0xe8(%rbx)
movq %rbx, %rdi
callq 0x40c3fe
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movq $0x64d7a0, %rsi         # imm = 0x64D7A0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x407ba8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40ad2c
leaq 0x8(%rsp), %rdi
callq 0x407b88
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x407b88
jmp 0x4081e7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4100e2
movq %rbx, %rdi
callq 0x4ca950
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/warp10server/src/Network/WebListener.cpp
// Function: Warp10::Network::WebListener::onConnectionClosed(u::Object*)
void WebListener::onConnectionClosed(Object *arg)
{
	u::Network::Event* event = ((u::Network::Event*)arg);
	IConnection* connection  = ((IConnection*)event->target());
	lock();
	int64 index = _connections.erase(connection);
	if (index != -1) {
		trace(
			className() + "::onConnectionClosed: Removed connection from list."
		);
		connection->removeEventListener(
			u::Network::Event::CLOSED
			, Callback(this, cb_cast(&WebListener::onConnectionClosed))
		);
		connection->destroy();
	}
	bool isClosed = _isClosed;
	unlock();
	if (isClosed == true) {
		checkClosed();
	}

	event->destroy();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x409f0c
movq %rax, %r15
movq %r14, %rdi
callq 0x40c442
leaq 0x98(%r14), %rdi
movq %r15, %rsi
callq 0x408a7c
cmpq $-0x1, %rax
je 0x408981
movq $0x64ec20, %rdi         # imm = 0x64EC20
leaq 0x1be7aa(%rip), %rsi    # 0x5c7091
callq 0x489b70
movq %rax, %r12
movq (%r14), %rax
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq *0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x1bed98(%rip), %rdx    # 0x5c76a1
movq %rsp, %rdi
callq 0x405349
movq %rsp, %rsi
movq %r12, %rdi
callq 0x49c3f0
leaq 0x1be788(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
movq %rsp, %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x4050e8
leaq 0x78(%rsp), %r12
pushq $0x49
popq %rdx
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64dc40, %rsi         # imm = 0x64DC40
movq %r15, %rdi
movq %r12, %rdx
callq 0x40ac48
leaq 0x78(%rsp), %rdi
callq 0x40c544
movq (%r15), %rax
movq %r15, %rdi
callq *(%rax)
movb 0xe8(%r14), %bpl
movq %r14, %rdi
callq 0x40c3fe
cmpb $0x1, %bpl
jne 0x40899f
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x40c544
jmp 0x4089e0
movq %rax, %rbx
jmp 0x4089d6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x499a70
leaq 0x20(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::createMemory()
void ByteArray::createMemory()
{
	uint64 i;
	_size = BYTEARRAY_CHUNK;
	_buffer = (char *) malloc(_size);
	_position = 0;
	_length=0;
	if(_buffer == null) error("ByteArray::ByteArray(): Out of memory.");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x400, 0x48(%rdi)      # imm = 0x400
movl $0x400, %edi            # imm = 0x400
callq 0x506090
movq %rax, 0x38(%rbx)
andq $0x0, 0x40(%rbx)
andq $0x0, 0x50(%rbx)
testq %rax, %rax
je 0x408edb
popq %rbx
retq
movq $0x64eb00, %rdi         # imm = 0x64EB00
leaq 0x1be26a(%rip), %rsi    # 0x5c7153
callq 0x489b70
leaq 0x1be89f(%rip), %rsi    # 0x5c7794
movq %rax, %rdi
callq 0x489b70
leaq 0x1be1a7(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
popq %rbx
jmp 0x489450
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::cloneFrom(u::ByteArray const&)
void ByteArray::cloneFrom(const ByteArray& value)
{
	size(value._length);
	_position = 0;
	writeBytes(value._buffer, value._length,0);
	_length = value._length;
	_position = value._position;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x50(%rsi), %rsi
callq 0x408fc0
andq $0x0, 0x40(%r14)
movq 0x38(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x409056
movq 0x50(%rbx), %rax
movq %rax, 0x50(%r14)
movq 0x40(%rbx), %rax
movq %rax, 0x40(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::size(unsigned long)
void ByteArray::size(uint64 value)
{
	uint64 newLength, i;
	char* newBuffer;

	_length = value;

	newLength = value+(BYTEARRAY_CHUNK-(value%BYTEARRAY_CHUNK));
	if(newLength == _size) return;

	newBuffer = (char*)realloc(_buffer, newLength);
	if(_buffer == null) error("ByteArray::setSize(): Out of memory.");

	_size = newLength;
	_buffer = newBuffer;
	position(_position); // correct pointer if needed
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rsi, 0x50(%rdi)
andq $-0x400, %r14           # imm = 0xFC00
addq $0x400, %r14            # imm = 0x400
cmpq 0x48(%rdi), %r14
jne 0x408fe6
popq %rbx
popq %r14
popq %r15
retq
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
movq %r14, %rsi
callq 0x506720
movq %rax, %r15
cmpq $0x0, 0x38(%rbx)
jne 0x409038
movq $0x64eb00, %rdi         # imm = 0x64EB00
leaq 0x1be146(%rip), %rsi    # 0x5c7153
callq 0x489b70
leaq 0x1be7d2(%rip), %rsi    # 0x5c77eb
movq %rax, %rdi
callq 0x489b70
leaq 0x1be083(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
movq %r14, 0x48(%rbx)
movq %r15, 0x38(%rbx)
movq (%rbx), %rax
movq 0x40(%rbx), %rsi
movq 0x20(%rax), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::writeBytes(char const*, long, long)
int64 ByteArray::writeBytes(const char* bytes, int64 length, int64 offset)
{
	int64 ret = 0;
	if(_position + length >= _size) size(_position+length);
	memcpy(_buffer+_position, bytes+offset, length);
	_position+=length;
	if(_length < _position) _length=_position;
	return length;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x40(%rdi), %rdi
leaq (%rdi,%rdx), %rsi
cmpq 0x48(%r14), %rsi
jb 0x409084
movq %r14, %rdi
callq 0x408fc0
movq 0x40(%r14), %rdi
addq 0x38(%r14), %rdi
addq %r12, %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x401080
movq 0x40(%r14), %rax
addq %rbx, %rax
movq %rax, 0x40(%r14)
cmpq %rax, 0x50(%r14)
jae 0x4090ab
movq %rax, 0x50(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::writeUInt(unsigned long, long, bool, signed char)
void ByteArray::writeUInt(const uint64 value, int64 min, bool noHeader, int8 type)
{
	char maxExp, byte;
	int i;

	maxExp = min;

	while((value >> (8*maxExp)) > 0 && maxExp < sizeof(uint64)) maxExp++;
	//maxExp = (double)(log((double)value)/log((double)256));

	if(noHeader == false)
	{
		writeByte(maxExp);
		writeByte(type);
	}

	for(i=maxExp-1; i>=0; i--)
	{
		byte = (value >> (8*i)) & 0xFF;
		writeByte(byte);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movl %ecx, %eax
movq %rsi, %rbx
movq %rdi, %r14
movsbl %dl, %r12d
leaq -0x10(,%r12,8), %r15
decb %dl
leal (,%r12,8), %ecx
movl %r12d, %edi
movq %rbx, %rsi
shrq %cl, %rsi
leal 0x1(%rdi), %r12d
addq $0x8, %r15
incb %dl
cmpl $0x7, %edi
ja 0x4094cd
addl $0x8, %ecx
testq %rsi, %rsi
jne 0x4094ad
testb %al, %al
jne 0x4094e8
movzbl %dl, %esi
movq %r14, %rdi
callq 0x409526
movzbl %bpl, %esi
movq %r14, %rdi
callq 0x409526
decl %r12d
testl %r12d, %r12d
jle 0x409510
movl %r15d, %ecx
andb $-0x8, %cl
movq %rbx, %rax
shrq %cl, %rax
movzbl %al, %esi
movq %r14, %rdi
callq 0x409526
decl %r12d
addq $-0x8, %r15
jmp 0x4094eb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::readBinary()
ByteArray ByteArray::readBinary()
{
	ByteArray dest;
	uint64 length = this->readInt();
	dest.size(length);
	readBytes(dest._buffer, length, 0);
	return dest;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x408e64
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4095e0
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x408fc0
movq 0x38(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x40966e
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x408f16
movq %r14, %rdi
callq 0x4ca950
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::readInt(long, signed char*)
uint64 ByteArray::readInt(int64 min, int8* type)
{
	int t, i;
	uint64 len, out;
	int64 lout;

	len = min;
	t = TYPE_UINT;
	if(len == 0)
	{
		len = (uint64)readByte();
		t = (int)readByte();
	}

	out=0;
	for(i=len-1; i>=0; i--)
	{
		out += (uint64)readByte() << (8*i);
	}

	if(type != null) *type = t;

	switch(t)
	{
		case TYPE_NEGATIVE_INT:
		{
			lout = (int64)out;
			lout *= -1;
			return lout;
		} break;
		case TYPE_POSITIVE_INT:
		{
			return (int64)out;
		} break;
	}

	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x4095fd
movq %rsi, %r15
xorl %ebp, %ebp
jmp 0x409613
movq %r14, %rdi
callq 0x4096b0
movzbl %al, %r15d
movq %r14, %rdi
callq 0x4096b0
movl %eax, %ebp
movl %r15d, %r12d
leaq -0x8(,%r12,8), %r13
decq %r12
xorl %r15d, %r15d
testl %r12d, %r12d
js 0x409649
movq %r14, %rdi
callq 0x4096b0
movzbl %al, %eax
movl %r13d, %ecx
andb $-0x8, %cl
shlq %cl, %rax
addq %rax, %r15
decq %r12
addq $-0x8, %r13
jmp 0x409624
testq %rbx, %rbx
je 0x409651
movb %bpl, (%rbx)
movq %r15, %rax
negq %rax
cmpb $0x2, %bpl
cmovneq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::readString()
String ByteArray::readString()
{
	size_t length;
	char * str;
	length = readInt();
	str = (char *)malloc(length+1);
	if(str)
	{
		readBytes(str, length);
		str[length]=0;
		String out(str);
		free(str);
		return out;
	}
	return (String)"";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4095e0
movq %rax, %r12
leaq 0x1(%rax), %rdi
callq 0x506090
testq %rax, %rax
je 0x4097b0
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x40966e
movb $0x0, (%r15,%r12)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40c908
movq %r15, %rdi
callq 0x5063d0
jmp 0x4097bf
leaq 0x1e260b(%rip), %rsi    # 0x5ebdc2
movq %rbx, %rdi
callq 0x40c908
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::writeFloat(float)
void ByteArray::writeFloat(float value)
{
	size_t l = sizeof(float);
	char bin[l];
	memcpy(&bin, &value, l);
	std::reverse(bin, bin+l);
	if(_position + l >= _size) size(_position+l);
	writeBytes(bin, l);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
movss %xmm0, -0x4(%rsi)
movq %rsp, %rdi
callq 0x409b65
movq 0x40(%rbx), %rsi
addq $0x4, %rsi
cmpq 0x48(%rbx), %rsi
jb 0x4097fe
movq %rbx, %rdi
callq 0x408fc0
movq %rsp, %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x409056
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::readFloat()
float ByteArray::readFloat()
{
	size_t l = sizeof(float);
	char bin[l];
	float out;
	readBytes(bin, l);
	std::reverse(bin, bin+l);
	memcpy(&out, &bin, l);
	return out;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsp, %rbx
pushq $0x4
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x40966e
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x409b65
movss -0x4(%r14), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::compress()
void ByteArray::compress()
{
	Bytef *compr;
	ulong cl;
	int err;
	ByteArray *ba = new ByteArray();
	ba->writeUInt(_length);

	cl = compressBound(_length);
	compr = (Bytef *)malloc(cl+ba->length());
	ba->position(0);
	ba->readBytes((char*)compr, ba->_length, 0);
	err = compress2(compr+ba->length(), &cl, (const Bytef*)_buffer, _length, Z_BEST_COMPRESSION);

	if(err != Z_OK)
	{
		assert(err == Z_OK && "ByteArray::compress(): Compression error.");
		free(compr);
		return;
	}
	size(cl);
	_length = 0;
	position(0);
	writeBytes((const char *)compr, cl+ba->length(),0);
	delete ba;
	free(compr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x58
popq %rdi
callq 0x420b40
movq %rax, %rbx
movq %rax, %rdi
callq 0x408e64
movq 0x50(%r14), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409484
movq 0x50(%r14), %rdi
callq 0x412100
movq %rax, %r15
movq %rsp, %r12
movq %rax, (%r12)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
addq %rax, %r15
movq %r15, %rdi
callq 0x506090
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x20(%rax)
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x40966e
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
leaq (%rax,%r15), %rdi
movq 0x38(%r14), %rdx
movq 0x50(%r14), %rcx
pushq $0x9
popq %r8
movq %r12, %rsi
callq 0x411fb0
testl %eax, %eax
jne 0x409946
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x408fc0
andq $0x0, 0x50(%r14)
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x20(%rax)
movq (%rsp), %r12
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
addq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x409056
movq %rbx, %rdi
callq 0x408f16
pushq $0x58
popq %rsi
movq %rbx, %rdi
callq 0x41fb60
movq %r15, %rdi
callq 0x5063d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1bdec3(%rip), %rdi    # 0x5c7810
leaq 0x1bdef7(%rip), %rsi    # 0x5c784b
leaq 0x1bdf02(%rip), %rcx    # 0x5c785d
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x4df5b0
movq %rax, %r14
pushq $0x58
popq %rsi
movq %rbx, %rdi
callq 0x41fb60
movq %r14, %rdi
callq 0x4ca950
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::uncompress()
void ByteArray::uncompress()
{
	char *ucompr;
	ulong cl;
	uint64 off, sl;
	int err;

	_position=0;
	cl = (uint64)readInt();
	off = _position;
	sl = _length-off;
	ucompr = (char *)malloc(cl);
	err = ::uncompress((Bytef*)ucompr, (uLongf *)&cl, (const Bytef*)_buffer+off, (uLong) sl);
	if(err != Z_OK)
	{
		assert(err == Z_OK && "ByteArray::uncompress(): Decompression error.");
		free(ucompr);
		return;
	}
	size(cl);
	position(0);
	_length = 0;
	writeBytes((const char *)ucompr, cl,0);
	free(ucompr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
andq $0x0, 0x40(%rdi)
xorl %esi, %esi
xorl %edx, %edx
callq 0x4095e0
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq 0x40(%rbx), %r12
movq 0x50(%rbx), %r13
subq %r12, %r13
movq %rax, %rdi
callq 0x506090
movq %rax, %r14
addq 0x38(%rbx), %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x4122e0
testl %eax, %eax
jne 0x409a16
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x408fc0
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x20(%rax)
andq $0x0, 0x50(%rbx)
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x409056
movq %r14, %rdi
callq 0x5063d0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1bde5e(%rip), %rdi    # 0x5c787b
leaq 0x1bde27(%rip), %rsi    # 0x5c784b
leaq 0x1bde8f(%rip), %rcx    # 0x5c78ba
movl $0x1c2, %edx            # imm = 0x1C2
callq 0x4df5b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::splice(long, long)
bool u::ByteArray::splice(int64 offset, int64 length)
{
	int64 oldSize = this->length();
	position(offset);
	int64 i;
	for(i=0; i < oldSize - length - offset; i++)
	{
		if(offset + i + length < oldSize)
			_buffer[offset + i] = _buffer[offset + i + length];
		else
			break; // end of data block before offset+length
	}
	int64 newSize = this->length() - length;
	if(newSize < 0) newSize=0;
	size(newSize);
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, %r12
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x20(%rax)
movq %r12, %rcx
subq %r14, %rcx
subq %r15, %rcx
xorl %eax, %eax
testq %rcx, %rcx
cmovgq %rcx, %rax
subq $0x1, %rax
jb 0x409af4
leaq (%r14,%r15), %rcx
cmpq %r12, %rcx
jge 0x409af4
movq 0x38(%rbx), %rcx
leaq (%rcx,%r15), %rdx
movb (%r14,%rdx), %dl
movb %dl, (%rcx,%r15)
incq %r15
jmp 0x409ad0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
subq %r14, %rax
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
callq 0x408fc0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/RoomOwner.cpp
// Function: u::RoomOwner::toString()
String u::RoomOwner::toString()
{
	String str = "["+className()+"<"+ptr2string(this)+"> Listeners:";
	str+=_room.toString();
	str+="]";
	return str;

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
leaq 0x88(%rsp), %rdi
callq *0x8(%rax)
leaq 0xc0(%rsp), %rdx
leaq 0x1ba6f1(%rip), %rsi    # 0x5c7d08
leaq 0x8(%rsp), %rdi
callq 0x405368
leaq 0x1c2353(%rip), %rdx    # 0x5cf97b
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x405349
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0x40c79c
leaq 0x118(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x406c55
leaq 0x1ba618(%rip), %rdx    # 0x5c7c7d
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x405349
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x40c94e
leaq 0x68(%rsp), %rdi
callq 0x499a70
leaq 0x48(%rsp), %rdi
callq 0x499a70
leaq 0xe0(%rsp), %rdi
callq 0x4050e8
leaq 0x28(%rsp), %rdi
callq 0x499a70
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0x88(%rsp), %rdi
callq 0x4050e8
addq $0x38, %r14
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x40c126
leaq 0xc0(%rsp), %rsi
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0x49b180
leaq 0x88(%rsp), %rdi
callq 0x4050e8
leaq 0x1de6a7(%rip), %rsi    # 0x5ebda6
movq %r14, %rdi
callq 0x49b220
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r14
retq
jmp 0x40d729
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x4050e8
jmp 0x40d72c
movq %rax, %r14
movq %rbx, %rdi
jmp 0x40d785
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x499a70
jmp 0x40d743
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x499a70
jmp 0x40d752
movq %rax, %r14
leaq 0xe0(%rsp), %rdi
callq 0x4050e8
jmp 0x40d764
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x499a70
jmp 0x40d773
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0x88(%rsp), %rdi
callq 0x4050e8
movq %r14, %rdi
callq 0x4ca950
movq %rax, %r14
jmp 0x40d77d
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/Socket.cpp
// Function: u::Socket::Socket(u::Socket&)
u::Socket::Socket(Socket & value) : Object(value)
{
	_type = value._type;
	_domain = value._domain;
	_protocol = value._protocol;
	_con = -1;
	_hostname = value._hostname;
	_port = value._port;
	maxWaitingClients = SOCKET_MAX_CLIENTS;
	receiveBufferSize = SOCKET_RECV_BUFFER;
	_neverUsed = true;
	_addr = null;
	_addrLen = 0;
	_descriptor = -1;
	_isSending = false;
	init(
		value._domain, value._hostname, value._port, value._type
		, value._protocol
	);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x40c656
leaq 0x235b64(%rip), %rax    # 0x643628
movq %rax, (%rbx)
leaq 0x58(%rbx), %r14
movq %r14, %rdi
callq 0x40c8e2
movl 0x40(%r15), %eax
movl %eax, 0x40(%rbx)
movq 0x38(%r15), %rax
movq %rax, 0x38(%rbx)
orl $-0x1, 0x54(%rbx)
leaq 0x58(%r15), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x40cbf6
movq 0xb0(%r15), %rax
movq %rax, 0xb0(%rbx)
movl $0xc350, 0xbc(%rbx)     # imm = 0xC350
movq $0x400, 0xc0(%rbx) # imm = 0x400
movw $0x1, 0xb8(%rbx)
andq $0x0, 0x48(%rbx)
andl $0x0, 0x50(%rbx)
orl $-0x1, 0x34(%rbx)
movl 0x38(%r15), %ebp
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x40cb38
movq 0xb0(%r15), %rcx
movl 0x3c(%r15), %r9d
movl 0x40(%r15), %r8d
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x40d90e
leaq 0x8(%rsp), %rdi
callq 0x4050e8
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x4050e8
jmp 0x40db8b
movq %rax, %r15
jmp 0x40db93
movq %rax, %r15
movq %r14, %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x40c544
movq %r15, %rdi
callq 0x4ca950
nop
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/Socket.cpp
// Function: u::Socket::destructor()
void u::Socket::destructor()
{
	if(isConnected()) close();
	lock();

	if(_neverUsed && _descriptor != -1)
	{
		::shutdown(_descriptor, SHUT_RDWR);
		::close(_descriptor);
	}

	switch(_domain)
	{
		case AF_UNIX:
		{
			delete ((struct sockaddr_un *)_addr);
		} break;
		default:
		{
			delete ((struct sockaddr_in *)_addr);
		} break;
	}
	unlock();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x40dc34
testb %al, %al
je 0x40dbe7
movq %rbx, %rdi
callq 0x40dc58
movq %rbx, %rdi
callq 0x40c442
cmpb $0x1, 0xb8(%rbx)
jne 0x40dc10
movl 0x34(%rbx), %edi
cmpl $-0x1, %edi
je 0x40dc10
pushq $0x2
popq %rsi
callq 0x55a240
movl 0x34(%rbx), %edi
callq 0x556f50
cmpl $0x1, 0x38(%rbx)
movq 0x48(%rbx), %rdi
pushq $0x6e
popq %rax
pushq $0x10
popq %rsi
cmoveq %rax, %rsi
callq 0x41fb60
movq %rbx, %rdi
popq %rbx
jmp 0x40c3fe
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/Socket.cpp
// Function: u::Socket::isConnected()
bool u::Socket::isConnected()
{
	lock();
	bool result = _con != -1;
	unlock();
	return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x40c442
cmpl $-0x1, 0x54(%rbx)
setne %bpl
movq %rbx, %rdi
callq 0x40c3fe
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/Socket.cpp
// Function: u::Socket::close()
void u::Socket::close()
{
	if(!isConnected()) return;
	lock();
	_neverUsed = false;
	::shutdown(_descriptor, SHUT_RDWR);
	::close(_descriptor);
	_con = -1;
	_descriptor = -1;
	unlock();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x40dc34
testb %al, %al
je 0x40dc98
movq %rbx, %rdi
callq 0x40c442
movb $0x0, 0xb8(%rbx)
movl 0x34(%rbx), %edi
pushq $0x2
popq %rsi
callq 0x55a240
movl 0x34(%rbx), %edi
callq 0x556f50
orl $-0x1, 0x54(%rbx)
orl $-0x1, 0x34(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x40c3fe
popq %rbx
retq