LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/proxyserver.cpp
// Function: eraseHostFromFdSets(int, fd_set&, fd_set&, int&, int&, int&)
void eraseHostFromFdSets(int hostFd, fd_set &readSet, fd_set &writeSet, int &max_read_sd, int &max_write_sd, int &max_all_sd) {
    
    if (FD_ISSET(hostFd, &writeSet)) {
        close(hostFd);
        FD_CLR(hostFd, &writeSet);
        if (hostFd == max_write_sd) {
            while (FD_ISSET(max_write_sd, &writeSet) == 0 && max_write_sd > 0)
                max_write_sd -= 1;
        }
    }
    else {
        LogHelper::log(Warn, "hostFd :%d not in writeSet");
    }
    if (FD_ISSET(hostFd, &readSet)) {
        FD_CLR(hostFd, &readSet);
        if (hostFd == max_read_sd) {
            while (FD_ISSET(max_read_sd, &readSet) == 0)
                max_read_sd -= 1;
        }
    }
    else {
        LogHelper::log(Warn, "hostFd: %d not in readSet");
    }
    
    max_all_sd = std::max(max_read_sd, max_write_sd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r14
movq %rcx, (%rsp)
movl %edi, %r13d
leal 0x3f(%r13), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movq %rsi, 0x8(%rsp)
movl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %r12
andl $-0x40, %eax
movl %edi, %ecx
subl %eax, %ecx
movl $0x1, %r15d
shlq %cl, %r15
movq (%rdx,%r12,8), %rax
btq %rcx, %rax
movq %r15, %rbx
notq %rbx
jae 0x3314
movq %rdx, %rbp
movl %r13d, %edi
callq 0x2340
andq %rbx, (%rbp,%r12,8)
cmpl %r13d, (%r14)
jne 0x3327
movl (%r14), %eax
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %eax, %ecx
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
testl %eax, %eax
jle 0x3327
sarl $0x6, %edx
movslq %edx, %rcx
andq (%rbp,%rcx,8), %rsi
jne 0x3327
decl %eax
movl %eax, (%r14)
jmp 0x32e3
leaq 0x5288(%rip), %rsi      # 0x85a3
movl $0x1, %edi
xorl %eax, %eax
callq 0x273c
movq 0x8(%rsp), %rsi
movq (%rsi,%r12,8), %rax
testq %r15, %rax
je 0x3380
andq %rbx, %rax
movq %rax, (%rsi,%r12,8)
movq (%rsp), %rdx
cmpl %r13d, (%rdx)
jne 0x3397
movl (%rdx), %eax
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq (%rsi,%rcx,8), %rcx
btq %rax, %rcx
jb 0x3397
movl %eax, %ecx
leal -0x1(%rcx), %eax
addl $0x3e, %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq (%rsi,%rcx,8), %rcx
btq %rax, %rcx
jae 0x335f
movl %eax, (%rdx)
jmp 0x3397
leaq 0x5237(%rip), %rsi      # 0x85be
movl $0x1, %edi
xorl %eax, %eax
callq 0x273c
movq (%rsp), %rdx
movl (%rdx), %eax
movl (%r14), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/proxyserver.cpp
// Function: eraseClientFromFdSet(int, fd_set&, int&, int, int&)
void eraseClientFromFdSet(int clientFd, fd_set &readSet, int &max_read_sd, int max_write_sd, int &max_all_sd) {
    close(clientFd);
    FD_CLR(clientFd, &readSet);
    if (clientFd == max_read_sd) {
        while (FD_ISSET(max_read_sd, &readSet) == 0)
            max_read_sd -= 1;
    }
    max_all_sd = std::max(max_read_sd, max_write_sd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
callq 0x2340
movq $-0x2, %rax
movl %r12d, %ecx
rolq %cl, %rax
leal 0x3f(%r12), %ecx
testl %r12d, %r12d
cmovnsl %r12d, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
andq %rax, (%r15,%rcx,8)
cmpl %r12d, (%r14)
jne 0x3435
movl (%r14), %eax
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq (%r15,%rcx,8), %rcx
btq %rax, %rcx
jb 0x3435
movl %eax, %ecx
leal -0x1(%rcx), %eax
addl $0x3e, %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq (%r15,%rcx,8), %rcx
btq %rax, %rcx
jae 0x3415
movl %eax, (%r14)
movl (%r14), %eax
cmpl %ebp, %eax
cmovgl %eax, %ebp
movl %ebp, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/proxyserver.cpp
// Function: cleanDeadLocalFds(int, std::unordered_map<int, HostNode, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, HostNode>>>&, std::unordered_map<int, SocketNode, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, SocketNode>>>&, fd_set&, fd_set&, int&, int&, int&, bool)
void cleanDeadLocalFds(int clientFd, HostMap &h2lMap, SocketMap &sMap, fd_set &readSet, fd_set &writeSet, int &max_read_sd, int &max_write_sd, int &max_all_sd, bool forceClean = false) {
    time_t now = time(NULL);
    for (auto it = sMap.begin(); it != sMap.end();) {
        if (forceClean || now - it->second.lastTime > constants::SocketTimeOutSeconds) {
            int localFd = it->first, hostFd = it->second.sockFd;
            LogHelper::log(Debug, "Clean timeout localFd %d in clientFd: %d, forceClean: %d", localFd, clientFd, forceClean);
            eraseHostFromFdSets(hostFd, readSet, writeSet, max_read_sd, max_write_sd, max_all_sd);
            h2lMap.erase(hostFd);
            it = sMap.erase(it);
            
        }
        else it++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movl %edi, %ebp
xorl %edi, %edi
callq 0x2190
movq %rax, 0x10(%rsp)
movq 0x10(%r12), %rbx
testq %rbx, %rbx
je 0x350a
movzbl 0x70(%rsp), %r14d
cmpb $0x0, 0x70(%rsp)
jne 0x34a3
movq 0x10(%rsp), %rax
subq 0x18(%rbx), %rax
cmpq $0xb5, %rax
jl 0x3502
movl 0x8(%rbx), %edx
movl 0x10(%rbx), %eax
movl %eax, 0xc(%rsp)
movl $0x3, %edi
leaq 0x511f(%rip), %rsi      # 0x85d8
movl %ebp, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x273c
movl 0xc(%rsp), %edi
movq %r15, %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0x68(%rsp), %r9
callq 0x3278
movq %r13, %rdi
leaq 0xc(%rsp), %rsi
callq 0x5302
movq %r12, %rdi
movq %rbx, %rsi
callq 0x53ee
movq %rax, %rbx
jmp 0x3505
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x348b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/proxyserver.cpp
// Function: cleanDeadHosts(std::unordered_map<int, ClientNode*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, ClientNode*>>>&, std::unordered_map<int, HostNode, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, HostNode>>>&, fd_set&, fd_set&, int&, int&, int&)
void cleanDeadHosts(ClientMap &cMap, HostMap &sMap, fd_set &readSet, fd_set &writeSet, int &max_read_sd, int &max_write_sd, int &max_all_sd) {
    time_t now = time(NULL);
    for (auto it = sMap.begin(); it != sMap.end();) {
        if (now - it->second.lastTime > constants::SocketTimeOutSeconds) {
            LogHelper::log(Debug, "Clean timeout host fd: %d, localFd: %d", it->first, it->second.localFd);
            eraseHostFromFdSets(it->first, readSet, writeSet, max_read_sd, max_write_sd, max_all_sd);
            cMap[it->second.clientFd]->sMap.erase(it->second.localFd);
            it = sMap.erase(it);
        }
        else it++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, (%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
xorl %edi, %edi
callq 0x2190
movq 0x10(%r13), %r14
testq %r14, %r14
je 0x35d5
movq %rax, %rbx
movq %rbx, %rax
subq 0x18(%r14), %rax
cmpq $0xb5, %rax
jl 0x35cd
leaq 0x14(%r14), %r15
movl 0x8(%r14), %edx
movl 0x14(%r14), %ecx
movl $0x3, %edi
leaq 0x5095(%rip), %rsi      # 0x8611
xorl %eax, %eax
callq 0x273c
movl 0x8(%r14), %edi
movq %r12, %rsi
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x50(%rsp), %r9
callq 0x3278
leaq 0x10(%r14), %rsi
movq %rbp, %rdi
callq 0x4a0e
movq (%rax), %rdi
addq $0x18, %rdi
movq %r15, %rsi
callq 0x54aa
movq %r13, %rdi
movq %r14, %rsi
callq 0x54fa
movq %rax, %r14
jmp 0x35d0
movq (%r14), %r14
testq %r14, %r14
jne 0x3555
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/proxyserver.cpp
// Function: cleanDeadClients(std::unordered_map<int, ClientNode*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, ClientNode*>>>&, std::unordered_map<int, HostNode, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, HostNode>>>&, fd_set&, fd_set&, int&, int&, int&)
void cleanDeadClients(ClientMap &cMap, HostMap &h2lMap, fd_set &readSet, fd_set &writeSet, int &max_read_sd, int &max_write_sd, int &max_all_sd) {
    time_t now = time(NULL);
    for (auto it = cMap.begin(); it != cMap.end(); ) {
        if (now - it->second->lastTime > constants::ClientTimeOutSeconds) {
            LogHelper::log(Debug, "Clean timeout client fd: %d", it->first);
            cleanDeadLocalFds(it->first, h2lMap, it->second->sMap, readSet, writeSet, max_read_sd, max_write_sd, max_all_sd, true);
            eraseClientFromFdSet(it->first, readSet, max_read_sd, max_write_sd, max_all_sd);
            delete it->second;
            it = cMap.erase(it);
        }
        else {
            cleanDeadLocalFds(it->first, h2lMap, it->second->sMap, readSet, writeSet, max_read_sd, max_write_sd, max_all_sd);
            it++;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r13
movq %rdx, 0x8(%rsp)
movq %rsi, %rbp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x2190
movq %rax, 0x30(%rsp)
movq %rbx, 0x28(%rsp)
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x3728
movq %rbp, 0x20(%rsp)
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r12
movq 0x10(%r15), %rdx
movq 0x30(%rsp), %rcx
subq 0x10(%rdx), %rcx
movl 0x8(%r15), %eax
cmpq $0x79, %rcx
jl 0x36ec
movl $0x3, %edi
leaq 0x4fda(%rip), %rsi      # 0x8638
movl %eax, %edx
xorl %eax, %eax
callq 0x273c
movl 0x8(%r15), %edi
movq 0x10(%r15), %rdx
addq $0x18, %rdx
subq $0x8, %rsp
movq %rbp, %rsi
movq %rbx, %rcx
movq %r13, %rbp
movq %r13, %r8
movq %r12, %r9
pushq $0x1
movq 0x80(%rsp), %r14
pushq %r14
movq 0x30(%rsp), %r13
pushq %r13
callq 0x3448
addq $0x20, %rsp
movl 0x8(%r15), %edi
movl (%r13), %ecx
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %r8
callq 0x33b7
movq 0x10(%r15), %r13
testq %r13, %r13
je 0x36d2
leaq 0x18(%r13), %rdi
callq 0x4876
movq %r13, %rdi
callq 0x21a0
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x5524
movq %rax, %r15
movq %rbp, %r13
movq 0x20(%rsp), %rbp
jmp 0x371f
addq $0x18, %rdx
subq $0x8, %rsp
movl %eax, %edi
movq %rbp, %rsi
movq 0x10(%rsp), %rcx
movq %r13, %r8
movq 0x18(%rsp), %r9
pushq $0x0
pushq 0x80(%rsp)
pushq 0x30(%rsp)
callq 0x3448
addq $0x20, %rsp
movq (%r15), %r15
testq %r15, %r15
jne 0x3637
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/utils.cpp
// Function: make_socket(unsigned short, int, int)
int make_socket(uint16_t port, int on, int bindToLoopback)
{
    int sock;
    struct sockaddr_in6 name;

    /* Create the socket. */    
    sock = socket(AF_INET6, SOCK_STREAM, 0);
    if (sock < 0)
    {
        LogHelper::log(Error, "failed to create socket, %s", strerror(errno));
        return -1;
    }

    // set reuseable
    int rc = setsockopt(sock, SOL_SOCKET,  SO_REUSEADDR,
                   (char *)&on, sizeof(on));
    if (rc < 0)
    {
        LogHelper::log(Error, "setsockopt() failed, %s", strerror(errno));
        close(sock);
        return -2;
    }

    /* Give the socket a name. */
    memset(&name, 0, sizeof(name));
    name.sin6_family = AF_INET6;
    name.sin6_port = htons (port);
    //   name.sin6_addr.s_addr = htonl (INADDR_ANY);
    
    if (bindToLoopback)
        memcpy(&name.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback));
    else
        memcpy(&name.sin6_addr, &in6addr_any, sizeof(in6addr_any));

    if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
    {
        LogHelper::log(Error, "Failed to bind, %s", strerror(errno));
        return -3;
    }

    return sock;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebp
movl %edi, %r14d
movl %esi, 0xc(%rsp)
movl $0xa, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2080
testl %eax, %eax
js 0x5956
movl %eax, %ebx
leaq 0xc(%rsp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x2320
testl %eax, %eax
js 0x597c
xorps %xmm0, %xmm0
leaq 0x18(%rsp), %rax
movaps %xmm0, -0x8(%rax)
movups %xmm0, 0x4(%rax)
movw $0xa, -0x8(%rax)
rolw $0x8, %r14w
movw %r14w, -0x6(%rax)
testl %ebp, %ebp
je 0x59a9
movq 0x767c(%rip), %rcx      # 0xcfd0
jmp 0x59b0
callq 0x2040
movl (%rax), %edi
callq 0x20d0
leaq 0x309c(%rip), %rsi      # 0x8a05
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x273c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x59ef
callq 0x2040
movl (%rax), %edi
callq 0x20d0
leaq 0x3092(%rip), %rsi      # 0x8a21
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x273c
movl %ebx, %edi
callq 0x2340
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
jmp 0x59ef
movq 0x7630(%rip), %rcx      # 0xcfe0
movups (%rcx), %xmm0
movups %xmm0, (%rax)
leaq 0x10(%rsp), %rsi
movl %ebx, %edi
movl $0x1c, %edx
callq 0x2060
testl %eax, %eax
jns 0x59ef
callq 0x2040
movl (%rax), %edi
callq 0x20d0
leaq 0x305b(%rip), %rsi      # 0x8a39
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x273c
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/utils.cpp
// Function: readNBytes(int, void*, unsigned long, int)
ssize_t readNBytes(int fd, void *buf, size_t nbyte, int isNonBlocking) {
    size_t hasRead = 0;
    char* dest = (char*)buf;
    while(hasRead < nbyte) {
        ssize_t tempLen = recv(fd, dest + hasRead, nbyte - hasRead, 0);
        if(tempLen < 0) {
            if (isNonBlocking && errno == EAGAIN) {
                continue;
            }
            LogHelper::log(Error, "Error happens when read fd , errno: %d %s", errno, strerror(errno));
            return -1;
        }
        if(isNonBlocking && tempLen == 0) {
            LogHelper::log(Error, "Connection has been closed in sockFd %d when tried to recv", fd);
            return hasRead;
        }
        hasRead += tempLen;
        
    }
    
    return hasRead;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x5ab4
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
xorl %r12d, %r12d
leaq (%r15,%r12), %rsi
movq %r14, %rdx
subq %r12, %rdx
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x20c0
testq %rax, %rax
js 0x5a58
testl %ebx, %ebx
je 0x5a9f
testq %rax, %rax
jne 0x5a9f
xorl %edi, %edi
leaq 0x3031(%rip), %rsi      # 0x8a76
movl %ebp, %edx
xorl %eax, %eax
callq 0x273c
movl $0x1, %ecx
movq %r12, %r13
jmp 0x5aa4
testl %ebx, %ebx
je 0x5a6b
callq 0x2040
movl $0x2, %ecx
cmpl $0xb, (%rax)
je 0x5aa4
callq 0x2040
movl (%rax), %r13d
movl %r13d, %edi
callq 0x20d0
xorl %edi, %edi
leaq 0x2fc8(%rip), %rsi      # 0x8a4c
movl %r13d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x273c
movl $0x1, %ecx
movq $-0x1, %r13
jmp 0x5aa4
addq %rax, %r12
xorl %ecx, %ecx
testb $0x1, %cl
jne 0x5ab9
cmpq %r14, %r12
jb 0x5a1b
jmp 0x5abc
xorl %r12d, %r12d
jmp 0x5abc
movq %r13, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/utils.cpp
// Function: disAssembleInnerMsg(InnerMsg*, unsigned char const*, unsigned long)
int disAssembleInnerMsg(InnerMsg *msg ,const uint8_t *src_data, size_t nbyte) {
    // memset(msg, 0, sizeof(InnerMsg));
    if (nbyte < sizeof(msg->cSeq) + sizeof(msg->sSeq) + sizeof(msg->msgType) + sizeof(msg->dataLength) ) {
        LogHelper::log(Warn, "nbyte less than InnerMsg header, nbyte: %lu", nbyte); 
        return -1;
    }
    ntoh_copy8bytes(&(msg->cSeq), src_data); src_data += sizeof(msg->cSeq);
    ntoh_copy8bytes(&(msg->sSeq), src_data); src_data += sizeof(msg->sSeq);
    ntoh_copy2bytes(&(msg->msgType), src_data); src_data += sizeof(msg->msgType);
    ntoh_copy2bytes(&(msg->dataLength), src_data); src_data += sizeof(msg->dataLength);
    memcpy(msg->data, src_data, msg->dataLength);
    return 0;
}

// Assembly:
pushq %rax
cmpq $0x13, %rdx
ja 0x5bbe
leaq 0x2f62(%rip), %rsi      # 0x8b0d
movl $0x1, %edi
xorl %eax, %eax
callq 0x273c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x5bfc
movq (%rsi), %rax
bswapq %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
bswapq %rax
movq %rax, 0x8(%rdi)
movzwl 0x10(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0x10(%rdi)
movzwl 0x12(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0x12(%rdi)
addq $0x14, %rsi
addq $0x14, %rdi
movzwl %ax, %edx
callq 0x2150
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/utils.cpp
// Function: assembleInnerMsg(unsigned char*, unsigned long, InnerMsg const*)
ssize_t assembleInnerMsg(uint8_t *dst, size_t buffer_size, const InnerMsg *src_msg) {
    uint8_t *old_dst = dst;
    if (buffer_size < sizeof(src_msg->cSeq) + sizeof(src_msg->sSeq) + sizeof(src_msg->msgType) + sizeof(src_msg->dataLength)) {
        LogHelper::log(Warn, "buffer size less than inner msg header, buffer_size: %lu");
        return -1;
    }
    hton_copy8bytes(dst, &(src_msg->cSeq)); dst += sizeof(src_msg->cSeq);
    hton_copy8bytes(dst, &(src_msg->sSeq)); dst += sizeof(src_msg->sSeq);
    hton_copy2bytes(dst, &(src_msg->msgType)); dst += sizeof(src_msg->msgType);
    hton_copy2bytes(dst, &(src_msg->dataLength)); dst += sizeof(src_msg->dataLength);
    buffer_size -= sizeof(src_msg->cSeq) + sizeof(src_msg->sSeq) + sizeof(src_msg->dataLength);
    if (buffer_size < src_msg->dataLength) {
        LogHelper::log(Warn, "buffer size less than InnerMsg dataLength, buffer_size: %lu, dataLength: %lu", buffer_size, src_msg->dataLength);
        return -2;
    }
    memcpy(dst, src_msg->data, src_msg->dataLength); dst += src_msg->dataLength;
    return dst - old_dst; 
}

// Assembly:
pushq %rbx
cmpq $0x13, %rsi
ja 0x5d56
leaq 0x2ed4(%rip), %rsi      # 0x8c15
movl $0x1, %edi
xorl %eax, %eax
callq 0x273c
movq $-0x1, %rax
jmp 0x5dc9
movq %rdx, %rbx
movq %rsi, %rdx
movq (%rbx), %rax
bswapq %rax
movq %rax, (%rdi)
movq 0x8(%rbx), %rax
bswapq %rax
movq %rax, 0x8(%rdi)
movzwl 0x10(%rbx), %eax
rolw $0x8, %ax
movw %ax, 0x10(%rdi)
movzwl 0x12(%rbx), %eax
rolw $0x8, %ax
movw %ax, 0x12(%rdi)
addq $-0x12, %rdx
movzwl 0x12(%rbx), %ecx
cmpq %rcx, %rdx
jae 0x5db1
leaq 0x2eb2(%rip), %rsi      # 0x8c4e
movl $0x1, %edi
xorl %eax, %eax
callq 0x273c
movq $-0x2, %rax
jmp 0x5dc9
addq $0x14, %rdi
leaq 0x14(%rbx), %rsi
movq %rcx, %rdx
callq 0x2150
movzwl 0x12(%rbx), %eax
addq $0x14, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/utils.cpp
// Function: getRand63()
uint64_t getRand63() {
    uint64_t ret = 0;
    for (int i = 0; i < 63; ++i) {
        ret = (ret << 1) + (rand() & 1);
    }
    ret &= 0x7fffffffffffffffULL;
    return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x3f, %ebp
xorl %ebx, %ebx
callq 0x2090
andl $0x1, %eax
leaq (%rax,%rbx,2), %rbx
decl %ebp
jne 0x622b
btrq $0x3f, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/constants.cpp
// Function: constants::getKey(char (&) [16])
int getKey(char (&dst)[16]) {
    // uuid_t id;
    if (hasParsedKey == 0) {
        int code = uuid_parse(constants::uuidKey, storedId);
        if (code != 0)
            return code;
        hasParsedKey = 1;
    }
    memcpy(dst, storedId, 16);
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0xb7229(%rip)     # 0xbd480
jne 0x6277
leaq 0x2c90(%rip), %rdi      # 0x8ef0
leaq 0xb7229(%rip), %rsi     # 0xbd490
callq 0x22e0
testl %eax, %eax
jne 0x6283
movb $0x1, 0xb7209(%rip)     # 0xbd480
movaps 0xb7212(%rip), %xmm0    # 0xbd490
movups %xmm0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/aes.cpp
// Function: addKey(int (&) [4][4], int)
static void addKey(int (&array)[4][4], int round) {
	int warray[4];
	int i,j;
	for(i = 0; i < 4; i++) {
		intToArray(w[round*4 + i], warray);
		for(j = 0; j < 4; j++) {
			array[j][i] = array[j][i] ^ warray[j];
		}
	}
}

// Assembly:
shll $0x2, %esi
movslq %esi, %rax
xorl %ecx, %ecx
leaq 0xb765c(%rip), %rdx     # 0xbdce0
movl $0xff, %esi
leaq (%rcx,%rax), %r8
movl (%rdx,%r8,4), %r8d
movl %r8d, %r9d
shrl $0x18, %r9d
movl %r9d, -0x18(%rsp)
movl %r8d, %r9d
shrl $0x10, %r9d
andl %esi, %r9d
movl %r9d, -0x14(%rsp)
movl %r8d, %r9d
shrl $0x8, %r9d
andl %esi, %r9d
movl %r9d, -0x10(%rsp)
andl %esi, %r8d
movl %r8d, -0xc(%rsp)
xorl %r8d, %r8d
movl -0x18(%rsp,%r8), %r9d
xorl %r9d, (%rdi,%r8,4)
addq $0x4, %r8
cmpq $0x10, %r8
jne 0x66c6
incq %rcx
addq $0x4, %rdi
cmpq $0x4, %rcx
jne 0x6689
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/aes.cpp
// Function: showStr(char*)
void showStr(char *str){
	int i;
	for(i=0;i<16;i++)
		printf("%02x", (unsigned char)str[i]);
		// printf("%c", (unsigned char)str[i]);
	printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2cea(%rip), %r14      # 0x93e0
xorl %r15d, %r15d
movzbl (%rbx,%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
incq %r15
cmpq $0x10, %r15
jne 0x66f9
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/aes.cpp
// Function: compute_hh(unsigned char (&) [16])
int compute_hh(unsigned char (&h)[16])
{//计算h<<1，h<<2，h<<3，....h<<127；p(x)=x128+ x7 + x2 +x + 1; 
		int i,msb,j;    
	memcpy(hh[0],h,16);//hh[0]=h
	for(i=1;i<128;i++)
	{
		msb=hh[i-1][0]>>7;//最高位
		for(j=0;j<15;j++)//h[i]=h[i-1]<<1 | ...
			hh[i][j] = ((hh[i-1][j]<<1) | (hh[i-1][j+1]>>7)) &255;
		hh[i][15] = hh[i-1][15]<<1;
		if(msb==1)
			hh[i][15] ^= 0x87;
	}
	return 0;
}

// Assembly:
movups (%rdi), %xmm0
movaps %xmm0, 0xb6db6(%rip)    # 0xbd4e0
movl $0x1, %eax
leaq 0xb6dba(%rip), %rcx     # 0xbd4f0
leaq 0xb6da3(%rip), %rdx     # 0xbd4e0
movq %rax, %rsi
shlq $0x4, %rsi
leaq (%rsi,%rdx), %r8
addq $-0x10, %r8
movb (%r8), %dil
movq $-0xf, %r9
movb -0x1(%rcx,%r9), %r10b
movb (%rcx,%r9), %r11b
shrb $0x7, %r11b
addb %r10b, %r10b
orb %r11b, %r10b
movb %r10b, 0xf(%rcx,%r9)
incq %r9
jne 0x6756
movb 0xf(%r8), %r8b
addb %r8b, %r8b
movzbl %r8b, %r9d
xorb $-0x79, %r8b
testb %dil, %dil
movzbl %r8b, %edi
cmovnsl %r9d, %edi
movb %dil, 0xf(%rsi,%rdx)
incq %rax
addq $0x10, %rcx
cmpq $0x80, %rax
jne 0x673d
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/aes.cpp
// Function: mult_h(unsigned char (&) [16], unsigned char (&) [16])
static int mult_h(unsigned char (&a)[16],unsigned char (&b)[16])
{//有限域乘法G(2128);注意：a，b不能为同一个地址（b在不停的更新）
	int i,j,k,m;
	memset(b,0,16);
	for(k=0,i=15; i>=0; i--)//从低位开始，数据都是从高位开始的，所以从15开始。
	{//k为从低位开始的计数器
		for(j=0; j<8; j++,k++)
		{
			if( ((a[i]>>j)&1) == 1)//每个字节也从低位开始
			{
				for(m=0;m<16;m++)
					b[m] ^= hh[k][m] ;
			}
		}
	}
	return 0;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movl $0xf, %eax
xorl %ecx, %ecx
leaq 0xb6b82(%rip), %rdx     # 0xbd4e0
movslq %ecx, %rcx
movq %rcx, %r8
shlq $0x4, %r8
addq %rdx, %r8
xorl %r9d, %r9d
movzbl (%rdi,%rax), %r10d
btl %r9d, %r10d
jae 0x6980
xorps (%r8), %xmm0
movups %xmm0, (%rsi)
addq $0x10, %r8
incq %r9
cmpl $0x8, %r9d
jne 0x696e
addq %r9, %rcx
subq $0x1, %rax
jae 0x695e
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/aes.cpp
// Function: encrypt(char*, int, char const*, int, char const (&) [16], char (&) [16], char (&) [16])
int encrypt(char *dst, int dst_size, const char *src, int src_size, const char (&key)[16], char (&random)[16], char (&mac)[16]) {
	int valid_size = (src_size >> 4) << 4;
	if (valid_size < src_size)
		valid_size += 16;
	if (valid_size < src_size + 2) {
		valid_size += 16;
	}
	// static char buf[constants::AES_MAX_DATA_LENGTH];
	
	if (valid_size > constants::AES_MAX_DATA_LENGTH) {
		LogHelper::log(Error, "data size should be no longer than: %lu, but size is: %d", constants::AES_MAX_DATA_LENGTH, valid_size);
		return -5;
	}
	
	if (dst_size < valid_size) {
		LogHelper::log(Error, "dst_size is less than valid size, dst_size: %d, valid_size: %d", dst_size, valid_size);
		return -5;
	}
	char *buf = new char[valid_size];
	memcpy(buf, src, src_size);
	
	//Padding
	memset(buf + src_size, 0, valid_size - src_size);
	buf[src_size] = 0xf;

	int retCode = encode(dst, dst_size, buf, valid_size, key, random, mac);
	delete[] buf;
	if (retCode != 0) {
		LogHelper::log(Error, "Fail to encrypt");
		return retCode;
	}
	
	return valid_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r13d
movl %ecx, %eax
andl $-0x10, %eax
leal 0x10(%rax), %ecx
cmpl %r13d, %eax
cmovel %eax, %ecx
leal 0x2(%r13), %eax
leal 0x10(%rcx), %ebx
cmpl %eax, %ecx
cmovgel %ecx, %ebx
cmpl $0xffcd, %ebx           # imm = 0xFFCD
jb 0x6ba9
leaq 0x28f2(%rip), %rsi      # 0x9489
movl $0xffcc, %edx           # imm = 0xFFCC
xorl %edi, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x273c
jmp 0x6bc3
movl %esi, %ebp
cmpl %esi, %ebx
jle 0x6bd9
leaq 0x290c(%rip), %rsi      # 0x94c2
xorl %edi, %edi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x273c
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rdi, 0x10(%rsp)
movslq %ebx, %rdi
movq %r9, 0x20(%rsp)
movq %r8, 0x18(%rsp)
callq 0x2030
movq %rax, %r15
movslq %r13d, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2150
leaq (%r15,%r12), %rdi
movl %ebx, %eax
subl %r13d, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x2120
movb $0xf, (%r15,%r12)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movl %ebp, %esi
movq %r15, %rdx
movl %ebx, %ecx
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
callq 0x67a4
movl %eax, %ebp
movq %r15, %rdi
callq 0x2240
testl %ebp, %ebp
je 0x6bc8
leaq 0x28a5(%rip), %rsi      # 0x9501
xorl %edi, %edi
xorl %eax, %eax
callq 0x273c
movl %ebp, %ebx
jmp 0x6bc8
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/aes.cpp
// Function: testEncodeAndDecode()
int testEncodeAndDecode() {
	char key[16], random[16], mac[16];
	for (int i = 0; i < 16; ++i) {
		key[i] = rand() & 0xff;
	}
	char text[30] = "12345678901234566543210987654";
	for (int i = 0; i < sizeof(text) - 1; i++) {
		text[i] -= '0';
	}
	char buf[60] = {0};
	int codeLen = encrypt(buf, sizeof(buf), text, sizeof(text) - 1, key, random, mac);
	if (codeLen < 0) {
		printf("encode error, ret :%d", codeLen);
		return codeLen;
	}
	printf("after encode:\n");
	
	for(int i = 0; i < codeLen; ++i) {
		printf("%u ", buf[i]);
	}
	printf("\n");
	memset(text, 0, sizeof(text));
	// memset(random, 0, 2);
	codeLen = decrypt(text, sizeof(text), buf, codeLen, key, random, mac);
	if (codeLen < 0) {
		printf("decode error, ret :%d", codeLen);
		return codeLen;
	}
	printf("after decode:\n");
	for(int i = 0; i < codeLen; ++i) {
		printf("%u ", text[i]);
	}
	printf("\n");
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
xorl %ebx, %ebx
callq 0x2090
movb %al, 0x30(%rsp,%rbx)
incq %rbx
cmpq $0x10, %rbx
jne 0x6de8
movups 0x283d(%rip), %xmm0     # 0x963e
movups %xmm0, 0x1e(%rsp)
movaps 0x2823(%rip), %xmm0     # 0x9630
movaps %xmm0, 0x10(%rsp)
xorl %eax, %eax
addb $-0x30, 0x10(%rsp,%rax)
incq %rax
cmpq $0x1d, %rax
jne 0x6e14
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rdi
movups %xmm0, 0x2c(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
leaq 0x50(%rsp), %r15
movq %r15, (%rsp)
leaq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %r8
leaq 0x40(%rsp), %r9
movl $0x3c, %esi
movl $0x1d, %ecx
callq 0x6b5d
movl %eax, %ebx
testl %eax, %eax
js 0x6f20
leaq 0x2795(%rip), %rdi      # 0x9606
callq 0x22c0
testl %ebx, %ebx
je 0x6e9f
movl %ebx, %r12d
leaq 0x2768(%rip), %r14      # 0x95ec
xorl %r13d, %r13d
movsbl 0x60(%rsp,%r13), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
incq %r13
cmpq %r13, %r12
jne 0x6e87
movl $0xa, %edi
callq 0x2290
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movups %xmm0, 0xe(%rdi)
movq %r15, (%rsp)
leaq 0x60(%rsp), %rdx
leaq 0x30(%rsp), %r8
leaq 0x40(%rsp), %r9
movl $0x1e, %esi
movl %ebx, %ecx
callq 0x6c6c
movl %eax, %ebx
testl %eax, %eax
js 0x6f29
leaq 0x2730(%rip), %rdi      # 0x9614
callq 0x22c0
testl %ebx, %ebx
je 0x6f12
movl %ebx, %r14d
leaq 0x26f5(%rip), %rbx      # 0x95ec
xorl %r15d, %r15d
movsbl 0x10(%rsp,%r15), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
incq %r15
cmpq %r15, %r14
jne 0x6efa
movl $0xa, %edi
callq 0x2290
xorl %ebx, %ebx
jmp 0x6f39
leaq 0x26af(%rip), %rdi      # 0x95d6
jmp 0x6f30
leaq 0x26c0(%rip), %rdi      # 0x95f0
movl %ebx, %esi
xorl %eax, %eax
callq 0x2050
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/renzibei[P]TSProxy/aes.cpp
// Function: GFMul(int, int)
static int GFMul(int n, int s) {
	int result;

	if(n == 1)
		result = s;
	else if(n == 2)
		result = GFMul2(s);
	else if(n == 3)
		result = GFMul3(s);
	else if(n == 0x9)
		result = GFMul9(s);
	else if(n == 0xb)//11
		result = GFMul11(s);
	else if(n == 0xd)//13
		result = GFMul13(s);
	else if(n == 0xe)//14
		result = GFMul14(s);

	return result;
}

// Assembly:
movl %esi, %eax
addl $-0x2, %edi
cmpl $0xc, %edi
ja 0x6fe0
leaq 0x1fcf(%rip), %rcx      # 0x8f30
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
leal (%rax,%rax), %ecx
movzbl %cl, %edx
xorl $0x1b, %edx
testb %al, %al
cmovnsl %ecx, %edx
jmp 0x6ff1
leal (%rax,%rax), %ecx
movl $0xff, %edx
movl %ecx, %esi
andl %edx, %esi
xorl $0x1b, %esi
testb %al, %al
cmovnsl %ecx, %esi
leal (%rsi,%rsi), %ecx
movl %ecx, %edi
andl %edx, %edi
xorl $0x1b, %edi
testb %sil, %sil
cmovnsl %ecx, %edi
leal (%rdi,%rdi), %ecx
andl %ecx, %edx
xorl $0x1b, %edx
testb %dil, %dil
jmp 0x6fec
leal (%rax,%rax), %edx
movl $0xff, %ecx
movl %edx, %esi
andl %ecx, %esi
xorl $0x1b, %esi
testb %al, %al
cmovnsl %edx, %esi
leal (%rsi,%rsi), %edx
movl %edx, %eax
andl %ecx, %eax
xorl $0x1b, %eax
testb %sil, %sil
cmovnsl %edx, %eax
leal (%rax,%rax), %edx
andl %edx, %ecx
xorl $0x1b, %ecx
testb %al, %al
cmovnsl %edx, %ecx
xorl %esi, %eax
xorl %ecx, %eax
retq
leal (%rax,%rax), %ecx
movzbl %cl, %edx
xorl $0x1b, %edx
testb %al, %al
cmovnsl %ecx, %edx
xorl %eax, %edx
movl %edx, %eax
retq
leal (%rax,%rax), %esi
movl $0xff, %ecx
movl %esi, %edx
andl %ecx, %edx
xorl $0x1b, %edx
testb %al, %al
cmovnsl %esi, %edx
leal (%rdx,%rdx), %esi
movl %esi, %edi
andl %ecx, %edi
xorl $0x1b, %edi
testb %dl, %dl
cmovnsl %esi, %edi
leal (%rdi,%rdi), %esi
andl %esi, %ecx
xorl $0x1b, %ecx
testb %dil, %dil
cmovnsl %esi, %ecx
xorl %eax, %edx
xorl %ecx, %edx
movl %edx, %eax
retq
leal (%rax,%rax), %edx
movl $0xff, %ecx
movl %edx, %esi
andl %ecx, %esi
xorl $0x1b, %esi
testb %al, %al
cmovnsl %edx, %esi
leal (%rsi,%rsi), %edx
movl %edx, %edi
andl %ecx, %edi
xorl $0x1b, %edi
testb %sil, %sil
cmovnsl %edx, %edi
leal (%rdi,%rdi), %edx
andl %edx, %ecx
xorl $0x1b, %ecx
testb %dil, %dil
cmovnsl %edx, %ecx
xorl %eax, %edi
xorl %ecx, %edi
movl %edi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_utils.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> numToString<double>(double)
std::string numToString(T i) {
    std::string ret;
    std::stringstream out;
    out << i;
    ret = out.str();
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movsd %xmm0, (%rsp)
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %rdi
callq 0x8320
leaq 0x38(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x8730
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x8700
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8540
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x45e95
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xc50cc(%rip), %rsi     # 0x10af68
leaq 0x28(%rsp), %rdi
callq 0x8370
leaq 0xa8(%rsp), %rdi
callq 0x8190
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x45ec5
movq %rax, %r14
movq 0xc5099(%rip), %rsi     # 0x10af68
leaq 0x28(%rsp), %rdi
callq 0x8370
leaq 0xa8(%rsp), %rdi
callq 0x8190
jmp 0x45eeb
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x45efe
movq (%r15), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_annotation_tools.h
// Function: LinkedCoordsBed::getElementNames[abi:cxx11]()
std::vector<string> getElementNames() {
        std::vector<string> elementNames;
        for (int i = 0; i < (int)elementCoordsVector.size(); i++) {
            std::vector<std::vector<string> > thisElement = elementCoordsVector[i];
            //if (thisElement[0].size() < 4) {
            //    std::cerr << "thisElement[0].size()" << thisElement.size() << std::endl;
            //}
            elementNames.push_back(thisElement[0][3]);
        }
        return elementNames;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
jle 0x3194d
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
xorl %r13d, %r13d
addq %r12, %rsi
movq %r15, %rdi
callq 0x3386e
movq 0x8(%rsp), %rax
movq (%rax), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x33db0
movq %r15, %rdi
callq 0x31aa2
incq %r13
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
addq $0x18, %r12
cmpq %rax, %r13
jl 0x31904
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x31970
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x31aa2
movq %rbx, %rdi
callq 0x3123c
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_annotation_tools.h
// Function: LinkedCoordsBed::getElementOuterBoundaries[abi:cxx11]()
std::vector<std::vector<string> > getElementOuterBoundaries() {
        std::vector<std::vector<string> > allOuterBounds;
        for (int i = 0; i < (int)elementCoordsVector.size(); i++) {
            std::vector<std::vector<string> > thisElement = elementCoordsVector[i];
            //if (thisElement[0].size() < 4) {
            //    std::cerr << "thisElement[0].size()" << thisElement.size() << std::endl;
            //}
            std::vector<string> elementOuterBounds;
            elementOuterBounds.push_back(thisElement[0][0]);
            elementOuterBounds.push_back(thisElement[0][1]);
            elementOuterBounds.push_back(thisElement.back()[2]);
            allOuterBounds.push_back(elementOuterBounds);
        }
        return allOuterBounds;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
jle 0x31a63
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
leaq 0x20(%rsp), %r12
xorl %ebp, %ebp
addq %r13, %rsi
movq %r15, %rdi
callq 0x3386e
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq %r12, %rdi
callq 0x33db0
movq 0x8(%rsp), %rax
movq (%rax), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x33db0
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rsi
addq $0x40, %rsi
movq %r12, %rdi
callq 0x33db0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32338
movq %r12, %rdi
callq 0x3123c
movq %r15, %rdi
callq 0x31aa2
incq %rbp
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
addq $0x18, %r13
cmpq %rax, %rbp
jl 0x319cd
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x31a91
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x3123c
leaq 0x8(%rsp), %rdi
callq 0x31aa2
movq %rbx, %rdi
callq 0x31aa2
movq %r14, %rdi
callq 0x8840
nop
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_utils.h
// Function: void print_vector<std::deque<int, std::allocator<int>>>(std::deque<int, std::allocator<int>>, std::ostream&, char, bool)
void print_vector(T vector, std::ostream& outFile, char delim = '\t', bool endLine = true) {
    for (int i = 0; i < vector.size(); i++) {
        if (i == (vector.size()-1)) {
            if (endLine) outFile << vector[i] << std::endl;
            else outFile << vector[i];
        } else {
            outFile << vector[i] << delim;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r13d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ebx, %ebx
movl %ecx, 0x4(%rsp)
movq 0x48(%r15), %rcx
movq 0x28(%r15), %rax
movq %rcx, %rsi
subq %rax, %rsi
shrq $0x3, %rsi
cmpq $0x1, %rcx
adcq $-0x1, %rsi
shlq $0x7, %rsi
movq 0x30(%r15), %rdi
subq 0x38(%r15), %rdi
sarq $0x2, %rdi
movq 0x10(%r15), %rcx
movq 0x20(%r15), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
addq %rdi, %rdx
addq %rsi, %rdx
cmpq %rbx, %rdx
jbe 0x4a8b8
decq %rdx
cmpq %rdx, %rbx
jne 0x4a767
movq %rcx, %rdx
testb %r13b, %r13b
je 0x4a781
subq 0x18(%r15), %rdx
sarq $0x2, %rdx
leaq (%rbx,%rdx), %rsi
cmpq $0x7f, %rsi
ja 0x4a7fb
addq %r12, %rcx
jmp 0x4a831
movq %rcx, %rdx
subq 0x18(%r15), %rdx
sarq $0x2, %rdx
leaq (%rbx,%rdx), %rsi
cmpq $0x7f, %rsi
ja 0x4a79f
addq %r12, %rcx
jmp 0x4a7d5
subq 0x18(%r15), %rdx
sarq $0x2, %rdx
leaq (%rbx,%rdx), %rsi
cmpq $0x7f, %rsi
ja 0x4a86c
addq %r12, %rcx
jmp 0x4a8a2
movq %rsi, %rcx
shrq $0x7, %rcx
movq %rcx, %rdi
movabsq $-0x200000000000000, %r8 # imm = 0xFE00000000000000
orq %r8, %rdi
testq %rsi, %rsi
cmovgq %rcx, %rdi
movq %rdi, %rcx
shlq $0x7, %rcx
subq %rcx, %rdx
addq %rbx, %rdx
shlq $0x2, %rdx
addq (%rax,%rdi,8), %rdx
movq %rdx, %rcx
movl (%rcx), %esi
movq %r14, %rdi
callq 0x8810
movb %bpl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3(%rsp), %rsi
callq 0x84e0
jmp 0x4a8ac
movq %rsi, %rcx
shrq $0x7, %rcx
movq %rcx, %rdi
movabsq $-0x200000000000000, %r8 # imm = 0xFE00000000000000
orq %r8, %rdi
testq %rsi, %rsi
cmovgq %rcx, %rdi
movq %rdi, %rcx
shlq $0x7, %rcx
subq %rcx, %rdx
addq %rbx, %rdx
shlq $0x2, %rdx
addq (%rax,%rdi,8), %rdx
movq %rdx, %rcx
movl (%rcx), %esi
movq %r14, %rdi
callq 0x8810
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r13, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movl 0x4(%rsp), %r13d
jmp 0x4a8ac
movq %rsi, %rcx
shrq $0x7, %rcx
movq %rcx, %rdi
movabsq $-0x200000000000000, %r8 # imm = 0xFE00000000000000
orq %r8, %rdi
testq %rsi, %rsi
cmovgq %rcx, %rdi
movq %rdi, %rcx
shlq $0x7, %rcx
subq %rcx, %rdx
addq %rbx, %rdx
shlq $0x2, %rdx
addq (%rax,%rdi,8), %rdx
movq %rdx, %rcx
movl (%rcx), %esi
movq %r14, %rdi
callq 0x8810
incq %rbx
addq $0x4, %r12
jmp 0x4a6f1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/evo_abba_baba.cpp
// Function: getAAfromInfo(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>>>> const&)
inline std::string getAAfromInfo(const std::vector<std::string>& info) {
    string AA = "?";
    for (std::vector<std::string>::size_type i = 0; i != info.size(); i++) {
        string infoKey = split(info[i],'=')[0];
        if (infoKey == "AA") {
            AA = split(info[i],'=')[1];
        }
    }
    return AA;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
leaq 0xa7ff3(%rip), %rsi     # 0xe22d3
leaq 0xa7fed(%rip), %rdx     # 0xe22d4
movq %rdi, (%rsp)
callq 0x28952
movq (%r14), %rsi
cmpq %rsi, 0x8(%r14)
je 0x3a3ba
leaq 0x20(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
addq %rbx, %rsi
movq %r15, %rdi
movl $0x3d, %edx
callq 0x50624
movq 0x30(%rsp), %rax
movq %rbp, 0x10(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2e45c
movq %r15, %rdi
callq 0x3123c
movq %r12, %rdi
leaq 0x90f60(%rip), %rsi     # 0xcb2af
callq 0x8160
testl %eax, %eax
jne 0x3a385
movq (%r14), %rsi
addq %rbx, %rsi
movq %r15, %rdi
movl $0x3d, %edx
callq 0x50624
movq 0x30(%rsp), %rsi
addq $0x20, %rsi
movq (%rsp), %rdi
callq 0x8270
movq %r15, %rdi
callq 0x3123c
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3a39c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
incq %r13
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %rax, %r13
jne 0x3a311
movq (%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x3123c
jmp 0x3a3df
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3a40a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x3a40a
movq %rax, %r14
jmp 0x3a40a
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x3123c
movq (%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x3a428
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_annotation_tools.h
// Function: Annotation::getTranscriptName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool&)
std::string getTranscriptName(const string& geneColumn, bool& bPartial) {
        string thisTranscriptName;
        std::vector<string> findIfPartial = split(geneColumn, '-');
        if (findIfPartial.size() == 2) {
            bPartial = true;
            thisTranscriptName = findIfPartial[1];
        } else if (findIfPartial.size() == 1) {
            thisTranscriptName = geneColumn;
        }
        return thisTranscriptName;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsp, %rdi
movq %rdx, %rsi
movl $0x2d, %edx
callq 0x50624
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq $0x1, %rcx
je 0x3ea66
cmpq $0x2, %rcx
jne 0x3ea71
movb $0x1, (%r15)
addq $0x20, %rax
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8270
movq %rsp, %rdi
callq 0x3123c
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x3123c
jmp 0x3ea98
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x3eaac
movq (%r12), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_cbs.cpp
// Function: numToStringVector[abi:cxx11](std::vector<int, std::allocator<int>>&)
std::vector<string> numToStringVector(std::vector<int>& vec) {
    std::vector<string> converted;
    for (std::vector<int>::size_type i = 0; i != vec.size(); i++) {
        converted.push_back(numToString(vec[i]));
    }
    return converted;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x472a9
movq %rsi, %r14
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
movq %rsp, %r15
movl (%rax,%r13,4), %esi
movq %r15, %rdi
callq 0x31297
movq %rbx, %rdi
movq %r15, %rsi
callq 0x416a6
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x47293
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
incq %r13
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r13
jne 0x47266
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x472d8
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x472d8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x3123c
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_cbs.cpp
// Function: numToStringMinFilterVector[abi:cxx11](std::vector<int, std::allocator<int>>&, int)
std::vector<string> numToStringMinFilterVector(std::vector<int>& vec, int min) {
    std::vector<string> converted;
    for (std::vector<int>::size_type i = 0; i != vec.size(); i++) {
        if (vec[i] >= min)
            converted.push_back(numToString(vec[i]));
    }
    return converted;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x4736c
movl %edx, %ebp
movq %rsi, %r14
leaq 0x18(%rsp), %r12
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
cmpl %ebp, (%rax,%r13,4)
jl 0x47356
movl (%rax,%r13,4), %esi
movq %r15, %rdi
callq 0x31297
movq %rbx, %rdi
movq %r15, %rsi
callq 0x416a6
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x47356
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
incq %r13
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r13
jne 0x47322
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4739d
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4739d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x3123c
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_cbs.cpp
// Function: cbsMain(int, char**)
int cbsMain(int argc, char** argv) {
    parseCbsOptions(argc, argv);
    
    if (!opt::vcfFile.empty()) {
        std::cerr << "Calculating the lenghts of cbs tracts from: " << opt::vcfFile << std::endl;
        std::cerr << "and using information about scaffold lengths and the location of undetermined regions from: " << opt::undeterminedLociFile << std::endl;
        calculateCbs();
    } else if (!opt::genomeFile.empty()) {
        std::cerr << "Looking for undetermined regions (runs of Ns) in the reference genome: " << std::endl;
        std::cerr << opt::genomeFile << std::endl;
        findUndeterminedRegions();
    } else {
        assert(false);
    }
    
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x491fa
cmpq $0x0, 0xc2fbe(%rip)     # 0x10c040
jne 0x49127
cmpq $0x0, 0xc2fd0(%rip)     # 0x10c060
je 0x491db
movq 0xc1f4b(%rip), %rbx     # 0x10afe8
leaq 0x8ce61(%rip), %rsi     # 0xd5f05
movl $0x47, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xc2f79(%rip), %rsi     # 0x10c058
movq 0xc2f7a(%rip), %rdx     # 0x10c060
movq %rbx, %rdi
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
callq 0x46d74
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xc1eba(%rip), %rbx     # 0x10afe8
leaq 0x8cd46(%rip), %rsi     # 0xd5e7b
movl $0x2c, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0xc2eef(%rip), %rsi     # 0x10c038
movq 0xc2ef0(%rip), %rdx     # 0x10c040
movq %rbx, %rdi
callq 0x84e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x8cd1f(%rip), %rsi     # 0xd5ea8
movl $0x5c, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0xc2f3b(%rip), %rsi     # 0x10c0d8
movq 0xc2f3c(%rip), %rdx     # 0x10c0e0
movq %rbx, %rdi
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
callq 0x473c2
leaq 0x8cd6b(%rip), %rdi     # 0xd5f4d
leaq 0x8cb7f(%rip), %rsi     # 0xd5d68
leaq 0x8cd63(%rip), %rcx     # 0xd5f53
movl $0x176, %edx            # imm = 0x176
callq 0x82c0