LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/mooncoincore[P]mooncoin-seeder/bitcoin.cpp
// Function: CNode::PushVersion()
void PushVersion() {
    int64 nTime = time(NULL);
    uint64 nLocalNonce = BITCOIN_SEED_NONCE;
    int64 nLocalServices = 0;
    CAddress me(CService("0.0.0.0"));
    BeginMessage("version");
    int nBestHeight = GetRequireHeight();
    string ver = "/mooncoin-seeder: v0.13.9.0-b257fcdsegwit/";
    vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me << nLocalNonce << ver << nBestHeight;
    EndMessage();
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x33c0
movq %rax, %r15
leaq 0xdd46(%rip), %rsi      # 0x13014
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x9eec
movzwl 0x10(%r14), %eax
movw %ax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
leaq 0x58(%rsp), %rdi
movl $0x1, %esi
callq 0xae26
leaq 0xdd17(%rip), %rsi      # 0x1301c
movq %rbx, %rdi
callq 0x5836
leaq 0x1716c(%rip), %rax     # 0x1c480
cmpb $0x0, (%rax)
movl $0x12ebc0, %ebp         # imm = 0x12EBC0
cmovnel %r12d, %ebp
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xdcf3(%rip), %rsi      # 0x13024
leaq 0xdd16(%rip), %rdx      # 0x1304e
leaq 0x20(%rsp), %rdi
callq 0x5cbc
leaq 0x8(%rbx), %r14
leaq 0x1c(%rsp), %rcx
movl $0x11180, -0x4(%rcx)    # imm = 0x11180
movq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5a6e
leaq 0x20(%rsp), %rcx
movq $0x0, -0x8(%rcx)
movq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5a6e
leaq 0x20(%rsp), %rcx
movq %r15, -0x8(%rcx)
movq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5a6e
leaq 0xa8(%rbx), %rdi
movl 0x28(%rbx), %edx
movl 0x2c(%rbx), %ecx
movq %r14, %rsi
callq 0x5d4c
movl 0x28(%rbx), %edx
movl 0x2c(%rbx), %ecx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x5d4c
movabsq $0x539a019ca550825, %rax # imm = 0x539A019CA550825
leaq 0x20(%rsp), %rcx
movq %rax, -0x8(%rcx)
movq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5a6e
movq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x5e27
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x540b
movq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x5a2e
leaq 0x1c(%rsp), %rcx
movl %ebp, -0x4(%rcx)
movq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5a6e
movq %rbx, %rdi
callq 0x58a2
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x543b
callq 0x33d0
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x545d
callq 0x33d0
movq %rbx, %rdi
callq 0x3650
nop
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: allocate(unsigned long)
void* allocate(uint64_t size)
{
    auto sizeGb = size / (1024*1024*1024ULL);
    auto space = tryAllocate1Gb(size);
    auto l = mlock(space,size);
    if(space != (void*) -1 && l == 0)
    {
        std::cout << "Allocated " << sizeGb << "GB using 1GB pages" << endl;
        return space;
    }
    space = tryAllocate2Mb(size);
    l = mlock(space,size);
    if(space != (void*) -1 && l == 0)
    {
        std::cout << "Allocated " << sizeGb << "GB using 2MB pages" << endl;
        return space;
    }
    space = tryAllocate4Kb(size);
    l = mlock(space,size);
    if(space != (void*) -1 && l == 0)
    {
        std::cout << "Allocated " << sizeGb << "GB using 4KB pages" << endl;
        return space;
    }
    std::cout << "Failed to allocate " << sizeGb << "GB" << endl;
    return nullptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movq %rdi, %r14
shrq $0x1e, %r14
xorl %edi, %edi
movq %r15, %rsi
movl $0x3, %edx
movl $0x78048022, %ecx       # imm = 0x78048022
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x57a0
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5590
cmpq $-0x1, %rbx
je 0x7bcc
testl %eax, %eax
jne 0x7bcc
movq 0x24412(%rip), %r15     # 0x2bfb0
leaq 0x1a4ab(%rip), %rsi     # 0x22050
movl $0xa, %edx
movq %r15, %rdi
callq 0x54c0
movq %r15, %rdi
movq %r14, %rsi
callq 0x5330
movq %rax, %r14
leaq 0x1a494(%rip), %rsi     # 0x2205b
jmp 0x7c98
xorl %edi, %edi
movq %r15, %rsi
movl $0x3, %edx
movl $0x54048022, %ecx       # imm = 0x54048022
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x57a0
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5590
cmpq $-0x1, %rbx
je 0x7c33
testl %eax, %eax
jne 0x7c33
movq 0x243a8(%rip), %r15     # 0x2bfb0
leaq 0x1a441(%rip), %rsi     # 0x22050
movl $0xa, %edx
movq %r15, %rdi
callq 0x54c0
movq %r15, %rdi
movq %r14, %rsi
callq 0x5330
movq %rax, %r14
leaq 0x1a43d(%rip), %rsi     # 0x2206e
jmp 0x7c98
xorl %edi, %edi
movq %r15, %rsi
movl $0x3, %edx
movl $0x8022, %ecx           # imm = 0x8022
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x57a0
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5590
cmpq $-0x1, %rbx
je 0x7cd5
testl %eax, %eax
jne 0x7cd5
movq 0x24341(%rip), %r15     # 0x2bfb0
leaq 0x1a3da(%rip), %rsi     # 0x22050
movl $0xa, %edx
movq %r15, %rdi
callq 0x54c0
movq %r15, %rdi
movq %r14, %rsi
callq 0x5330
movq %rax, %r14
leaq 0x1a3e9(%rip), %rsi     # 0x22081
movl $0x12, %edx
movq %rax, %rdi
callq 0x54c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5350
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x242d4(%rip), %rbx     # 0x2bfb0
leaq 0x1a3b1(%rip), %rsi     # 0x22094
movl $0x13, %edx
movq %rbx, %rdi
callq 0x54c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5330
movq %rax, %r14
leaq 0x1a3a3(%rip), %rsi     # 0x220a8
movl $0x2, %edx
movq %rax, %rdi
callq 0x54c0
xorl %ebx, %ebx
jmp 0x7ca5
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: getUsedSets(std::map<unsigned long, std::vector<unsigned long, std::allocator<unsigned long>>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::vector<unsigned long, std::allocator<unsigned long>>>>>)
std::vector<uint64_t> getUsedSets(AddressSet addressSet)
{
    std::vector<uint64_t> usedSets;
    for(auto list : addressSet)
    {
        if(!list.second.empty())
        {
            usedSets.push_back(list.first);
        }
    }
    return usedSets;
}

// 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 0x18(%rsi), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x7db9
leaq 0x8(%rsp), %r12
movq %rsp, %r13
movq 0x20(%r15), %rax
movq %rax, (%rsp)
leaq 0x28(%r15), %rsi
movq %r12, %rdi
callq 0xa90a
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x7d92
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x7d87
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x7d92
movq %rbx, %rdi
movq %r13, %rdx
callq 0xb1c4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7da9
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x5470
movq %r15, %rdi
callq 0x5360
movq %rax, %r15
cmpq %r14, %rax
jne 0x7d4c
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7de9
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x5470
jmp 0x7de9
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7dfd
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x5470
movq %r14, %rdi
callq 0x5790
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: getPhysicalAddr(unsigned long)
uint64_t getPhysicalAddr(uint64_t virtualAddr) {
    uint64_t value;
    off_t offset = (virtualAddr / 4096) * sizeof(value);
    int got = pread(g_pagemap_fd, &value, sizeof(value), offset);
    assert(got == 8);

    // Check the "page present" flag.
    assert(value & (1ULL << 63));
    uint64_t frame_num = frameNumberFromPagemap(value);
    return (frame_num * 4096) | (virtualAddr & (4095));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rdi, %rcx
shrq $0x9, %rcx
andq $-0x8, %rcx
movl 0x245e8(%rip), %edi     # 0x2c450
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x5540
cmpl $0x8, %eax
jne 0x7e9c
movq 0x8(%rsp), %rax
testq %rax, %rax
jns 0x7ebb
shlq $0xc, %rax
andl $0xfff, %ebx            # imm = 0xFFF
orq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x1a249(%rip), %rdi     # 0x220ec
leaq 0x1a226(%rip), %rsi     # 0x220d0
leaq 0x1a244(%rip), %rcx     # 0x220f5
movl $0x7f, %edx
callq 0x5320
leaq 0x1a256(%rip), %rdi     # 0x22118
leaq 0x1a207(%rip), %rsi     # 0x220d0
leaq 0x1a225(%rip), %rcx     # 0x220f5
movl $0x82, %edx
callq 0x5320
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: access(unsigned long, unsigned long)
void access(uint64_t addr,size_t numAccess)
{
    volatile uint64_t *p = (volatile uint64_t *) addr;
    for (unsigned int i = 0; i < numAccess; i++)
    {
        _mm_clflush((void*)p);
        _mm_lfence();
        *p;
        _mm_lfence();
    }
}

// Assembly:
testq %rsi, %rsi
je 0x7ef9
movl $0x1, %eax
clflush (%rdi)
lfence
movq (%rdi), %rcx
lfence
movl %eax, %ecx
incl %eax
cmpq %rsi, %rcx
jb 0x7ee4
retq
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: stopMeasure(int)
long long stopMeasure(int fd)
{
    long long count;
    _mm_mfence();
    ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
    read(fd, &count, sizeof(long long));
    close(fd);
    return count;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
mfence
movl $0x2401, %esi           # imm = 0x2401
xorl %edx, %edx
xorl %eax, %eax
callq 0x55e0
movq %rsp, %r14
movl $0x8, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x5620
movl %ebx, %edi
callq 0x5860
movq (%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: getRandomAddress(unsigned long, unsigned long)
uint64_t getRandomAddress(uint64_t base, uint64_t size)
{
    size_t part1 = static_cast<size_t>(rand());
    size_t part2 = static_cast<size_t>(rand());
    size_t offset = ((part1 << 32ULL) | part2) % size;
    auto clSize = 64ULL;
    offset = (offset / clSize) * clSize;
    return  base + offset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5140
movl %eax, %r15d
callq 0x5140
cltq
shlq $0x20, %r15
orq %rax, %r15
movq %r15, %rax
xorl %edx, %edx
divq %rbx
andq $-0x40, %rdx
addq %rdx, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: getNextAddress(unsigned long, unsigned long, unsigned long)
uint64_t getNextAddress(uint64_t oldAddr, uint64_t base, uint64_t size)
{
    static const size_t MIN_SHIFT = 6;
    static size_t shift = MIN_SHIFT;
    static uint64_t baseAddr = 0;
    if(shift == MIN_SHIFT)
    {
        baseAddr = oldAddr;
    }
    auto oldPhys = getPhysicalAddr(baseAddr);
    auto addr = baseAddr ^ (1ULL << shift);
    if(addr >= base && addr < base+size)
    {
        volatile uint8_t* p;
        p = (uint8_t*) addr;
        *p;
        auto phys = getPhysicalAddr(addr);
        auto diff = std::bitset<64>(phys) ^ std::bitset<64>(oldPhys);
        if(diff.count() > 1)
        {
            //moved into a new frame
            shift = MIN_SHIFT;
            return getRandomAddress(base,size);
        }
        else
        {
            shift++;
            return addr;
        }
    }
    else
    {
        shift = MIN_SHIFT;
        return getRandomAddress(base,size);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
cmpq $0x6, 0x242dd(%rip)     # 0x2c458
jne 0x8184
movq %rdi, 0x242f4(%rip)     # 0x2c478
movq 0x242ed(%rip), %rdi     # 0x2c478
callq 0x7e4f
movq %rax, %r12
movq 0x242de(%rip), %r15     # 0x2c478
movb 0x242b8(%rip), %al      # 0x2c458
btcq %rax, %r15
cmpq %rbx, %r15
setb %al
leaq (%r14,%rbx), %rcx
cmpq %rcx, %r15
setae %cl
orb %al, %cl
jne 0x81cf
movb (%r15), %al
movq %r15, %rdi
callq 0x7e4f
xorq %r12, %rax
leaq -0x1(%rax), %rcx
testq %rcx, %rax
je 0x8204
movq $0x6, 0x2427e(%rip) # 0x2c458
callq 0x5140
movl %eax, %r15d
callq 0x5140
cltq
shlq $0x20, %r15
orq %rax, %r15
movq %r15, %rax
xorl %edx, %edx
divq %r14
movq %rdx, %r15
andq $-0x40, %r15
addq %rbx, %r15
jmp 0x820b
incq 0x2424d(%rip)           # 0x2c458
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: printSolution(Solver::Solution const&, unsigned long)
void printSolution(const Solver::Solution& s, size_t offset)
{
    if(s.exists)
    {
        std::cout << "Involved bits: ";
        for (auto b : s.involvedBits)
        {
            std::cout << offset + b << " ";
        }
        std::cout << std::endl;
        std::cout << "Uninvolved bits: ";
        for (auto b : s.uninvolvedBits)
        {
            std::cout << offset + b << " ";
        }
        std::cout << std::endl;
        std::cout << "Unknown bits: ";
        for (auto b : s.unknownBits)
        {
            std::cout << offset + b << " ";
        }
        std::cout << std::endl;
    }
    else
    {
        std::cout << "No solution exists" << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x1, (%rdi)
jne 0x864b
movq %rsi, %rbx
movq %rdi, %r14
movq 0x23adf(%rip), %rdi     # 0x2bfb0
leaq 0x19c99(%rip), %rsi     # 0x22171
movl $0xf, %edx
callq 0x54c0
movq 0x20(%r14), %r12
leaq 0x10(%r14), %r15
cmpq %r15, %r12
je 0x852d
movq 0x23aba(%rip), %r13     # 0x2bfb0
leaq 0x19eef(%rip), %rbp     # 0x223ec
movq 0x20(%r12), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0x5340
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x54c0
movq %r12, %rdi
callq 0x54e0
movq %rax, %r12
cmpq %r15, %rax
jne 0x84fd
movq 0x23a7c(%rip), %r15     # 0x2bfb0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5350
leaq 0x19c1f(%rip), %rsi     # 0x22181
movl $0x11, %edx
movq %r15, %rdi
callq 0x54c0
movq 0x50(%r14), %r12
leaq 0x40(%r14), %r15
cmpq %r15, %r12
je 0x85ba
movq 0x23a2d(%rip), %r13     # 0x2bfb0
leaq 0x19e62(%rip), %rbp     # 0x223ec
movq 0x20(%r12), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0x5340
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x54c0
movq %r12, %rdi
callq 0x54e0
movq %rax, %r12
cmpq %r15, %rax
jne 0x858a
movq 0x239ef(%rip), %r15     # 0x2bfb0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5350
leaq 0x19ba4(%rip), %rsi     # 0x22193
movl $0xe, %edx
movq %r15, %rdi
callq 0x54c0
movq 0x80(%r14), %r15
addq $0x70, %r14
cmpq %r14, %r15
je 0x8663
movq 0x2399d(%rip), %r12     # 0x2bfb0
leaq 0x19dd2(%rip), %r13     # 0x223ec
movq 0x20(%r15), %rsi
addq %rbx, %rsi
movq %r12, %rdi
callq 0x5340
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x54c0
movq %r15, %rdi
callq 0x54e0
movq %rax, %r15
cmpq %r14, %rax
jne 0x861a
jmp 0x8663
movq 0x2395e(%rip), %rdi     # 0x2bfb0
leaq 0x19b49(%rip), %rsi     # 0x221a2
movl $0x12, %edx
callq 0x54c0
movq 0x23946(%rip), %rbx     # 0x2bfb0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5350
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: compactSets(std::map<unsigned long, std::vector<unsigned long, std::allocator<unsigned long>>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::vector<unsigned long, std::allocator<unsigned long>>>>> const&)
std::map<size_t,std::vector<uint64_t>> compactSets(const std::map<size_t,std::vector<uint64_t>>& addresses)
{
    std::map<size_t,std::vector<uint64_t>> newAddresses;
    size_t newIdx = 0;
    for(const auto& adr : addresses)
    {
        if(!adr.second.empty())
        {
            newAddresses.insert(make_pair(newIdx,adr.second));
            newIdx++;
        }
    }
    return newAddresses;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq 0x18(%rsi), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x880a
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movq 0x28(%r15), %rax
cmpq 0x30(%r15), %rax
je 0x87fa
leaq 0x28(%r15), %rsi
movq %rbp, 0x8(%rsp)
movq %r12, %rdi
callq 0xa90a
movq %rbx, %rdi
movq %r13, %rsi
callq 0xb802
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x87f7
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5470
incq %rbp
movq %r15, %rdi
callq 0x54e0
movq %rax, %r15
cmpq %r14, %rax
jne 0x87ba
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x883b
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x883b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5470
movq %rbx, %rdi
callq 0xaae6
movq %r14, %rdi
callq 0x5790
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/main.cpp
// Function: prepareSolvePrint(std::map<unsigned long, std::vector<unsigned long, std::allocator<unsigned long>>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::vector<unsigned long, std::allocator<unsigned long>>>>>, unsigned long, unsigned long)
void prepareSolvePrint(AddressSet adrs,size_t removeFront, size_t removeBack)
{
    cleanAddresses(adrs,removeFront,removeBack);
    adrs = compactSets(adrs);
    auto expectedBits = static_cast<size_t>(ceil(log2(adrs.size())));
    auto cSol = calculateAddressingFunction(adrs,expectedBits,getUsableBits(removeFront,removeBack));
    printSolutions(cSol,removeFront);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8226
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x8770
movq %r14, %rdi
callq 0xab5c
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x88c7
leaq 0x8(%r14), %rcx
leaq 0x20(%rsp), %rdx
movl (%rdx), %esi
movl %esi, 0x8(%r14)
movq %rax, 0x10(%r14)
movq 0x10(%rdx), %rsi
movq %rsi, 0x18(%r14)
movq 0x18(%rdx), %rsi
movq %rsi, 0x20(%r14)
movq %rcx, 0x8(%rax)
movq 0x20(%rdx), %rax
movq %rax, 0x28(%r14)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
leaq 0x18(%rsp), %rdi
callq 0xaae6
movsd 0x28(%r14), %xmm1
unpcklps 0x19742(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1974a(%rip), %xmm1    # 0x22030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x57b0
callq 0x50b0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x19734(%rip), %xmm0    # 0x22040
sarq $0x3f, %rcx
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
addq %rbx, %r15
movl $0x40, %ecx
subq %r15, %rcx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8284
movq %rsp, %rdi
movq %r15, %rsi
callq 0xa62c
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x869f
movq %rsp, %rdi
callq 0xa5fc
leaq 0x18(%rsp), %rdi
callq 0xa5fc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa5fc
jmp 0x897a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xa5fc
movq %rbx, %rdi
callq 0x5790
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/solver.cpp
// Function: Solver::solve(std::vector<unsigned long, std::allocator<unsigned long>>&, unsigned long)
void Solver::solve(Matrix& matrix, size_t colMax)
{
    for(size_t c = colMax, r = 0; c-- > 1 && r < matrix.size();)
    {
        uint64_t mask = 1ULL << c;
        if((matrix[r] & mask) == 1)
        {
            xorRows(matrix,r,c);
            r++;
        }
        else
        {
            auto rowToSwap = findRowToSwap(matrix,r,c);
            if(rowToSwap == r)
            {
                //move to next column, stay in same row
                continue;
            }
            else
            {
                swapRows(matrix,r,rowToSwap);
                xorRows(matrix,r,c);
                r++;
            }
        }
        if(debug)
        {
            printMatrix(matrix);
        }
    }
}

// Assembly:
cmpq $0x2, %rdx
jb 0xc51a
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rdx, %r12
jae 0xc511
decq %rbx
movl $0x1, %esi
movl %ebx, %ecx
shlq %cl, %rsi
movq (%rax,%r12,8), %rcx
movq %rcx, %rdi
andq %rsi, %rdi
cmpq $0x1, %rdi
jne 0xc4ac
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xc26c
incq %r12
jmp 0xc4f9
decq %rdx
movq %r12, %rdi
cmpq %rdi, %rdx
je 0xc4c7
leaq 0x1(%rdi), %r13
testq %rsi, 0x8(%rax,%rdi,8)
movq %r13, %rdi
je 0xc4b2
jmp 0xc4ca
movq %r12, %r13
movq %r12, %rdx
cmpq %r12, %r13
je 0xc4f1
movq (%rax,%r13,8), %rdx
movq %rdx, (%rax,%r12,8)
movq %rcx, (%rax,%r13,8)
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xc26c
leaq 0x1(%r12), %rdx
cmpq %r12, %r13
movq %rdx, %r12
je 0xc507
cmpb $0x1, (%r15)
jne 0xc507
movq %r14, %rsi
callq 0xc2de
cmpq $0x1, %rbx
ja 0xc465
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/helchr[P]reMap/sysinfo.cpp
// Function: SysInfo::getTadRegions(unsigned int)
std::map<size_t,std::vector<SysInfo::TadRegion>> SysInfo::getTadRegions(unsigned int socket)
{
    std::map<size_t,std::vector<TadRegion>> regions; //must be ordered map
    for(unsigned int contr = 0; contr < 2; contr++)
    {
        size_t lastLimit = 0;
        unsigned int i = 0;
        auto reg = readTadRegion(socket,contr,i);
        auto regionLimit = getRegionLimitAddress(reg);
        while(lastLimit != regionLimit)
        {
            TadRegion r;
            r.limitAddress = regionLimit;
            r.socketInterleaving = getSocketInterleaving(reg);
            r.channelInterleaving = getChannelInterleaving(reg);
            regions[regionLimit].push_back(r);
            i++;
            lastLimit = regionLimit;
            reg = readTadRegion(socket,contr,i);
            regionLimit =  getRegionLimitAddress(reg);
        }
    }
    return regions;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %r14d, %r14d
movq %r14, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %r14, 0x28(%rdi)
movq %rsp, %r15
movl %ebp, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0xd1dc
movl %eax, %ecx
shrl $0xc, %ecx
shlq $0x1a, %rcx
movq %rcx, (%rsp)
cmpl $0x1000, %eax           # imm = 0x1000
jb 0xe33f
movl $0x1, %r13d
movq %rcx, 0x8(%rsp)
movl %eax, %ecx
shrl $0xa, %ecx
andb $0x3, %cl
incb %cl
movb %cl, 0x10(%rsp)
shrl $0x8, %eax
andb $0x3, %al
incb %al
movb %al, 0x11(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe7a2
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0xe30c
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rax)
jmp 0xe319
movq %rax, %rdi
leaq 0x8(%rsp), %rdx
callq 0xf92c
movq (%rsp), %r12
movl %ebp, %edi
movl %r14d, %esi
movl %r13d, %edx
callq 0xd1dc
movl %eax, %ecx
shrl $0xc, %ecx
shlq $0x1a, %rcx
movq %rcx, (%rsp)
incl %r13d
cmpq %rcx, %r12
jne 0xe2ca
leal 0x1(%r14), %eax
testl %r14d, %r14d
movl %eax, %r14d
je 0xe2a4
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe363
movq %rax, %r14
movq %rbx, %rdi
callq 0xb052
movq %r14, %rdi
callq 0x5790
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH02_VariablesAndBasicTypes/examples/convs.cc
// Function: main
int main()
{
	int i = 42;
	std::cout << i << std::endl; // prints 42
	if (i) // condition will evaluate as true
		i = 0;
	std::cout << i << std::endl; // prints 0

	bool b = 42;            // b is true
	std::cout << b << std::endl; // prints 1

	int j = b;              // j has value 1
	std::cout << j << std::endl; // prints 1

	double pi = 3.14;       // pi has value 3.14
	std::cout << pi << std::endl; // prints 3.14

	j = pi;                 // j has value 3
	std::cout << j << std::endl; // prints 3

	unsigned char c = -1;   // assuming 8-bit chars, c has value 255
	i = c;  // the character with value 255 is an unprintable character
	        // assigns value of c (i.e., 255) to an int
	std::cout << i << std::endl; // prints 255
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x2dde(%rip), %rbx      # 0x3fd8
movq %rbx, %rdi
movl $0x2a, %esi
callq 0x10a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1090
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movsd 0xd2d(%rip), %xmm0      # 0x2008
movq %rbx, %rdi
callq 0x1080
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
movl $0x3, %esi
callq 0x10a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
movl $0xff, %esi
callq 0x10a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::close_fd(int)
int acceptor::close_fd(int fd) {
	int tmp;
	pthread_mutex_lock(&conn_mutex);
	conn_num--;
	tmp = conn_num;
	pthread_mutex_unlock(&conn_mutex);
	_INFO("close fd=%d, conn_num=%d", fd, tmp);
	return close(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x30(%rdi), %r15
movq %r15, %rdi
callq 0x2310
movl 0x1c(%r14), %ebp
decl %ebp
movl %ebp, 0x1c(%r14)
movq %r15, %rdi
callq 0x2160
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x21d0
leaq 0x30(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2100
leaq 0x39bb(%rip), %rdx      # 0x6004
leaq 0x10(%rsp), %r14
pushq $0x12
popq %rsi
movq %r14, %rdi
movq %r15, %rcx
callq 0x2180
movq 0x6975(%rip), %rax      # 0x8fd8
movq (%rax), %r15
callq 0x21b0
movl %ebp, (%rsp)
leaq 0x39f8(%rip), %rsi      # 0x606d
leaq 0x3aff(%rip), %r8       # 0x617b
movq %r15, %rdi
movq %r14, %rdx
movq %rax, %rcx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x22e0
movl %ebx, %edi
callq 0x2400
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: init_list
double_linked_list* init_list() {
	double_linked_list* ret = (double_linked_list*)malloc(sizeof(double_linked_list));
	if (!ret) {
		return NULL;
	}
	ret->header = NULL;
	ret->tail = ret->header;
	ret->node_cnt = 0;
	return ret;
}

// Assembly:
pushq %rax
movl $0x18, %edi
callq 0x22a0
testq %rax, %rax
je 0x310b
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x0, 0x10(%rax)
popq %rcx
retq
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: destroy_list
void destroy_list(double_linked_list* lst) {
	if (lst == NULL) {
		return;
	}
	node* n = lst->header;
	if (n == NULL) {
		return;
	}
	node* cur;
	while (n) {
		cur = n;
		n = n->next;
		free(cur);
	}
	free(lst);
	return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3143
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3143
movq 0x10(%rdi), %r14
callq 0x2250
movq %r14, %rdi
testq %r14, %r14
jne 0x3123
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2250
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: new_node
node* new_node() {
	node* ret = (node*)malloc(sizeof(node));
	ret->prev = NULL;
	ret->next = NULL;
	ret->key = 0;
	return ret;
}

// Assembly:
pushq %rax
movl $0x18, %edi
callq 0x22a0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: mv_node_to_header
void mv_node_to_header(double_linked_list* lst, node* n, int is_new_node) {
	node* next = NULL;
	node* prev = NULL;
	if (is_new_node == 0) {
		if (n == lst->header) {
			return;
		}
		prev = n->prev;
		next = n->next;
		n->prev->next = next;
		if (n->next) {
			n->next->prev= prev;
		}
		if (n == lst->tail) {
			lst->tail = prev;
		}
	}
	else {
		if (1 == ++lst->node_cnt) {
			lst->tail = n;
		}
	}
	n->prev = NULL;
	n->next = lst->header;
	if (lst->header) {
		lst->header->prev = n;
	}
	lst->header = n;
	return;	
}

// Assembly:
testl %edx, %edx
je 0x317d
movl 0x10(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rdi)
testl %eax, %eax
jne 0x31a5
movq %rsi, 0x8(%rdi)
jmp 0x31a5
cmpq %rsi, (%rdi)
je 0x31c0
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0x319b
movq %rax, 0x8(%rcx)
cmpq %rsi, 0x8(%rdi)
jne 0x31a5
movq %rax, 0x8(%rdi)
movq $0x0, 0x8(%rsi)
movq (%rdi), %rax
movq %rax, 0x10(%rsi)
testq %rax, %rax
je 0x31bd
movq %rsi, 0x8(%rax)
movq %rsi, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: rm_node_from_tail
int rm_node_from_tail(double_linked_list* lst, int cnt, uint64_t* keys) {
	node* n = lst->tail;
	node* cur;
	int ret = 0;
	keys = (uint64_t*)malloc(sizeof(uint64_t) * cnt);
	while (n && cnt > 0) {
		cur = n;
		n = n->prev;

		keys[ret] = cur->key;
		free(cur);

		cnt--;
		lst->node_cnt--;
		ret++;
	}
	lst->tail = n;
	if (!n) {
		lst->header = NULL;
	}
	return ret; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
setne %cl
sete %dl
testl %esi, %esi
setle %sil
xorl %eax, %eax
orb %dl, %sil
jne 0x3213
xorl %r15d, %r15d
movq %r14, %rdi
movq 0x8(%r14), %r14
callq 0x2250
decl 0x10(%rbx)
leal -0x1(%r15), %eax
testq %r14, %r14
setne %cl
je 0x3211
addl %ebp, %r15d
cmpl $0x1, %r15d
movl %eax, %r15d
jg 0x31ea
negl %eax
movq %r14, 0x8(%rbx)
testb %cl, %cl
jne 0x3222
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: push_from_header
int push_from_header(double_linked_list* lst, node* n) {
	n->next = lst->header;
	n->prev = NULL;
	if (lst->header) {
		lst->header->prev = n;
	}
	lst->header = n;
	return ++lst->node_cnt;
}

// Assembly:
movq (%rdi), %rax
movq %rax, 0x10(%rsi)
movq $0x0, 0x8(%rsi)
testq %rax, %rax
je 0x3245
movq %rsi, 0x8(%rax)
movq %rsi, (%rdi)
movl 0x10(%rdi), %eax
incl %eax
movl %eax, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: push_from_tail
int push_from_tail(double_linked_list* lst, node* n) {
	if (lst->tail) {
		lst->tail->next = n;
		n->prev = lst->tail;
		lst->tail = n;
		return ++lst->node_cnt;
	}
	else {
		return push_from_header(lst, n);
	}
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3267
leaq 0x8(%rdi), %rdx
movq %rsi, 0x10(%rax)
movq %rsi, %rcx
jmp 0x3281
movq (%rdi), %rcx
movq %rcx, 0x10(%rsi)
movq $0x0, 0x8(%rsi)
movq %rsi, %rax
movq %rdi, %rdx
testq %rcx, %rcx
je 0x3285
movq %rax, 0x8(%rcx)
movq %rsi, (%rdx)
movl 0x10(%rdi), %eax
incl %eax
movl %eax, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/double_linked_list.c
// Function: pop_from_tail
node* pop_from_tail(double_linked_list* lst) {
	if (!lst->tail) {
		return NULL;
	}
	node* n = lst->tail;
	lst->tail = n->prev;
	if (lst->tail) {
		lst->tail->next = NULL;
	} else {
		lst->header = NULL;
	}
	--lst->node_cnt;
	return n;
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x32dd
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x10(%rcx), %rdx
testq %rcx, %rcx
cmoveq %rdi, %rdx
movq $0x0, (%rdx)
decl 0x10(%rdi)
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::~acceptor()
acceptor::~acceptor() {
	delete[] epoll_fds;
	delete[] epoll_ready_event_num;
	delete[] pipe_read_fds;
	delete[] pipe_write_fds;
	for (int i = 0; i < epoll_cnt; i++) {
		pthread_mutex_destroy(&epoll_mutexes[i]);
	}
	delete[] epoll_mutexes;
	for (int i = 0; i < epoll_cnt; i++) {
		delete[] epoll_ready_events[i];
	}
	delete[] epoll_ready_events;
	pthread_mutex_destroy(&epoll_idx_mutex);
	pthread_mutex_destroy(&conn_mutex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x32f6
callq 0x2270
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x3307
callq 0x2270
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x3318
callq 0x2270
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x3329
callq 0x2270
cmpl $0x0, 0x4(%rbx)
jle 0x3351
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x28(%rbx), %rdi
addq %r14, %rdi
callq 0x2230
incq %r15
movslq 0x4(%rbx), %rax
addq $0x28, %r14
cmpq %rax, %r15
jl 0x3335
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x335f
callq 0x2270
cmpl $0x0, 0x4(%rbx)
jle 0x3389
xorl %r14d, %r14d
movq 0x80(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x337d
callq 0x2270
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x3368
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x339a
callq 0x2270
leaq 0x58(%rbx), %rdi
callq 0x2230
addq $0x30, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::add_input_fd(int, int)
int acceptor::add_input_fd(int fd, int efd) {
	epoll_event event;
	event.events = EPOLLIN | EPOLLET;
	event.data.fd = fd;
	int ret = epoll_ctl(efd, EPOLL_CTL_ADD, fd, &event);
	if (ret < 0) {
		_ERROR("add_input_fd err,fd=%d,errno=%d", fd, errno);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edx, %edi
movl %esi, %ebx
leaq 0xc(%rsp), %rcx
movl $0x80000001, (%rcx)     # imm = 0x80000001
movl %esi, 0x4(%rcx)
movl $0x1, %esi
movl %ebx, %edx
callq 0x22d0
movl %eax, %ebp
testl %eax, %eax
js 0x340d
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movl %ebx, %edi
callq 0x271d
jmp 0x3404
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::create_listen(int&, unsigned short)
int acceptor::create_listen(int &socket_fd, unsigned short port) {
	sockaddr_in addr;
	memset(&addr, 0, sizeof addr);
	addr.sin_family = AF_INET;
	addr.sin_addr.s_addr = INADDR_ANY;
	addr.sin_port = htons(port);

	if ((socket_fd = socket(PF_INET, SOCK_STREAM, 0)) == -1)
		return -1;
	if (set_socket(socket_fd, O_NONBLOCK))
		return -1;
	if (::bind(socket_fd, (const sockaddr*)&addr, sizeof addr))
		return -1;
	if (listen(socket_fd, max_conn))
		return -1;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movw $0x2, (%rsp)
movl $0x0, 0x4(%rsp)
rolw $0x8, %dx
movw %dx, 0x2(%rsp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2080
movl %eax, (%r14)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x3494
movl %eax, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x34a0
testl %eax, %eax
jne 0x3494
movl (%r14), %edi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x2070
testl %eax, %eax
jne 0x3494
movl (%r14), %edi
movl (%rbx), %esi
callq 0x2210
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::set_socket(int, int)
int acceptor::set_socket(int fd, int flag) {
	int options;
	options = SOCKET_SND_BUF_SIZE;
	setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &options, sizeof(int));
	options = SOCKET_RCV_BUF_SIZE;
	setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &options, sizeof(int));
	options = 1;
	setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &options, sizeof(int));
	options = fcntl(fd, F_GETFL);
	fcntl(fd, F_SETFL, options | flag);
	int on = 1;
	int ret = -1;
	ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&on, sizeof(on));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %esi, %ebx
movl $0x100000, %r12d        # imm = 0x100000
leaq 0xc(%rsp), %r14
movl %r12d, (%r14)
movl $0x1, %r15d
movl %esi, %edi
movl $0x1, %esi
movl $0x7, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23b0
movl %r12d, (%r14)
movl %ebx, %edi
movl $0x1, %esi
movl $0x8, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23b0
movl %r15d, (%r14)
movl %ebx, %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23b0
movl %ebx, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x2130
movl %eax, (%r14)
orl %eax, %ebp
movl %ebx, %edi
movl $0x4, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2130
leaq 0x8(%rsp), %rcx
movl %r15d, (%rcx)
movl %ebx, %edi
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x23b0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::del_input_fd(int, int)
int acceptor::del_input_fd(int fd, int efd) {
	epoll_event event;
	event.events = EPOLLIN | EPOLLET;
	event.data.fd = fd;
	int ret = epoll_ctl(efd, EPOLL_CTL_DEL, fd, &event);
	if (ret < 0) {
		_ERROR("del_input_fd err,fd=%d,errno=%d", fd, errno);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edx, %edi
movl %esi, %ebx
leaq 0xc(%rsp), %rcx
movl $0x80000001, (%rcx)     # imm = 0x80000001
movl %esi, 0x4(%rcx)
movl $0x2, %esi
movl %ebx, %edx
callq 0x22d0
movl %eax, %ebp
testl %eax, %eax
js 0x359b
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movl %ebx, %edi
callq 0x27aa
jmp 0x3592
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::create_pipe(int)
int acceptor::create_pipe(int idx) {
	int options;
	int pipe_fd[2];
	
	if (pipe(pipe_fd)) {
		return -1;
	}

	pipe_read_fds[idx] = pipe_fd[0];
	pipe_write_fds[idx] = pipe_fd[1];

	for (int i = 0;i < 2;i++) {
		if ((options = fcntl(pipe_fd[i], F_GETFL)) == -1) {
			return -1;
		}
		if (fcntl(pipe_fd[i], F_SETFL, options | O_NONBLOCK) == -1) {
			return -1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r15d
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x22b0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3675
movl 0x8(%rsp), %eax
movq 0x90(%r14), %rcx
movslq %r15d, %rdx
movl %eax, (%rcx,%rdx,4)
movl 0xc(%rsp), %eax
movq 0x98(%r14), %rcx
movl %eax, (%rcx,%rdx,4)
movl 0x8(%rsp), %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x2130
cmpl $-0x1, %eax
je 0x3675
movb $0x1, %r15b
leaq 0xc(%rsp), %r14
movb $0x1, %r12b
movl %r12d, %ebp
movl (%rbx), %edi
orl $0x800, %eax            # imm = 0x800
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2130
cmpl $-0x1, %eax
je 0x365e
testb $0x1, %bpl
je 0x365e
movl 0xc(%rsp), %edi
xorl %r12d, %r12d
movl $0x3, %esi
xorl %eax, %eax
callq 0x2130
movq %r14, %rbx
movl %ebp, %r15d
cmpl $-0x1, %eax
jne 0x361b
jmp 0x366c
cmpl $-0x1, %eax
movzbl %bpl, %eax
movzbl %r15b, %ebp
cmovnel %eax, %ebp
movzbl %bpl, %ebp
andl $0x1, %ebp
negl %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/base_nio_handler.cpp
// Function: base_nio_handler::readn_timeout(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
int base_nio_handler::readn_timeout(int fd, std::string &content, int buf_len) {
    char buf[READ_BUF_SIZE+1];
    timeval timeout = {
        0,
        recv_timeout * 1000
    };
    int n,len;
    int left = buf_len;

    while (left > 0)
    {
        len = left>READ_BUF_SIZE?READ_BUF_SIZE:left;
        if ((n = read_data(fd, buf, len,&timeout)) <= 0)
            return buf_len - left;

        buf[n] = '\0';
        content += buf;
        left -= n;
    }

    return buf_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq $0x0, 0x10(%rsp)
movslq (%rdi), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, 0x18(%rsp)
testl %ecx, %ecx
jle 0x370c
movq %rdx, %r14
movl %esi, %ebp
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r12
movl %ecx, 0xc(%rsp)
movl %ecx, %ebx
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %ebx
movl $0x400, %ecx            # imm = 0x400
cmovll %ebx, %ecx
movl %ebp, %esi
movq %r15, %rdx
movq %r12, %r8
callq 0x3720
testl %eax, %eax
jle 0x3706
movl %eax, %r13d
movl %eax, %eax
movb $0x0, 0x20(%rsp,%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x23e0
subl %r13d, %ebx
jg 0x36c6
movl 0xc(%rsp), %ecx
jmp 0x370c
movl 0xc(%rsp), %ecx
subl %ebx, %ecx
movl %ecx, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/base_nio_handler.cpp
// Function: base_nio_handler::readn_timeout(int, char*, int, timeval*)
int base_nio_handler::readn_timeout(int fd, char* content, int need_to_read, timeval* timeout) {
	char buf[READ_BUF_SIZE + 1];
	int n, left;
	int len;
    int ptr = 0;
	left = need_to_read;
	while (left > 0) {
		len = left > READ_BUF_SIZE ? READ_BUF_SIZE : left;
		n = read_data(fd, buf, len, timeout);
		if (n <= 0 ) {
			if(n == 0)
				return -2;
			return need_to_read - left;
		}
		buf[n] = '\0';
        memcpy(content + ptr, buf, len);
        ptr = ptr + n;
		left = left - n;
	}
	return need_to_read;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %r8, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
testl %ecx, %ecx
jle 0x38c3
movl %esi, %ebp
xorl %r15d, %r15d
leaq 0x20(%rsp), %r12
movl %ecx, 0xc(%rsp)
movl %ecx, %r14d
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %r14d
movl $0x400, %ebx            # imm = 0x400
cmovll %r14d, %ebx
movl %ebp, %esi
movq %r12, %rdx
movl %ebx, %ecx
movq 0x18(%rsp), %r8
callq 0x3720
movl %eax, %r13d
testl %eax, %eax
jle 0x38b1
movl %r13d, %eax
movb $0x0, 0x20(%rsp,%rax)
movl %r15d, %edi
addq 0x10(%rsp), %rdi
movl %ebx, %edx
movq %r12, %rsi
callq 0x2190
addl %r13d, %r15d
subl %r13d, %r14d
jg 0x3860
movl 0xc(%rsp), %ecx
jmp 0x38c3
movl 0xc(%rsp), %ecx
subl %r14d, %ecx
testl %r13d, %r13d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovel %eax, %ecx
movl %ecx, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/base_nio_handler.cpp
// Function: base_nio_handler::setSocket(int&)
int base_nio_handler::setSocket(int& fd) {
    if (fd <= 0) {
        _ERROR("error socket fd=%d", fd);
        return -1;
    }
    int options;
    options = SOCKET_SND_BUF_SIZE;
    setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &options, sizeof(int));
    options = SOCKET_RCV_BUF_SIZE;
    setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &options, sizeof(int));
    options = 1;
    setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &options, sizeof(int));
    options = fcntl(fd, F_GETFL);
    fcntl(fd, F_SETFL, options | O_NONBLOCK);
    int on = 1;
    int ret = -1;
    ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&on, sizeof(on));
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl (%rsi), %edi
testl %edi, %edi
jle 0x3a42
movl $0x100000, %r15d        # imm = 0x100000
leaq 0x4(%rsp), %r14
movl %r15d, (%r14)
movl $0x1, %ebp
movl $0x1, %esi
movl $0x7, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23b0
movl %r15d, (%r14)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x8, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23b0
movl %ebp, (%r14)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23b0
movl (%rbx), %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x2130
movl %eax, (%r14)
movl (%rbx), %edi
orl $0x800, %eax            # imm = 0x800
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2130
movq %rsp, %rcx
movl %ebp, (%rcx)
movl (%rbx), %edi
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x23b0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2c68
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3a37
nop
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/key_group.cpp
// Function: KeyGroup::KeyGroup(int)
KeyGroup::KeyGroup(int _capacity) {
	capacity = _capacity;
	cache = new LRUCache(capacity);
	store = (int*)malloc(sizeof(int) * capacity);
	memset(store, 0, sizeof(int) * capacity);
	for (int i = 0; i < capacity; i++) {
		free_poses.push_back(i);
	}
	pthread_mutex_init(&group_mutex, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, 0x20(%rdi)
movq %rbx, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movl %esi, (%rdi)
movl $0x40, %edi
callq 0x21e0
movq %rax, %r15
movq %rax, %rdi
movl %ebp, %esi
callq 0x3e84
movq %r15, 0x10(%r14)
movslq (%r14), %r15
shlq $0x2, %r15
movq %r15, %rdi
callq 0x22a0
movq %rax, 0x8(%r14)
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2110
cmpl $0x0, (%r14)
jle 0x3d0c
movl $0x18, %edi
callq 0x21e0
movl %ebp, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x28(%r14)
incl %ebp
cmpl (%r14), %ebp
jl 0x3ce9
addq $0x30, %r14
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2320
movq %rax, %r14
movl $0x40, %esi
movq %r15, %rdi
callq 0x21f0
jmp 0x3d3b
jmp 0x3d38
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x3d58
movq (%rdi), %r15
movl $0x18, %esi
callq 0x21f0
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x3d43
movq %r14, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O1/SeTriones[P]Anubis/key_group.cpp
// Function: KeyGroup::Inc(unsigned long)
int KeyGroup::Inc(uint64_t key) {
	int ret;
	pthread_mutex_lock(&group_mutex);
	int* pos = cache->get(key);
	if (pos == NULL) {
		if (free_poses.empty()) {
			_INFO("no free pos");
			pos = NULL;
		} else {
			int idx = free_poses.front();
			free_poses.pop_front();
			pos = store + idx;
		}
		pos = cache->set(key, pos, 0);
		*pos = 1;
		pthread_mutex_unlock(&group_mutex);
		return 1;
	} else {
		pthread_mutex_unlock(&group_mutex);
		ret = __sync_add_and_fetch(pos, 1);
		return ret;
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rdi), %rbx
movq %rbx, %rdi
callq 0x2310
movq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0x3f16
testq %rax, %rax
je 0x3e08
movq %rax, %r12
movq %rbx, %rdi
callq 0x2160
movl $0x1, %eax
lock
xaddl %eax, (%r12)
incl %eax
jmp 0x3e5e
leaq 0x18(%r15), %rax
movq 0x18(%r15), %r13
cmpq %rax, %r13
je 0x3e68
movslq 0x10(%r13), %r12
decq 0x28(%r15)
movq %r13, %rdi
callq 0x2370
movl $0x18, %esi
movq %r13, %rdi
callq 0x21f0
shlq $0x2, %r12
addq 0x8(%r15), %r12
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x3f70
movl $0x1, (%rax)
movq %rbx, %rdi
callq 0x2160
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x2d58
xorl %r12d, %r12d
jmp 0x3e3a