LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/Server.cpp
// Function: Server::Run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Server::Run(const std::string &type) {

    mServer->Init(mServerInfo.first, mServerInfo.second, true);

    while(true) {

        int sockfd = mServer->Accept();
        std::thread t(&Server::ProcessTicket, this, sockfd, type);
        t.detach();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x10(%r14), %rsi
leaq 0x30(%r14), %rdx
pushq $0x1
popq %rcx
callq 0x3782
leaq -0x40(%rbp), %r15
leaq -0x38(%rbp), %r13
leaq -0x2c(%rbp), %r12
movq 0x8(%r14), %rdi
callq 0x38a4
movl %eax, -0x2c(%rbp)
leaq 0x48(%rip), %rax        # 0x267a
movq %rax, -0x50(%rbp)
andq $0x0, -0x48(%rbp)
movq %r14, -0x38(%rbp)
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x28f0
movq %r15, %rdi
callq 0x22a0
movq %r15, %rdi
callq 0x298c
jmp 0x261f
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x298c
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/Server.cpp
// Function: Server::HandleRequest[abi:cxx11](int const&)
std::string Server::HandleRequest(const int &amount) {

    int left = mTickets - amount;

    if(left < 0) {
        return "Not enought ticket to sale!";
    }
    else {
        mTickets = mTickets - amount;
        return "Success!";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rsi), %eax
subl (%rdx), %eax
js 0x28b0
movl %eax, (%rsi)
leaq 0x17cc(%rip), %rsi      # 0x4076
leaq -0x9(%rbp), %rdx
jmp 0x28bb
leaq 0x17a3(%rip), %rsi      # 0x405a
leaq -0xa(%rbp), %rdx
movq %rbx, %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerInterface.cpp
// Function: ServerInterface::ServerInterface()
ServerInterface::ServerInterface() {

    std::cout << "==================================================" << std::endl;
    std::cout << "||"
              << std::setw(31) << std::right << "Server Interface" 
              << std::setw(17) << std::right << "||" << std::endl;
    std::cout << "==================================================" << std::endl;

    mQuit = false;
    mServer = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
andl $0x0, 0x48(%rdi)
leaq 0x8(%rdi), %r14
leaq 0x28(%rdi), %r15
leaq 0x50(%rdi), %r12
leaq 0x60(%rdi), %rcx
movq %rcx, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
movb %al, 0x60(%rdi)
andl $0x0, 0x70(%rdi)
movq 0x4386(%rip), %rdi      # 0x6fc8
leaq 0x14bd(%rip), %rsi      # 0x4106
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq 0x436b(%rip), %rdi      # 0x6fc8
leaq 0x14d5(%rip), %rsi      # 0x4139
callq 0x21c0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x1f, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
movl 0x18(%rax,%rcx), %edx
andl %r13d, %edx
orl $0x80, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x14a1(%rip), %rsi      # 0x413c
movq %rax, %rdi
callq 0x21c0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x11, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
andl 0x18(%rax,%rcx), %r13d
orl $0x80, %r13d
movl %r13d, 0x18(%rax,%rcx)
leaq 0x146a(%rip), %rsi      # 0x4139
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq 0x42e2(%rip), %rdi      # 0x6fc8
leaq 0x1419(%rip), %rsi      # 0x4106
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
andw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x20c0
movq %r15, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerInterface.cpp
// Function: ServerInterface::Run()
void ServerInterface::Run() {

    int opt = -1;

    while(!mQuit) {

        while(mServerName.empty())
            Init();

        OptionMessage();
        std::cin >> opt;
        if(!std::cin.good()) {

            std::cout << "Unknow option! Please enter again." << std::endl;
            std::cin.clear();
            std::cin.ignore(INT_MAX, '\n');
            continue;
        }

        switch(opt) {
            case 1:
                PrintStatus();
                break;
            case 2:
                Host();
                break;
            case 3:
                mQuit = true;
                break;
            default:
                std::cout << "Unknow option! Please enter again." << std::endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x2c(%rbp), %r14
orl $-0x1, (%r14)
movq 0x4262(%rip), %r15      # 0x6fe0
movq 0x4243(%rip), %r12      # 0x6fc8
leaq 0x13c1(%rip), %r13      # 0x414d
cmpb $0x0, (%rbx)
je 0x2d9e
jmp 0x2e46
movq %rbx, %rdi
callq 0x2e56
cmpq $0x0, 0x10(%rbx)
je 0x2d96
callq 0x31a0
movq %r15, %rdi
movq %r14, %rsi
callq 0x2130
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r15,%rax)
je 0x2dfa
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
callq 0x2280
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %r15, %rdi
pushq $0xa
popq %rdx
callq 0x2140
jmp 0x2d8c
movl -0x2c(%rbp), %eax
cmpl $0x3, %eax
je 0x2e26
cmpl $0x2, %eax
je 0x2e19
cmpl $0x1, %eax
jne 0x2e2e
movq %rbx, %rdi
callq 0x3208
jmp 0x2d8c
movq %rbx, %rdi
callq 0x3596
jmp 0x2d8c
movb $0x1, (%rbx)
jmp 0x2d8c
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
jmp 0x2d8c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerInterface.cpp
// Function: ServerInterface::OptionMessage()
void ServerInterface::OptionMessage() {

    std::cout << std::endl;
    std::cout << "1. Server Status" << std::endl;
    std::cout << "2. Host Server" << std::endl;
    std::cout << "3. Quit" << std::endl;
    std::cout << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x3e1b(%rip), %rbx      # 0x6fc8
movq %rbx, %rdi
callq 0x20e0
leaq 0x106f(%rip), %rsi      # 0x422b
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
leaq 0x1069(%rip), %rsi      # 0x423c
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
leaq 0x1061(%rip), %rsi      # 0x424b
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerInterface.cpp
// Function: ServerInterface::Host()
void ServerInterface::Host() {

    std::cout << "Hosting..." << std::endl;
    mServer = true;
    std::cout << std::endl;

    Server *server = new Server(mServerInfo, mPairInfo);

    server->Run(mServerName);

    delete server;
    mServer = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x3a21(%rip), %r14      # 0x6fc8
leaq 0xd2f(%rip), %rsi       # 0x42dd
movq %r14, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movb $0x1, 0x1(%rbx)
movq %r14, %rdi
callq 0x20e0
movl $0x88, %edi
callq 0x21d0
movq %rax, %r14
leaq 0x28(%rbx), %rsi
leaq 0x50(%rbx), %rdx
movq %rax, %rdi
callq 0x24dc
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x25e8
movq %r14, %rdi
callq 0x25ac
movq %r14, %rdi
callq 0x21b0
movb $0x0, 0x1(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x21b0
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerSocket.cpp
// Function: ServerSocket::Init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int const&, bool)
void ServerSocket::Init(const std::string &ipaddress, const int &port, bool host) {

    if((mSockfd = socket(AF_INET, SOCK_STREAM, 0))==0) {
        std::cout << "Socket creation error" << std::endl;
        return;
    }
    
    //setup socket address structure
    memset(&mAddress, '0', sizeof(mAddress));
    mAddress.sin_family = AF_INET;
    mAddress.sin_port = htons(port);

    if(host) {

        mAddress.sin_addr.s_addr = INADDR_ANY;

        // call bind to associate the socket with our local address and port
        if(bind(mSockfd, (struct sockaddr *)&mAddress, sizeof(mAddress))<0) {
            std::cout << "Bind Failed" << std::endl;
            return;
        }

        // convert the socket to listen for incoming connections
        if(listen(mSockfd, 10)<0) {
            std::cout << "Listen Failed" << std::endl;
            return;
        }
    }
    else {

        if(inet_pton(AF_INET, ipaddress.c_str(), &mAddress.sin_addr)<=0) {
            std::cout << "Invalid pair server address/ Address not supported" << std::endl;
            return;
        }

        if(connect(mSockfd, (struct sockaddr *)&mAddress, sizeof(mAddress))<0) {
            std::cout << "Connection Failed" << std::endl;
            return;
        }
    }

    mValid = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2050
movl %eax, 0x4(%rbx)
testl %eax, %eax
je 0x380b
leaq 0xc(%rbx), %r14
movaps 0xc05(%rip), %xmm0      # 0x43c0
movups %xmm0, 0xc(%rbx)
movw $0x2, 0xc(%rbx)
movzwl (%r13), %ecx
rolw $0x8, %cx
movw %cx, 0xe(%rbx)
testb %r12b, %r12b
je 0x381b
andl $0x0, 0x10(%rbx)
pushq $0x10
popq %rdx
movl %eax, %edi
movq %r14, %rsi
callq 0x2040
testl %eax, %eax
js 0x3852
movl 0x4(%rbx), %edi
pushq $0xa
popq %rsi
callq 0x21f0
testl %eax, %eax
jns 0x3840
movq 0x37c6(%rip), %rdi      # 0x6fc8
leaq 0xbe9(%rip), %rsi       # 0x43f2
jmp 0x3880
movq 0x37b6(%rip), %rdi      # 0x6fc8
leaq 0xbb7(%rip), %rsi       # 0x43d0
jmp 0x3880
movq (%r15), %rsi
leaq 0x10(%rbx), %rdx
pushq $0x2
popq %rdi
callq 0x22c0
testl %eax, %eax
jle 0x3862
movl 0x4(%rbx), %edi
pushq $0x10
popq %rdx
movq %r14, %rsi
callq 0x2170
testl %eax, %eax
js 0x3872
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x376f(%rip), %rdi      # 0x6fc8
leaq 0xb86(%rip), %rsi       # 0x43e6
jmp 0x3880
movq 0x375f(%rip), %rdi      # 0x6fc8
leaq 0xb90(%rip), %rsi       # 0x4400
jmp 0x3880
movq 0x374f(%rip), %rdi      # 0x6fc8
leaq 0xbb3(%rip), %rsi       # 0x4433
callq 0x21c0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerSocket.cpp
// Function: ServerSocket::Accept()
int ServerSocket::Accept() {

    int addrlen = sizeof(mAddress);
    int new_socket;

    if((new_socket = accept(mSockfd, (struct sockaddr *)&mAddress, (socklen_t*)&addrlen))<0) {
        std::cout << "Accept Failed" << std::endl;
        return -1;
    }

    return new_socket;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x4(%rbp), %rdx
movl $0x10, (%rdx)
movl 0x4(%rdi), %eax
leaq 0xc(%rdi), %rsi
movl %eax, %edi
callq 0x2090
testl %eax, %eax
jns 0x38e6
movq 0x36f9(%rip), %rdi      # 0x6fc8
leaq 0xb6f(%rip), %rsi       # 0x4445
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerSocket.cpp
// Function: ServerSocket::GetMessage[abi:cxx11](int const&)
std::string ServerSocket::GetMessage(const int &sock) {

    mValread = read(sock, buffer, 1024);
    std::string message = buffer;
    memset(buffer, 0, sizeof(buffer));
    
    return message;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdx), %edi
leaq 0x1c(%rsi), %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rsi
callq 0x2240
movl %eax, 0x8(%r14)
leaq -0x19(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20a0
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x2110
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerSocket.cpp
// Function: ServerSocket::SendMessage(int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ServerSocket::SendMessage(const int &sock, const std::string &message) {

    //  Delay 5 second to simulate the time for message passing
    std::this_thread::sleep_for(std::chrono::seconds(5));
    send(sock, message.c_str(), message.length(), 0);

    close(sock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq -0x18(%rbp), %rdi
movq $0x5, (%rdi)
callq 0x3a00
movl (%r14), %edi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
xorl %ecx, %ecx
callq 0x20f0
movl (%r14), %edi
callq 0x22e0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/ServerSocket.cpp
// Function: ServerSocket::ForwardTicket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string ServerSocket::ForwardTicket(const std::string &message) {

    //  Delay 5 second to simulate the time for message passing
    std::this_thread::sleep_for(std::chrono::seconds(5));
    send(mSockfd, message.c_str(), message.length(), 0);

    mValread = read(mSockfd, buffer, 1024);

    std::string reply = buffer;

    return reply;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x28(%rbp), %rdi
movq $0x5, (%rdi)
callq 0x3a00
movl 0x4(%r14), %edi
movq (%r15), %rsi
movq 0x8(%r15), %rdx
xorl %ecx, %ecx
callq 0x20f0
movl 0x4(%r14), %edi
leaq 0x1c(%r14), %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rsi
callq 0x2240
movl %eax, 0x8(%r14)
leaq -0x19(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20a0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/XuhuiSun95[P]Ticket-Booking-Service/server/main.cpp
// Function: main
int main(int argc, char* argv[]) {

    ServerInterface* server = new ServerInterface();

    server->Run();

    delete server;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
pushq $0x78
popq %rdi
callq 0x21d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x2be4
movq %rbx, %rdi
callq 0x2d5e
movq %rbx, %rdi
callq 0x2d30
movq %rbx, %rdi
callq 0x21b0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x21b0
movq %r14, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: CheckTCid(char**, std::vector<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>>>>, int)
int CheckTCid(char **lib_TC, std::vector<std::string> in_TC, int Length)  
{
	for (int i = 0; i < Length; i++)
	{
		if (strcmp(lib_TC[i], in_TC[i].c_str()) != 0)
		{
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testl %edx, %edx
movl $0x0, %r13d
movl %edx, -0x2c(%rbp)
cmovgl %edx, %r13d
xorl %ecx, %ecx
movq %rcx, %rbx
cmpq %rcx, %r13
je 0x3d17
movq (%r15,%rbx,8), %rdi
movq (%r14), %rax
movq (%rax,%r12), %rsi
callq 0x2280
leaq 0x1(%rbx), %rcx
addq $0x20, %r12
testl %eax, %eax
je 0x3cf3
movslq -0x2c(%rbp), %rcx
xorl %eax, %eax
cmpq %rcx, %rbx
setl %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: MatchExon(char**, Exondata*, int, int*)
int MatchExon(char **lib_TC, Exondata *indata, int Length, int *match_idx)
{
    int error_flag = 1;
    std::unordered_map<std::string, int> id_map;
    
    for (int i = 0; i < indata->TC_name.size(); i++)
    {
        id_map[indata->TC_name[i].c_str()] = i+1;
    }
    
    for (int i = 0; i < Length; i++)
    {
        match_idx[i] = id_map[lib_TC[i]] - 1;
    }
    
    for (int i = 0; i < Length; i++)
    {
        if(match_idx[i] != -1)
        {
            error_flag = 0;
            break;
        }
    }
    
    if(error_flag == 1)
    {
        return 1;
    }
    else
    {
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r14
movl %edx, -0x30(%rbp)
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %r15d, %r15d
leaq -0x58(%rbp), %r13
xorl %ebx, %ebx
movq 0x18(%r12), %rax
movq 0x20(%r12), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbx, %rcx
jbe 0x3fd2
movq (%rax,%r15), %rsi
movq %r13, %rdi
leaq -0x29(%rbp), %rdx
callq 0x20d0
leaq -0x90(%rbp), %rdi
movq %r13, %rsi
callq 0x5ee4
incq %rbx
movl %ebx, (%rax)
movq %r13, %rdi
callq 0x2110
addq $0x20, %r15
jmp 0x3f8a
xorl %r12d, %r12d
movl -0x30(%rbp), %eax
testl %eax, %eax
movl $0x0, %r15d
cmovgl %eax, %r15d
leaq -0x58(%rbp), %rbx
leaq -0x90(%rbp), %r13
cmpq %r12, %r15
je 0x4028
movq -0x38(%rbp), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
leaq -0x29(%rbp), %rdx
callq 0x20d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5ee4
movl (%rax), %eax
decl %eax
movl %eax, (%r14,%r12,4)
movq %rbx, %rdi
callq 0x2110
incq %r12
jmp 0x3fef
xorl %ecx, %ecx
movq %rcx, %rax
cmpq %rcx, %r15
je 0x403d
leaq 0x1(%rax), %rcx
cmpl $-0x1, (%r14,%rax,4)
je 0x402a
movslq -0x30(%rbp), %rcx
xorl %ebx, %ebx
cmpq %rcx, %rax
setge %bl
leaq -0x90(%rbp), %rdi
callq 0x5938
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4078
jmp 0x406a
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2110
jmp 0x407b
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x5938
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: ShellSort(double*, int*, int)
void ShellSort(double *num, int *index, int numLength)    
{
	int i, j, increment, temp_idx;
	double temp;

	for (increment = numLength / 2; increment > 0; increment /= 2)
	{
		for (i = increment; i<numLength; i++)
		{
			temp = num[i];
			temp_idx = index[i];
			for (j = i; j >= increment; j -= increment)
			{

				if (temp > num[j - increment])
				{
					num[j] = num[j - increment];
					index[j] = index[j - increment];
				}
				else
				{
					break;
				}
			}
			num[j] = temp;
			index[j] = temp_idx;
		}
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl %edx, %ecx
movl $0x2, %r8d
movl %edx, %eax
cltd
idivl %r8d
testl %eax, %eax
jle 0x45ba
movl %eax, %edx
xorl %r8d, %r8d
cmpl %ecx, %edx
jge 0x45b6
movsd (%rdi,%rdx,8), %xmm0
movl (%rsi,%rdx,4), %r9d
movl %r8d, %r10d
leal (%rax,%r10), %r11d
cmpl %eax, %r11d
jl 0x45a1
movslq %r10d, %r10
movsd (%rdi,%r10,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x45a1
movl %r11d, %r11d
movsd %xmm1, (%rdi,%r11,8)
movl (%rsi,%r10,4), %ebx
movl %ebx, (%rsi,%r11,4)
subl %eax, %r10d
jmp 0x4573
movslq %r11d, %r10
movsd %xmm0, (%rdi,%r10,8)
movl %r9d, (%rsi,%r10,4)
incq %rdx
incl %r8d
jmp 0x4563
shrl %eax
jmp 0x455a
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: GetRank(double*, double*, int)
void GetRank(double *rank, double *num,int numLength)
{
    int i,j,k;
    i = 0;
    while (i < numLength)
    {
        j = i;
        while ((j < numLength - 1) && (num[j]  == num[j + 1]))
        {
            j++;
        }
        if (i != j)
        {
            for (k = i; k <= j; k++)
            {
                rank[k] = (i + j + 2) / 2.0;
            }
        }
        else
        {
            rank[i] = i + 1;
        }
        i = j + 1;
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal -0x1(%rdx), %eax
movslq %eax, %rcx
xorl %r10d, %r10d
movsd 0x2e86(%rip), %xmm0     # 0x7458
cmpl %edx, %r10d
jge 0x4641
movslq %r10d, %r9
leal -0x1(%r10), %r8d
movq %r9, %r11
cmpq %rcx, %r11
jge 0x4600
movsd (%rsi,%r11,8), %xmm1
incl %r8d
ucomisd 0x8(%rsi,%r11,8), %xmm1
leaq 0x1(%r11), %r11
jne 0x4603
jnp 0x45e1
jmp 0x4603
movl %eax, %r8d
cmpl %r8d, %r10d
jne 0x461e
incl %r10d
cvtsi2sd %r10d, %xmm1
movsd %xmm1, (%rdi,%r9,8)
incl %r8d
movl %r8d, %r10d
jmp 0x45d2
addl %r8d, %r10d
addl $0x2, %r10d
cvtsi2sd %r10d, %xmm1
mulsd %xmm0, %xmm1
movslq %r8d, %r10
cmpq %r10, %r9
jg 0x4616
movsd %xmm1, (%rdi,%r9,8)
incq %r9
jmp 0x4631
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: QuantileNorm(double*, double*, int)
void QuantileNorm(double *indata, double *quantile, int dataLength) 
{
	int *index = new int[dataLength];
	double *indata_copy = new double[dataLength];
    double *ranks = new double[dataLength];

	for (int i = 0; i < dataLength; i++)
	{
		index[i] = i;
		indata_copy[i] = indata[i];
	}

	ShellSort(indata_copy, index, dataLength);
    GetRank(ranks, indata_copy, dataLength);
    
	for (int i = 0; i < dataLength; i++)
	{
        if (ranks[i] - floor(ranks[i]) > 0.4)
        {
            indata[index[i]] = 0.5 * (quantile[(size_t)floor(ranks[i])-1] + quantile[(size_t)floor(ranks[i])]);
        }
        else
        {
            indata[index[i]] = quantile[(size_t)floor(ranks[i])-1];
        }
	}

	delete[] index;
    delete[] ranks;
	delete[] indata_copy;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %rax
xorl %r13d, %r13d
testl %eax, %eax
movl $0x0, %r15d
movl %edx, -0x38(%rbp)
cmovgl %edx, %r15d
leaq (,%rax,8), %rdx
testl %eax, %eax
pushq $-0x1
popq %rcx
cmovsq %rcx, %rdx
movq %rdx, -0x30(%rbp)
movq %rax, %rdi
shlq $0x2, %rdi
testl %eax, %eax
cmovsq %rcx, %rdi
callq 0x2030
movq %rax, %r12
movq -0x30(%rbp), %rdi
callq 0x2030
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0x2030
movq -0x40(%rbp), %rcx
movq %rax, -0x30(%rbp)
cmpq %r13, %r15
je 0x46d1
movl %r13d, (%r12,%r13,4)
movsd (%r14,%r13,8), %xmm0
movsd %xmm0, (%rcx,%r13,8)
incq %r13
jmp 0x46b7
movq %rcx, %r13
movq %rcx, %rdi
movq %r12, %rsi
movl -0x38(%rbp), %edx
callq 0x4547
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movl -0x38(%rbp), %edx
callq 0x45bd
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x4769
movq -0x30(%rbp), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x2330
movsd -0x38(%rbp), %xmm1
subsd %xmm0, %xmm1
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x2d36(%rip), %xmm0     # 0x7460
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
ucomisd 0x2d2b(%rip), %xmm1     # 0x7468
jbe 0x4754
movsd -0x8(%rbx,%rax,8), %xmm0
addsd (%rbx,%rax,8), %xmm0
mulsd 0x2d06(%rip), %xmm0     # 0x7458
jmp 0x475a
movsd -0x8(%rbx,%rax,8), %xmm0
movslq (%r12,%r13,4), %rax
movsd %xmm0, (%r14,%rax,8)
incq %r13
jmp 0x46f4
movq %r12, %rdi
callq 0x2240
movq -0x30(%rbp), %rdi
callq 0x2240
movq -0x40(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: StandardizeRow(double**, double*, double*, int, int)
void StandardizeRow(double **data_in, double *Mean, double *SD, int Length, int sample_size)  
{
	for (int i = 0; i < Length; i++)
	{
		if (SD[i] != 0)
		{
			for (int j = 0; j < sample_size; j++)
			{
				data_in[j][i] = (data_in[j][i] - Mean[i]) / SD[i];
			}
		}
		else
		{
			for (int j = 0; j < sample_size; j++)
			{
				data_in[j][i] = 0;
			}
		}

	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %r8d
testl %ecx, %ecx
cmovlel %eax, %ecx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x47f8
movsd (%rdx,%rax,8), %xmm1
xorl %r9d, %r9d
ucomisd %xmm0, %xmm1
jne 0x47db
jp 0x47db
jmp 0x47ee
movq (%rdi,%r9,8), %r10
movsd (%r10,%rax,8), %xmm1
subsd (%rsi,%rax,8), %xmm1
divsd (%rdx,%rax,8), %xmm1
movsd %xmm1, (%r10,%rax,8)
incq %r9
cmpq %r9, %r8
jne 0x47be
jmp 0x47f3
movq (%rdi,%r9,8), %r10
andq $0x0, (%r10,%rax,8)
incq %r9
cmpq %r9, %r8
jne 0x47e2
incq %rax
jmp 0x47a7
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: StandardizeRow_r(double**, double*, double*, int, int)
void StandardizeRow_r(double **data_in, double *Mean, double *SD, int Length, int sample_size)  
{
	for (int i = 0; i < Length; i++)
	{
		for (int j = 0; j < sample_size; j++)
		{
			data_in[j][i] = data_in[j][i] * SD[i] + Mean[i];
		}

	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %r8d
testl %ecx, %ecx
cmovlel %eax, %ecx
cmpq %rcx, %rax
je 0x483d
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x4838
movq (%rdi,%r9,8), %r10
movsd (%r10,%rax,8), %xmm0
mulsd (%rdx,%rax,8), %xmm0
addsd (%rsi,%rax,8), %xmm0
movsd %xmm0, (%r10,%rax,8)
incq %r9
jmp 0x4814
incq %rax
jmp 0x480c
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: ClusterMean(double**, double**, int*, int, int, int)
void ClusterMean(double **data_matrix, double **data_mean, int *cluster_idx, int p_length, int c_length, int sample_size)
{
	double *data_sum = new double[sample_size];
	int data_count;

	for (int i = 0; i < c_length; i++)
	{
		for (int m = 0; m < sample_size; m++)
		{
			data_sum[m] = 0;
		}
		data_count = 0;
		for (int j = 0; j < p_length; j++)
		{
			if (cluster_idx[j] == i + 1)                      
			{
				for (int k = 0; k < sample_size; k++)
				{
					data_sum[k] += data_matrix[k][j];
				}
				data_count++;
			}
		}
		for (int m = 0; m < sample_size; m++)
		{
			data_mean[m][i] = data_sum[m] / (double)data_count;
		}

	}

	delete[] data_sum;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebx
movq %r8, -0x38(%rbp)
movl %ecx, %r15d
movq %rdx, -0x30(%rbp)
movq %rsi, %r13
movq %rdi, %r14
movl %r9d, %eax
shlq $0x3, %rax
xorl %r12d, %r12d
testl %r9d, %r9d
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
cmovlel %r12d, %ebx
callq 0x2030
movq -0x30(%rbp), %r10
movq -0x38(%rbp), %r9
testl %r15d, %r15d
cmovlel %r12d, %r15d
testl %r9d, %r9d
cmovlel %r12d, %r9d
cmpq %r9, %r12
je 0x4914
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x48ad
andq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0x489e
leaq 0x1(%r12), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %r15, %rdx
je 0x48eb
movl (%r10,%rdx,4), %edi
cmpq %rdi, %rcx
jne 0x48e6
xorl %edi, %edi
cmpq %rdi, %rbx
je 0x48e4
movq (%r14,%rdi,8), %r8
movsd (%r8,%rdx,8), %xmm0
addsd (%rax,%rdi,8), %xmm0
movsd %xmm0, (%rax,%rdi,8)
incq %rdi
jmp 0x48c6
incl %esi
incq %rdx
jmp 0x48b6
cvtsi2sd %esi, %xmm0
xorl %edx, %edx
cmpq %rdx, %rbx
je 0x490f
movsd (%rax,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movq (%r13,%rdx,8), %rsi
movsd %xmm1, (%rsi,%r12,8)
incq %rdx
jmp 0x48f1
movq %rcx, %r12
jmp 0x4897
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: ReadPar(char*, int&, int&, int&, int&, int&, int&, int&, int&)
int ReadPar(char filename[255], int &loci_size, int &predictor_size, int &cluster_size, int &bin_size, int &var_size, int &DH_num1, int &DH_num2, int &DH_num3)
{
	FILE *pFile;
	int param[8];
	pFile = fopen(filename, "rb");
	if (pFile != NULL)
	{
		std::cout << "Reading model parameter..." << std::endl;
		fread(param, sizeof(int), 8, pFile);
		loci_size = param[0];
		predictor_size = param[1];
		cluster_size = param[2];
		bin_size = param[3];
		var_size = param[4];
		DH_num1 = param[5];
		DH_num2 = param[6];
		DH_num3 = param[7];
		fclose(pFile);

	}
	else
	{
		std::cout << "Error! File " << filename << " not found!" << std::endl;
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x38(%rbp)
movq %r8, -0x30(%rbp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2826(%rip), %rsi      # 0x74cc
callq 0x2210
testq %rax, %rax
je 0x4d3a
movq %rax, %r15
movq 0x631a(%rip), %rdi      # 0xafd8
leaq 0x2820(%rip), %rsi      # 0x74e5
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq -0x60(%rbp), %r14
pushq $0x4
popq %rsi
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %r15, %rcx
callq 0x22b0
movl (%r14), %eax
movl %eax, (%rbx)
movl 0x4(%r14), %eax
movl %eax, (%r13)
movl 0x8(%r14), %eax
movl %eax, (%r12)
movl 0xc(%r14), %eax
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
movl 0x10(%r14), %eax
movq -0x38(%rbp), %rcx
movl %eax, (%rcx)
movl 0x14(%r14), %eax
movq 0x10(%rbp), %rcx
movl %eax, (%rcx)
movl 0x18(%r14), %eax
movq 0x18(%rbp), %rcx
movl %eax, (%rcx)
movl 0x1c(%r14), %eax
movq 0x20(%rbp), %rcx
movl %eax, (%rcx)
movq %r15, %rdi
callq 0x21e0
xorl %eax, %eax
jmp 0x4d72
movq 0x6297(%rip), %rdi      # 0xafd8
leaq 0x276b(%rip), %rsi      # 0x74b3
callq 0x21d0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
leaq 0x2761(%rip), %rsi      # 0x74c0
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
pushq $0x1
popq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: Regression(double**, double**, double**, int**, int, int, int)
void Regression(double **predictor, double **output, double **coef, int **predictor_idx, int var_length, int loci_length, int sample_size)
{
	for (int i = 0; i < loci_length; i++)
	{
		for (int j = 0; j < sample_size; j++)
		{
			output[j][i] = 0;
			for (int k = 0; k < var_length; k++)
			{
				output[j][i] += coef[k][i] * predictor[j][predictor_idx[k][i] - 1];               //index from 1 in library file.
			}

		}
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %r8d
movl 0x10(%rbp), %r10d
testl %r10d, %r10d
cmovlel %eax, %r10d
testl %r9d, %r9d
cmovlel %eax, %r9d
cmpq %r9, %rax
je 0x4dfe
xorl %r11d, %r11d
cmpq %r10, %r11
je 0x4df9
movq (%rsi,%r11,8), %rbx
andq $0x0, (%rbx,%rax,8)
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
cmpq %r14, %r8
je 0x4df4
movq (%rdx,%r14,8), %r15
movsd (%r15,%rax,8), %xmm1
movq (%rdi,%r11,8), %r15
movq (%rcx,%r14,8), %r12
movslq (%r12,%rax,4), %r12
mulsd -0x8(%r15,%r12,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%rax,8)
incq %r14
jmp 0x4dc4
incq %r11
jmp 0x4daf
incq %rax
jmp 0x4da7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: ModelAverage(double**, double**, double**, double**, double**, int**, int, int)
void ModelAverage(double **output, double **DH_pre1, double **DH_pre2, double **DH_pre3, double **dis_matrix, int **DH_cluster, int loci_length, int sample_size)
{
	double weight;
	for (int i = 0; i < loci_length; i++)
	{
		for (int j = 0; j < sample_size; j++)
		{
			weight = dis_matrix[0][i] + dis_matrix[1][i] + dis_matrix[2][i] + 1;
			output[j][i] = (output[j][i] + DH_pre1[j][DH_cluster[0][i] - 1] * dis_matrix[0][i] + DH_pre2[j][DH_cluster[1][i] - 1] * dis_matrix[1][i] + DH_pre3[j][DH_cluster[2][i] - 1] * dis_matrix[2][i]) / weight ;               //index from 1 in library file.
		}
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x10(%rbp), %eax
movl 0x18(%rbp), %r10d
xorl %r11d, %r11d
testl %r10d, %r10d
cmovlel %r11d, %r10d
testl %eax, %eax
cmovlel %r11d, %eax
movsd 0x21dd(%rip), %xmm0     # 0x7010
cmpq %rax, %r11
je 0x4ed9
xorl %ebx, %ebx
cmpq %rbx, %r10
je 0x4ed1
movq (%r8), %r14
movq 0x8(%r8), %r15
movsd (%r14,%r11,8), %xmm1
movsd (%r15,%r11,8), %xmm2
movapd %xmm1, %xmm3
addsd %xmm2, %xmm3
movq 0x10(%r8), %r14
movsd (%r14,%r11,8), %xmm4
addsd %xmm4, %xmm3
addsd %xmm0, %xmm3
movq (%rdi,%rbx,8), %r14
movq (%rsi,%rbx,8), %r15
movq (%r9), %r12
movq 0x8(%r9), %r13
movslq (%r12,%r11,4), %r12
mulsd -0x8(%r15,%r12,8), %xmm1
addsd (%r14,%r11,8), %xmm1
movq (%rdx,%rbx,8), %r15
movslq (%r13,%r11,4), %r12
mulsd -0x8(%r15,%r12,8), %xmm2
addsd %xmm1, %xmm2
movq (%rcx,%rbx,8), %r15
movq 0x10(%r9), %r12
movslq (%r12,%r11,4), %r12
mulsd -0x8(%r15,%r12,8), %xmm4
addsd %xmm2, %xmm4
divsd %xmm3, %xmm4
movsd %xmm4, (%r14,%r11,8)
incq %rbx
jmp 0x4e3e
incq %r11
jmp 0x4e33
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/predict_function.cpp
// Function: help_info()
void help_info()
{
	std::cout << "Usage:" << std::endl;
	std::cout << "Standard output: BIRD_predict -b model_file.bin -i input_file.txt -o output_file.txt" << std::endl;
	std::cout << "Standard output will save a matrix contained all predited value in log scale (log2(x+1) transformed)." << std::endl;
	std::cout << "WIG output: BIRD_predict -b model_file.bin -i input_file.txt -o output_name -w" << std::endl;
	std::cout << "WIG output will save each sample as a WIG file." << std::endl;
	std::cout << "Options:" << std::endl;
	std::cout << "-b   Specify library file. If not sepecified,the program will search for model_file.bin in the current directory." << std::endl;
	std::cout << "-i   Specify input file (gene expression matrix)." << std::endl;
	std::cout << "-o   Specify output file." << std::endl;
	std::cout << "-u   Set upper bound for predicted values (default:14)." << std::endl;
	std::cout << "-w   Output WIG file for each sample." << std::endl;
    std::cout << "-wt  Output WIG file for each sample with log-transformed value." << std::endl;
	std::cout << "-l   Use locus-level model for prediction." << std::endl;
    std::cout << "-e   Use exact id match for matching the gene expression data." << std::endl;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x58b3(%rip), %rbx      # 0xafd8
leaq 0x1ecc(%rip), %rsi      # 0x75f8
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1a6f(%rip), %rsi      # 0x71b2
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1ea5(%rip), %rsi      # 0x75ff
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1a96(%rip), %rsi      # 0x7207
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1edd(%rip), %rsi      # 0x7665
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1ef6(%rip), %rsi      # 0x7695
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1ee8(%rip), %rsi      # 0x769e
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1f43(%rip), %rsi      # 0x7710
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1f5e(%rip), %rsi      # 0x7742
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1f61(%rip), %rsi      # 0x775c
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1f82(%rip), %rsi      # 0x7794
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1f91(%rip), %rsi      # 0x77ba
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1fbb(%rip), %rsi      # 0x77fb
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq 0x1fcf(%rip), %rsi      # 0x7826
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2120
nop
// File: /workspace/github_cpp_makefile_star2_O2/ahupowerdns[P]mcounter/./mcounter-single.hh
// Function: UnsharedCounterParent::get()
uint64_t UnsharedCounterParent::get()
{
  uint64_t ret=d_formerChildren;
  std::lock_guard<std::mutex> l(d_mutex);
  for(const auto& c : d_children) {
    ret += c->d_value;
  }
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movq 0x38(%rdi), %rbx
leaq 0x40(%rdi), %r14
movq %r14, %rdi
callq 0x294e
addq $0x10, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x2419
movq 0x8(%r15), %rax
addq (%rax), %rbx
jmp 0x2408
movq %r14, %rdi
callq 0x2110
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ahupowerdns[P]mcounter/mcounter-single.cc
// Function: main
int main(int argc, char **argv)
{
  int num= argc > 1 ? atoi(argv[1]) : 1;
  bool unshared = argc > 2 ? argv[2]==std::string("unshared") : 1;
  
  std::thread progress(printWorker);
  progress.detach();
  
  vector<std::thread> threads;

  auto start = high_resolution_clock::now();
  for(int n=0; n < num; ++n)
    threads.emplace_back(unshared ? unsharedWorker: sharedWorker, 100000000);

  for(auto& t : threads)
    t.join();
                           
  auto finish = high_resolution_clock::now();
  auto msecs = duration_cast<milliseconds>(finish-start);

  cout<<"Took "<<msecs.count()<<" milliseconds of wall time"<<endl;
  cout << ucp.get() <<endl;
  cout << g_counter<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq -0xaf(%rip), %rbx       # 0x24d5
cmpl $0x2, %edi
jl 0x25e4
movq %rsi, %r14
movl %edi, %r15d
movq 0x8(%rsi), %rdi
callq 0x21f0
movl %eax, %ebp
cmpl $0x2, %r15d
je 0x25e7
movq 0x10(%r14), %rbx
leaq 0x1a5d(%rip), %rsi      # 0x4008
leaq 0x10(%rsp), %r14
movq %rsp, %rdx
movq %r14, %rdi
callq 0x2786
movq %rbx, %rdi
movq %r14, %rsi
callq 0x276f
leaq -0xf8(%rip), %rcx       # 0x24d5
leaq -0xd0(%rip), %rbx       # 0x2504
testb %al, %al
cmovneq %rcx, %rbx
movq %r14, %rdi
callq 0x2090
jmp 0x25e7
pushq $0x1
popq %rbp
leaq -0xda(%rip), %rsi       # 0x2514
movq %rsp, %r14
movq %r14, %rdi
callq 0x27c2
movq %r14, %rdi
callq 0x2220
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
callq 0x2030
movq %rax, %r14
xorl %r13d, %r13d
testl %ebp, %ebp
cmovgl %ebp, %r13d
leaq 0xc(%rsp), %r12
subl $0x1, %r13d
jb 0x2646
movl $0x5f5e100, 0xc(%rsp)   # imm = 0x5F5E100
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2828
jmp 0x2628
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r15
cmpq %r15, %rbx
je 0x2663
movq %rbx, %rdi
callq 0x2210
addq $0x8, %rbx
jmp 0x2650
callq 0x2030
movq %rax, %rbx
movq 0x3966(%rip), %rdi      # 0x5fd8
leaq 0x1998(%rip), %rsi      # 0x4011
callq 0x2170
movq %rax, %rdi
subq %r14, %rbx
movl $0xf4240, %ecx          # imm = 0xF4240
movq %rbx, %rax
cqto
idivq %rcx
movq %rax, %rsi
callq 0x2160
leaq 0x1977(%rip), %rsi      # 0x4017
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20b0
leaq 0x3a99(%rip), %rdi      # 0x6150
callq 0x23ec
movq 0x3915(%rip), %rdi      # 0x5fd8
movq %rax, %rsi
callq 0x20f0
movq %rax, %rdi
callq 0x20b0
movq 0x3ade(%rip), %rsi      # 0x61b8
movq 0x38f7(%rip), %rdi      # 0x5fd8
callq 0x20f0
movq %rax, %rdi
callq 0x20b0
leaq 0x10(%rsp), %rdi
callq 0x286a
movq %rsp, %rdi
callq 0x288c
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2727
jmp 0x271a
jmp 0x271a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x286a
movq %rsp, %rdi
callq 0x288c
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/point.cc
// Function: main
int main()
{
	cout << 10.0 << endl;         // prints 10
	cout << showpoint << 10.0     // prints 10.0000
	     << noshowpoint << endl;  // revert to default format 
	
	cout << 10.0 << endl;  // prints 10

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x2e1f(%rip), %rbx      # 0x3fd8
movsd 0xe47(%rip), %xmm0      # 0x2008
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
movq (%rbx), %rax
movq -0x18(%rax), %rax
orl $0x400, 0x18(%rbx,%rax) # imm = 0x400
movq %rbx, %rdi
movsd 0xe1d(%rip), %xmm0      # 0x2008
callq 0x1060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
andl $0xfffffbff, 0x18(%rax,%rcx) # imm = 0xFFFFFBFF
movq %rax, %rdi
callq 0x1030
movq %rbx, %rdi
movsd 0xdf6(%rip), %xmm0      # 0x2008
callq 0x1060
movq %rax, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/rsync_upload.c
// Function: adler32
unsigned int adler32(unsigned char *data, unsigned int len)
{
	unsigned short a = 1, b = 0;
	unsigned int i;

	// Process each byte of the data in order
	for (i = 0; i < len; i++)
	{
		a = (a + data[i]) % MOD_ADLER;
		b = (b + a) % MOD_ADLER;
	}

	return (b << 16) | a;
}

// Assembly:
movl %esi, %ecx
movw $0x1, %r9w
xorl %esi, %esi
movl $0xfff1, %r8d           # imm = 0xFFF1
xorl %edx, %edx
movzwl %r9w, %eax
cmpq %rsi, %rcx
je 0x1388
movzbl (%rdi,%rsi), %r10d
addl %eax, %r10d
movl %r10d, %r9d
subl %r8d, %r9d
cmovbl %r10d, %r9d
movzwl %dx, %eax
addl %r9d, %eax
xorl %edx, %edx
divl %r8d
incq %rsi
jmp 0x135d
shll $0x10, %edx
orl %eax, %edx
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/rsync_upload.c
// Function: Recv
int Recv(SOCKET sock, char *buffer, unsigned int size, int flag)
{
	unsigned int num_read = 0;

	while (num_read < size && num_read >= 0)
	{
		int ret = 0;

		ret = recv(sock, &buffer[num_read], size - num_read, flag);
		if (ret > 0)
		{
			num_read += ret;
			if (size > RECV_PROGRESS)
			{
				printf("Recv %d of %d\r", num_read, size);
			}
		}
		else
		{
			return ret;
		}
	}
	if (size > RECV_PROGRESS)
	{
		printf("\r\n");
	}
	return num_read;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %r12d
leaq 0x29d9(%rip), %r13      # 0x4004
xorl %ebx, %ebx
movl %ebp, %edx
subl %ebx, %edx
jbe 0x1661
movl %ebx, %esi
addq %r15, %rsi
movl %r12d, %edi
movl %r14d, %ecx
callq 0x1040
testl %eax, %eax
jle 0x1677
addl %eax, %ebx
cmpl $0x2001, %ebp           # imm = 0x2001
jb 0x162d
movq %r13, %rdi
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10e0
jmp 0x162d
cmpl $0x2001, %ebp           # imm = 0x2001
jb 0x1679
leaq 0x2f01(%rip), %rdi      # 0x4571
callq 0x1070
jmp 0x1679
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/rsync_upload.c
// Function: Send
int Send(SOCKET sock, char *buffer, int size, int flag)
{
	int num_sent = 0;

	while (num_sent < size && num_sent >= 0)
	{
		int ret = 0;

		ret = send(sock, &buffer[num_sent], size - num_sent, flag);
		if (ret > 0)
		{
			num_sent += ret;

			if (size > RECV_PROGRESS)
			{
				printf("Sent %d of %d\r", num_sent, size);
			}
		}
		else
		{
			return ret;
		}
	}
	if (size > RECV_PROGRESS)
	{
		printf("\r\n");
	}
	return num_sent;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %r12d
leaq 0x296c(%rip), %r13      # 0x4013
xorl %ebx, %ebx
movl %ebp, %eax
subl %ebx, %eax
jle 0x16e0
movl %ebx, %esi
addq %r15, %rsi
movslq %eax, %rdx
movl %r12d, %edi
movl %r14d, %ecx
callq 0x10d0
testl %eax, %eax
jle 0x16f6
addl %eax, %ebx
cmpl $0x2001, %ebp           # imm = 0x2001
jl 0x16a9
movq %r13, %rdi
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10e0
jmp 0x16a9
cmpl $0x2001, %ebp           # imm = 0x2001
jl 0x16f8
leaq 0x2e82(%rip), %rdi      # 0x4571
callq 0x1070
jmp 0x16f8
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/rsync_upload.c
// Function: write_file
int write_file(char *filename, const char *bytes, int size)
{
    FILE *fp = fopen(filename, "wb");
    int ret;
    
    if (fp == NULL)
    {
        perror("Unable to open file for writing");
        return -1;
    }
    
    ret = fwrite(bytes, sizeof(char), size, fp);
    
    if (ret != size)
    {
		perror("fwrite didnt write all data");
		fclose(fp);
        return -1;
    }
    fclose(fp);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
leaq 0x2865(%rip), %rsi      # 0x4025
callq 0x11c0
testq %rax, %rax
je 0x17fb
movq %rax, %rbx
movslq %ebp, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0x1220
cmpl %r15d, %eax
jne 0x1809
movq %rbx, %rdi
callq 0x10a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2826(%rip), %rdi      # 0x4028
callq 0x11d0
jmp 0x181d
leaq 0x2838(%rip), %rdi      # 0x4048
callq 0x11d0
movq %rbx, %rdi
callq 0x10a0
pushq $-0x1
popq %rax
jmp 0x17f0
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/rsync_upload.c
// Function: assemble_download
int assemble_download(char *response, unsigned int rfile_size, char *data, unsigned int file_size, block_t *block_offset, int num_block, unsigned int block_size, char *diff, unsigned int diff_size)
{
	unsigned int diff_pos = 0;

	memset(response, 0, rfile_size);
	for (unsigned int i = 0; i < rfile_size; i++)
	{
		int skip = 0;

		// check if this byte is in a block
		for (int j = 0; j < num_block; j++)
		{
			if (i >= block_offset[j].offset && i < block_offset[j].offset + block_size)
			{
				// we are in this block, memcpy and skip to the end of this block
				memcpy(&response[i], &data[j * block_size], block_offset[j].length);
				i = block_offset[j].offset + block_size - 1;
				skip = 1;
				break;
			}
		}

		if (skip)
		{
			// restart again as we move passed a block
			continue;
		}

		// This byte comes from the downloaded pile
		response[i] = diff[diff_pos++];
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebx
movq %r8, %r14
movq %rdx, 0x10(%rsp)
movl %esi, %ebp
movl 0x50(%rsp), %r13d
movl %esi, %edx
xorl %r15d, %r15d
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
callq 0x1100
testl %ebx, %ebx
cmovlel %r15d, %ebx
xorl %eax, %eax
cmpl %ebp, %eax
jae 0x18bb
xorl %ecx, %ecx
xorl %r12d, %r12d
movl %eax, %edi
cmpq %r12, %rbx
je 0x1882
movl (%r14,%r12,8), %edx
cmpl %edx, %eax
jb 0x187a
addl %r13d, %edx
cmpl %edx, %eax
jb 0x189c
incq %r12
addl %r13d, %ecx
jmp 0x1864
movl %r15d, %ecx
incl %r15d
movq 0x58(%rsp), %rdx
movb (%rdx,%rcx), %cl
movq 0x8(%rsp), %rdx
movb %cl, (%rdx,%rdi)
incl %eax
jmp 0x185b
addq 0x8(%rsp), %rdi
movl %ecx, %esi
addq 0x10(%rsp), %rsi
movl 0x4(%r14,%r12,8), %edx
callq 0x1160
movl (%r14,%r12,8), %eax
addl %r13d, %eax
jmp 0x185b
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/rsync_upload.c
// Function: StripChars
void StripChars(const char *in, char *out, char *stripc)
{
    while (*in)
    {
    	int flag = 0;

		int length = strlen(stripc);
		for(int i = 0; i < length; i++)
		{
			if (*in == stripc[i])
			{
				if (stripc[i] == '.' && strlen(in) == 4)
				{
					continue;
				}
				flag = 1;
				break;
			}
		}

		if (flag)
		{
			in++;
			continue;
		}
        *out++ = *in++;
    }
    *out = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movb (%r15), %bpl
testb %bpl, %bpl
je 0x203f
movq %r14, %rdi
callq 0x10c0
movq %rax, %r12
testl %r12d, %r12d
movl $0x0, %eax
cmovlel %eax, %r12d
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x2034
cmpb (%r14,%r13), %bpl
jne 0x202f
cmpb $0x2e, %bpl
jne 0x203a
movq %r15, %rdi
callq 0x10c0
cmpq $0x4, %rax
jne 0x203a
incq %r13
jmp 0x2010
movb %bpl, (%rbx)
incq %rbx
incq %r15
jmp 0x1fee
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq