LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Server.cpp
// Function: Server::AddClientToEvent(Client)
Error Server::AddClientToEvent(Client client)
{
	error_state = Error::UNKNOWN;
	int epoll_status;
	struct epoll_event event;

	event.data.fd = client.get_fd();
	event.events = EPOLLIN | EPOLLET | EPOLLRDHUP;

	epoll_status = epoll_ctl(event_fd, EPOLL_CTL_ADD, event.data.fd, &event);

	if (epoll_status == -1)
	{
		perror ("epoll_create");
		error_state = Error::EPOLL_CTL;
	}
	else
	{
		error_state = Error::NONE;
	}

	return error_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x0, 0x1b4(%rdi)
movl 0xc(%rsi), %edx
leaq -0x14(%rbp), %rcx
movl %edx, 0x4(%rcx)
movl $0x80002001, (%rcx)     # imm = 0x80002001
movl 0x1b8(%rdi), %edi
movl $0x1, %esi
callq 0x6520
movl %eax, %ecx
movl $0x2, %eax
cmpl $-0x1, %ecx
je 0xa3ef
movl %eax, 0x1b4(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0xed0(%rip), %rdi       # 0xb2c6
callq 0x6370
movl $0xc, %eax
jmp 0xa3e2
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Server.cpp
// Function: Server::isClient(int, Client&)
bool Server::isClient(int fd, Client& client)
{
	bool found = false;
	for(auto local:client_list)
	{
		if(local.get_fd() == fd)
		{
			client = local;
			found = true;
		}
	}

	return found;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, -0x30(%rbp)
movq %rdi, %r15
leaq -0x78(%rbp), %r13
leaq 0x8(%rdx), %r12
movq %rdx, -0x38(%rbp)
leaq 0x18(%rdx), %rax
movq %rax, -0x40(%rbp)
movl $0x48, %ebx
movl $0x0, -0x2c(%rbp)
movq 0x4b88(%rip), %r14      # 0xefc8
addq $0x10, %r14
movq %r14, -0x80(%rbp)
movb -0x28(%r15,%rbx), %al
movb %al, 0x8(%r13)
movq -0x30(%r15,%rbx), %rax
movq %rax, (%r13)
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%r15,%rbx), %rsi
movq -0x18(%r15,%rbx), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x61c0
movzwl (%r15,%rbx), %eax
movw %ax, -0x48(%rbp)
movl -0x30(%rbp), %eax
cmpl %eax, -0x74(%rbp)
jne 0xa4b8
movb 0x8(%r13), %al
movb %al, 0x8(%r12)
movq (%r13), %rax
movq %rax, (%r12)
movq -0x40(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x6240
movzwl -0x48(%rbp), %eax
movq -0x38(%rbp), %rcx
movw %ax, 0x38(%rcx)
movb $0x1, %al
movl %eax, -0x2c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x60e0
addq $0x40, %rbx
cmpq $0x1c8, %rbx            # imm = 0x1C8
jne 0xa444
movl -0x2c(%rbp), %eax
andb $0x1, %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x60e0
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH13_CopyControl/examples/HasPtrValueLike.cc
// Function: HasPtr::operator=(HasPtr const&)
HasPtr& HasPtr::operator=(const HasPtr& rhs)
{
	auto newp = new string(*rhs.ps);  // copy the underlying string
	delete ps;       // free the old memory
	ps = newp;       // copy data from rhs into this object
	i = rhs.i;
	return *this;    // return this object
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x20, %edi
callq 0x1050
movq %rax, %r15
movq (%r14), %rax
leaq 0x10(%r15), %rcx
movq %rcx, (%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x140a
movq (%rbx), %r12
testq %r12, %r12
je 0x11e7
movq (%r12), %rdi
leaq 0x10(%r12), %rax
cmpq %rax, %rdi
je 0x11e7
movq (%rax), %rsi
incq %rsi
callq 0x1060
movl $0x20, %esi
movq %r12, %rdi
callq 0x1060
movq %r15, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x20, %esi
movq %r15, %rdi
callq 0x1060
movq %rbx, %rdi
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/proxyclient.cpp
// Function: sendMessage(int, unsigned char const*, unsigned long, ClientContext*, int)
ssize_t sendMessage(int sockFd, const uint8_t *src, size_t nbyte, ClientContext *ctx, int msgType = 4) {
    static InnerMsg innerMsg;
    memset(&innerMsg, 0, sizeof(innerMsg));
    ctx->cSeq++;
    innerMsg.cSeq = ctx->cSeq;
    innerMsg.sSeq = ctx->sSeq;
    innerMsg.msgType = msgType;
    if (nbyte > sizeof(innerMsg.data)) {
        LogHelper::log(Error, "Failed to send data, nbyte too large, nbyte: %lu", nbyte);
        return -1;
    }
    innerMsg.dataLength = nbyte;
    memcpy(innerMsg.data, src, nbyte);
    ssize_t sendCode = sendTSPacket(sockFd, &innerMsg, constants::serverNonBlocking);
    if (sendCode < 0) {
        LogHelper::log(Error, "Fail to send data");
        return sendCode;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r15d
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x177c8(%rip), %rdi     # 0x1a240
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x2130
movq (%r12), %rax
incq %rax
movq %rax, (%r12)
movq %rax, 0x177aa(%rip)     # 0x1a240
movq 0x8(%r12), %rax
movq %rax, 0x177a6(%rip)     # 0x1a248
movw %r15w, 0x177a6(%rip)    # 0x1a250
cmpq $0xffed, %rbx           # imm = 0xFFED
jb 0x2acf
leaq 0x3697(%rip), %rsi      # 0x6151
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x27f8
movq $-0x1, %rbx
jmp 0x2b1a
movw %bx, 0x1777c(%rip)      # 0x1a252
leaq 0x17763(%rip), %r15     # 0x1a240
leaq 0x17770(%rip), %rdi     # 0x1a254
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2190
movl %ebp, %edi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4d0f
testq %rax, %rax
js 0x2b07
xorl %ebx, %ebx
jmp 0x2b1a
movq %rax, %rbx
leaq 0x3671(%rip), %rsi      # 0x6182
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/proxyclient.cpp
// Function: sendRequestMsg(int, int, unsigned char const*, unsigned long, ClientContext*)
ssize_t sendRequestMsg(int serverFd, int localFd, const uint8_t *src, size_t nbyte, ClientContext *ctx) {
    static uint8_t msgBuffer[constants::AES_MAX_DATA_LENGTH];
    memset(msgBuffer, 0, sizeof(msgBuffer));
    hton_copy4bytes(msgBuffer, &localFd);
    if (sizeof(msgBuffer) < nbyte + 4) {
        LogHelper::log(Warn, "Failed to send request msg, nbyte greater than buffersize + 4");
        return -1;
    }
    memcpy(msgBuffer + 4, src, nbyte);
    ssize_t sendCode = sendMessage(serverFd, msgBuffer, nbyte + 4, ctx, 8);
    if (sendCode < 0) {
        LogHelper::log(Error, "Failed to send request msg");
        return sendCode;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %r12d
movl %edi, %ebp
leaq 0x276fd(%rip), %rdi     # 0x2a240
movl $0xffcc, %edx           # imm = 0xFFCC
xorl %esi, %esi
callq 0x2130
bswapl %r12d
movl %r12d, 0x276e7(%rip)    # 0x2a240
leaq 0x4(%r14), %r12
cmpq $0xffcd, %r12           # imm = 0xFFCD
jb 0x2b82
leaq 0x3627(%rip), %rsi      # 0x6194
movl $0x1, %edi
xorl %eax, %eax
callq 0x27f8
movq $-0x1, %rbx
jmp 0x2bca
leaq 0x276bb(%rip), %rdi     # 0x2a244
movq %r15, %rsi
movq %r14, %rdx
callq 0x2190
leaq 0x276a5(%rip), %rsi     # 0x2a240
movl %ebp, %edi
movq %r12, %rdx
movq %rbx, %rcx
movl $0x8, %r8d
callq 0x2a5b
testq %rax, %rax
js 0x2bb7
xorl %ebx, %ebx
jmp 0x2bca
movq %rax, %rbx
leaq 0x3611(%rip), %rsi      # 0x61d2
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/proxyclient.cpp
// Function: recvMessage(int, unsigned char*, unsigned long, ClientContext*, unsigned char*)
ssize_t recvMessage(int sockFd, uint8_t *dst, size_t bufferSize, ClientContext *ctx, uint8_t *msgTypePtr = NULL) {
    static InnerMsg innerMsg;
    memset(&innerMsg, 0, sizeof(innerMsg));

    ssize_t recvCode = recvTSPacket(sockFd, &innerMsg, constants::serverNonBlocking);
    if (recvCode < 0) {
        LogHelper::log(Error, "Fail to recv data");
        return recvCode;
    }
    if (innerMsg.sSeq != ctx->sSeq + 1) {
        LogHelper::log(Error, "Fail to recv data, seq error, sSeq: %llu, expected: %llu", innerMsg.sSeq, ctx->sSeq + 1);
        return -2;
    }
    if (innerMsg.msgType != 5 && innerMsg.msgType != 7 && innerMsg.msgType != 9) {
        LogHelper::log(Error, "Fail to recv data, msgType error, recv type :%d", innerMsg.msgType);
        return -3;
    }
    if (msgTypePtr != NULL)
        *msgTypePtr = innerMsg.msgType;
    if (innerMsg.dataLength > bufferSize) {
        LogHelper::log(Error, "Fail to recv data, bufferSize not enought, bufferSize :%lu, expected: %lu", bufferSize, innerMsg.dataLength);
        return -4;
    }
    memcpy(dst, innerMsg.data, innerMsg.dataLength);
    ctx->sSeq = innerMsg.sSeq;
    return innerMsg.dataLength;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
leaq 0x3761a(%rip), %r13     # 0x3a210
movl $0x10000, %edx          # imm = 0x10000
movq %r13, %rdi
xorl %esi, %esi
callq 0x2130
movl %ebp, %edi
movq %r13, %rsi
movl $0x1, %edx
callq 0x4e95
testq %rax, %rax
js 0x2c7b
movq 0x375f8(%rip), %rdx     # 0x3a218
movq 0x8(%rbx), %rcx
incq %rcx
cmpq %rcx, %rdx
jne 0x2c90
movzwl 0x375ed(%rip), %edx     # 0x3a220
cmpl $0x9, %edx
ja 0x2cd0
movl $0x2a0, %eax            # imm = 0x2A0
btl %edx, %eax
jae 0x2cd0
testq %r12, %r12
je 0x2c53
movb %dl, (%r12)
movzwl 0x375c8(%rip), %ecx     # 0x3a222
cmpq %r14, %rcx
jbe 0x2ca9
leaq 0x3602(%rip), %rsi      # 0x6268
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x27f8
movq $-0x4, %r13
jmp 0x2ce7
movq %rax, %r13
leaq 0x3568(%rip), %rsi      # 0x61ed
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
jmp 0x2ce7
leaq 0x3568(%rip), %rsi      # 0x61ff
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
movq $-0x2, %r13
jmp 0x2ce7
leaq 0x37574(%rip), %rsi     # 0x3a224
movq %r15, %rdi
movq %rcx, %rdx
callq 0x2190
movq 0x37556(%rip), %rax     # 0x3a218
movq %rax, 0x8(%rbx)
movzwl 0x37554(%rip), %r13d    # 0x3a222
jmp 0x2ce7
leaq 0x3561(%rip), %rsi      # 0x6238
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
movq $-0x3, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/proxyclient.cpp
// Function: recvReplyMsg(int, unsigned char*, unsigned long, ClientContext*, int*)
int recvReplyMsg(int serverFd, uint8_t *dst, size_t bufferSize, ClientContext *ctx, int *localFdPtr) {
    static uint8_t msgBuffer[constants::MAX_MSG_DATA_LENGTH];
    memset(msgBuffer, 0, sizeof(msgBuffer));
    uint8_t msgType = 0;
    ssize_t recvCode = recvMessage(serverFd, msgBuffer, sizeof(msgBuffer), ctx, &msgType);
    if (msgType != 9) {
        LogHelper::log(Error, "Failed in reply msg, error msg type, get :%d, expected: %d", msgType, 9);
        return -3;
    }
    if (recvCode < 0) {
        LogHelper::log(Error, "Failed to recv reply msg");
        return recvCode;
    }
    if (recvCode > bufferSize + 4) {
        LogHelper::log(Error, "buffer size less than recv msg len + 4, buffersize: %d, msgLen: %d", bufferSize, recvCode);
        return -1;
    }
    if (recvCode < 4) {
        LogHelper::log(Error, "recv msg len less than 4, recv len: %d", recvCode);
        return -2;
    }
    int localFd = 0;
    ntoh_copy4bytes(&localFd, msgBuffer);
    memcpy(dst, msgBuffer + 4, recvCode - 4);
    assert(localFdPtr != NULL);
    *localFdPtr = localFd;
    return recvCode - 4;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movl %edi, %ebp
leaq 0x474f2(%rip), %r13     # 0x4a210
movl $0xffec, %edx           # imm = 0xFFEC
movq %r13, %rdi
xorl %esi, %esi
callq 0x2130
leaq 0xf(%rsp), %r14
movb $0x0, (%r14)
movl $0xffec, %edx           # imm = 0xFFEC
movl %ebp, %edi
movq %r13, %rsi
movq %rbx, %rcx
movq %r14, %r8
callq 0x2bd6
movzbl (%r14), %edx
cmpl $0x9, %edx
jne 0x2d83
movq %rax, %rbx
testq %rax, %rax
js 0x2d9f
leaq 0x4(%r12), %rax
cmpq %rax, %rbx
jbe 0x2db1
leaq 0x3599(%rip), %rsi      # 0x6306
xorl %edi, %edi
movq %r12, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x27f8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2dfb
leaq 0x3528(%rip), %rsi      # 0x62b2
xorl %edi, %edi
movl $0x9, %ecx
xorl %eax, %eax
callq 0x27f8
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
jmp 0x2dfb
leaq 0x3547(%rip), %rsi      # 0x62ed
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
jmp 0x2dfb
cmpq $0x3, %rbx
ja 0x2dd1
leaq 0x358b(%rip), %rsi      # 0x6349
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x27f8
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
jmp 0x2dfb
movl 0x47439(%rip), %ebp     # 0x4a210
addq $-0x4, %rbx
leaq 0x47432(%rip), %rsi     # 0x4a214
movq %r15, %rdi
movq %rbx, %rdx
callq 0x2190
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2e0c
bswapl %ebp
movl %ebp, (%rax)
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x355d(%rip), %rdi      # 0x6370
leaq 0x3569(%rip), %rsi      # 0x6383
leaq 0x3572(%rip), %rcx      # 0x6393
movl $0xac, %edx
callq 0x2150
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/proxyclient.cpp
// Function: loopSend(int, ClientContext*)
void loopSend(int sockFd, ClientContext *ctx) {
    static char sendBuf[] = "Hello Server!";
    while (true) {
        ssize_t sendCode = sendMessage(sockFd, (const uint8_t *)sendBuf, sizeof(sendBuf), ctx);
        if (sendCode < 0) {
            LogHelper::log(Error, "Fail to send msg to Server, break");
            break;
        }
        LogHelper::log(Debug, "Send hello to server");
        std::this_thread::sleep_for(std::chrono::milliseconds(10));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x7395(%rip), %rsi      # 0xa1d8
movl $0xe, %edx
movq %rbx, %rcx
movl $0x4, %r8d
callq 0x2a5b
testq %rax, %rax
js 0x2ec3
leaq 0x3594(%rip), %r14      # 0x63f6
movq %rsp, %r15
leaq 0x736c(%rip), %r12      # 0xa1d8
movl $0x3, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x27f8
movq $0x0, (%rsp)
movq $0x989680, 0x8(%rsp)    # imm = 0x989680
movq %r15, %rdi
movq %r15, %rsi
callq 0x20b0
cmpl $-0x1, %eax
jne 0x2ea6
callq 0x2040
cmpl $0x4, (%rax)
je 0x2e8c
movl $0xe, %edx
movl %ebp, %edi
movq %r12, %rsi
movq %rbx, %rcx
movl $0x4, %r8d
callq 0x2a5b
testq %rax, %rax
jns 0x2e6c
leaq 0x350a(%rip), %rsi      # 0x63d4
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/proxyclient.cpp
// Function: loopRead(int, ClientContext*)
void loopRead(int sockFd, ClientContext *ctx) {
    static char buf[65536];
    while (true) {
        memset(buf, 0, sizeof(buf));
        ssize_t recvCode = recvMessage(sockFd, (uint8_t *)buf, sizeof(buf), ctx, NULL);
        if (recvCode < 0) {
            LogHelper::log(Error, "Fail to recv msg from server, break");
            break;
        }
        LogHelper::log(Debug, "recv msg from server: %s", buf);
        // std::this_thread::sleep_for(std::chrono::milliseconds(500));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x5730d(%rip), %r14     # 0x5a200
movl $0x10000, %edx          # imm = 0x10000
movq %r14, %rdi
xorl %esi, %esi
callq 0x2130
movl $0x10000, %edx          # imm = 0x10000
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x2bd6
testq %rax, %rax
js 0x2f65
leaq 0x350c(%rip), %r14      # 0x642f
leaq 0x572d6(%rip), %r15     # 0x5a200
movl $0x3, %edi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x27f8
movl $0x10000, %edx          # imm = 0x10000
movq %r15, %rdi
xorl %esi, %esi
callq 0x2130
movl $0x10000, %edx          # imm = 0x10000
movl %ebp, %edi
movq %r15, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x2bd6
testq %rax, %rax
jns 0x2f2a
leaq 0x349f(%rip), %rsi      # 0x640b
xorl %edi, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x27f8
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/proxyclient.cpp
// Function: launch_client()
int launch_client() {

    // ignore signal
    signal(SIGPIPE, SIG_IGN);
    const char tempBuf[] = "Hello, test!";
    while (true) {
        ClientContext context;
        if (SocketPlugin::getInstance()->connectSocket(serverAddrStr.c_str(),  serverListenPort, constants::clientNonBlocking) < 0 ) {
            LogHelper::log(Error, "Client Fail to connect to server");
            std::this_thread::sleep_for(std::chrono::milliseconds(200));
            break;
        }
        ssize_t shakeCode = clientHandleShake(&context);
        if (shakeCode < 0) {
            return shakeCode;
        }
        
        LogHelper::log(Debug, "Hand shake success");
        int sockFd = SocketPlugin::getInstance()->getSockFd();
        // std::thread readThread(loopRead, sockFd, &context), writeThread(loopSend, sockFd, &context);
        // readThread.join();
        // writeThread.join();
        std::thread listenThread(startListen, sockFd, &context);
        listenThread.join();

        SocketPlugin::getInstance()->closeSocket();
        // break;
        std::this_thread::sleep_for(std::chrono::milliseconds(20));
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl $0x1, %esi
movl $0xd, %edi
callq 0x2240
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
callq 0x3ee8
movq 0x647d(%rip), %rsi      # 0xa200
movq %rax, %rdi
movl $0x1bb, %edx            # imm = 0x1BB
movl $0x1, %ecx
callq 0x4468
testl %eax, %eax
js 0x3e81
leaq 0x20(%rsp), %rbx
leaq 0x2d60(%rip), %r14      # 0x6b09
leaq -0x6f7(%rip), %r15      # 0x36b9
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r13
leaq 0x10(%rsp), %rbp
movq %rbx, %rdi
callq 0x28dc
testq %rax, %rax
js 0x3ec1
movl $0x3, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x27f8
callq 0x3ee8
movq %rax, %rdi
callq 0x44ee
movl %eax, 0x4(%rsp)
movq %rbx, 0x10(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x3f5e
movq %r12, %rdi
callq 0x2340
callq 0x3ee8
movq %rax, %rdi
callq 0x44a8
movq $0x0, 0x10(%rsp)
movq $0x1312d00, 0x18(%rsp)  # imm = 0x1312D00
movq %rbp, %rdi
movq %rbp, %rsi
callq 0x20b0
cmpl $-0x1, %eax
jne 0x3e47
callq 0x2040
cmpl $0x4, (%rax)
je 0x3e2d
cmpq $0x0, 0x8(%rsp)
jne 0x3ee2
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
callq 0x3ee8
movq 0x6399(%rip), %rsi      # 0xa200
movq %rax, %rdi
movl $0x1bb, %edx            # imm = 0x1BB
movl $0x1, %ecx
callq 0x4468
testl %eax, %eax
jns 0x3dbf
leaq 0x2c60(%rip), %rsi      # 0x6ae8
xorl %edi, %edi
xorl %eax, %eax
callq 0x27f8
leaq 0x10(%rsp), %rbx
movq $0x0, (%rbx)
movq $0xbebc200, 0x8(%rbx)   # imm = 0xBEBC200
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x20b0
cmpl $-0x1, %eax
jne 0x3ebf
callq 0x2040
cmpl $0x4, (%rax)
je 0x3ea5
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ed2
cmpq $0x0, 0x8(%rsp)
jne 0x3ee2
movq %rax, %rdi
callq 0x2350
callq 0x20a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/./Singleton.h
// Function: Singleton<SocketPlugin>::getInstance()
static T* getInstance() {
        if(_instance == nullptr) {
            std::lock_guard<std::mutex> lockGuard(singleMutex);
            if(_instance == nullptr)
                _instance = new T();
        }
        return _instance;
    }

// Assembly:
pushq %rbx
movq 0x865b8(%rip), %rax     # 0x8a4a8
testq %rax, %rax
jne 0x3f3d
leaq 0x865b4(%rip), %rdi     # 0x8a4b0
callq 0x22f0
testl %eax, %eax
jne 0x3f3f
cmpq $0x0, 0x8659b(%rip)     # 0x8a4a8
jne 0x3f2a
movl $0x10, %edi
callq 0x2210
leaq 0x5e00(%rip), %rcx      # 0x9d20
movq %rcx, (%rax)
movq %rax, 0x8657e(%rip)     # 0x8a4a8
leaq 0x8657f(%rip), %rdi     # 0x8a4b0
callq 0x2170
movq 0x8656b(%rip), %rax     # 0x8a4a8
popq %rbx
retq
movl %eax, %edi
callq 0x2160
movq %rax, %rbx
leaq 0x86560(%rip), %rdi     # 0x8a4b0
callq 0x2170
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O3/renzibei[P]TSProxy/SocketPlugin.cpp
// Function: SocketPlugin::closeSocket()
int SocketPlugin::closeSocket() {

    int ret = close(this->m_sockfd);
    if(ret == -1) {
        LogHelper::log(Error, "close socket failed", strerror(errno));
    }
    LogHelper::log(Info, "close socket");
    return ret;
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %edi
callq 0x2380
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x44d7
callq 0x2040
movl (%rax), %edi
callq 0x20e0
leaq 0x26e9(%rip), %rsi      # 0x6bb4
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x27f8
leaq 0x26ea(%rip), %rsi      # 0x6bc8
movl $0x2, %edi
xorl %eax, %eax
callq 0x27f8
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/anapacheapp.cpp
// Function: AnapacheApp::fixLogFormat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string AnapacheApp::fixLogFormat(std :: string lf)
{
  if ( (lf.front()=='"') && (lf.back()=='"') )
    lf = lf.substr(1, lf.length()-2);

  lf = GCommon::replace(lf, "\\\"", "\"");
  return lf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdx), %rsi
cmpb $0x22, (%rsi)
jne 0x48ed
movq 0x8(%rbx), %rcx
cmpb $0x22, -0x1(%rsi,%rcx)
jne 0x48ed
addq $-0x2, %rcx
leaq 0x68(%rsp), %r15
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x33a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3460
movq (%r15), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x48ea
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3390
movq (%rbx), %rsi
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x78d2
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x58b9(%rip), %rsi      # 0xa1d1
leaq 0x58b4(%rip), %rdx      # 0xa1d3
leaq 0x28(%rsp), %rdi
callq 0x4074
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x5899(%rip), %rsi      # 0xa1d2
leaq 0x5893(%rip), %rdx      # 0xa1d3
leaq 0x8(%rsp), %rdi
callq 0x4074
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x9138
leaq 0x68(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3460
movq (%r15), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x4993
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x49aa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x49c1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x49d8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3390
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rbx), %rdx
leaq 0x10(%rbx), %rax
cmpq %rax, %rdx
je 0x49f7
movq %rdx, (%r14)
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
jmp 0x49fd
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4a48
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
jmp 0x4a48
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4a64
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
jmp 0x4a64
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x4a7b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x3590
nop
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/anapacheapp.cpp
// Function: AnapacheApp::ipCount_Input(long, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&, AnapacheApp::AnalizerOptions)
void AnapacheApp::ipCount_Input(time_t moment, ParsedInput & parsed, AnalizerOptions opts)
{
  auto ipAddress = parsed.find("h");
  if (ipAddress == parsed.end())
    {
      std::cerr << "No IP found on request"<<std::endl;
      return;
    }

  auto fip = ipCount_data.queryCount.find(ipAddress->second);
  if (fip == ipCount_data.queryCount.end())
    ipCount_data.queryCount.insert({ipAddress->second, 1});
  else
    fip->second++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x52a4(%rip), %rsi      # 0xa344
leaq 0x529e(%rip), %rdx      # 0xa345
movq %rsp, %rdi
callq 0x4074
movq %rsp, %rsi
movq %r14, %rdi
callq 0x7b34
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x50d3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3390
addq $0x8, %r14
cmpq %r14, %r15
je 0x50fe
leaq 0x78(%rbx), %r14
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x7b7a
subq $-0x80, %rbx
cmpq %rbx, %rax
je 0x5142
incq 0x40(%rax)
jmp 0x5184
movq 0x8ee3(%rip), %rbx      # 0xdfe8
leaq 0x51de(%rip), %rsi      # 0xa2ea
movl $0x16, %edx
movq %rbx, %rdi
callq 0x33f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3340
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
jmp 0x5184
movq %rsp, %rbx
movq %r12, (%rbx)
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x78d2
movq $0x1, 0x20(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7c04
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5184
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3390
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x5192
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x51b0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3390
jmp 0x51b0
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3590
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/anapacheapp.cpp
// Function: AnapacheApp::parseTime(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
time_t AnapacheApp::parseTime(std::string strTime)
{
  /* We must improve it a little bit */
  std::string format;
  struct tm tm;
  time_t now = time(NULL);
  localtime_r(&now, &tm);

  if (strTime == "now")
    return now;
  else if (strTime == "yesterday")
    return now-86400;

  if (strTime.find('/') == std::string::npos)
    format = "%H:%M:%S";
  else
    format ="%d/%m/%Y %H:%M:%S";

  char *conv = strptime(strTime.c_str(), format.c_str(), &tm);

  time_t newtime = mktime(&tm);
  if ( (conv == NULL) && (newtime == now) )
    return 0;

  return newtime;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
xorl %edi, %edi
callq 0x3330
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x28(%rsp), %rsi
callq 0x31f0
leaq 0x45ca(%rip), %rsi      # 0xa245
movq %rbx, %rdi
callq 0x3100
testl %eax, %eax
je 0x5d13
leaq 0x45b7(%rip), %rsi      # 0xa249
movq %rbx, %rdi
callq 0x3100
testl %eax, %eax
je 0x5d19
movq %rbx, %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x3470
xorl %esi, %esi
cmpq $-0x1, %rax
setne %sil
leaq 0x8(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x4595(%rip), %rax      # 0xa25c
leaq 0x4585(%rip), %rcx      # 0xa253
cmoveq %rax, %rcx
leaq (%rsi,%rsi,8), %r8
addq $0x8, %r8
xorl %esi, %esi
callq 0x34f0
movq (%rbx), %rdi
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rbx
movq %rbx, %rdx
callq 0x3080
movq %rax, %r14
movq %rbx, %rdi
callq 0x3220
movq (%rsp), %rcx
xorq %rax, %rcx
xorl %ebx, %ebx
orq %r14, %rcx
cmovneq %rax, %rbx
jmp 0x5d24
movq (%rsp), %rbx
jmp 0x5d24
movq $-0x15180, %rbx         # imm = 0xFFFEAE80
addq (%rsp), %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d3b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d62
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x3590
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/anapacheapp.cpp
// Function: AnapacheApp::summary()
void AnapacheApp::summary()
{
  if (fromDate)
    std::cout << "From: "<< GCommon::put_time("%d/%m/%Y %H:%M:%S", fromDate) << std::endl;
  if (toDate)
    std::cout << "To: "<< GCommon::put_time("%d/%m/%Y %H:%M:%S", toDate) << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
je 0x5f00
movq 0x816c(%rip), %rdi      # 0xdfb8
leaq 0x4412(%rip), %rsi      # 0xa265
movl $0x6, %edx
callq 0x33f0
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x43e6(%rip), %rsi      # 0xa253
leaq 0x43f0(%rip), %rdx      # 0xa264
leaq 0x40(%rsp), %rdi
callq 0x4074
movq 0x28(%rbx), %rdx
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x8432
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x8119(%rip), %rdi      # 0xdfb8
callq 0x33f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3340
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ee9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x5f00
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3390
cmpq $0x0, 0x30(%rbx)
je 0x5fc6
movq 0x80a6(%rip), %rdi      # 0xdfb8
leaq 0x4353(%rip), %rsi      # 0xa26c
movl $0x4, %edx
callq 0x33f0
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4320(%rip), %rsi      # 0xa253
leaq 0x432a(%rip), %rdx      # 0xa264
leaq 0x20(%rsp), %rdi
callq 0x4074
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x8432
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x8053(%rip), %rdi      # 0xdfb8
callq 0x33f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3340
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5faf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5fc6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3390
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x5fff
jmp 0x5fdc
movq %rax, %rbx
jmp 0x602e
movq %rax, %rbx
jmp 0x6045
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5fff
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6045
movq 0x30(%rsp), %rsi
jmp 0x603d
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x602e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x6045
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x3590
nop
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/gcommon.cpp
// Function: GCommon::(anonymous namespace)::_findFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
bool _findFile(std::string &file, const std::list<std::string>& paths, const std::map<std::string, std::string>& replacements)
    {
      for (auto p : paths)
	{
	  p = replace(p, replacements);
	  if (file_exists(p.c_str())==1)
	    {
	      file = p;
	      return true;
	    }
	}
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x50(%rsp)
movq %rdi, 0x48(%rsp)
movq (%rsi), %r14
cmpq %rsi, %r14
je 0x82de
movq %rsi, %r15
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %r13
leaq 0x78(%rsp), %rbp
leaq 0x58(%rsp), %rbx
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x78d2
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x78d2
movq %rbp, %rdi
movq 0x50(%rsp), %rsi
callq 0x89b8
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x960d
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3460
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x8255
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbp, %rdi
callq 0x7876
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8279
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
callq 0x8d59
cmpw $0x1, %ax
je 0x82b3
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x82a5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq (%r14), %r14
cmpq %r15, %r14
jne 0x81cc
jmp 0x82de
leaq 0x8(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0x3210
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x82de
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8303
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x7876
jmp 0x830b
jmp 0x8303
movq %rax, %rbx
jmp 0x8327
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8327
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8343
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x3590
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/gcommon.cpp
// Function: GCommon::put_time(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, long)
std::string put_time(std::string format, time_t tim)
  {
    struct tm tm;
    if (tim==0)
      tim = time (NULL);

    localtime_r(&tim, &tm);
    return std::put_time(&tm, format.c_str());
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, 0x10(%rsp)
testq %rdx, %rdx
jne 0x845b
xorl %edi, %edi
callq 0x3330
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %r14
movq %r14, %rsi
callq 0x31f0
movq (%r15), %r15
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x18(%rsp), %r12
movl $0x80, %esi
movq %r12, %rdi
xorl %edx, %edx
callq 0x3400
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x32c0
testq %rax, %rax
jne 0x84bc
movq 0x20(%rsp), %rsi
subq $-0x80, %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x3110
jmp 0x848d
movq 0x18(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0x18(%rsp), %rsi
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x402c
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x84ee
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x8501
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x851b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x3590
nop
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/gcommon.cpp
// Function: GCommon::GlobalSettings::basics(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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 GlobalSettings::basics(std::string programName, std::string programShortName, std::string programFile, std::string programVersion)
  {
    storage.insert({"name", programName});
    storage.insert({"sname", programShortName});
    storage.insert({"exec", programFile});
    storage.insert({"version", programVersion});
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rdx
leaq 0x1ee6(%rip), %rsi      # 0xa42b
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x8856
leaq 0x5e47(%rip), %rdi      # 0xe3a0
movq %r12, %rsi
callq 0x7996
leaq 0x38(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x857c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
leaq 0x18(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x8597
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
leaq 0x1e8c(%rip), %rsi      # 0xa42a
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x88cc
leaq 0x5deb(%rip), %rdi      # 0xe3a0
movq %r12, %rsi
callq 0x7996
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x85d4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x85eb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
leaq 0x1e3e(%rip), %rsi      # 0xa430
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x8856
leaq 0x5d97(%rip), %rdi      # 0xe3a0
movq %r15, %rsi
callq 0x7996
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8628
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x863f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
leaq 0x1def(%rip), %rsi      # 0xa435
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8942
leaq 0x5d43(%rip), %rdi      # 0xe3a0
movq %r14, %rsi
callq 0x7996
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x867c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8693
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x86a8
jmp 0x86a8
jmp 0x86a8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8820
movq %rbx, %rdi
callq 0x3590
nop
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: human_size(char*, long double)
char *human_size(char *store, long double size)
{
  static char units[10][6]={"bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb","Bb"};  
  int i= 0;

  while (size>1024) {
    size = size /1024;
    i++;
  }

  sprintf(store,"%.2Lf%s",size, units[i]);

  return store;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
fldt 0x20(%rsp)
flds 0x1782(%rip)            # 0xa440
fxch %st(1)
fucomi %st(1), %st
jbe 0x8cd5
xorl %eax, %eax
fmuls 0x1778(%rip)            # 0xa444
incq %rax
fucomi %st(1), %st
ja 0x8cc6
jmp 0x8cdd
fstp %st(1)
xorl %eax, %eax
fldz
fxch %st(1)
fstp %st(1)
leaq (%rax,%rax,2), %rax
leaq 0x5646(%rip), %rcx      # 0xe330
leaq (%rcx,%rax,2), %rdx
fstpt (%rsp)
leaq 0x1750(%rip), %rsi      # 0xa448
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30b0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: file_size(char*)
long long file_size(char *fileName)
{
  FILE *fich;

  fich=fopen(fileName,"r");
  if (fich==NULL)
    return -1;

  fseek(fich, 0L, SEEK_END);
  size_t res=ftell(fich);

  fclose(fich);

  return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x150f(%rip), %rsi      # 0xa225
callq 0x3420
testq %rax, %rax
je 0x8d4a
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x33c0
movq %rbx, %rdi
callq 0x3030
movq %rax, %r14
movq %rbx, %rdi
callq 0x3370
movq %r14, %rax
jmp 0x8d51
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: file_exists(char const*)
short file_exists(const char *filename)
{
  int fd=open(filename, O_RDONLY);
  if (fd==-1)
    {
      if (errno==2)		/* If errno==2 it means file not found */
	return 0;		/* otherwise there is another error at */
      else 			/* reading file, for example path not  */
	return -1;		/* found, no memory, etc */
    }
  close(fd);			/* If we close the file, it exists */
  return 1;
}

// Assembly:
pushq %rax
xorl %esi, %esi
xorl %eax, %eax
callq 0x3290
cmpl $-0x1, %eax
je 0x8d75
movl %eax, %edi
callq 0x35f0
movw $0x1, %ax
jmp 0x8d87
callq 0x3060
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x2, (%rcx)
setne %al
negl %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: human_to_bytes(char const*)
long long human_to_bytes(const char *human)
{
  long double n;
  char unit[3];
  
  sscanf(human, "%Lf%c%c", &n, &unit[0], &unit[1]);

  unit[0]=toupper(unit[0]);	/* Uppercase, please */
  unit[1]=tolower(unit[1]);	/* Lowercase, please */
  unit[2]='\0';
  
  return n * human_size_multiplier(unit);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xe(%rsp), %r8
leaq 0x1618(%rip), %rsi      # 0xa450
xorl %r14d, %r14d
leaq 0x30(%rsp), %rdx
leaq 0xd(%rsp), %rbx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3350
movsbl (%rbx), %edi
callq 0x35e0
movb %al, (%rbx)
movsbl 0x1(%rbx), %edi
callq 0x34b0
movb %al, 0x1(%rbx)
movb $0x0, 0x2(%rbx)
movl $0x1, %r15d
fldt 0x30(%rsp)
fstpt 0x24(%rsp)
leaq 0x54f2(%rip), %r12      # 0xe370
leaq (%r12,%r14), %rsi
movq %rbx, %rdi
callq 0x3490
testl %eax, %eax
je 0x8ea2
shlq $0xa, %r15
addq $0x3, %r14
cmpq $0x1e, %r14
jne 0x8e7e
movl $0x1, %r15d
movq %r15, 0x10(%rsp)
fildll 0x10(%rsp)
fldt 0x24(%rsp)
fmulp %st, %st(1)
fnstcw 0x8(%rsp)
movzwl 0x8(%rsp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, 0xa(%rsp)
fldcw 0xa(%rsp)
fistpll 0x18(%rsp)
fldcw 0x8(%rsp)
movq 0x18(%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: getHomeDir()
char *getHomeDir()
{
  static char *home = NULL;
  
  if (home==NULL)
    home = getenv("HOME") ;

  if (home==NULL)
    {
      struct passwd *pw = getpwuid(getuid());
      if (pw!=NULL) 
	home = pw->pw_dir;
    }

  return home;
}

// Assembly:
movq 0x5500(%rip), %rax      # 0xe3e8
testq %rax, %rax
je 0x8eee
retq
pushq %rax
leaq 0x1562(%rip), %rdi      # 0xa458
callq 0x3450
movq %rax, 0x54e6(%rip)      # 0xe3e8
testq %rax, %rax
jne 0x8f2c
callq 0x31d0
movl %eax, %edi
callq 0x3410
testq %rax, %rax
je 0x8f25
movq 0x20(%rax), %rax
movq %rax, 0x54c5(%rip)      # 0xe3e8
jmp 0x8f2c
movq 0x54bc(%rip), %rax      # 0xe3e8
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: makePath(char**, char const*, char const*)
char* makePath(char **out, const char *directory, const char *file)
{
  size_t dlen=strlen(directory);
  size_t flen=strlen(file);
  if (*out!=NULL)
    {
      free(*out);
      *out=NULL;
    }

  *out=(char*)malloc(dlen+flen+2);
  if ( (dlen>0) && (directory[dlen-1]!='/') )
    sprintf(*out, "%s/%s", directory, file);
  else
    sprintf(*out, "%s%s", directory, file);


  return *out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3190
movq %rax, %r12
movq %r14, %rdi
callq 0x3190
movq %rax, %r13
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8f66
callq 0x3430
leaq (%r12,%r13), %rdi
addq $0x2, %rdi
callq 0x3480
movq %rax, (%rbx)
testq %r12, %r12
je 0x8f83
cmpb $0x2f, -0x1(%r15,%r12)
jne 0x8f8c
leaq 0x14d9(%rip), %rsi      # 0xa463
jmp 0x8f93
leaq 0x14ca(%rip), %rsi      # 0xa45d
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x30b0
movq (%rbx), %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: copyFile(char*, char*)
int copyFile(char *origin, char *destination)
{
  int forigin;
  int fdest;
  char buffer[512];

  int result=0;
  size_t bytes;

  forigin=open(origin, O_RDONLY);
  if (forigin<0)
    return -1;

  fdest=open(destination, O_WRONLY | O_CREAT, 0600);
  if (fdest!=-1)
    {
      while ( (bytes=read(forigin, buffer, (size_t)512))>0)
	{
	  if (write(fdest, buffer, bytes)<0)
	    {
	      result=-4;
	      break;
	    }	  
	}
      if (bytes<0)
	  result=-5;
      
      close(fdest);
    }
  else
    result=-2;
  close(forigin);

  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %r14
xorl %esi, %esi
xorl %eax, %eax
callq 0x3290
testl %eax, %eax
js 0x9019
movl %eax, %ebx
movq %r14, %rdi
movl $0x41, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x3290
cmpl $-0x1, %eax
je 0x9021
movl %eax, %ebp
movq %rsp, %r14
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
movq %r14, %rsi
callq 0x34a0
testq %rax, %rax
je 0x9029
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3140
testq %rax, %rax
jns 0x8feb
movl $0xfffffffc, %r14d      # imm = 0xFFFFFFFC
jmp 0x902c
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x903a
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
jmp 0x9033
xorl %r14d, %r14d
movl %ebp, %edi
callq 0x35f0
movl %ebx, %edi
callq 0x35f0
movl %r14d, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gasparfm[P]anapache/lib/gcommon/cfileutils.cpp
// Function: file_get_contents(char**, char*, int)
int file_get_contents(char **data, char *fileName, int freeNotNull)
{
  long long fileSize;
  int fd;
  int totalRead;

  if (!file_exists(fileName))
    return -1;
  
  fileSize=file_size(fileName);
  if (fileSize==-1)
    return -2;
  
  fd=open(fileName, O_RDONLY);
  if (fd<0)
    return -3;

  if ( (*data!=NULL) && (freeNotNull) )
    {
      free(*data);
      *data=NULL;
    }
  *data=(char*)malloc(fileSize+1);
  totalRead=read(fd, *data, fileSize);
  close(fd);

  if (totalRead<0)
    return -4;
  else if (totalRead!=fileSize)
    return -5;
    
  (*data)[fileSize]='\0';

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x8d59
testw %ax, %ax
je 0x911a
movq %r15, %rdi
callq 0x8d0b
cmpq $-0x1, %rax
je 0x9121
movq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3290
testl %eax, %eax
js 0x9128
movl %eax, %r15d
movq (%rbx), %rdi
testq %rdi, %rdi
sete %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x90ce
callq 0x3430
leaq 0x1(%r14), %rdi
callq 0x3480
movq %rax, (%rbx)
movl %r15d, %edi
movq %rax, %rsi
movq %r14, %rdx
callq 0x34a0
movq %rax, %r12
movl %r15d, %edi
callq 0x35f0
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
testl %r12d, %r12d
js 0x912d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
cmpq %r14, %r12
jne 0x912d
movq (%rbx), %rax
movb $0x0, (%rax,%r14)
xorl %eax, %eax
jmp 0x912d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x912d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x912d
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop