LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4ad8
callq 0x3440
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4aee
callq 0x3310
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %rdx
cmpq %rcx, %rax
je 0x4d3d
movq 0x50(%rdx), %r8
subq 0x48(%rdx), %r8
sarq $0x2, %r8
addq 0x30(%rdx), %r8
movq (%rax), %rdi
movq 0x50(%rdi), %r9
subq 0x48(%rdi), %r9
sarq $0x2, %r9
addq 0x30(%rdi), %r9
cmpq %r9, %r8
ja 0x4d2f
movq %rdx, %rdi
addq $0x8, %rax
movq %rdi, %rdx
cmpq %rcx, %rax
jne 0x4d04
jmp 0x4d40
movq %rdx, %rdi
popq %rbp
jmp 0x4d46
// File: /workspace/github_cpp_makefile_star2_O1/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
testl %esi, %esi
jle 0x54d2
movl %esi, %r14d
leaq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
movl %esi, %r12d
negl %r12d
movl $0x1, %r15d
movl $0x198, %edi            # imm = 0x198
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0x55f2
movl %r15d, 0x38(%r13)
movl 0x120(%rbx), %eax
cltd
idivl %r14d
leal 0x1(%rax), %esi
movq (%r13), %rax
movq %r13, %rdi
callq *0x10(%rax)
movq %r13, -0x38(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x67bc
movq %rbx, 0x40(%r13)
movq %r13, %rdi
callq 0x5694
leal (%r12,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x5472
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq -0x80(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rbx, (%rdx)
addq $0x8, %rbx
leaq 0x1d82(%rip), %rax      # 0x727e
movq %rax, 0x18(%rdx)
leaq 0x1d8b(%rip), %rax      # 0x7292
movq %rax, 0x10(%rdx)
leaq -0x60(%rbp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq %rbx, %rdi
callq 0x57b0
movq -0x50(%rbp), %rax
testq %rax, %rax
je 0x5535
leaq -0x60(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x70(%rbp), %rax
testq %rax, %rax
je 0x554c
leaq -0x80(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x90(%rbp), %rax
testq %rax, %rax
je 0x5569
leaq -0xa0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55d2
jmp 0x55d2
jmp 0x55d2
movq %rax, %rbx
movq -0x50(%rbp), %rax
testq %rax, %rax
je 0x5598
leaq -0x60(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x70(%rbp), %rax
testq %rax, %rax
je 0x55af
leaq -0x80(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x90(%rbp), %rax
testq %rax, %rax
je 0x55ea
leaq -0xa0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x55ea
jmp 0x55d2
jmp 0x55d2
movq %rax, %rdi
callq 0x4354
movq %rax, %rbx
movl $0x198, %esi            # imm = 0x198
movq %r13, %rdi
callq 0x32a0
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O1/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 -0x70(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq -0x50(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rdi, (%rdx)
leaq 0x126f(%rip), %rcx      # 0x6936
movq %rcx, 0x18(%rdx)
leaq 0x1274(%rip), %rcx      # 0x6946
movq %rcx, 0x10(%rdx)
leaq -0x30(%rbp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq %rdi, (%rcx)
leaq 0x189d(%rip), %rdi      # 0x6f88
movq %rdi, 0x18(%rcx)
leaq 0x18a0(%rip), %rdi      # 0x6f96
movq %rdi, 0x10(%rcx)
movq %rax, %rdi
callq 0x57b0
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x5719
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x5730
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x5747
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
jmp 0x57a8
jmp 0x57a8
jmp 0x57a8
movq %rax, %rbx
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x576e
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x5785
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x579c
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x33f0
jmp 0x57a8
jmp 0x57a8
movq %rax, %rdi
callq 0x4354
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3380
testl %eax, %eax
jne 0x5879
cmpb $0x0, 0xe8(%r14)
jne 0x5862
movb $0x1, 0xe8(%r14)
cmpq $0x0, 0x10(%r13)
je 0x5805
movq %r14, %rdi
movq %r13, %rsi
callq 0x706e
cmpq $0x0, 0x10(%r12)
je 0x5819
leaq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0x706e
cmpq $0x0, 0x10(%r15)
je 0x582c
leaq 0x40(%r14), %rdi
movq %r15, %rsi
callq 0x706e
leaq 0x18af(%rip), %rax      # 0x70e2
leaq -0x48(%rbp), %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
leaq -0x38(%rbp), %rdx
movq %r14, (%rdx)
leaq -0x30(%rbp), %rdi
callq 0x7140
leaq -0x30(%rbp), %rdi
callq 0x33e0
cmpq $0x0, -0x30(%rbp)
jne 0x5887
movq %rbx, %rdi
callq 0x3200
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x31c0
cmpq $0x0, -0x30(%rbp)
je 0x588e
callq 0x30b0
jmp 0x588e
movq %rax, %r14
movq %rbx, %rdi
callq 0x3200
movq %r14, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, -0x38(%rbp)
movl $0x1, %esi
callq 0x49f6
movl %eax, -0x2c(%rbp)
testl %eax, %eax
js 0x5a31
je 0x5a49
movq 0x188(%r14), %r13
movl -0x2c(%rbp), %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rbx
xorl %r15d, %r15d
movq 0x4(%r13,%r15), %r12
testq %r12, %r12
je 0x5a22
testb $0x1, (%r13,%r15)
je 0x59c8
xorl %edi, %edi
callq 0x3260
addq $0xb4, %rax
movq %rax, 0x58(%r12)
leaq 0x10(%r12), %rdi
movl 0xc(%r12), %esi
callq 0x5e92
cmpl $-0x1, %eax
je 0x5a17
movq 0x40(%r14), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x18(%rax)
testb $0x4, (%r13,%r15)
je 0x5a22
movq $0x0, 0x40(%r12)
xorl %edi, %edi
callq 0x3260
addq $0xb4, %rax
movq %rax, 0x58(%r12)
leaq 0x28(%r12), %rdi
movl 0xc(%r12), %esi
callq 0x614a
cmpl $-0x1, %eax
je 0x5a17
movq -0x38(%rbp), %rdi
movl $0x3, %esi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x5daa
jmp 0x5a22
movq %r14, %rdi
movq %r12, %rsi
callq 0x5de4
addq $0xc, %r15
cmpq %r15, %rbx
jne 0x597f
jmp 0x5a49
callq 0x3040
movl (%rax), %edi
callq 0x3100
leaq 0x2998(%rip), %rdi      # 0x83dc
callq 0x3b22
cmpl $0x0, -0x2c(%rbp)
setns %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3380
testl %eax, %eax
jne 0x5d8f
cmpb $0x1, 0xe8(%r14)
jne 0x5d83
movb $0x0, 0xe8(%r14)
addq $0x88, %r14
movq %r14, %rdi
callq 0x474e
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3200
movl %eax, %edi
callq 0x31c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x3200
movq %r14, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3320
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
je 0x5dd8
addq $0x10, %rsp
popq %rbp
retq
callq 0x34d8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x5dd2
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x30(%rax)
movl 0xc(%rbx), %edi
movq 0x18(%r14), %rdx
leaq 0x10(%r14), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x5e28
movq %rax, %rcx
xorl %esi, %esi
cmpl %edi, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x5e11
movq %rax, %r15
cmpq %rax, %rcx
je 0x5e3a
cmpl 0x20(%rcx), %edi
cmovlq %rax, %rcx
movq %rcx, %r15
cmpq %rax, %r15
je 0x5e6c
leaq 0x8(%r14), %r12
testl %edi, %edi
jle 0x5e4c
callq 0x3440
movq %rbx, %rdi
callq 0x5ed0
movl $0x60, %esi
movq %rbx, %rdi
callq 0x32a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x6104
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x5e89
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5ec0
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 0x5ec3
addl %eax, 0x8(%rbx)
jmp 0x5ec8
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x251a(%rip), %rdi      # 0x83ff
callq 0x5f3a
movl 0xc(%rbx), %edi
cmpl $-0x1, %edi
je 0x5efe
callq 0x3440
movl $0xffffffff, 0xc(%rbx)  # imm = 0xFFFFFFFF
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x5f14
callq 0x3310
movq $0x0, 0x28(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5f2a
callq 0x3310
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
callq 0x4354
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x61bc
movq %rdi, %rbx
movq (%rdi), %rax
movl %esi, %edi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x3170
movq %rax, %r14
testl %r14d, %r14d
jle 0x6193
movl 0x8(%rbx), %eax
subl %r14d, %eax
jne 0x619b
movl $0x0, 0x8(%rbx)
jmp 0x61b5
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x61bc
movl %eax, 0x8(%rbx)
movq (%rbx), %rdi
movl %r14d, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
addq %rdi, %rsi
movslq %eax, %rdx
callq 0x3220
movl $0x0, 0x10(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6776
addq (%rbx), %rdi
movslq %edx, %r14
movq %r14, %rdx
callq 0x3220
addl 0x8(%rbx), %r14d
movl %r14d, 0x8(%rbx)
cmpl $0x1400, %r14d          # imm = 0x1400
jne 0x6779
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_O1/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
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x3320
cmpl $-0x1, %eax
je 0x67af
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x34f6
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x67a6
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rdi, %r14
movq %rsi, -0x48(%rbp)
cmpb $0x1, 0xe8(%rsi)
jne 0x6ade
leaq 0x60(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x8(%r14), %r12
movq 0x48(%r14), %rax
cmpq 0x50(%r14), %rax
je 0x6a71
movq -0x30(%rbp), %rdi
callq 0x3380
testl %eax, %eax
jne 0x6afd
movq 0x48(%r14), %r13
movq 0x50(%r14), %rax
movq %rax, -0x50(%rbp)
cmpq %rax, %r13
je 0x6a5a
movl (%r13), %ebx
movl %ebx, -0x40(%rbp)
movl $0x60, %edi
callq 0x3280
movq %rax, %r15
movq %rax, %rdi
movl %ebx, %esi
movl $0x1400, %edx           # imm = 0x1400
movl $0x1400, %ecx           # imm = 0x1400
callq 0x6b2a
movq %r12, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6bf2
movq %r15, (%rax)
movl 0x38(%r14), %eax
movl %eax, 0x4(%r15)
movq 0x40(%r14), %r15
testq %r15, %r15
je 0x6a34
movq %r12, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6bf2
movq (%rax), %rsi
movq (%r15), %rax
movq %r15, %rdi
callq *(%rax)
movq %r12, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6bf2
movq (%rax), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
addq $0x4, %r13
cmpq -0x50(%rbp), %r13
jne 0x69d5
movq 0x48(%r14), %rax
cmpq %rax, 0x50(%r14)
je 0x6a68
movq %rax, 0x50(%r14)
movq -0x30(%rbp), %rdi
callq 0x3200
cmpq $0x0, 0x30(%r14)
je 0x6a97
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
testb %al, %al
je 0x6ad5
movq %r14, %rdi
callq 0x6c5a
movq %r14, %rdi
callq 0x6cd4
jmp 0x6ac2
movq $0x0, -0x40(%rbp)
movq $0xf4240, -0x38(%rbp)   # imm = 0xF4240
leaq -0x40(%rbp), %rdi
movq %rdi, %rsi
callq 0x30d0
cmpl $-0x1, %eax
jne 0x6ac2
callq 0x3040
cmpl $0x4, (%rax)
je 0x6aa7
movq -0x48(%rbp), %rax
cmpb $0x0, 0xe8(%rax)
jne 0x69a1
jmp 0x6ade
movq -0x48(%rbp), %rdi
callq 0x4a24
movl 0x38(%r14), %esi
leaq 0x19f8(%rip), %rdi      # 0x84e1
callq 0x458e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x31c0
movq %rax, %r14
movl $0x60, %esi
movq %r15, %rdi
callq 0x32a0
jmp 0x6b19
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x3200
movq %r14, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %rbx
movq $-0x1, (%rdi)
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
xorl %r13d, %r13d
movl %r13d, 0x20(%rdi)
movl %ecx, 0x1c(%rdi)
movslq %ecx, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movl %r13d, 0x38(%rbx)
movl %r12d, 0x34(%rbx)
movslq %r12d, %rdi
callq 0x3030
movq %rax, 0x28(%rbx)
movaps 0x147e(%rip), %xmm0     # 0x8010
movups %xmm0, 0x48(%rbx)
movl 0x569c(%rip), %eax      # 0xc238
leal 0x1(%rax), %ecx
movl %ecx, 0x5693(%rip)      # 0xc238
movl %eax, (%rbx)
movl %r14d, 0xc(%rbx)
xorl %edi, %edi
callq 0x3260
addq $0xb4, %rax
movq %rax, 0x58(%rbx)
movq $0x0, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x3310
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x20(%rdi), %r14
leaq 0x10(%rdi), %r12
cmpq %r12, %r14
je 0x6ccb
movq %rdi, %rbx
movq 0x28(%r14), %r15
movl 0x18(%r15), %eax
cmpl $0x4, %eax
jb 0x6cbb
movq 0x10(%r15), %rcx
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x6cbb
movq 0x10(%r15), %rdx
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x28(%rax)
movq %r15, %rdi
callq 0x6f3a
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x10(%rax)
movl 0x18(%r15), %eax
cmpl $0x3, %eax
ja 0x6c82
movq %r14, %rdi
callq 0x31d0
movq %rax, %r14
cmpq %r12, %rax
jne 0x6c75
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3260
movq 0x20(%rbx), %r15
leaq 0x10(%rbx), %r12
cmpq %r12, %r15
je 0x6d1b
movq %rax, %r14
movq 0x28(%r15), %rsi
cmpq 0x58(%rsi), %r14
jl 0x6d0b
movq %rbx, %rdi
callq 0x5de4
movq %r15, %rdi
callq 0x31d0
movq %rax, %r15
cmpq %r12, %rax
jne 0x6cf9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/pxzwxx[P]SynBS/./serverFile/./../share/./CELLBuffer.hpp
// Function: CELLClient::pop_front_msg()
bool hasMsg()
	{
		//判断消息缓冲区的数据长度大于消息头netmsg_DataHeader长度
		if (_nLast >= sizeof(netmsg_DataHeader))
		{
			//这时就可以知道当前消息的长度
			netmsg_DataHeader* header = (netmsg_DataHeader*)_pBuff;
			//判断消息缓冲区的数据长度大于消息长度
			return _nLast >= header->dataLength;
		}
		return false;
	}

// Assembly:
movl 0x18(%rdi), %eax
cmpl $0x4, %eax
jb 0x6f86
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x6f82
movq 0x10(%rbx), %rdi
movzwl (%rdi), %esi
movl 0x18(%rbx), %r14d
subl %esi, %r14d
jle 0x6f72
addq %rdi, %rsi
movl %r14d, %edx
callq 0x3220
movl %r14d, 0x18(%rbx)
movl 0x20(%rbx), %eax
testl %eax, %eax
jle 0x6f82
decl %eax
movl %eax, 0x20(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x8(%rdi), %r14
movq 0x20(%rdi), %r15
leaq 0x10(%rdi), %r13
cmpq %r13, %r15
je 0x7010
movq 0x28(%r15), %r12
testq %r12, %r12
je 0x7000
movq %r12, %rdi
callq 0x5ed0
movl $0x60, %esi
movq %r12, %rdi
callq 0x32a0
movq %r15, %rdi
callq 0x31d0
movq %rax, %r15
cmpq %r13, %rax
jne 0x6fe2
movq %r14, %rdi
callq 0x7036
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x7026
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_O1/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 0x70ff
leaq -0x10(%rbp), %rsi
movq %rbx, (%rsi)
movq %rbx, %rdi
callq *0x18(%rbx)
cmpq $0x0, 0x30(%rbx)
je 0x7114
leaq 0x20(%rbx), %rdi
leaq -0x10(%rbp), %rsi
movq %rbx, (%rsi)
callq *0x38(%rbx)
cmpq $0x0, 0x50(%rbx)
je 0x7129
leaq 0x40(%rbx), %rdi
leaq -0x10(%rbp), %rsi
movq %rbx, (%rsi)
callq *0x58(%rbx)
addq $0x88, %rbx
movq %rbx, %rdi
callq 0x47a4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq $0x0, 0x4f17(%rip)      # 0xc280
jne 0x73bf
leaq 0x4ee6(%rip), %rax      # 0xc258
leaq -0x18(%rbp), %rbx
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x4810
movb $0x1, 0x8(%rbx)
cmpq $0x0, 0x4eef(%rip)      # 0xc280
jne 0x73b6
movl $0xa0, %edi
callq 0x3280
movq $0x0, 0x90(%rax)
movb $0x1, 0x98(%rax)
movq %rax, 0x4eca(%rip)      # 0xc280
leaq -0x18(%rbp), %rdi
callq 0x47f6
movq 0x4eba(%rip), %rax      # 0xc280
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x47f6
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpb $0x1, 0x98(%rdi)
jne 0x74ae
movq %rdi, %rbx
leaq -0x38(%rbp), %r12
leaq 0x4e4a(%rip), %r15      # 0xc258
leaq -0x48(%rbp), %r13
leaq 0x4ecf(%rip), %r14      # 0xc2e8
leaq 0x4e68(%rip), %rdi      # 0xc288
callq 0x474e
movq %r15, %rdi
callq 0x3380
testl %eax, %eax
jne 0x74bd
movq 0x4f0c(%rip), %rax      # 0xc348
movq %r12, -0x48(%rbp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x7768
movq 0x4eee(%rip), %rsi      # 0xc348
leaq 0x4ee7(%rip), %rdi      # 0xc348
callq 0x7802
movq -0x48(%rbp), %rdi
movq 0x8(%rbx), %rsi
callq 0x32c0
movq 0x8(%rbx), %rdi
callq 0x32f0
movq %r15, %rdi
callq 0x3200
movq %r14, %rdi
callq 0x47a4
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x74a1
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32a0
cmpb $0x0, 0x98(%rbx)
jne 0x7419
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x31c0
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x74dc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32a0
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3130
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3220
leaq 0x118b(%rip), %rsi      # 0x86a6
movq %r14, %rdi
callq 0x3300
movq %rax, 0x8(%rbx)
movl $0x0, 0x4daf(%rip)      # 0xc2e0
movl (%rbx), %eax
movl %eax, 0x4e07(%rip)      # 0xc340
leaq -0x15e(%rip), %rax      # 0x73e2
leaq -0x38(%rbp), %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
leaq -0x28(%rbp), %rdx
movq %rbx, (%rdx)
leaq -0x20(%rbp), %rdi
callq 0x7650
cmpq $0x0, 0x90(%rbx)
jne 0x758a
addq $0x90, %rbx
movq -0x20(%rbp), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x33e0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x30b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x4ce1(%rip)      # 0xc280
je 0x762f
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4c9e(%rip), %rax      # 0xc258
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x4810
movb $0x1, 0x8(%r14)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x75ea
callq 0x32f0
movq 0x8(%rbx), %rdi
callq 0x3270
movq 0x4c8f(%rip), %r14      # 0xc280
testq %r14, %r14
je 0x760b
movq %r14, %rdi
callq 0x76e2
movl $0xa0, %esi
movq %r14, %rdi
callq 0x32a0
movl $0x0, (%rbx)
xorl %eax, %eax
movq %rax, 0x4c66(%rip)      # 0xc280
movq %rax, 0x8(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x47f6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x15d4
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2a92(%rip), %rsi      # 0x4078
movq 0x2a83(%rip), %rax      # 0x4070
movq %rsi, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rdi, %rcx
ja 0x167b
movabsq $-0x768fa0ceed5d701b, %r12 # imm = 0x89705F3112A28FE5
leaq 0x2a63(%rip), %r14      # 0x4070
movq %rsp, %r15
imulq -0x8(%rsi), %rcx
movq %rcx, %rax
imulq %r12
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1d, %rdx
addq %rax, %rdx
imulq $0x3b9aca07, %rdx, %rax # imm = 0x3B9ACA07
subq %rax, %rcx
movq %rcx, (%rsp)
cmpq 0x2a3f(%rip), %rsi      # 0x4080
je 0x1653
movq %rcx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x2a27(%rip)      # 0x4078
jmp 0x165e
movq %r14, %rdi
movq %r15, %rdx
callq 0x17e2
movq 0x2a13(%rip), %rsi      # 0x4078
movq 0x2a04(%rip), %rax      # 0x4070
movq %rsi, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
jbe 0x1610
movq (%rax,%rbx,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r12
movabsq $-0x768fa0ceed5d701b, %r13 # imm = 0x89705F3112A28FE5
movl $0x1, %ebx
movq %r12, %rax
orq %rdi, %rax
je 0x179b
movq %rdi, %rax
imulq %r13
movq %rdx, %r14
addq %rdi, %r14
movq %r14, %rax
shrq $0x3f, %rax
sarq $0x1d, %r14
addq %rax, %r14
imulq $0x3b9aca07, %r14, %rax # imm = 0x3B9ACA07
subq %rax, %rdi
movq %r12, %rax
imulq %r13
movq %rdx, %r15
addq %r12, %r15
movq %r15, %rax
shrq $0x3f, %rax
sarq $0x1d, %r15
addq %rax, %r15
imulq $0x3b9aca07, %r15, %rax # imm = 0x3B9ACA07
subq %rax, %r12
movq %rdi, %rbp
subq %r12, %rbp
jl 0x17a2
callq 0x15c8
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x15c8
movl $0x3b9aca05, %esi       # imm = 0x3B9ACA05
movq %rax, %rdi
callq 0x14dc
movq %rax, %r12
movq %rbp, %rdi
callq 0x15c8
movl $0x3b9aca05, %esi       # imm = 0x3B9ACA05
movq %rax, %rdi
callq 0x14dc
movq %rax, %rcx
imulq %r12, %rcx
movq %rcx, %rax
imulq %r13
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1d, %rdx
addq %rax, %rdx
imulq $0x3b9aca07, %rdx, %rax # imm = 0x3B9ACA07
subq %rax, %rcx
imulq (%rsp), %rcx
movq %rcx, %rax
imulq %r13
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1d, %rdx
addq %rax, %rdx
imulq $0x3b9aca07, %rdx, %rax # imm = 0x3B9ACA07
subq %rax, %rcx
imulq %rcx, %rbx
movq %r14, %rdi
movq %r15, %r12
jmp 0x16a8
movl $0x1, %eax
jmp 0x17a4
xorl %eax, %eax
imulq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %esi, 0x4(%rsp)
movq %rdi, %rax
andq $-0x2, %rax
cmpq $0x2, %rax
jne 0x1223
movb $0x1, %al
jmp 0x1338
movq %rdi, %r14
cmpq $0x2, %rdi
setl %al
testb $0x1, %r14b
sete %cl
orb %al, %cl
je 0x123f
xorl %eax, %eax
jmp 0x1338
leaq -0x1(%r14), %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r15, %rcx
movq %r15, %rax
shrq %rax
incl %ebp
testb $0x2, %cl
movq %rax, %rcx
je 0x124e
movl $0x2, %eax
movl %ebp, %ecx
shll %cl, %eax
movslq %eax, %rcx
movq %r15, %rax
cqto
idivq %rcx
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x4(%rsp)
setle %al
jle 0x1338
leaq -0x3(%r14), %rax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
testl %ebp, %ebp
sete %bl
callq 0x1040
movl %eax, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
shlq $0x20, %r13
callq 0x1040
cltq
orq %r13, %rax
cqto
idivq 0x8(%rsp)
leaq 0x2(%rdx), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x116c
cmpq $0x1, %rax
sete %cl
cmpq %r15, %rax
sete %dl
orb %cl, %dl
orb %dl, %bl
testb %dl, %dl
movl $0x1, %ecx
movl $0x7, %edx
cmovnel %edx, %ecx
movl %ebp, %r13d
testb %bl, %bl
jne 0x1318
movl $0x2, %esi
movq %rax, %rdi
movq %r14, %rdx
callq 0x116c
movl $0x1, %ecx
cmpq $0x1, %rax
je 0x1318
cmpq %r15, %rax
je 0x1316
decl %r13d
jne 0x12ef
jmp 0x1318
xorl %ecx, %ecx
cmpl $0x7, %ecx
je 0x1325
testl %ecx, %ecx
jne 0x1238
incl %r12d
cmpl 0x4(%rsp), %r12d
jne 0x128e
jmp 0x121c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
xorl %edi, %edi
callq 0x1050
movl %eax, %edi
callq 0x1060
leaq 0xca7(%rip), %rdi       # 0x2004
movl $0x1, %esi
xorl %eax, %eax
callq 0x1030
leaq 0xcb1(%rip), %rdi       # 0x2021
movl $0x1, %esi
xorl %eax, %eax
callq 0x1030
leaq 0xcbb(%rip), %rdi       # 0x203e
xorl %esi, %esi
xorl %eax, %eax
callq 0x1030
movl $0x5, %edi
movl $0xa, %esi
callq 0x11fd
movzbl %al, %esi
leaq 0xcb6(%rip), %rdi       # 0x205b
xorl %eax, %eax
callq 0x1030
movl $0x2bc521f, %edi        # imm = 0x2BC521F
movl $0xa, %esi
callq 0x11fd
movzbl %al, %esi
leaq 0xcb3(%rip), %rdi       # 0x2078
xorl %eax, %eax
callq 0x1030
movl $0xd165493, %edi        # imm = 0xD165493
movl $0xa, %esi
callq 0x11fd
movzbl %al, %esi
leaq 0xcb7(%rip), %rdi       # 0x209c
xorl %eax, %eax
callq 0x1030
movabsq $0x31bad0e013, %rdi     # imm = 0x31BAD0E013
movl $0xa, %esi
callq 0x11fd
movzbl %al, %esi
leaq 0xcb7(%rip), %rdi       # 0x20c1
xorl %eax, %eax
callq 0x1030
movl $0xb2d08c91, %edi       # imm = 0xB2D08C91
movl $0xa, %esi
callq 0x11fd
movzbl %al, %esi
leaq 0xcbf(%rip), %rdi       # 0x20e9
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %rsi, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
leaq -0x1d(%rbp), %rcx
movq %rsi, %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x32a2
movq 0x5e17(%rip), %rsi      # 0x91d0
leaq -0x1d(%rbp), %rdi
movl $0x4, %edx
callq 0x2100
testl %eax, %eax
jne 0x33d5
cmpb $0x3, -0x19(%rbp)
je 0x34af
movq 0x5be4(%rip), %r15      # 0x8fc0
leaq 0x2c84(%rip), %rsi      # 0x6067
movl $0x24, %edx
movq %r15, %rdi
callq 0x2240
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5bb2(%rip), %rdi      # 0x8fc0
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq 0x5b9e(%rip), %r15      # 0x8fc0
leaq 0x2c63(%rip), %rsi      # 0x608c
movl $0xb, %edx
movq %r15, %rdi
callq 0x2240
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5b6c(%rip), %rdi      # 0x8fc0
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x34ce
movq 0x5b50(%rip), %r14      # 0x8fc0
leaq 0x2c21(%rip), %rsi      # 0x6098
movl $0x9, %edx
movq %r14, %rdi
callq 0x2240
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5b1e(%rip), %rdi      # 0x8fc0
callq 0x2030
movq %rax, %rdi
callq 0x2170
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3930
movq %r14, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5ced(%rip), %rsi      # 0x91d0
leaq -0x15(%rbp), %r14
movl $0x4, %edx
movq %r14, %rdi
callq 0x2130
movb $0x3, 0x4(%r14)
movq (%rbx), %rdi
xorl %esi, %esi
movl $0x5, %edx
movq %r14, %rcx
callq 0x32ba
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %r14d
movq %rdi, %rbx
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x68(%rbp), %rdi
callq 0x2150
leaq -0x68(%rbp), %rsi
movb %r14b, 0x20(%rsi)
movl $0x0, 0x24(%rsi)
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x396e
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x3585
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x359a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x39a6
movq %rbx, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movq 0x8(%rsi), %r15
movq 0x10(%rsi), %rax
subq %r15, %rax
sarq $0x3, %rax
movabsq $-0x71c71c71c71c71c7, %rsi # imm = 0x8E38E38E38E38E39
imulq %rax, %rsi
testl %esi, %esi
setg %r12b
jle 0x365c
movq -0x38(%rbp), %rax
movq 0x8(%rax), %r14
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
addq $0x30, %r15
movq %rsi, %r13
negq %r13
movl $0x1, %ebx
movq %rsi, -0x40(%rbp)
movq -0x28(%r15), %rdx
cmpq %r14, %rdx
jne 0x3641
testq %rdx, %rdx
je 0x368e
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%r15), %rdi
callq 0x2230
movq -0x40(%rbp), %rsi
testl %eax, %eax
je 0x368e
cmpq %rsi, %rbx
setb %r12b
addq $0x48, %r15
leaq (%rbx,%r13), %rax
incq %rax
incq %rbx
cmpq $0x1, %rax
jne 0x361b
movl $0x10, %edi
callq 0x2120
movq %rax, %rbx
leaq 0x2a32(%rip), %rsi      # 0x60a2
movq %rax, %rdi
callq 0x20d0
movq 0x5971(%rip), %rsi      # 0x8ff0
movq 0x5932(%rip), %rdx      # 0x8fb8
movq %rbx, %rdi
callq 0x22d0
movq -0x30(%rbp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq -0x8(%r15), %rsi
movq (%r15), %rdx
addq %rsi, %rdx
callq 0x39ec
testb $0x1, %r12b
je 0x365c
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2190
movq %r14, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq 0x8(%rdi), %r8
movq %rdi, -0x30(%rbp)
movq 0x10(%rdi), %rax
subq %r8, %rax
sarq $0x3, %rax
movabsq $-0x71c71c71c71c71c7, %r14 # imm = 0x8E38E38E38E38E39
imulq %rax, %r14
testl %r14d, %r14d
setg %r12b
jle 0x3793
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq %r14, %rdi
negq %rdi
movl $0x28, %r13d
movl $0x1, %r15d
movq %rsi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
movq -0x20(%r8,%r13), %rdx
cmpq %rsi, %rdx
jne 0x3778
testq %rdx, %rdx
je 0x37c5
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq -0x28(%r8,%r13), %rdi
movl %r12d, %ebx
movq %r8, %r12
callq 0x2230
movq -0x48(%rbp), %rdi
movq %r12, %r8
movl %ebx, %r12d
movq -0x50(%rbp), %rsi
testl %eax, %eax
je 0x37c5
cmpq %r14, %r15
setb %r12b
addq $0x48, %r13
leaq (%rdi,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x3740
movl $0x10, %edi
callq 0x2120
movq %rax, %r14
leaq 0x28fb(%rip), %rsi      # 0x60a2
movq %rax, %rdi
callq 0x20d0
movq 0x583a(%rip), %rsi      # 0x8ff0
movq 0x57fb(%rip), %rdx      # 0x8fb8
movq %r14, %rdi
callq 0x22d0
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x40(%rbp), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0x39ec
movq 0x8(%r15), %rsi
movl $0x1, %ecx
movq %r15, %rdi
xorl %edx, %edx
movl $0x16, %r8d
callq 0x2330
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
addq %r13, %rdi
movq %r15, %rsi
callq 0x2250
movq (%r15), %rdi
cmpq %r14, %rdi
je 0x3827
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
movl 0x8(%rbx), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl %eax, -0x4(%rcx,%r13)
testb $0x1, %r12b
je 0x3793
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x3875
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x3875
movq %rax, %rbx
movq %r14, %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %r12
movq 0x10(%rsi), %rax
subq %r12, %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
testl %eax, %eax
jle 0x3908
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
xorl %ebx, %ebx
movq (%r12,%r13), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x2100
testl %eax, %eax
je 0x38e5
addq %r13, %r12
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x396e
incq %rbx
movq 0x8(%r15), %r12
movq 0x10(%r15), %rax
subq %r12, %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
cltq
addq $0x48, %r13
cmpq %rax, %rbx
jl 0x38c2
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 0x3930
movq %r14, %rdi
callq 0x22f0
nop