LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLEpoll.hpp
// Function: CELLEpoll::wait(int)
int wait(int timeout) { //以毫秒为单位
        int ret = epoll_wait(_epfd, _pEvents, _nMaxEvents, timeout);
        if (ret < 0) { //error
            perror("error, epoll_wait");
			Log::ERROR("epoll_wait : EPOLL_ERROR\n");
            return ret;
        }
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ecx
movq 0x8(%rdi), %rsi
movl (%rdi), %eax
movl 0x4(%rdi), %edx
movl %eax, %edi
callq 0x3170
movl %eax, %ebx
testl %eax, %eax
js 0x47b9
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3a13(%rip), %rdi      # 0x81d3
callq 0x3250
leaq 0x3a19(%rip), %rdi      # 0x81e5
callq 0x39d6
jmp 0x47b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./EasyTcpServer.hpp
// Function: EasyTcpServer::Accept()
SOCKET Accept() {
		// 4 accept 等待接受客户端连接
		sockaddr_in clientAddr = {};
		int nAddrLen = sizeof(sockaddr_in);
		SOCKET cSock = INVALID_SOCKET;
		cSock = accept(_sock, (sockaddr*)&clientAddr, (socklen_t *)&nAddrLen);
		if (INVALID_SOCKET == cSock) {
			Log::INFO("error, accept INVALID_SOCKET...\n");
		}
		else {
			//将新客户端分配给客户数量最少的cellServer
			addClientToCELLServer(cSock);
		}
		return cSock;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rsi
movaps %xmm0, (%rsi)
leaq -0x14(%rbp), %rdx
movl $0x10, (%rdx)
movl 0x118(%rdi), %edi
callq 0x30e0
movl %eax, %r14d
cmpl $-0x1, %eax
je 0x484a
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4a0c
jmp 0x4856
leaq 0x39ae(%rip), %rdi      # 0x81ff
callq 0x38ac
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLEpoll.hpp
// Function: CELLEpoll::destory()
void destory() {
		if(_epfd > 0) {
			close(_epfd);
			_epfd = -1;
		}
		if(_pEvents) {
			delete[] _pEvents;
			_pEvents = nullptr;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
jle 0x488d
callq 0x3480
orl $-0x1, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x48a0
callq 0x3340
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./EasyTcpServer.hpp
// Function: EasyTcpServer::addClientToCELLServer(int)
void addClientToCELLServer(SOCKET cSock) {
		//查找客户数量最少的CELLServer消息处理对象
		auto pMinServer = _cellServers[0];
		for(auto pServer : _cellServers) {
			if (pMinServer->getClientCount() > pServer->getClientCount()) {
				pMinServer = pServer;
			}
		}
		pMinServer->addClient(cSock);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xf8(%rdi), %rax
movq 0x100(%rdi), %rcx
movq (%rax), %rdi
cmpq %rcx, %rax
je 0x4a5a
movq 0x50(%rdi), %r8
subq 0x48(%rdi), %r8
sarq $0x2, %r8
addq 0x30(%rdi), %r8
movq (%rax), %rdx
movq 0x50(%rdx), %r9
subq 0x48(%rdx), %r9
sarq $0x2, %r9
addq 0x30(%rdx), %r9
cmpq %r9, %r8
ja 0x4a51
movq %rdi, %rdx
addq $0x8, %rax
movq %rdx, %rdi
jmp 0x4a21
popq %rbp
jmp 0x4a60
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./EasyTcpServer.hpp
// Function: void EasyTcpServer::Start<CELLEpollServer>(int)
void Start(int nCELLServer) {
		for (int n = 0; n < nCELLServer; n++) {
			auto ser = new ServerT;
			ser->setId(n+1);
			ser->setIOListenNum((_nMaxClient / nCELLServer) + 1);
			_cellServers.push_back(ser);
			ser->setEventObj(this);
			ser->Start();
		}
		_thread.Start(
			nullptr,
			[this](CELLThread* pThread) {
				OnRun(pThread);
			},
			nullptr
		);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
testl %esi, %esi
movl %esi, -0x2c(%rbp)
cmovgl %esi, %r12d
leaq 0xf8(%rdi), %r15
negl %r12d
pushq $0x1
popq %r14
leal (%r12,%r14), %eax
cmpl $0x1, %eax
je 0x5070
movl $0x198, %edi            # imm = 0x198
callq 0x32a0
movq %rax, %r13
movq %rax, %rdi
callq 0x5122
movl %r14d, 0x38(%r13)
movl 0x120(%rbx), %eax
cltd
idivl -0x2c(%rbp)
leal 0x1(%rax), %esi
movq (%r13), %rax
movq %r13, %rdi
callq *0x10(%rax)
movq %r13, -0x38(%rbp)
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x609e
movq %rbx, 0x40(%r13)
movq %r13, %rdi
callq 0x5166
incl %r14d
jmp 0x5016
xorps %xmm0, %xmm0
leaq -0x80(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq -0xa0(%rbp), %rdx
andq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
addq $0x8, %rbx
leaq 0x1bb2(%rip), %rax      # 0x6c4a
movq %rax, 0x18(%rdx)
leaq 0x1bbb(%rip), %rax      # 0x6c5e
movq %rax, 0x10(%rdx)
leaq -0x60(%rbp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq %rbx, %rdi
callq 0x5218
leaq -0x60(%rbp), %rdi
callq 0x41f4
leaq -0xa0(%rbp), %rdi
callq 0x41f4
leaq -0x80(%rbp), %rdi
callq 0x41f4
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x41f4
leaq -0xa0(%rbp), %rdi
callq 0x41f4
leaq -0x80(%rbp), %rdi
callq 0x41f4
jmp 0x511a
movq %rax, %rbx
movl $0x198, %esi            # imm = 0x198
movq %r13, %rdi
callq 0x32c0
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./CELLServer.hpp
// Function: CELLServer::Start()
void Start() {
		_thread.Start(
			nullptr,
			[this](CELLThread* pThread) {
				OnRun(pThread);
			},
			[this](CELLThread* pThread) {
				ClearClients();
			}
		);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
leaq 0x88(%rdi), %rax
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rsi
leaq -0x70(%rbp), %rdx
andq $0x0, 0x8(%rdx)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq %rdi, (%rdx)
leaq 0x10a5(%rip), %rcx      # 0x623c
movq %rcx, 0x18(%rdx)
leaq 0x10a4(%rip), %rcx      # 0x6246
movq %rcx, 0x10(%rdx)
leaq -0x50(%rbp), %rcx
andq $0x0, 0x8(%rcx)
movq %rdi, (%rcx)
leaq 0x176f(%rip), %rdi      # 0x6928
movq %rdi, 0x18(%rcx)
leaq 0x1772(%rip), %rdi      # 0x6936
movq %rdi, 0x10(%rcx)
movq %rax, %rdi
callq 0x5218
leaq -0x50(%rbp), %rdi
callq 0x41f4
leaq -0x70(%rbp), %rdi
callq 0x41f4
leaq -0x30(%rbp), %rdi
callq 0x41f4
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x41f4
leaq -0x70(%rbp), %rdi
callq 0x41f4
leaq -0x30(%rbp), %rdi
callq 0x41f4
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLThread.hpp
// Function: CELLThread::Start(std::function<void (CELLThread*)>, std::function<void (CELLThread*)>, std::function<void (CELLThread*)>)
void Start(
		EventCall onCreate = nullptr,
		EventCall onRun = nullptr,
		EventCall onDestory = nullptr)
	{
		std::lock_guard<std::mutex> lock(_mutex);
		if (!_isRun)
		{
			_isRun = true;

			if (onCreate)
				_onCreate = onCreate;
			if (onRun)
				_onRun = onRun;
			if (onDestory)
				_onDestory = onDestory;

			//线程
			std::thread t(std::mem_fn(&CELLThread::OnWork), this);
			t.detach();
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
leaq 0x60(%rdi), %rbx
movq %rbx, %rdi
callq 0x4412
cmpb $0x0, 0xe8(%r14)
jne 0x52c1
movb $0x1, 0xe8(%r14)
cmpq $0x0, 0x10(%r13)
je 0x5265
movq %r14, %rdi
movq %r13, %rsi
callq 0x6a32
cmpq $0x0, 0x10(%r12)
je 0x5279
leaq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0x6a32
cmpq $0x0, 0x10(%r15)
je 0x528c
leaq 0x40(%r14), %rdi
movq %r15, %rsi
callq 0x6a32
leaq 0x17ff(%rip), %rax      # 0x6a92
leaq -0x48(%rbp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
leaq -0x38(%rbp), %rdx
movq %r14, (%rdx)
leaq -0x30(%rbp), %rdi
callq 0x6ae8
leaq -0x30(%rbp), %rdi
callq 0x3420
leaq -0x30(%rbp), %rdi
callq 0x6b66
movq %rbx, %rdi
callq 0x3220
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x30(%rbp), %rdi
callq 0x6b66
jmp 0x52eb
jmp 0x52e8
movq %rax, %r14
movq %rbx, %rdi
callq 0x3220
movq %r14, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./CELLEpollServer.hpp
// Function: CELLEpollServer::DoNetEvents()
bool DoNetEvents() {
		int ret = _ep.wait(1);
		if(ret < 0) {
			strerror(errno); //print the reason of wrong
			Log::INFO("CELLEpollServer DoNetEvents error\n");
			return false;
		}
		else if(ret == 0) return true;
		else {
			auto events = _ep.events();
			for(int i = 0; i < ret; i ++) {
				CELLClient *pClient = (CELLClient*)events[i].data.ptr;
				if(pClient) {
					if(events[i].events & EPOLLIN) {
						if(SOCKET_ERROR == pClient->RecvData()) {
							rmClient(pClient);
							continue;
						}
						else { //接收消息成功, 接收计数++
							_pNetEvent->OnNetRecv(pClient);
						}	
					}
					if(events[i].events & EPOLLOUT) {
						if(SOCKET_ERROR == pClient->SendDataReal()) {
							rmClient(pClient);
							continue;
						}
						else { //修改当前描述符号为只读
							_ep.ctl(EPOLL_CTL_MOD, pClient, EPOLLIN);
						}	
					}
				} 
			}
		}				
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
addq $0x180, %rdi            # imm = 0x180
pushq $0x1
popq %rsi
movq %rdi, -0x38(%rbp)
callq 0x4792
movl %eax, -0x2c(%rbp)
testl %eax, %eax
js 0x54c8
je 0x54e0
movq 0x188(%r14), %r13
movl -0x2c(%rbp), %eax
imulq $0xc, %rax, %rbx
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x54e0
movq 0x4(%r13,%r15), %r12
testq %r12, %r12
je 0x54c2
movl (%r13,%r15), %eax
testb $0x1, %al
je 0x5492
movq %r12, %rdi
callq 0x581a
cmpl $-0x1, %eax
je 0x54b7
movq 0x40(%r14), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x18(%rax)
movl (%r13,%r15), %eax
testb $0x4, %al
je 0x54c2
movq %r12, %rdi
callq 0x58d0
cmpl $-0x1, %eax
je 0x54b7
movq -0x38(%rbp), %rdi
pushq $0x3
popq %rsi
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0x57ce
jmp 0x54c2
movq %r14, %rdi
movq %r12, %rsi
callq 0x584a
addq $0xc, %r15
jmp 0x5457
callq 0x3040
movl (%rax), %edi
callq 0x3100
leaq 0x2ef1(%rip), %rdi      # 0x83cc
callq 0x38ac
cmpl $0x0, -0x2c(%rbp)
setns %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLThread.hpp
// Function: CELLThread::Close()
void Close()
	{
		std::lock_guard<std::mutex> lock(_mutex);
		if (_isRun)
		{
			_isRun = false;
			//_sem.wait();
			m_sem.P();
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x60(%rdi), %rbx
movq %rbx, %rdi
callq 0x4412
cmpb $0x1, 0xe8(%r14)
jne 0x57af
movb $0x0, 0xe8(%r14)
addq $0x88, %r14
movq %r14, %rdi
callq 0x43cc
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3220
movq %rax, %r14
movq %rbx, %rdi
callq 0x3220
movq %r14, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLEpoll.hpp
// Function: CELLEpoll::ctl(int, CELLClient*, unsigned int)
int ctl(int op, CELLClient* pClient, uint32_t events) {
		epoll_event ev;
		ev.events = events;
		ev.data.ptr = pClient;
		if(epoll_ctl(_epfd, op, pClient->sockfd(), &ev) == EPOLL_ERROR) {
			perror("error, epoll_ctl");
			Log::ERROR("epoll_ctl : EPOLL_ERROR\n");
			return EPOLL_ERROR;
		}
    	return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0xc(%rbp), %rax
movl %ecx, (%rax)
movq %rdx, 0x4(%rax)
movl (%rdi), %edi
movl 0xc(%rdx), %edx
movq %rax, %rcx
callq 0x3370
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
je 0x57fc
addq $0x10, %rsp
popq %rbp
retq
leaq 0x2969(%rip), %rdi      # 0x816c
callq 0x3250
leaq 0x296e(%rip), %rdi      # 0x817d
callq 0x39d6
pushq $-0x1
popq %rax
jmp 0x57f6
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./CELLServer.hpp
// Function: CELLServer::rmClient(CELLClient*)
void rmClient(CELLClient* pClient) {
		removeIO(pClient); //移除IO复用中的文件描述符
        auto iter = _clients.find(pClient->sockfd());
        if(iter != _clients.end()) {
			if(pClient) {
				if(pClient->sockfd() > 0) {
					close(pClient->sockfd()); //关闭文件描述符
				}
				if(pClient) {
					delete pClient;
				}
			}
			_clients.erase(iter);
        }
        if(_pNetEvent) {
            _pNetEvent->OnNetLeave(pClient);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x30(%rax)
leaq 0x8(%r14), %r15
movl 0xc(%rbx), %eax
leaq -0x24(%rbp), %rsi
movl %eax, (%rsi)
movq %r15, %rdi
callq 0x598e
movq %rax, %r12
leaq 0x10(%r14), %rax
cmpq %rax, %r12
je 0x58b0
movl 0xc(%rbx), %edi
testl %edi, %edi
jle 0x5892
callq 0x3480
movq %rbx, %rdi
callq 0x5940
pushq $0x60
popq %rsi
movq %rbx, %rdi
callq 0x32c0
movq %r15, %rdi
movq %r12, %rsi
callq 0x5b44
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x58c2
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/./CELLBuffer.hpp
// Function: CELLBuffer::read4socket(int)
int read4socket(SOCKET sockfd)
	{
		if (_nSize - _nLast > 0)
		{
			//接收客户端数据
			char* szRecv = _pBuff + _nLast;
			int nLen = (int)recv(sockfd, szRecv, _nSize - _nLast, 0);
			if (nLen <= 0)
			{
				return SOCKET_ERROR;
			}
			//消息缓冲区的数据尾部位置后移
			_nLast += nLen;
			return nLen;
		}
		return 0;
	}

// Assembly:
movl 0xc(%rdi), %ecx
movslq 0x8(%rdi), %rax
subl %eax, %ecx
jle 0x5932
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq (%rdi), %rax
movl %ecx, %edx
movl %esi, %edi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x30f0
testl %eax, %eax
jle 0x5935
addl %eax, 0x8(%rbx)
jmp 0x5938
xorl %eax, %eax
retq
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLClient.hpp
// Function: CELLClient::~CELLClient()
~CELLClient()
	{
		Log::INFO("s=%d CELLClient%d.~CELLClient\n", serverId, id);
		if (INVALID_SOCKET != _sockfd)
		{
			close(_sockfd);
			_sockfd = INVALID_SOCKET;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edx
movl 0x4(%rdi), %esi
leaq 0x2a9a(%rip), %rdi      # 0x83ef
callq 0x59e6
movl 0xc(%rbx), %edi
cmpl $-0x1, %edi
je 0x596b
callq 0x3480
orl $-0x1, 0xc(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x5b22
addq $0x10, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5b22
movq %rax, %rdi
callq 0x3fb0
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/./CELLBuffer.hpp
// Function: CELLBuffer::write2socket(int)
int write2socket(SOCKET sockfd)
	{
		int ret = 0;
		//缓冲区有数据
		if (_nLast > 0 && INVALID_SOCKET != sockfd)
		{
			//发送数据
			ret = send(sockfd, _pBuff, _nLast, 0);
			if (ret <= 0) {
				return SOCKET_ERROR;
			}
			if (ret == _nLast) {
				//数据尾部位置清零
				_nLast = 0;
			}
			else {
				_nLast -= ret;
				memcpy(_pBuff, _pBuff + ret, _nLast);
			}
			_fullCount = 0;
		}
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movslq 0x8(%rdi), %rdx
testq %rdx, %rdx
setle %al
cmpl $-0x1, %esi
sete %cl
xorl %r14d, %r14d
orb %al, %cl
jne 0x5c10
movq %rdi, %rbx
movq (%rdi), %rax
movl %esi, %edi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x3190
movq %rax, %r14
testl %r14d, %r14d
jle 0x5bec
movl 0x8(%rbx), %eax
subl %r14d, %eax
jne 0x5bf2
andl $0x0, 0x8(%rbx)
jmp 0x5c0c
pushq $-0x1
popq %r14
jmp 0x5c10
movl %eax, 0x8(%rbx)
movq (%rbx), %rdi
movl %r14d, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
addq %rdi, %rsi
movslq %eax, %rdx
callq 0x3240
andl $0x0, 0x10(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/./CELLBuffer.hpp
// Function: CELLBuffer::push(char const*, int)
bool push(const char* pData, int nLen)
	{
		if (_nLast + nLen <= _nSize)
		{
			//将要发送的数据 拷贝到发送缓冲区尾部
			memcpy(_pBuff + _nLast, pData, nLen);
			//计算数据尾部位置
			_nLast += nLen;

			if (_nLast == SEND_BUFF_SZIE)
			{
				++_fullCount;
			}

			return true;
		}
		else {
			++_fullCount;
		}

		return false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x8(%rdi), %rdi
leal (%rdi,%rdx), %r15d
movl 0xc(%rbx), %r12d
cmpl %r12d, %r15d
jg 0x604a
addq (%rbx), %rdi
movslq %edx, %r14
movq %r14, %rdx
callq 0x3240
addl 0x8(%rbx), %r14d
movl %r14d, 0x8(%rbx)
cmpl $0x1400, %r14d          # imm = 0x1400
jne 0x604d
incl 0x10(%rbx)
cmpl %r12d, %r15d
setle %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLEpoll.hpp
// Function: CELLEpoll::del(CELLClient*)
int del(CELLClient* pClient) {
        if(epoll_ctl(_epfd, EPOLL_CTL_DEL, pClient->sockfd(), NULL) == EPOLL_ERROR) {
            perror("error, epoll_ctl");
			Log::ERROR("epoll_ctl : EPOLL_ERROR\n");
            return EPOLL_ERROR;
        }
		return 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl (%rdi), %edi
movl 0xc(%rsi), %edx
xorl %ebx, %ebx
pushq $0x2
popq %rsi
xorl %ecx, %ecx
callq 0x3370
cmpl $-0x1, %eax
je 0x6081
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x20e4(%rip), %rdi      # 0x816c
callq 0x3250
leaq 0x20e9(%rip), %rdi      # 0x817d
callq 0x39d6
pushq $-0x1
popq %rbx
jmp 0x6078
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./CELLServer.hpp
// Function: CELLServer::OnRun(CELLThread*)
void OnRun(CELLThread* pThread) {
		while (pThread->isRun()) {
			if (!_clientSocketBuff.empty()) {//从缓冲队列里取出客户数据
				std::lock_guard<std::mutex> lock(_mutex);
				for (auto cSock : _clientSocketBuff) {
					CELLClient *pClient = new CELLClient(cSock);
					_clients[cSock] = pClient;
					pClient->serverId = _id;

					if (_pNetEvent)
						_pNetEvent->OnNetJoin(_clients[cSock]);
					addClient2IO(_clients[cSock]);
				}
				_clientSocketBuff.clear();
			}
			//如果没有需要处理的客户端，就跳过
			if (_clients.empty()) {
				std::chrono::milliseconds t(1);
				std::this_thread::sleep_for(t);
				continue;
			}
			if (!DoNetEvents()) { //读写socket
				pThread->Exit();
				break;
			}
			DoMsg(); //处理时间，分包，组织响应消息
			processTimer(); //处理定时器心跳时间
		}
		Log::INFO("CELLServer%d.OnRun exit\n", _id);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, %r14
leaq 0x60(%rdi), %rax
movq %rax, -0x38(%rbp)
leaq 0x8(%rdi), %r12
movq -0x40(%rbp), %rax
cmpb $0x1, 0xe8(%rax)
jne 0x63c3
movq 0x48(%r14), %rax
cmpq 0x50(%r14), %rax
je 0x637b
movq -0x38(%rbp), %rdi
callq 0x4412
movq 0x48(%r14), %r15
movq 0x50(%r14), %rax
movq %rax, -0x48(%rbp)
cmpq -0x48(%rbp), %r15
je 0x6364
movl (%r15), %r13d
movl %r13d, -0x2c(%rbp)
pushq $0x60
popq %rdi
callq 0x32a0
movq %rax, %rbx
movq %rax, %rdi
movl %r13d, %esi
movl $0x1400, %edx           # imm = 0x1400
movl $0x1400, %ecx           # imm = 0x1400
callq 0x6406
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x648a
movq %rbx, (%rax)
movl 0x38(%r14), %eax
movl %eax, 0x4(%rbx)
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x6343
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x648a
movq (%rax), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x648a
movq (%rax), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
addq $0x4, %r15
jmp 0x62e0
movq 0x48(%r14), %rax
cmpq %rax, 0x50(%r14)
je 0x6372
movq %rax, 0x50(%r14)
movq -0x38(%rbp), %rdi
callq 0x3220
cmpq $0x0, 0x30(%r14)
je 0x63a4
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
testb %al, %al
je 0x63ba
movq %r14, %rdi
callq 0x6536
movq %r14, %rdi
callq 0x65a2
jmp 0x62ac
movq $0x1, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x64db
jmp 0x62ac
movq -0x40(%rbp), %rdi
callq 0x47d4
movl 0x38(%r14), %esi
leaq 0x2103(%rip), %rdi      # 0x84d1
callq 0x429a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x60
popq %rsi
movq %rbx, %rdi
callq 0x32c0
jmp 0x63f5
movq %rax, %r14
movq -0x38(%rbp), %rdi
callq 0x3220
movq %r14, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLClient.hpp
// Function: CELLClient::CELLClient(int, int, int)
CELLClient(SOCKET sockfd = INVALID_SOCKET, int sendBuffSize = SEND_BUFF_SZIE, int recvBuffSize = RECV_BUFF_SZIE) :_recvBuff(recvBuffSize), _sendBuff(sendBuffSize)
	{
		static int n = 1;
		id = n++;
		_sockfd = sockfd;
		_expire = time(NULL) + TIMESLOT;
		resetDTSend();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %rbx
orq $-0x1, (%rdi)
leaq 0x10(%rdi), %r15
movq %r15, %rdi
movl %ecx, %esi
callq 0x65f0
leaq 0x28(%rbx), %rdi
movl %r12d, %esi
callq 0x65f0
movaps 0x1bd1(%rip), %xmm0     # 0x8010
movups %xmm0, 0x48(%rbx)
movl 0x5e0f(%rip), %eax      # 0xc258
leal 0x1(%rax), %ecx
movl %ecx, 0x5e06(%rip)      # 0xc258
movl %eax, (%rbx)
movl %r14d, 0xc(%rbx)
xorl %edi, %edi
callq 0x3280
addq $0xb4, %rax
movq %rax, 0x58(%rbx)
andq $0x0, 0x40(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x5b22
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./CELLServer.hpp
// Function: CELLServer::DoMsg()
void DoMsg() { 
		for (auto iter : _clients) {
			auto pClient = iter.second;
			//接收客户端数据
			while (pClient->hasMsg()) {
				ProcessNetMsg(pClient, pClient->front_msg()); //处理网络消息
				pClient->pop_front_msg(); //移除消息队列（缓冲区）最前的一条数据
				_pNetEvent->OnNetMsg(pClient);//添加消息计数 
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
leaq 0x10(%rdi), %r12
cmpq %r12, %r14
je 0x6599
movq 0x28(%r14), %r15
movl 0x18(%r15), %eax
cmpl $0x4, %eax
jb 0x658c
movq 0x10(%r15), %rdx
movzwl (%rdx), %ecx
cmpl %ecx, %eax
jl 0x658c
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x28(%rax)
movq %r15, %rdi
callq 0x68a0
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x10(%rax)
jmp 0x6555
movq %r14, %rdi
callq 0x31f0
movq %rax, %r14
jmp 0x654c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./CELLServer.hpp
// Function: CELLServer::processTimer()
void processTimer() { //心跳检测
		time_t cur = time(NULL);
		for(auto &client : _clients) {
			auto pClient = client.second;
			if(cur >= pClient->_expire) {
				rmClient(pClient);
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x3280
movq %rax, %r14
movq 0x20(%rbx), %r15
leaq 0x10(%rbx), %r12
cmpq %r12, %r15
je 0x65e6
movq 0x28(%r15), %rsi
cmpq 0x58(%rsi), %r14
jl 0x65d9
movq %rbx, %rdi
callq 0x584a
movq %r15, %rdi
callq 0x31f0
movq %rax, %r15
jmp 0x65c2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/./CELLBuffer.hpp
// Function: CELLBuffer::pop(int)
void pop(int nLen)
	{
		int n = _nLast - nLen;
		if (n > 0)
		{
			memcpy(_pBuff, _pBuff + nLen, n);
		}
		_nLast = n;
		if (_fullCount > 0)
			--_fullCount;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %r14d
subl %esi, %r14d
jle 0x68e8
movq (%rbx), %rdi
movslq %esi, %rsi
addq %rdi, %rsi
movl %r14d, %edx
callq 0x3240
movl %r14d, 0x8(%rbx)
movl 0x10(%rbx), %eax
testl %eax, %eax
jle 0x68f8
decl %eax
movl %eax, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./CELLServer.hpp
// Function: CELLServer::ClearClients()
void ClearClients() {
		for (auto iter : _clients) {
			delete iter.second;
		}
		_clients.clear();
		_clientSocketBuff.clear();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r15
leaq 0x10(%rdi), %r13
pushq $0x60
popq %r14
cmpq %r13, %r15
je 0x69a9
movq 0x28(%r15), %r12
testq %r12, %r12
je 0x6991
movq %r12, %rdi
callq 0x5940
movq %r12, %rdi
movq %r14, %rsi
callq 0x32c0
movq %r15, %rdi
callq 0x31f0
movq %rax, %r15
jmp 0x697b
leaq 0x8(%rbx), %rdi
callq 0x69d0
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x69c0
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./serverFile/./../share/CELLThread.hpp
// Function: CELLThread::OnWork()
void OnWork()
	{
		if (_onCreate)
			_onCreate(this);
		if (_onRun)
			_onRun(this);
		if (_onDestory)
			_onDestory(this);

		//_sem.wakeup();
		m_sem.V();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x6aad
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x6bc4
cmpq $0x0, 0x30(%rbx)
je 0x6ac0
leaq 0x20(%rbx), %rdi
movq %rbx, %rsi
callq 0x6bc4
cmpq $0x0, 0x50(%rbx)
je 0x6ad3
leaq 0x40(%rbx), %rdi
movq %rbx, %rsi
callq 0x6bc4
addq $0x88, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4438
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./share/log.cpp
// Function: Log::GetLogInstance()
Log* Log::GetLogInstance() {
    if(m_log == NULL) {
        std::unique_lock<std::mutex> ulock(m_mutex);
        if(m_log == NULL) {
            m_log = new Log;
            if(m_log == NULL) return NULL;
        }
    }
    return m_log;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq 0x5540(%rip), %rax      # 0xc2a0
testq %rax, %rax
jne 0x6daf
leaq 0x550c(%rip), %rsi      # 0xc278
leaq -0x18(%rbp), %rdi
callq 0x447a
cmpq $0x0, 0x5523(%rip)      # 0xc2a0
jne 0x6d9f
movl $0xa0, %edi
callq 0x32a0
andq $0x0, 0x90(%rax)
movb $0x1, 0x98(%rax)
movq %rax, 0x5501(%rip)      # 0xc2a0
leaq -0x18(%rbp), %rdi
callq 0x449a
movq 0x54f1(%rip), %rax      # 0xc2a0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x449a
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./share/log.cpp
// Function: Log::async_write_log()
void Log::async_write_log() {
    while(isRun) {
        m_fullBuff.P();
        m_mutex.lock();
        auto item = m_list.front();
        m_list.pop_front();

        fputs(item.c_str(), m_fp);
        fflush(m_fp);

        m_mutex.unlock();
        m_emptyBuff.V();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x5493(%rip), %r15      # 0xc278
leaq 0x557c(%rip), %r12      # 0xc368
leaq -0x48(%rbp), %r13
leaq 0x5511(%rip), %r14      # 0xc308
cmpb $0x1, 0x98(%rbx)
jne 0x6e5f
leaq 0x54a1(%rip), %rdi      # 0xc2a8
callq 0x43cc
movq %r15, %rdi
callq 0x4412
movq 0x554d(%rip), %rsi      # 0xc368
addq $0x10, %rsi
movq %r13, %rdi
callq 0x3360
movq %r12, %rdi
callq 0x6fbc
movq -0x48(%rbp), %rdi
movq 0x8(%rbx), %rsi
callq 0x32f0
movq 0x8(%rbx), %rdi
callq 0x3320
movq %r15, %rdi
callq 0x3220
movq %r14, %rdi
callq 0x4438
movq %r13, %rdi
callq 0x3150
jmp 0x6df7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./share/log.cpp
// Function: Log::init(char const*, int)
void Log::init(const char *file_name, int max_queue_size) {
    m_max_task = max_queue_size;
    memcpy(m_log_name, file_name, strlen(file_name) + 1);
    m_fp = fopen(file_name, "a");  //追加模式日志文件   
    m_fullBuff.setNum(0);           //设置信号量值
    m_emptyBuff.setNum(m_max_task); //设置信号量值
    log_thread = std::thread(&Log::async_write_log, this);
    log_thread.detach();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, (%rdi)
leaq 0x10(%rdi), %r15
movq %rsi, %rdi
callq 0x3140
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3240
leaq 0x17dd(%rip), %rsi      # 0x8696
movq %r14, %rdi
callq 0x3330
movq %rax, 0x8(%rbx)
andl $0x0, 0x5434(%rip)      # 0xc300
movl (%rbx), %eax
leaq -0x10b(%rip), %rcx      # 0x6dca
leaq -0x38(%rbp), %rsi
movq %rcx, (%rsi)
andq $0x0, 0x8(%rsi)
movl %eax, 0x5479(%rip)      # 0xc360
leaq -0x20(%rbp), %rdx
movq %rbx, (%rdx)
leaq -0x28(%rbp), %r14
movq %r14, %rdi
callq 0x6fca
addq $0x90, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7048
movq %r14, %rdi
callq 0x6b66
movq %rbx, %rdi
callq 0x3420
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pxzwxx[P]SynBS/./share/log.cpp
// Function: Log::destory()
void Log::destory() {
    isRun = false;
    if(m_log) {
        std::unique_lock<std::mutex> ulock(m_mutex);
        if(m_fp) {
            fflush(m_fp);
            fclose(m_fp);
        }
        if(m_log) delete m_log;
        m_max_task = false;
        m_log = NULL;
        m_fp = NULL;
    }
}

// Assembly:
movb $0x0, 0x98(%rdi)
cmpq $0x0, 0x5369(%rip)      # 0xc2a0
je 0x6fb0
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x532a(%rip), %rsi      # 0xc278
leaq -0x20(%rbp), %rdi
callq 0x447a
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6f6e
callq 0x3320
movq 0x8(%rbx), %rdi
callq 0x3290
movq 0x532b(%rip), %r14      # 0xc2a0
testq %r14, %r14
je 0x6f8f
movq %r14, %rdi
callq 0x7066
movl $0xa0, %esi
movq %r14, %rdi
callq 0x32c0
andl $0x0, (%rbx)
andq $0x0, 0x5306(%rip)      # 0xc2a0
andq $0x0, 0x8(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x449a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ruippeixotog[P]algo-lib/mod-ops.cpp
// Function: mfact(long long)
ll mfact(ll a) {
  if(a >= MOD) return 0;
  while(a >= _mfactMem.size())
    _mfactMem.push_back(mmul(_mfactMem.size(), _mfactMem.back()));
  return _mfactMem[a];
}

// Assembly:
cmpq $0x3b9aca06, %rdi       # imm = 0x3B9ACA06
jle 0x129d
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x3b9aca07, %r12d      # imm = 0x3B9ACA07
leaq 0x2dcb(%rip), %r14      # 0x4080
movq %rsp, %r15
movq 0x2dc9(%rip), %rcx      # 0x4088
movq 0x2dba(%rip), %rdx      # 0x4080
movq %rcx, %rax
subq %rdx, %rax
sarq $0x3, %rax
cmpq %rbx, %rax
ja 0x12f0
imulq -0x8(%rcx), %rax
cqto
idivq %r12
movq %rdx, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1764
jmp 0x12b8
movq (%rdx,%rbx,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ruippeixotog[P]algo-lib/mod-ops.cpp
// Function: mcomb(long long, long long)
ll mcomb(ll n, ll k) {
  if (n == 0 && k == 0) return 1;
  ll ni = n % MOD, ki = k % MOD;
  if (ni < ki) return 0;
  ll comb = mmul(mfact(ni), mmul(minv(mfact(ki)), minv(mfact(ni - ki))));
  return mcomb(n / MOD, k / MOD) * comb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
pushq $0x1
popq %rbx
movl $0x3b9aca07, %esi       # imm = 0x3B9ACA07
movq %r15, %rax
orq %r14, %rax
je 0x1390
movq %r14, %rax
cqto
idivq %rsi
movq %rdx, %rdi
movq %rax, %r14
movq %r15, %rax
cqto
idivq %rsi
movq %rdi, %r12
subq %rdx, %r12
jl 0x1395
movq %rdx, %r13
movq %rax, %r15
callq 0x1291
movq %rax, %rbp
movq %r13, %rdi
callq 0x1291
movq %rax, %rdi
callq 0x1268
movq %rax, %r13
movq %r12, %rdi
callq 0x1291
movq %rax, %rdi
callq 0x1268
movl $0x3b9aca07, %esi       # imm = 0x3B9ACA07
imulq %r13, %rax
cqto
idivq %rsi
imulq %rdx, %rbp
movq %rbp, %rax
cqto
idivq %rsi
imulq %rdx, %rbx
jmp 0x1319
pushq $0x1
popq %rax
jmp 0x1397
xorl %eax, %eax
imulq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ruippeixotog[P]algo-lib/miller-rabin.cpp
// Function: isPrime(long long, int)
bool isPrime(ll n, int bases = 10) {
  if (n == 2 || n == 3) return true;
  if (n <= 1 || n % 2 == 0) return false;

  // Write (n - 1) as (d * 2^s) by factoring powers of 2 from (n - 1)
  int s = 0;
  for (ll m = n - 1; m % 2 == 0; ++s, m /= 2);
  ll d = (n - 1) / (1 << s);

  for(int i = 0; i < bases; i++) {
    ll a = randBetween(2, n - 2);
    ll x = mpow(a, d, n);

    if (x == 1 || x == n - 1)
      continue;

    bool found = false;
    for(int r = 1; r <= s - 1; r++) {
      x = mpow(x, 2, n);
      if(x == 1) return false;
      if(x == n - 1) { found = true; break; }
    }
    if(!found) return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rax
andq $-0x2, %rax
cmpq $0x2, %rax
jne 0x1224
movb $0x1, %bl
jmp 0x12e1
movq %rdi, %r14
cmpq $0x2, %rdi
setl %al
testb $0x1, %r14b
sete %cl
xorl %ebx, %ebx
orb %al, %cl
jne 0x12e1
leaq -0x1(%r14), %r15
movq %r15, %rax
testb $0x1, %al
jne 0x1251
incl %ebx
shrq %rax
jmp 0x1246
pushq $0x1
popq %rax
movl %ebx, %ecx
shll %cl, %eax
movslq %eax, %rcx
movq %r15, %rax
cqto
idivq %rcx
movq %rax, 0x10(%rsp)
leaq -0x2(%r14), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
testl %esi, %esi
cmovlel %r13d, %esi
pushq $0x2
popq %r12
movl %esi, 0x4(%rsp)
cmpl %esi, %r13d
je 0x121d
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x11c3
movq %rax, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x116c
cmpq $0x1, %rax
sete %cl
cmpq %r15, %rax
sete %dl
orb %cl, %dl
jne 0x12d6
xorl %ebp, %ebp
incl %ebp
cmpl %ebx, %ebp
jae 0x12df
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x116c
cmpq $0x1, %rax
je 0x12df
cmpq %r15, %rax
jne 0x12b7
incl %r13d
movl 0x4(%rsp), %esi
jmp 0x1282
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ruippeixotog[P]algo-lib/miller-rabin.cpp
// Function: main
int main() {
  srand(time(NULL));

  printf("2 is prime: %d (expected 1)\n", isPrime(2));
  printf("3 is prime: %d (expected 1)\n", isPrime(3));
  printf("4 is prime: %d (expected 0)\n", isPrime(4));
  printf("5 is prime: %d (expected 1)\n", isPrime(5));

  printf("45896223 is prime: %d (expected 0)\n", isPrime(45896223));
  printf("219567251 is prime: %d (expected 1)\n", isPrime(219567251));
  printf("213587648531 is prime: %d (expected 0)\n", isPrime(213587648531L));
  printf("3000011921 is prime: %d (expected 1)\n", isPrime(3000011921L));

  return 0;
}

// Assembly:
pushq %rbx
xorl %edi, %edi
callq 0x1050
movl %eax, %edi
callq 0x1060
pushq $0x2
popq %rdi
pushq $0xa
popq %rbx
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xcec(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1030
pushq $0x3
popq %rdi
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xcee(%rip), %rdi       # 0x2021
xorl %eax, %eax
callq 0x1030
pushq $0x4
popq %rdi
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xcf0(%rip), %rdi       # 0x203e
xorl %eax, %eax
callq 0x1030
pushq $0x5
popq %rdi
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xcf2(%rip), %rdi       # 0x205b
xorl %eax, %eax
callq 0x1030
movl $0x2bc521f, %edi        # imm = 0x2BC521F
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xcf2(%rip), %rdi       # 0x2078
xorl %eax, %eax
callq 0x1030
movl $0xd165493, %edi        # imm = 0xD165493
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xcf9(%rip), %rdi       # 0x209c
xorl %eax, %eax
callq 0x1030
movabsq $0x31bad0e013, %rdi     # imm = 0x31BAD0E013
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xcfc(%rip), %rdi       # 0x20c1
xorl %eax, %eax
callq 0x1030
movl $0xb2d08c91, %edi       # imm = 0xB2D08C91
movl %ebx, %esi
callq 0x1202
movzbl %al, %esi
leaq 0xd07(%rip), %rdi       # 0x20e9
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/Matan-Vinkler[P]Basic-File-System/myfs.cpp
// Function: MyFs::MyFs(BlockDeviceSimulator*)
MyFs::MyFs(BlockDeviceSimulator *blkdevsim_):blkdevsim(blkdevsim_) {
	struct myfs_header header;
	blkdevsim->read(0, sizeof(header), (char *)&header);

	if (strncmp(header.magic, MYFS_MAGIC, sizeof(header.magic)) != 0 ||
	    (header.version != CURR_VERSION)) {
		std::cout << "Did not find myfs instance on blkdev" << std::endl;
		std::cout << "Creating..." << std::endl;
		format();
		std::cout << "Finished!" << std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq %rsi, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
andq $0x0, 0x18(%rdi)
pushq $0x5
popq %rdx
leaq -0x15(%rbp), %rcx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x2b6a
movq 0x54df(%rip), %rsi      # 0x81c8
leaq -0x15(%rbp), %rdi
pushq $0x4
popq %rdx
callq 0x20f0
testl %eax, %eax
jne 0x2cff
cmpb $0x3, -0x11(%rbp)
je 0x2d58
movq 0x52ba(%rip), %rdi      # 0x7fc0
leaq 0x235a(%rip), %rsi      # 0x5067
callq 0x21e0
movq %rax, %rdi
callq 0x2100
movq 0x529f(%rip), %rdi      # 0x7fc0
leaq 0x2364(%rip), %rsi      # 0x508c
callq 0x21e0
movq %rax, %rdi
callq 0x2100
movq %r14, %rdi
callq 0x2d74
movq 0x527c(%rip), %rdi      # 0x7fc0
leaq 0x234d(%rip), %rsi      # 0x5098
callq 0x21e0
movq %rax, %rdi
callq 0x2100
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3064
movq %r14, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/Matan-Vinkler[P]Basic-File-System/myfs.cpp
// Function: MyFs::format()
void MyFs::format() {

	// put the header in place
	struct myfs_header header;
	strncpy(header.magic, MYFS_MAGIC, sizeof(header.magic));
	header.version = CURR_VERSION;
	blkdevsim->write(0, sizeof(header), (const char*)&header);

	// TODO: put your format code here
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x543f(%rip), %rsi      # 0x81c8
leaq -0x15(%rbp), %r14
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x2120
movb $0x3, 0x4(%r14)
movq (%rbx), %rdi
pushq $0x5
popq %rdx
xorl %esi, %esi
movq %r14, %rcx
callq 0x2b82
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Matan-Vinkler[P]Basic-File-System/myfs.cpp
// Function: MyFs::create_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void MyFs::create_file(std::string path_str, bool directory) {
	struct dir_list_entry entry;
	entry.name = path_str;
	entry.is_dir = directory;
	entry.file_size = 0;

	this->list.push_back(entry);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edx, %r14d
movq %rdi, %rbx
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0x20(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq -0x58(%rbp), %rdi
callq 0x2140
leaq -0x58(%rbp), %rsi
movb %r14b, 0x20(%rsi)
andl $0x0, 0x24(%rsi)
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x3090
leaq -0x58(%rbp), %rdi
callq 0x30cc
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x30cc
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/Matan-Vinkler[P]Basic-File-System/myfs.cpp
// Function: MyFs::get_content(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string MyFs::get_content(std::string path_str) {
	for(int i = 0; i < (int)this->list.size(); i++)
	{
		if(this->list[i].name == path_str)
		{
			return this->list[i].content;
		}
	}

	throw std::runtime_error("No such file or directory");
	return "";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
pushq $-0x20
popq %r14
pushq $-0x1
popq %r13
pushq $0x48
popq %rbx
movq 0x8(%r15), %rcx
movq 0x10(%r15), %rax
subq %rcx, %rax
cqto
idivq %rbx
cltq
incq %r13
cmpq %rax, %r13
jge 0x2ea8
leaq (%rcx,%r14), %rdi
addq $0x20, %rdi
addq $0x48, %r14
movq %r12, %rsi
callq 0x30ec
testb %al, %al
je 0x2e51
addq 0x8(%r15), %r14
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2240
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2110
movq %rax, %rbx
leaq 0x21e8(%rip), %rsi      # 0x50a2
movq %rax, %rdi
callq 0x20b0
movq 0x5127(%rip), %rsi      # 0x7ff0
movq 0x50e8(%rip), %rdx      # 0x7fb8
movq %rbx, %rdi
callq 0x22c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Matan-Vinkler[P]Basic-File-System/myfs.cpp
// Function: MyFs::set_content(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void MyFs::set_content(std::string path_str, std::string content) {
	for(int i = 0; i < (int)this->list.size(); i++)
	{
		if(this->list[i].name == path_str)
		{
			this->list[i].content = content + '\26';
			this->list[i].file_size = content.size();
			return;
		}
	}

	throw std::runtime_error("No such file or directory");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r15
movq %rdi, %r14
pushq $-0x1
popq %r13
xorl %r12d, %r12d
pushq $0x48
popq %rbx
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rax
subq %rdi, %rax
cqto
idivq %rbx
cltq
incq %r13
cmpq %rax, %r13
jge 0x2f8b
addq %r12, %rdi
addq $0x48, %r12
movq %r15, %rsi
callq 0x30ec
testb %al, %al
je 0x2f11
leaq -0x50(%rbp), %r15
pushq $0x16
popq %rdx
movq %r15, %rdi
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x3118
movq 0x8(%r14), %rax
leaq (%rax,%r12), %rdi
addq $-0x20, %rdi
movq %r15, %rsi
callq 0x2220
movq %r15, %rdi
callq 0x2368
movl 0x8(%rbx), %eax
movq 0x8(%r14), %rcx
movl %eax, -0x24(%rcx,%r12)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2110
movq %rax, %rbx
leaq 0x2105(%rip), %rsi      # 0x50a2
movq %rax, %rdi
callq 0x20b0
movq 0x5044(%rip), %rsi      # 0x7ff0
movq 0x5005(%rip), %rdx      # 0x7fb8
movq %rbx, %rdi
callq 0x22c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/Matan-Vinkler[P]Basic-File-System/myfs.cpp
// Function: MyFs::list_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MyFs::dir_list MyFs::list_dir(std::string path_str) {
	MyFs::dir_list ans;
	for(int i = 0; i < (int)this->list.size(); i++)
	{
		if(strncmp(this->list[i].name.c_str(), path_str.c_str(), path_str.size()))
		{
			ans.push_back(this->list[i]);
		}
	}

	return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movq %rdi, -0x30(%rbp)
movups %xmm0, (%rdi)
xorl %r13d, %r13d
xorl %ebx, %ebx
movq 0x8(%r15), %r12
movq 0x10(%r15), %rax
subq %r12, %rax
cqto
pushq $0x48
popq %rcx
idivq %rcx
cltq
cmpq %rax, %rbx
jge 0x303c
movq (%r12,%r13), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x20f0
testl %eax, %eax
je 0x3033
addq %r13, %r12
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x3090
incq %rbx
addq $0x48, %r13
jmp 0x2ff6
movq -0x30(%rbp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x3064
movq %r14, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Matan-Vinkler[P]Basic-File-System/myfs_main.cpp
// Function: split_cmd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::vector<std::string> split_cmd(std::string cmd) {
	std::stringstream ss(cmd);
	std::string part;
	std::vector<std::string> ans;

	while (std::getline(ss, part, ' '))
		ans.push_back(part);

	return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rbx
leaq -0x1c8(%rbp), %r14
pushq $0x18
popq %rdx
movq %r14, %rdi
callq 0x2280
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq -0x40(%rbp), %r15
pushq $0x20
popq %r12
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x2310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x34cf
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40cc
jmp 0x34a6
leaq -0x40(%rbp), %rdi
callq 0x2368
leaq -0x1c8(%rbp), %rdi
callq 0x2190
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4108
leaq -0x40(%rbp), %rdi
callq 0x2368
leaq -0x1c8(%rbp), %rdi
callq 0x2190
movq %r14, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/gdaws[P]process-monitor/program_arguments.cpp
// Function: program_arguments::parser::add_option(char, char const*, char const*, char const*, program_arguments::basic_binder*)
parser & parser::add_option(const char     name, 
                            const char *   verbose_name, 
                            const char *   value_name, 
                            const char *   description,
                            basic_binder * binding)
{
    option opt;
    opt.name = name;
    opt.verbose_name = verbose_name;
    opt.value_name = value_name;
    opt.description = description;
    opt.binding = binding;
    
    if(opt.name != '\0') m_names[opt.name] = opt;
    if(opt.verbose_name) m_verbose_names[opt.verbose_name] = opt;
    
    m_groups.back().options.push_back(opt);
    
    std::sort(m_groups.back().options.begin(), 
              m_groups.back().options.end(),
              &parser::compare_option);
    
    return *this;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movb %sil, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x30(%rsp)
testb %sil, %sil
je 0x2ace
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a6e
movq 0x20(%r14), %rcx
movq %rcx, 0x20(%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x2b1b
leaq 0x38(%rsp), %r14
leaq 0xf(%rsp), %rax
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x3b22
leaq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x3abc
movq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rax)
movups 0x10(%rsp), %xmm0
movups 0x20(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0x38(%rsp), %rdi
callq 0x20c0
movq 0x68(%rbx), %rdi
addq $-0x18, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3b5e
movq 0x68(%rbx), %rax
movq -0x18(%rax), %rdi
movq -0x10(%rax), %rsi
leaq 0x26(%rip), %rdx        # 0x2b66
callq 0x483d
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/gdaws[P]process-monitor/program_arguments.cpp
// Function: program_arguments::parser::add_argument(char const*, program_arguments::basic_binder*)
parser & parser::add_argument(const char * value_name, basic_binder * binding)
{
    if(m_argument_repeat_last) m_argument_repeat_last++;

    argument arg;
    arg.value_name = value_name;
    arg.binding = binding;
    m_arguments.push_back(arg);
    
    m_next_argument = m_arguments.begin();
    
    return *this;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x98(%rdi), %eax
testl %eax, %eax
je 0x2c90
incl %eax
movl %eax, 0x98(%rbx)
movq %rsp, %rax
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
leaq 0x78(%rbx), %rdi
movq %rax, %rsi
callq 0x3b8c
movq 0x78(%rbx), %rax
movq %rax, 0x90(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/pritpal20[P]vector/./vector.hpp
// Function: lni::vector<bool>::resize(unsigned int)
void vector<bool>::resize(typename vector<bool>::size_type sz) {
		if (sz > rsrv_sz) {
			rsrv_sz = sz;
			reallocate();
		}
		vec_sz = sz;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, (%rdi)
jae 0x1274
movl %ebx, (%r14)
movq %r14, %rdi
callq 0x217e
movl %ebx, 0x4(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq