LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Connector.cpp
// Function: beyondy::Async::Connector::onWritable(int)
int Connector::onWritable(int fd)
{
	SYSLOG_DEBUG("connector(%s) is onWritable", address);
	assert(this->fd == fd);

	if (status == CONN_ESTABLISHED) {
		return Connection::onWritable(fd);
	}
	else if (status == CONN_OPENNING) {
			int err = XbsGetError(this->fd);
			if (err != 0) {
				errno = err;
				SYSLOG_ERROR("connect to %s failed: %m", address);
				return -1;
			}

			cntRetryConnect = 0;	// reset it
			status = CONN_ESTABLISHED;
			if (emgr->modifyConnection(this, EVENT_IN, 0) < 0) {
				SYSLOG_ERROR("connector(%s) fd=%d flow=%d add EVENT_IN failed: %m", address, fd, flow);
				return -1;
			}

			SYSLOG_ERROR("connector(%s) establish done: fd=%d flow=%d", address, fd, flow);
			return Connection::onWritable(fd);
	}

	SYSLOG_ERROR("connector %s is writable but in CLOSE state", address);
	return 0; // why here?
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xa131(%rip), %r15      # 0x10528
movq (%r15), %rdi
cmpl $0x5, (%rdi)
jl 0x6417
leaq 0xb8(%rbx), %rcx
leaq 0x4b0f(%rip), %rdx      # 0xaf1c
pushq $0x5
popq %rsi
xorl %eax, %eax
callq 0x6d1a
cmpl %ebp, 0x8(%rbx)
jne 0x6535
movl 0xb4(%rbx), %eax
cmpl $0x1, %eax
je 0x6444
cmpl $0x2, %eax
jne 0x6476
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5d80
movl %ebp, %edi
callq 0x7171
testl %eax, %eax
je 0x64ad
movl %eax, %r14d
callq 0x3060
movl %r14d, (%rax)
movq (%r15), %rdi
pushq $-0x1
popq %r14
cmpl $0x2, (%rdi)
jl 0x649f
addq $0xb8, %rbx
leaq 0x4b09(%rip), %rdx      # 0xaf7d
jmp 0x6492
movq (%r15), %rdi
xorl %r14d, %r14d
cmpl $0x2, (%rdi)
jl 0x649f
addq $0xb8, %rbx
leaq 0x4b67(%rip), %rdx      # 0xaff6
xorl %r14d, %r14d
pushq $0x2
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6d1a
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0xb0(%rbx)
movq 0x70(%rbx), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x4d26
movq (%r15), %rdi
movl (%rdi), %ecx
testl %eax, %eax
js 0x6505
cmpl $0x2, %ecx
jl 0x6430
leaq 0xb8(%rbx), %rcx
movl 0x10(%rbx), %r9d
leaq 0x4ad7(%rip), %rdx      # 0xafca
pushq $0x2
popq %rsi
movl %ebp, %r8d
xorl %eax, %eax
callq 0x6d1a
jmp 0x6430
pushq $-0x1
popq %r14
cmpl $0x2, %ecx
jl 0x649f
movl 0x10(%rbx), %r9d
addq $0xb8, %rbx
leaq 0x4a76(%rip), %rdx      # 0xaf96
pushq $0x2
popq %rsi
movq %rbx, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x6d1a
jmp 0x649f
leaq 0x431c(%rip), %rdi      # 0xa858
leaq 0x49f5(%rip), %rsi      # 0xaf38
leaq 0x49fc(%rip), %rcx      # 0xaf46
pushq $0x21
popq %rdx
callq 0x3200
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Connector.cpp
// Function: beyondy::Async::Connector::open()
int Connector::open()
{
	fd = XbsClient(address, O_NONBLOCK, 0);
	if (++cntRetryConnect >= 5) cntRetryConnect = 0;

	if (fd >= 0) {
		if (errno == EINPROGRESS) {
			events = EVENT_OUT;
			status = CONN_OPENNING;
		}
		else {
			cntRetryConnect = 0;
			events = EVENT_IN;
			status = CONN_ESTABLISHED;
		}
	} 
	else {
		return -1;
	}

	SYSLOG_DEBUG("connector(%s) open OK, fd=%d flow=%d, status=%d", address, fd, flow, (int)status);
	int retval = emgr->addConnection(this, events);
	if (retval < 0) {
		// TODO: 
		::close(fd); fd = -1;
		status = CONN_CLOSE;

		SYSLOG_ERROR("connector(%s) addConnection got error: %m", address);
		return retval;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xb8(%rdi), %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
callq 0x7517
movl %eax, %ebp
movl %eax, 0x8(%r14)
movl 0xb0(%r14), %eax
leal 0x1(%rax), %ecx
cmpl $0x4, %eax
cmovgel %r15d, %ecx
movl %ecx, 0xb0(%r14)
testl %ebp, %ebp
js 0x65a8
callq 0x3060
cmpl $0x73, (%rax)
jne 0x65b0
pushq $0x1
popq %rax
pushq $0x4
jmp 0x65bd
pushq $-0x1
popq %rax
jmp 0x6642
andl $0x0, 0xb0(%r14)
pushq $0x2
popq %rax
pushq $0x1
popq %rdx
movl %edx, 0xc(%r14)
movl %eax, 0xb4(%r14)
leaq 0x9f58(%rip), %r15      # 0x10528
movq (%r15), %rdi
cmpl $0x5, (%rdi)
jl 0x65fa
movl 0x10(%r14), %r9d
movl %eax, (%rsp)
leaq 0x4a3c(%rip), %rdx      # 0xb022
pushq $0x5
popq %rsi
movq %rbx, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x6d1a
movl 0xc(%r14), %edx
movq 0x70(%r14), %rdi
movq %r14, %rsi
callq 0x4c92
movl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
jns 0x6642
movl 0x8(%r14), %edi
callq 0x3660
orl $-0x1, 0x8(%r14)
andl $0x0, 0xb4(%r14)
movq (%r15), %rdi
cmpl $0x2, (%rdi)
jl 0x6640
leaq 0x4a1f(%rip), %rdx      # 0xb052
pushq $0x2
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6d1a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Connector.cpp
// Function: beyondy::Async::Connector::destroy()
int Connector::destroy()
{
	SYSLOG_ERROR("connector(%s) is cleared, outQ-size=%ld", address, (long)((outMsg == NULL ? 0 : 1) + outQueue->size()));

	if (inMsg != NULL) {
		Message::destroy(inMsg);
		inMsg = NULL;
	}

	if (outMsg != NULL) {
		outMsg->setRptr(0);	// reset it and re-send next time
		outQueue->push_front(outMsg);
		outMsg = NULL;
	}

	// keep other message in the queue
	// Need check timeout in the main-loop

	// DO NOT UNMAP FLOW
	emgr->deleteConnection(this);

	::close(fd); fd = -1;
	status = CONN_CLOSE;

	// re-connect sometime later
	gettimeofday(&tsLastClosed, NULL);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9ec8(%rip), %rax      # 0x10528
movq (%rax), %r14
cmpl $0x2, (%r14)
jl 0x669f
leaq 0xb8(%rbx), %r15
movq 0x60(%rbx), %r12
movq 0x68(%rbx), %rdi
callq 0x5676
cmpq $0x1, %r12
sbbq $-0x1, %rax
leaq 0x49f0(%rip), %rdx      # 0xb07c
pushq $0x2
popq %rsi
movq %r14, %rdi
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x6d1a
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x66b2
callq 0x6fc6
andq $0x0, 0x50(%rbx)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x66d2
leaq 0x60(%rbx), %rsi
andq $0x0, 0x8(%rax)
movq 0x68(%rbx), %rdi
callq 0x68a6
andq $0x0, 0x60(%rbx)
movq 0x70(%rbx), %rdi
movq %rbx, %rsi
callq 0x4db8
movl 0x8(%rbx), %edi
callq 0x3660
orl $-0x1, 0x8(%rbx)
andl $0x0, 0xb4(%rbx)
addq $0xa0, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x35a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Connector.cpp
// Function: beyondy::Async::Connector::sendMessage(beyondy::Async::Message*)
int Connector::sendMessage(Message *msg)
{
	if (status == CONN_CLOSE) {
		if (open() < 0) {
			SYSLOG_WARN("when sendMessage, open connector to %s failed", address);
			return -1;
		}

		SYSLOG_DEBUG("connector(%s) open OK when sendMessage", address);
	}

	if (status == CONN_OPENNING) {
		if (outQueue->size() >= (size_t)emgr->getConnectionOutQueueSize()) {
			SYSLOG_ERROR("connector fd=%d flow=%d sendMessge over-flow, out-queue-size=%ld", fd, flow, (long)outQueue->size());
			proc->onSent(msg, SS_QUEUE_FULL);
		}
		else {
			SYSLOG_DEBUG("connector(%s) is openning when sendMessage", address);
			outQueue->push_back(msg);
		}

		return 0;
	}

	assert(status == CONN_ESTABLISHED);
	SYSLOG_DEBUG("connector(%s) is established when sendMessage", address);

	return Connection::sendMessage(msg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movl 0xb4(%rdi), %eax
testl %eax, %eax
jne 0x6770
movq %rbx, %rdi
callq 0x6552
leaq 0x9de8(%rip), %rcx      # 0x10528
movq (%rcx), %rdi
movl (%rdi), %ecx
testl %eax, %eax
js 0x6861
cmpl $0x5, %ecx
jl 0x676a
leaq 0xb8(%rbx), %rcx
leaq 0x4972(%rip), %rdx      # 0xb0d2
pushq $0x5
popq %rsi
xorl %eax, %eax
callq 0x6d1a
movl 0xb4(%rbx), %eax
cmpl $0x2, %eax
je 0x67d1
cmpl $0x1, %eax
jne 0x6886
movq 0x68(%rbx), %rdi
callq 0x5676
movq 0x70(%rbx), %rcx
movslq 0x64(%rcx), %rdx
leaq 0x9d92(%rip), %rcx      # 0x10528
movq (%rcx), %r15
movl (%r15), %ecx
cmpq %rdx, %rax
jae 0x680f
cmpl $0x5, %ecx
jl 0x67c1
leaq 0xb8(%rbx), %rcx
leaq 0x4986(%rip), %rdx      # 0xb13a
pushq $0x5
popq %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x6d1a
movq 0x68(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x56be
jmp 0x6850
leaq 0x9d50(%rip), %rax      # 0x10528
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x67f8
leaq 0xb8(%rbx), %rcx
leaq 0x49d0(%rip), %rdx      # 0xb1be
pushq $0x5
popq %rsi
xorl %eax, %eax
callq 0x6d1a
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x601c
cmpl $0x2, %ecx
jl 0x6840
movl 0x8(%rbx), %ebp
movl 0x10(%rbx), %r12d
movq 0x68(%rbx), %rdi
callq 0x5676
leaq 0x48ce(%rip), %rdx      # 0xb0f9
pushq $0x2
popq %rsi
movq %r15, %rdi
movl %ebp, %ecx
movl %r12d, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x6d1a
movq 0x78(%rbx), %rdi
movq (%rdi), %rax
pushq $0x3
popq %rdx
movq %r14, %rsi
callq *0x38(%rax)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rbp
cmpl $0x3, %ecx
jl 0x6852
addq $0xb8, %rbx
leaq 0x482d(%rip), %rdx      # 0xb0a4
pushq $0x3
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6d1a
jmp 0x6852
leaq 0x48d8(%rip), %rdi      # 0xb165
leaq 0x46a4(%rip), %rsi      # 0xaf38
leaq 0x48e5(%rip), %rcx      # 0xb180
movl $0x95, %edx
callq 0x3200
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Listener.cpp
// Function: beyondy::Async::Listener::onReadable(int)
int Listener::onReadable(int fd) {
	assert(this->fd == fd);

	int cfd = ::accept(fd, NULL, NULL);
	if (cfd < 0) {
		SYSLOG_WARN("listener(%s) accept failed: %m", address);
		return 0; // ignore
	}

	char peerName[128];
	if (beyondy::XbsGetPeername(cfd, peerName, sizeof(peerName)) < 0) {
		::close(cfd);
		SYSLOG_ERROR("listener(%s) new accepted fd=%d can not get peer name: %m", address, cfd);
		return 0; /* ignore (this is usually caused by peer closed immediately */
	}

	beyondy::XbsSetFlags(cfd, O_NONBLOCK, 0);
	if (connActive >= connMax) {
		::close(fd);
		SYSLOG_ERROR("listener(%s) reject connection from %s for overflow limit %d", address, peerName, connActive);
		return 0; // ignore
	}

	SYSLOG_DEBUG("listener(%s) accepted a connection: fd=%d peer=%s", address, cfd, peerName);
	Connection *connection = createConnection(cfd);
	if (connection == NULL) {
		::close(fd);
		SYSLOG_ERROR("listener(%s) failed to create connection from %s", address, peerName);
		return 0; // ignore
	}

	++connActive;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
cmpl %esi, 0x8(%rdi)
jne 0x6b30
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30e0
testl %eax, %eax
js 0x6a8b
movl %eax, %ebp
movq %rsp, %rsi
movl $0x80, %edx
movl %eax, %edi
callq 0x71ec
movl %ebp, %edi
testl %eax, %eax
js 0x6ab8
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
callq 0x72ee
movl 0x90(%rbx), %eax
cmpl 0x94(%rbx), %eax
jge 0x6ae9
leaq 0x9ad5(%rip), %rax      # 0x10528
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x6a76
leaq 0x10(%rbx), %rcx
leaq 0x487a(%rip), %rdx      # 0xb2e0
pushq $0x5
popq %rsi
movq %rsp, %r9
movl %ebp, %r8d
xorl %eax, %eax
callq 0x6d1a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6b4e
incl 0x90(%rbx)
jmp 0x6b22
leaq 0x9a96(%rip), %rax      # 0x10528
movq (%rax), %rdi
cmpl $0x3, (%rdi)
jl 0x6b22
addq $0x10, %rbx
leaq 0x47a1(%rip), %rdx      # 0xb24a
pushq $0x3
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6d1a
jmp 0x6b22
callq 0x3660
leaq 0x9a64(%rip), %rax      # 0x10528
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x6b22
addq $0x10, %rbx
leaq 0x4792(%rip), %rdx      # 0xb269
pushq $0x2
popq %rsi
movq %rbx, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x6d1a
jmp 0x6b22
movl %r14d, %edi
callq 0x3660
leaq 0x9a30(%rip), %rax      # 0x10528
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x6b22
movl 0x90(%rbx), %r9d
addq $0x10, %rbx
leaq 0x4791(%rip), %rdx      # 0xb2a3
pushq $0x2
popq %rsi
movq %rsp, %r8
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6d1a
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3d21(%rip), %rdi      # 0xa858
leaq 0x46c9(%rip), %rsi      # 0xb207
leaq 0x46cf(%rip), %rcx      # 0xb214
pushq $0x1f
popq %rdx
callq 0x3200
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Listener.cpp
// Function: beyondy::Async::Listener::createConnection(int)
Connection *Listener::createConnection(int cfd) 
{
	int flow = emgr->nextFlow();
	
	Connection *connection = new Connection(cfd, flow, emgr, inQueue, proc, CT_LISTENER, static_cast<void *>(this));
	if (connection != NULL) {
		emgr->mapFlow(flow, connection);
		emgr->addConnection(connection, EVENT_IN);
	}
	else {
		SYSLOG_ERROR("listener(%s) new Connection failed: %m", address);
	}
	
	return connection;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
movq 0x98(%rdi), %rdi
callq 0x4bf6
movl %eax, %ebp
movl $0x90, %edi
callq 0x3340
movq %rax, %rbx
movq 0x98(%r14), %rcx
movq 0xa0(%r14), %r8
movq 0xa8(%r14), %r9
movq %rax, %rdi
movl %r15d, %esi
movl %ebp, %edx
pushq %r14
pushq $0x0
callq 0x58ac
popq %rax
popq %rcx
movq 0x98(%r14), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x4c00
movq 0x98(%r14), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x4c92
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x90, %esi
movq %rbx, %rdi
callq 0x3350
movq %r14, %rdi
callq 0x3600
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Listener.cpp
// Function: beyondy::Async::Listener::destroyConnection(beyondy::Async::Connection*)
void Listener::destroyConnection(Connection *connection) 
{
	SYSLOG_INFO("listener(%s) close its connection: fd=%d, flow=%d", address, connection->fd, connection->flow);

	emgr->unmapFlow(connection);
	emgr->deleteConnection(connection);
	::close(connection->fd);

	--connActive;
	delete connection;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x98f3(%rip), %rax      # 0x10528
movq (%rax), %rdi
cmpl $0x4, (%rdi)
jl 0x6c5a
leaq 0x10(%r14), %rcx
movl 0x8(%rbx), %r8d
movl 0x10(%rbx), %r9d
leaq 0x472b(%rip), %rdx      # 0xb37b
pushq $0x4
popq %rsi
xorl %eax, %eax
callq 0x6d1a
movq 0x98(%r14), %rdi
movq %rbx, %rsi
callq 0x4eb6
movq 0x98(%r14), %rdi
movq %rbx, %rsi
callq 0x4db8
movl 0x8(%rbx), %edi
callq 0x3660
decl 0x90(%r14)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x8(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/main/Listener.cpp
// Function: beyondy::Async::Listener::open()
int Listener::open()
{
	fd = XbsServer(address, 1024, O_NONBLOCK);
	if (fd < 0) {
		SYSLOG_ERROR("listener(%s) open failed: %m", address);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x400, %esi            # imm = 0x400
movl $0x800, %edx            # imm = 0x800
callq 0x7456
movl %eax, 0x8(%r14)
xorl %ebp, %ebp
testl %eax, %eax
jns 0x6ce8
leaq 0x985f(%rip), %rax      # 0x10528
movq (%rax), %rdi
pushq $-0x1
popq %rbp
cmpl $0x2, (%rdi)
jl 0x6ce8
leaq 0x46d2(%rip), %rdx      # 0xb3ad
pushq $0x2
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6d1a
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_socket.cpp
// Function: beyondy::XbsConnect(int, sockaddr const*, unsigned int, long)
int XbsConnect(int fd, const struct sockaddr *target, socklen_t alen, long timedout)
{
	int retval = connect(fd, target, alen);
	if (retval == -1) {
		if (timedout < 1)
			return 0;	// with errno

		if (errno == EINPROGRESS) {
			if (XbsWaitWritable(fd, timedout) < 0) {
				return -1;
			}

			if ((retval = XbsGetError(fd)) != 0) {
				errno = retval;
				return -1;
			}

			errno = 0;	// clear errno
			return 0;
		}
		else {
			return -1;
		}
	}
	
	errno = 0;	// clear errno
	return 0;	// good?!
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edi, %ebp
callq 0x32c0
cmpl $-0x1, %eax
je 0x7136
callq 0x3060
andl $0x0, (%rax)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
testq %r14, %r14
jle 0x7129
callq 0x3060
pushq $-0x1
popq %rbx
cmpl $0x73, (%rax)
jne 0x7129
movq %rax, %r15
movl %ebp, %edi
movq %r14, %rsi
callq 0x8d31
testl %eax, %eax
js 0x7129
movl %ebp, %edi
callq 0x7171
testl %eax, %eax
je 0x716b
movl %eax, (%r15)
jmp 0x7129
andl $0x0, (%r15)
jmp 0x7127
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_socket.cpp
// Function: beyondy::XbsGetPeername(int, char*, unsigned long)
int XbsGetPeername(int fd, char *nbuf, size_t size)
{
	struct sockaddr_storage addr_buf;
	int type = 0;
	socklen_t addr_len = sizeof(addr_buf);
	socklen_t tlen = sizeof(type);

	if (getpeername(fd, (struct sockaddr *)&addr_buf, &addr_len) < 0) return -1;
	if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &tlen) < 0) return -1;

	return sockaddr2str((struct sockaddr *)&addr_buf, type, nbuf, size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbx
movq %rsi, %r14
andl $0x0, 0xc(%rsp)
movl %edi, %r15d
leaq 0x14(%rsp), %rdx
movl $0x80, (%rdx)
movl $0x4, 0x10(%rsp)
leaq 0x18(%rsp), %rsi
callq 0x3240
pushq $-0x1
popq %rbp
testl %eax, %eax
js 0x725d
pushq $0x1
popq %rsi
pushq $0x3
popq %rdx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
movl %r15d, %edi
callq 0x3260
testl %eax, %eax
js 0x725d
movl 0xc(%rsp), %esi
leaq 0x18(%rsp), %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x8bb6
movl %eax, %ebp
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_socket.cpp
// Function: beyondy::XbsGetLocalname(int, char*, unsigned long)
int XbsGetLocalname(int fd, char *nbuf, size_t size)
{
	struct sockaddr_storage addr_buf;
	int type = 0;
	socklen_t addr_len = sizeof(addr_buf);
	socklen_t tlen = sizeof(type);

	if (getsockname(fd, (struct sockaddr *)&addr_buf, &addr_len) < 0) return -1;
	if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &tlen) < 0) return -1;

	return sockaddr2str((struct sockaddr *)&addr_buf, type, nbuf, size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbx
movq %rsi, %r14
andl $0x0, 0xc(%rsp)
movl %edi, %r15d
leaq 0x14(%rsp), %rdx
movl $0x80, (%rdx)
movl $0x4, 0x10(%rsp)
leaq 0x18(%rsp), %rsi
callq 0x3300
pushq $-0x1
popq %rbp
testl %eax, %eax
js 0x72de
pushq $0x1
popq %rsi
pushq $0x3
popq %rdx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
movl %r15d, %edi
callq 0x3260
testl %eax, %eax
js 0x72de
movl 0xc(%rsp), %esi
leaq 0x18(%rsp), %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x8bb6
movl %eax, %ebp
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_socket.cpp
// Function: beyondy::XbsServer(char const*, int, int, int)
int XbsServer(const char *address, int backlog, int flags, int reuse)
{
	struct sockaddr_storage addr_buf;
	socklen_t addr_len = sizeof(addr_buf);
	int type;
	int fd;

	if (str2sockaddr(address, &type, (struct sockaddr *)&addr_buf, &addr_len, 1) < 0) goto error_out;
	if ((fd = XbsSocket(addr_buf.ss_family, type, 0)) < 0) goto error_out;
	if (flags && XbsSetFlags(fd, flags, 0) < 0) goto error_close;
	if (XbsSetReuse(fd, reuse) < 0) goto error_close;
	if (bind(fd, (struct sockaddr *)&addr_buf, addr_len) < 0) goto error_close;
	if (type == SOCK_STREAM && listen(fd, backlog) < 0) goto error_close;
	return fd;
error_close:
	close(fd);
error_out:
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %ebp
leaq 0xc(%rsp), %rcx
movl $0x80, (%rcx)
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
pushq $0x1
popq %r8
callq 0x89bc
pushq $-0x1
popq %rbx
testl %eax, %eax
js 0x7505
movzwl 0x10(%rsp), %edi
movl 0x8(%rsp), %esi
xorl %edx, %edx
callq 0x30b0
testl %eax, %eax
js 0x7505
movl %eax, %r14d
testl %r12d, %r12d
je 0x74bf
movl %r14d, %edi
movl %r12d, %esi
xorl %edx, %edx
callq 0x72ee
testl %eax, %eax
js 0x74fd
movl %r14d, %edi
movl %r15d, %esi
callq 0x731c
testl %eax, %eax
js 0x74fd
movl 0xc(%rsp), %edx
leaq 0x10(%rsp), %rsi
movl %r14d, %edi
callq 0x3080
testl %eax, %eax
js 0x74fd
cmpl $0x1, 0x8(%rsp)
jne 0x74f8
movl %r14d, %edi
movl %ebp, %esi
callq 0x33d0
testl %eax, %eax
js 0x74fd
movl %r14d, %ebx
jmp 0x7505
movl %r14d, %edi
callq 0x3660
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_socket.cpp
// Function: beyondy::XbsClient(char const*, int, long)
int XbsClient(const char *address, int flags, long timedout)
{
	struct sockaddr_storage addr_buf;
	socklen_t addr_len = sizeof(addr_buf);
	int type;
	int fd;

	if (str2sockaddr(address, &type, (struct sockaddr *)&addr_buf, &addr_len, 1) < 1) goto error_out;
	if ((fd = XbsSocket(addr_buf.ss_family, type, 0)) < 0) goto error_out;
	if (flags && XbsSetFlags(fd, flags, 0) < 0) goto error_close;
	if (XbsConnect(fd, (struct sockaddr *)&addr_buf, addr_len, timedout) < 0) goto error_close;
	return fd;
error_close:
	close(fd);
error_out:
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movl %esi, %ebp
leaq 0x4(%rsp), %rcx
movl $0x80, (%rcx)
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
pushq $0x1
popq %r8
callq 0x89bc
pushq $-0x1
popq %rbx
testl %eax, %eax
jle 0x759b
movzwl 0x8(%rsp), %edi
movl (%rsp), %esi
xorl %edx, %edx
callq 0x30b0
testl %eax, %eax
js 0x759b
movl %eax, %r15d
testl %ebp, %ebp
je 0x7576
movl %r15d, %edi
movl %ebp, %esi
xorl %edx, %edx
callq 0x72ee
testl %eax, %eax
js 0x7593
movl 0x4(%rsp), %edx
leaq 0x8(%rsp), %rsi
movl %r15d, %edi
movq %r14, %rcx
callq 0x7109
testl %eax, %eax
js 0x7593
movl %r15d, %ebx
jmp 0x759b
movl %r15d, %edi
callq 0x3660
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/rbtree.c
// Function: rb_insert_color
void rb_insert_color(struct rb_node *node, struct rb_root *root)
{
	struct rb_node *parent, *gparent;

	while ((parent = rb_parent(node)) && rb_is_red(parent))
	{
		gparent = rb_parent(parent);

		if (parent == gparent->rb_left)
		{
			{
				register struct rb_node *uncle = gparent->rb_right;
				if (uncle && rb_is_red(uncle))
				{
					rb_set_black(uncle);
					rb_set_black(parent);
					rb_set_red(gparent);
					node = gparent;
					continue;
				}
			}

			if (parent->rb_right == node)
			{
				register struct rb_node *tmp;
				__rb_rotate_left(parent, root);
				tmp = parent;
				parent = node;
				node = tmp;
			}

			rb_set_black(parent);
			rb_set_red(gparent);
			__rb_rotate_right(gparent, root);
		} else {
			{
				register struct rb_node *uncle = gparent->rb_left;
				if (uncle && rb_is_red(uncle))
				{
					rb_set_black(uncle);
					rb_set_black(parent);
					rb_set_red(gparent);
					node = gparent;
					continue;
				}
			}

			if (parent->rb_left == node)
			{
				register struct rb_node *tmp;
				__rb_rotate_right(parent, root);
				tmp = parent;
				parent = node;
				node = tmp;
			}

			rb_set_black(parent);
			rb_set_red(gparent);
			__rb_rotate_left(gparent, root);
		}
	}

	rb_set_black(root->rb_node);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
andq $-0x4, %rdi
je 0x767d
movq (%rdi), %rax
testb $0x1, %al
jne 0x767d
movq %rax, %r15
andq $-0x4, %r15
movq 0x10(%r15), %rcx
cmpq %rdi, %rcx
je 0x7621
testq %rcx, %rcx
je 0x75ef
movq (%rcx), %rdx
testb $0x1, %dl
je 0x7632
cmpq %r14, 0x10(%rdi)
jne 0x7609
movq %rdi, %r12
movq %rbx, %rsi
callq 0x76ea
movq (%r14), %rax
movq %r14, %rdi
movq %r12, %r14
orq $0x1, %rax
movq %rax, (%rdi)
andb $-0x2, (%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7690
jmp 0x75ba
movq 0x8(%r15), %rcx
testq %rcx, %rcx
je 0x7648
movq (%rcx), %rdx
testb $0x1, %dl
jne 0x7648
orq $0x1, %rdx
movq %rdx, (%rcx)
orb $0x1, (%rdi)
andb $-0x2, (%r15)
movq %r15, %r14
jmp 0x75ba
cmpq %r14, 0x8(%rdi)
jne 0x7662
movq %rdi, %r12
movq %rbx, %rsi
callq 0x7690
movq (%r14), %rax
movq %r14, %rdi
movq %r12, %r14
orq $0x1, %rax
movq %rax, (%rdi)
andb $-0x2, (%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x76ea
jmp 0x75ba
movq (%rbx), %rax
orq $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/rbtree.c
// Function: _rb_rotate_left
static void __rb_rotate_left(struct rb_node *node, struct rb_root *root)
{
	struct rb_node *right = node->rb_right;
	struct rb_node *parent = rb_parent(node);

	if ((node->rb_right = right->rb_left))
		rb_set_parent(right->rb_left, node);
	right->rb_left = node;

	rb_set_parent(right, parent);

	if (parent)
	{
		if (node == parent->rb_left)
			parent->rb_left = right;
		else
			parent->rb_right = right;
	}
	else
		root->rb_node = right;
	rb_set_parent(node, right);
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
andq $-0x4, %rcx
movq 0x10(%rax), %rdx
movq %rdx, 0x8(%rdi)
testq %rdx, %rdx
je 0x76b5
movq (%rdx), %r8
andl $0x3, %r8d
orq %rdi, %r8
movq %r8, (%rdx)
movq %rdi, 0x10(%rax)
movq (%rax), %rdx
andl $0x3, %edx
orq %rcx, %rdx
movq %rdx, (%rax)
testq %rcx, %rcx
je 0x76da
leaq 0x10(%rcx), %rdx
leaq 0x8(%rcx), %rsi
cmpq %rdi, 0x10(%rcx)
cmoveq %rdx, %rsi
movq %rax, (%rsi)
movq (%rdi), %rcx
andl $0x3, %ecx
orq %rax, %rcx
movq %rcx, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/rbtree.c
// Function: _rb_rotate_right
static void __rb_rotate_right(struct rb_node *node, struct rb_root *root)
{
	struct rb_node *left = node->rb_left;
	struct rb_node *parent = rb_parent(node);

	if ((node->rb_left = left->rb_right))
		rb_set_parent(left->rb_right, node);
	left->rb_right = node;

	rb_set_parent(left, parent);

	if (parent)
	{
		if (node == parent->rb_right)
			parent->rb_right = left;
		else
			parent->rb_left = left;
	}
	else
		root->rb_node = left;
	rb_set_parent(node, left);
}

// Assembly:
movq (%rdi), %rcx
movq 0x10(%rdi), %rax
andq $-0x4, %rcx
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rdi)
testq %rdx, %rdx
je 0x770f
movq (%rdx), %r8
andl $0x3, %r8d
orq %rdi, %r8
movq %r8, (%rdx)
movq %rdi, 0x8(%rax)
movq (%rax), %rdx
andl $0x3, %edx
orq %rcx, %rdx
movq %rdx, (%rax)
testq %rcx, %rcx
je 0x7734
leaq 0x8(%rcx), %rdx
leaq 0x10(%rcx), %rsi
cmpq %rdi, 0x8(%rcx)
cmoveq %rdx, %rsi
movq %rax, (%rsi)
movq (%rdi), %rcx
andl $0x3, %ecx
orq %rax, %rcx
movq %rcx, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/rbtree.c
// Function: rb_replace_node
void rb_replace_node(struct rb_node *victim, struct rb_node *newn,
		     struct rb_root *root)
{
	struct rb_node *parent = rb_parent(victim);

	/* Set the surrounding nodes to point to the replacement */
	if (parent) {
		if (victim == parent->rb_left)
			parent->rb_left = newn;
		else
			parent->rb_right = newn;
	} else {
		root->rb_node = newn;
	}
	if (victim->rb_left)
		rb_set_parent(victim->rb_left, newn);
	if (victim->rb_right)
		rb_set_parent(victim->rb_right, newn);

	/* Copy the pointers/colour from the victim to the replacement */
	*newn = *victim;
}

// Assembly:
movq (%rdi), %rax
andq $-0x4, %rax
je 0x7a6d
leaq 0x10(%rax), %rcx
leaq 0x8(%rax), %rdx
cmpq %rdi, 0x10(%rax)
cmoveq %rcx, %rdx
movq %rsi, (%rdx)
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x7a85
movq (%rax), %rcx
andl $0x3, %ecx
orq %rsi, %rcx
movq %rcx, (%rax)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x7a9a
movq (%rax), %rcx
andl $0x3, %ecx
orq %rsi, %rcx
movq %rcx, (%rax)
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsi)
movups (%rdi), %xmm0
movups %xmm0, (%rsi)
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/ConfigProperty.cpp
// Function: ConfigProperty::getInt(char const*, int) const
int ConfigProperty::getInt(const char *name, int def) const
{
	const char *val = getString(name, NULL);
	if (val == NULL || strlen(val) == 0) return def;

	char *eptr;
	int v = strtol(val, &eptr, 0);
	if (eptr == val) {
		// invalid number
		if (!strcasecmp(val, "true")  || !strcasecmp(val, "yes") || !strcasecmp(val, "t")  || !strcasecmp(val, "y"))
			return 1;
		if (!strcasecmp(val, "false") || !strcasecmp(val, "no") || !strcasecmp(val, "f") || !strcasecmp(val, "n"))
			return 0;
		return def;
	}

	if (*eptr == 'k' || *eptr == 'K') v *= 1024;
	else if (*eptr == 'm' || *eptr == 'M') v *= 1024 * 1024;
	else if (*eptr == 'g' || *eptr == 'G') v *= 1024 * 1024 * 1024;
	/* ignore others */

	return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
xorl %edx, %edx
callq 0x7dcc
testq %rax, %rax
je 0x7fdc
movq %rax, %r15
cmpb $0x0, (%rax)
je 0x7fdc
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3500
movq %rax, %r14
movq (%r12), %rax
cmpq %r15, %rax
je 0x7f22
movzbl (%rax), %eax
addl $-0x47, %eax
cmpl $0x26, %eax
ja 0x7fd9
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rax, %rcx
jb 0x7fd5
movabsq $0x1000000010, %rcx     # imm = 0x1000000010
btq %rax, %rcx
jb 0x7fcf
movabsq $0x4000000040, %rcx     # imm = 0x4000000040
btq %rax, %rcx
jae 0x7fd9
shll $0x14, %r14d
jmp 0x7fd9
leaq 0x351b(%rip), %rsi      # 0xb444
movq %r15, %rdi
callq 0x3390
pushq $0x1
popq %r14
testl %eax, %eax
je 0x7fd9
leaq 0x3505(%rip), %rsi      # 0xb449
movq %r15, %rdi
callq 0x3390
testl %eax, %eax
je 0x7fd9
leaq 0x27c8(%rip), %rsi      # 0xa723
movq %r15, %rdi
callq 0x3390
testl %eax, %eax
je 0x7fd9
leaq 0x2438(%rip), %rsi      # 0xa3a6
movq %r15, %rdi
callq 0x3390
testl %eax, %eax
je 0x7fd9
leaq 0x34cc(%rip), %rsi      # 0xb44d
movq %r15, %rdi
callq 0x3390
xorl %r14d, %r14d
testl %eax, %eax
je 0x7fd9
leaq 0x34bc(%rip), %rsi      # 0xb453
movq %r15, %rdi
callq 0x3390
testl %eax, %eax
je 0x7fd9
leaq 0x217f(%rip), %rsi      # 0xa129
movq %r15, %rdi
callq 0x3390
testl %eax, %eax
je 0x7fd9
leaq 0x230e(%rip), %rsi      # 0xa2cb
movq %r15, %rdi
callq 0x3390
testl %eax, %eax
cmovel %eax, %ebx
movl %ebx, %r14d
jmp 0x7fd9
shll $0xa, %r14d
jmp 0x7fd9
shll $0x1e, %r14d
movl %r14d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/ConfigProperty.cpp
// Function: ConfigProperty::getChildren[abi:cxx11](char const*) const
std::set<std::string> ConfigProperty::getChildren(const char *name) const
{
	std::set<std::string> result;

	char prefix[CP_NAME_MAX];
	snprintf(prefix, sizeof prefix, "%s.", name);
	prefix[sizeof(prefix) - 1] = 0;

	int nlen = strlen(prefix);
	const_iterator first = properties.lower_bound(std::string(prefix));

	snprintf(prefix, sizeof prefix, "%s/", name);
	prefix[sizeof(prefix) - 1] = 0;
	const_iterator end = properties.upper_bound(std::string(prefix));

	for (const_iterator iter = first; iter != end; ++iter) {
		std::size_t dot = iter->first.find_first_of('.', nlen);
		if (dot != std::string::npos) {
			// after {name}. and next DOT
			result.insert(iter->first.substr(nlen, dot - nlen));
		}
	}

	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdx, %r13
movq %rsi, %r15
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rdi, 0x8(%rsp)
andq $0x0, 0x28(%rdi)
leaq 0x3353(%rip), %rdx      # 0xb456
leaq 0x30(%rsp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x3590
movb $0x0, 0xff(%rbx)
movq %rbx, %rdi
callq 0x3140
movq %rax, %r12
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rbx, %rsi
callq 0x4168
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x84f2
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3150
leaq 0x32fb(%rip), %rdx      # 0xb45a
leaq 0x30(%rsp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x3590
movb $0x0, 0xff(%rbx)
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rbx, %rsi
callq 0x4168
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x8502
movq %rax, %r15
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x3150
movslq %r12d, %r12
pushq $0x2e
popq %rbp
cmpq %r15, %r14
je 0x8204
leaq 0x20(%r14), %rbx
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x3490
cmpq $-0x1, %rax
je 0x81f7
subq %r12, %rax
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x3360
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x854c
movq %r13, %rdi
callq 0x3150
movq %r14, %rdi
callq 0x33e0
movq %rax, %r14
jmp 0x81b2
movq 0x8(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8223
jmp 0x8232
jmp 0x8223
jmp 0x8232
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3150
jmp 0x8235
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x444a
movq %r14, %rdi
callq 0x3600
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_naddr.cpp
// Function: beyondy::sockaddr2str(sockaddr const*, int, char*, unsigned long)
int sockaddr2str(const struct sockaddr *naddr, int type, char *address, size_t addrlen)
{
	if (naddr->sa_family == PF_UNIX || naddr->sa_family == PF_LOCAL) {
		return __unix_naddr2str((struct sockaddr_un *)naddr, type, address, addrlen);
	}
	else if (naddr->sa_family == PF_INET) {
		return __inet_naddr2str((struct sockaddr_in *)naddr, type, address, addrlen);
	}
	else if (naddr->sa_family == PF_INET6) {
		return __inet6_naddr2str((struct sockaddr_in6 *)naddr, type, address, addrlen);
	}

	errno = EAFNOSUPPORT;
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x8c3d
cmpl $0x2, %eax
je 0x8c35
cmpl $0x1, %eax
jne 0x8ca2
cmpl $0x1, %ebp
leaq 0x2871(%rip), %rax      # 0xb45e
leaq 0x2871(%rip), %rcx      # 0xb465
cmoveq %rax, %rcx
addq $0x2, %r15
leaq 0x2869(%rip), %rdx      # 0xb46c
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %r8
xorl %eax, %eax
callq 0x3590
testl %eax, %eax
js 0x8cb9
cmpl %ebx, %eax
setge %al
testq %rbx, %rbx
setne %cl
testb %al, %cl
jne 0x8cbe
jmp 0x8cc4
leaq 0x4(%r15), %rsi
pushq $0x2
jmp 0x8c43
leaq 0x8(%r15), %rsi
pushq $0xa
popq %rdi
movq %rsp, %r12
pushq $0x10
popq %rcx
movq %r12, %rdx
callq 0x3380
cmpl $0x1, %ebp
leaq 0x2802(%rip), %rax      # 0xb45e
leaq 0x2802(%rip), %rcx      # 0xb465
cmoveq %rax, %rcx
movzwl 0x2(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %r9d
leaq 0x27f7(%rip), %rdx      # 0xb472
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r8
xorl %eax, %eax
callq 0x3590
testl %eax, %eax
js 0x8cb2
testq %rbx, %rbx
je 0x8c9e
cmpl %ebx, %eax
jl 0x8c9e
movb $0x0, -0x1(%r14,%rbx)
xorl %ebp, %ebp
jmp 0x8cc4
callq 0x3060
movl $0x61, (%rax)
pushq $-0x1
popq %rbp
jmp 0x8cc4
testq %rbx, %rbx
jne 0x8c98
jmp 0x8c9e
testq %rbx, %rbx
je 0x8cc4
movb $0x0, -0x1(%r14,%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_io.cpp
// Function: beyondy::XbsWaitPollable(int, short, long)
int XbsWaitPollable(int fd, short events, long msTimedout)
{
	struct pollfd pfd = { fd, events, 0 };
	int nfd = poll(&pfd, 1, msTimedout);

	if (nfd < 0) return -1;
	if (nfd == 0) return errno = ETIMEDOUT, -1;
	return pfd.revents;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rax
movl %edi, (%rax)
movw %si, 0x4(%rax)
andw $0x0, 0x6(%rax)
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x3560
pushq $-0x1
popq %rbx
testl %eax, %eax
js 0x8d29
je 0x8d1e
movswl 0xe(%rsp), %ebx
jmp 0x8d29
callq 0x3060
movl $0x6e, (%rax)
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_io.cpp
// Function: beyondy::XbsWriteN(int, void const*, unsigned long, long)
ssize_t XbsWriteN(int fd, const void *buf, size_t size, long msTimedout)
{
	if (size == 0) return 0;

	TimedoutCountdown toCountdown(msTimedout);
	size_t sed = 0;
	ssize_t slen;

	do {
		if (XbsWaitWritable(fd, toCountdown.Update()) < 0) goto out;
		if ((slen = write(fd, (char *)buf + sed, size - sed)) < 0) goto out;
		sed += static_cast<size_t>(slen);
	} while (sed < size);
out:
	return (sed > 0) ? static_cast<ssize_t>(sed) : -1;
}

// Assembly:
testq %rdx, %rdx
je 0x8df7
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rcx, %rsi
callq 0x8fda
xorl %r12d, %r12d
movq %r15, %rdi
xorl %esi, %esi
callq 0x8fe8
movl %ebp, %edi
movq %rax, %rsi
callq 0x8d31
testl %eax, %eax
js 0x8dde
leaq (%r14,%r12), %rsi
movq %rbx, %rdx
subq %r12, %rdx
movl %ebp, %edi
callq 0x30f0
testq %rax, %rax
js 0x8dde
addq %rax, %r12
cmpq %rbx, %r12
jb 0x8da8
xorl %eax, %eax
cmpq $0x1, %r12
sbbq %rax, %rax
orq %r12, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_io.cpp
// Function: beyondy::XbsWriteVN(int, iovec const*, int, long)
ssize_t XbsWriteVN(int fd, const struct iovec *iov, int iovcnt, long msTimedout)
{
	TimedoutCountdown toCountdown(msTimedout);
	size_t sed;
	ssize_t slen;

	sed = XbsWriteV(fd, iov, iovcnt, toCountdown.Update());
	if (sed < 0) return -1;

	int i = 0;
	size_t left = sed;
	while (i < iovcnt) {
		if (iov[i].iov_len > left) {
			break;
		}
		else {
			left -= iov[i].iov_len;
		}

		++i;
	}

	for (const struct iovec *next = &iov[i]; next != &iov[iovcnt]; ++next) {
		slen = XbsWriteN(fd, (char *)next->iov_base + left, next->iov_len - left, toCountdown.Update());
		if (slen < 0) break;
		if (static_cast<size_t>(slen) < (next->iov_len - left)) break;
		sed += static_cast<size_t>(slen);
		left = 0;
	}

	return (sed > 0) ? static_cast<ssize_t>(sed) : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r12d
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rcx, %rsi
callq 0x8fda
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
callq 0x8fe8
movl %ebp, 0xc(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movl %r12d, %edx
movq %rax, %rcx
callq 0x8dfa
movq %rax, %r15
testl %r12d, %r12d
movl $0x0, %eax
cmovgl %r12d, %eax
leaq 0x8(%rbx), %rcx
movq %r15, %r14
cmpq %r13, %rax
je 0x8ea2
movq %r14, %rdx
subq (%rcx), %rdx
jb 0x8e9f
incq %r13
addq $0x10, %rcx
movq %rdx, %r14
jmp 0x8e86
movq %r13, %rax
shlq $0x4, %rax
addq %rax, %rbx
movslq %r12d, %rbp
shlq $0x4, %rbp
subq %rax, %rbp
testq %rbp, %rbp
je 0x8f04
movq (%rbx), %r12
addq %r14, %r12
movq 0x8(%rbx), %r13
subq %r14, %r13
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x8fe8
movl 0xc(%rsp), %edi
movq %r12, %rsi
movq %r13, %rdx
movq %rax, %rcx
callq 0x8d7c
testq %rax, %rax
js 0x8f04
movq 0x8(%rbx), %rcx
subq %r14, %rcx
cmpq %rcx, %rax
jb 0x8f04
addq %rax, %r15
addq $0x10, %rbx
addq $-0x10, %rbp
xorl %r14d, %r14d
jmp 0x8eb3
xorl %eax, %eax
cmpq $0x1, %r15
sbbq %rax, %rax
orq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/xbs_io.cpp
// Function: beyondy::XbsReadN(int, void*, unsigned long, long)
ssize_t XbsReadN(int fd, void *buf, size_t size, long msTimedout)
{
	TimedoutCountdown toCountdown(msTimedout);
	ssize_t red = 0, rlen = -1;

	do {
		if (XbsWaitReadable(fd, toCountdown.Update()) < 0) goto out;
		if ((rlen = read(fd, (char *)buf + red, size - red)) < 1) goto out;
		red += rlen;
	} while (red < (ssize_t)size);
out:
	if (red > 0) {
		return red;
	}
	else if (rlen == 0) {
		return 0;
	}

	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movq %rsp, %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x8fda
xorl %r13d, %r13d
pushq $-0x1
popq %rbx
movq %r12, %rdi
xorl %esi, %esi
callq 0x8fe8
movl %ebp, %edi
movq %rax, %rsi
callq 0x8cd4
testl %eax, %eax
js 0x8fba
leaq (%r15,%r13), %rsi
movq %r14, %rdx
subq %r13, %rdx
movl %ebp, %edi
callq 0x3520
testq %rax, %rax
jle 0x8fb2
addq %rax, %r13
cmpq %r14, %r13
jl 0x8f7a
jmp 0x8fba
xorl %ebx, %ebx
negq %rax
sbbq %rbx, %rbx
testq %r13, %r13
cmovgq %r13, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/../include/beyondy/timedout_countdown.hpp
// Function: beyondy::TimedoutCountdown::Update(long*) const
long Update(long *during = NULL) const {
		if (timedout_ < 0) return -1;		// never timeout

		long past = During();
		if (during != NULL) *during = past;
		past = timedout_  - past;

		return (past < 1) ? 0 : past;
	}

// Assembly:
cmpq $0x0, (%rdi)
js 0x901c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x9020
testq %r14, %r14
je 0x9005
movq %rax, (%r14)
movq (%rbx), %rcx
subq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
cmovgq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/../include/beyondy/timedout_countdown.hpp
// Function: beyondy::TimedoutCountdown::During() const
long During() const {
		struct timeval tn;
		gettimeofday(&tn, NULL);
		return (tn.tv_sec  - start_tv_.tv_sec ) * 1000 + \
		       (tn.tv_usec - start_tv_.tv_usec) / 1000;
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x35a0
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq 0x8(%rbx), %rcx
subq 0x10(%rbx), %rax
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
movl $0x3e8, %esi            # imm = 0x3E8
cqto
idivq %rsi
addq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/AshOlogn[P]ash-language-interpreter/src/main.cpp
// Function: getLines(char*)
vector<char*>* getLines(char* code) {
  
  vector<char*>* lines = new vector<char*>();
  uint32_t codeIndex = 0;
  
  while(code[codeIndex]) {
    
    //edge cases
    if(code[codeIndex] == '\n') {
      char* c = new char[2];
      c[0] = '\n'; c[1] = '\0';
      lines->push_back(c);
      codeIndex++;
      continue;
    }
    
    //setup
    uint32_t start = codeIndex;
    uint32_t end = codeIndex;
    
    while(code[end] != '\n' && code[end] != '\0') {
      end++;
    }
    
    char* c = new char[end-start+2];
    for(uint32_t i = start; i < end; i++) {
      c[i-start] = code[i];
    }
    c[end-start] = '\n';
    c[end-start+1] = '\0';

    lines->push_back(c);
    codeIndex = end+1;
  }
  
  return lines;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x41f0
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r13d, %r13d
leaq -0x30(%rbp), %r12
movq %rax, -0x40(%rbp)
movl %r13d, %r15d
movzbl (%rbx,%r15), %eax
cmpl $0xa, %eax
je 0x4bb8
testl %eax, %eax
je 0x4c36
pushq $0x1
popq %rcx
movl %ecx, %r12d
testb %al, %al
je 0x4bce
movzbl %al, %eax
cmpl $0xa, %eax
je 0x4bce
incl %r13d
movb (%rbx,%r13), %al
incl %r12d
jmp 0x4ba0
pushq $0x2
popq %rdi
callq 0x4030
movq %rax, -0x30(%rbp)
movw $0xa, (%rax)
movq %r14, %rdi
jmp 0x4c26
movl %r13d, %r14d
leal -0x1(%r12), %eax
movl %eax, -0x34(%rbp)
leal 0x1(%r12), %edi
callq 0x4030
movq %rax, -0x30(%rbp)
leaq (%rbx,%r15), %rax
xorl %ecx, %ecx
leaq (%r15,%rcx), %rdx
cmpq %r14, %rdx
jae 0x4c05
movb (%rax,%rcx), %dl
movq -0x30(%rbp), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
jmp 0x4bed
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movb $0xa, (%rax,%rcx)
movq -0x30(%rbp), %rax
movl %r12d, %ecx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %r14
movq %r14, %rdi
leaq -0x30(%rbp), %r12
movq %r12, %rsi
callq 0x4c56
incl %r13d
jmp 0x4b85
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/AshOlogn[P]ash-language-interpreter/src/errors.cpp
// Function: LexerError::what() const
const char* LexerError::what() const throw() {
  
  std::string str  = "LexerError on line ";
  str.append(std::to_string(lineNumber));
  str.append(":\n\t");
  str.append(context);
  str.append("with token ");
  str.append(lexeme);
  str.append("\n");
  str.append(message);
  
  return copyString(str.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x171bf(%rip), %rsi     # 0x1c01e
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x40a0
movl 0x20(%rbx), %esi
leaq -0x48(%rbp), %rdi
callq 0x54e9
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4370
leaq -0x48(%rbp), %rdi
callq 0x40e0
leaq 0x1719d(%rip), %rsi     # 0x1c032
leaq -0x28(%rbp), %rdi
callq 0x4360
movq 0x8(%rbx), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4360
leaq 0x17184(%rip), %rsi     # 0x1c036
leaq -0x28(%rbp), %rdi
callq 0x4360
movq 0x10(%rbx), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4360
leaq 0x1c08d(%rip), %rsi     # 0x20f5c
leaq -0x28(%rbp), %rdi
callq 0x4360
movq 0x18(%rbx), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4360
movq -0x28(%rbp), %rdi
callq 0x152e4
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x40e0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x40e0
jmp 0x4f1c
jmp 0x4f19
movq %rax, %rbx
jmp 0x4f25
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x40e0
movq %rbx, %rdi
callq 0x4230
nop
// File: /workspace/github_cpp_makefile_star2_O2/AshOlogn[P]ash-language-interpreter/src/errors.cpp
// Function: ParseSyntaxError::what() const
const char* ParseSyntaxError::what() const throw() {
  
  std::string str = "";
  
  if(startLineNumber == endLineNumber) {
    str.append("ParseSyntaxError error on line ");
    str.append(std::to_string(startLineNumber));
  } else {
    str.append("ParseSyntaxError error from line ");
    str.append(std::to_string(startLineNumber));
    str.append(" to ");
    str.append(std::to_string(endLineNumber));
  }
  
  str.append(":\n\t");
  str.append(context);

  if(lexeme != NULL) {
    str.append("with element ");
    str.append(lexeme);
    str.append("\n");
  }
  
  str.append(message);

  return copyString(str.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x170f4(%rip), %rsi     # 0x1c035
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x40a0
movl 0x20(%rbx), %eax
cmpl 0x24(%rbx), %eax
jne 0x4f81
leaq 0x170e5(%rip), %rsi     # 0x1c042
leaq -0x28(%rbp), %rdi
callq 0x4360
movl 0x20(%rbx), %esi
leaq -0x48(%rbp), %rdi
callq 0x54e9
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4370
jmp 0x4fdc
leaq 0x170da(%rip), %rsi     # 0x1c062
leaq -0x28(%rbp), %rdi
callq 0x4360
movl 0x20(%rbx), %esi
leaq -0x48(%rbp), %rdi
callq 0x54e9
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4370
leaq -0x48(%rbp), %rdi
callq 0x40e0
leaq 0x1c340(%rip), %rsi     # 0x212fa
leaq -0x28(%rbp), %rdi
callq 0x4360
movl 0x24(%rbx), %esi
leaq -0x48(%rbp), %rdi
callq 0x54e9
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4370
leaq -0x48(%rbp), %rdi
callq 0x40e0
leaq 0x17046(%rip), %rsi     # 0x1c032
leaq -0x28(%rbp), %rdi
callq 0x4360
movq 0x8(%rbx), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4360
cmpq $0x0, 0x10(%rbx)
je 0x5036
leaq 0x17074(%rip), %rsi     # 0x1c084
leaq -0x28(%rbp), %rdi
callq 0x4360
movq 0x10(%rbx), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4360
leaq 0x1bf2f(%rip), %rsi     # 0x20f5c
leaq -0x28(%rbp), %rdi
callq 0x4360
movq 0x18(%rbx), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4360
movq -0x28(%rbp), %rdi
callq 0x152e4
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x40e0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
jmp 0x5068
jmp 0x507f
jmp 0x5068
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x40e0
jmp 0x5082
jmp 0x507f
jmp 0x507f
movq %rax, %rbx
jmp 0x508b
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x40e0
movq %rbx, %rdi
callq 0x4230
nop