LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::increase_size()
bool increase_size() {
        // nothing allocated yet? just allocate InitialNumElements
        if (0 == mMask) {
            initData(InitialNumElements);
            return true;
        }

        auto const maxNumElementsAllowed = calcMaxNumElementsAllowed(mMask + 1);
        if (mNumElements < maxNumElementsAllowed && try_increase_info()) {
            return true;
        }

        ROBIN_HOOD_LOG("mNumElements=" << mNumElements << ", maxNumElementsAllowed="
                                       << maxNumElementsAllowed << ", load="
                                       << (static_cast<double>(mNumElements) * 100.0 /
                                           (static_cast<double>(mMask) + 1)))

        if (mNumElements * 2 < calcMaxNumElementsAllowed(mMask + 1)) {
            // we have to resize, even though there would still be plenty of space left!
            // Try to rehash instead. Delete freed memory so we don't steadyily increase mem in case
            // we have to rehash a few times
            nextHashMultiplier();
            rehashPowerOfTwo(mMask + 1, true);
        } else {
            // we've reached the capacity of the map, so the hash seems to work nice. Keep using it.
            rehashPowerOfTwo((mMask + 1) * 2, false);
        }
        return true;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
xorl %eax, %eax
cmpq 0x20(%rcx), %rax
jne 0x2284
movq 0x8(%rsp), %rdi
movl $0x8, %esi
callq 0x24e0
movb $0x1, 0x27(%rsp)
jmp 0x232d
movq 0x8(%rsp), %rdi
movq 0x20(%rdi), %rsi
addq $0x1, %rsi
callq 0x25c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
cmpq 0x10(%rsp), %rax
jae 0x22c5
movq 0x8(%rsp), %rdi
callq 0x2630
testb $0x1, %al
jne 0x22be
jmp 0x22c5
movb $0x1, 0x27(%rsp)
jmp 0x232d
movq 0x8(%rsp), %rdi
movq 0x18(%rdi), %rax
shlq %rax
movq %rax, (%rsp)
movq 0x20(%rdi), %rsi
addq $0x1, %rsi
callq 0x25c0
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x2311
movq 0x8(%rsp), %rdi
callq 0x2730
movq 0x8(%rsp), %rdi
movq 0x20(%rdi), %rsi
addq $0x1, %rsi
movl $0x1, %edx
callq 0x2750
jmp 0x2328
movq 0x8(%rsp), %rdi
movq 0x20(%rdi), %rsi
addq $0x1, %rsi
shlq %rsi
xorl %edx, %edx
callq 0x2750
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::shiftUp(unsigned long, unsigned long)
void
    shiftUp(size_t startIdx,
            size_t const insertion_idx) noexcept(std::is_nothrow_move_assignable<Node>::value) {
        auto idx = startIdx;
        ::new (static_cast<void*>(mKeyVals + idx)) Node(std::move(mKeyVals[idx - 1]));
        while (--idx != insertion_idx) {
            mKeyVals[idx] = std::move(mKeyVals[idx - 1]);
        }

        idx = startIdx;
        while (idx != insertion_idx) {
            ROBIN_HOOD_COUNT(shiftUp)
            mInfo[idx] = static_cast<uint8_t>(mInfo[idx - 1] + mInfoInc);
            if (ROBIN_HOOD_UNLIKELY(mInfo[idx] + mInfoInc > 0xFF)) {
                mMaxNumElementsAllowed = 0;
            }
            --idx;
        }
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rdx
movq %rdx, -0x28(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movq 0x8(%rdx), %rax
movq -0x20(%rsp), %rcx
movq 0x8(%rdx), %rdx
movq -0x20(%rsp), %rsi
subq $0x1, %rsi
movq (%rdx,%rsi,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rsp)
cmpq -0x18(%rsp), %rax
je 0x23eb
movq -0x28(%rsp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rsp), %rsi
subq $0x1, %rsi
movq 0x8(%rax), %rax
movq -0x20(%rsp), %rcx
movq (%rdx,%rsi,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x23b1
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
cmpq -0x18(%rsp), %rax
je 0x245e
movq -0x28(%rsp), %rcx
movq 0x10(%rcx), %rax
movq -0x20(%rsp), %rdx
subq $0x1, %rdx
movzbl (%rax,%rdx), %eax
addl 0x30(%rcx), %eax
movb %al, %sil
movq 0x10(%rcx), %rax
movq -0x20(%rsp), %rdx
movb %sil, (%rax,%rdx)
movq 0x10(%rcx), %rax
movq -0x20(%rsp), %rdx
movzbl (%rax,%rdx), %eax
addl 0x30(%rcx), %eax
cmpl $0xff, %eax
jbe 0x244e
movq -0x28(%rsp), %rax
movq $0x0, 0x28(%rax)
movq -0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rsp)
jmp 0x23f5
retq
nop
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::initData(unsigned long)
void initData(size_t max_elements) {
        mNumElements = 0;
        mMask = max_elements - 1;
        mMaxNumElementsAllowed = calcMaxNumElementsAllowed(max_elements);

        auto const numElementsWithBuffer = calcNumElementsWithBuffer(max_elements);

        // malloc & zero mInfo. Faster than calloc everything.
        auto const numBytesTotal = calcNumBytesTotal(numElementsWithBuffer);
        ROBIN_HOOD_LOG("std::calloc " << numBytesTotal << " = calcNumBytesTotal("
                                      << numElementsWithBuffer << ")")
        mKeyVals = reinterpret_cast<Node*>(
            detail::assertNotNull<std::bad_alloc>(std::malloc(numBytesTotal)));
        mInfo = reinterpret_cast<uint8_t*>(mKeyVals + numElementsWithBuffer);
        std::memset(mInfo, 0, numBytesTotal - numElementsWithBuffer * sizeof(Node));

        // set sentinel
        mInfo[numElementsWithBuffer] = 1;

        mInfoInc = InitialInfoInc;
        mInfoHashShift = InitialInfoHashShift;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
movq $0x0, 0x18(%rdi)
movq 0x18(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x20(%rdi)
movq 0x18(%rsp), %rsi
callq 0x25c0
movq (%rsp), %rdi
movq %rax, 0x28(%rdi)
movq 0x18(%rsp), %rsi
callq 0x2870
movq (%rsp), %rdi
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
callq 0x28e0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x10e0
movq %rax, %rdi
callq 0x2920
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rcx
movq 0x10(%rsp), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
shlq $0x3, %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x1090
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x10(%rsp), %rdx
movb $0x1, (%rcx,%rdx)
movl $0x20, 0x30(%rax)
movl $0x0, 0x34(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::calcMaxNumElementsAllowed(unsigned long) const
size_t calcMaxNumElementsAllowed(size_t maxElements) const noexcept {
        if (ROBIN_HOOD_LIKELY(maxElements <= (std::numeric_limits<size_t>::max)() / 100)) {
            return maxElements * MaxLoadFactor100 / 100;
        }

        // we might be a bit inprecise, but since maxElements is quite large that doesn't matter
        return (maxElements / 100) * MaxLoadFactor100;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x2a20
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
ja 0x260b
imulq $0x50, 0x10(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x20(%rsp)
jmp 0x2623
movq 0x10(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
imulq $0x50, %rax, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::try_increase_info()
bool try_increase_info() {
        ROBIN_HOOD_LOG("mInfoInc=" << mInfoInc << ", numElements=" << mNumElements
                                   << ", maxNumElementsAllowed="
                                   << calcMaxNumElementsAllowed(mMask + 1))
        if (mInfoInc <= 2) {
            // need to be > 2 so that shift works (otherwise undefined behavior!)
            return false;
        }
        // we got space left, try to make info smaller
        mInfoInc = static_cast<uint8_t>(mInfoInc >> 1U);

        // remove one bit of the hash, leaving more space for the distance info.
        // This is extremely fast because we can operate on 8 bytes at once.
        ++mInfoHashShift;
        auto const numElementsWithBuffer = calcNumElementsWithBuffer(mMask + 1);

        for (size_t i = 0; i < numElementsWithBuffer; i += 8) {
            auto val = unaligned_load<uint64_t>(mInfo + i);
            val = (val >> 1U) & UINT64_C(0x7f7f7f7f7f7f7f7f);
            std::memcpy(mInfo + i, &val, sizeof(val));
        }
        // update sentinel, which might have been cleared out!
        mInfo[numElementsWithBuffer] = 1;

        mMaxNumElementsAllowed = calcMaxNumElementsAllowed(mMask + 1);
        return true;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x2, 0x30(%rax)
ja 0x2653
movb $0x0, 0x37(%rsp)
jmp 0x271f
movq 0x8(%rsp), %rdi
movl 0x30(%rdi), %eax
shrl %eax
movzbl %al, %eax
movl %eax, 0x30(%rdi)
movl 0x34(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x34(%rdi)
movq 0x20(%rdi), %rsi
addq $0x1, %rsi
callq 0x2870
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x26ef
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
addq 0x18(%rsp), %rdi
callq 0x2a30
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq 0x10(%rsp), %rcx
shrq %rcx
movabsq $0x7f7f7f7f7f7f7f7f, %rdx # imm = 0x7F7F7F7F7F7F7F7F
andq %rdx, %rcx
movq %rcx, 0x10(%rsp)
movq 0x10(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq %rdx, (%rax,%rcx)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
jmp 0x2687
movq 0x8(%rsp), %rdi
movq 0x10(%rdi), %rax
movq 0x20(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movq 0x20(%rdi), %rsi
addq $0x1, %rsi
callq 0x25c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::rehashPowerOfTwo(unsigned long, bool)
void rehashPowerOfTwo(size_t numBuckets, bool forceFree) {
        ROBIN_HOOD_TRACE(this)

        Node* const oldKeyVals = mKeyVals;
        uint8_t const* const oldInfo = mInfo;

        const size_t oldMaxElementsWithBuffer = calcNumElementsWithBuffer(mMask + 1);

        // resize operation: move stuff
        initData(numBuckets);
        if (oldMaxElementsWithBuffer > 1) {
            for (size_t i = 0; i < oldMaxElementsWithBuffer; ++i) {
                if (oldInfo[i] != 0) {
                    // might throw an exception, which is really bad since we are in the middle of
                    // moving stuff.
                    insert_move(std::move(oldKeyVals[i]));
                    // destroy the node but DON'T destroy the data.
                    oldKeyVals[i].~Node();
                }
            }

            // this check is not necessary as it's guarded by the previous if, but it helps
            // silence g++'s overeager "attempt to free a non-heap object 'map'
            // [-Werror=free-nonheap-object]" warning.
            if (oldKeyVals != reinterpret_cast_no_cast_align_warning<Node*>(&mMask)) {
                // don't destroy old data: put it into the pool instead
                if (forceFree) {
                    std::free(oldKeyVals);
                } else {
                    DataPool::addOrFree(oldKeyVals, calcNumBytesTotal(oldMaxElementsWithBuffer));
                }
            }
        }
    }

// Assembly:
subq $0x58, %rsp
movb %dl, %al
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
andb $0x1, %al
movb %al, 0x47(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x8(%rdi), %rax
movq %rax, 0x38(%rsp)
movq 0x10(%rdi), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rdi), %rsi
addq $0x1, %rsi
callq 0x2870
movq 0x18(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rsi
callq 0x24e0
cmpq $0x1, 0x28(%rsp)
jbe 0x286b
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x2804
movq 0x30(%rsp), %rax
movq 0x20(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x27f2
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x20(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x2a50
jmp 0x27f4
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x27b8
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x20, %rdi
callq 0x1950
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0x2869
testb $0x1, 0x47(%rsp)
je 0x283c
movq 0x38(%rsp), %rdi
callq 0x10c0
jmp 0x2867
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rsi
callq 0x28e0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x2be0
jmp 0x2869
jmp 0x286b
addq $0x58, %rsp
retq
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::shiftDown(unsigned long)
void shiftDown(size_t idx) noexcept(std::is_nothrow_move_assignable<Node>::value) {
        // until we find one that is either empty or has zero offset.
        // TODO(martinus) we don't need to move everything, just the last one for the same
        // bucket.
        mKeyVals[idx].destroy(*this);

        // until we find one that is either empty or has zero offset.
        while (mInfo[idx + 1] >= 2 * mInfoInc) {
            ROBIN_HOOD_COUNT(shiftDown)
            mInfo[idx] = static_cast<uint8_t>(mInfo[idx + 1] - mInfoInc);
            mKeyVals[idx] = std::move(mKeyVals[idx + 1]);
            ++idx;
        }

        mInfo[idx] = 0;
        // don't destroy, we've moved it
        // mKeyVals[idx].destroy(*this);
        mKeyVals[idx].~Node();
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq 0x8(%rsi), %rdi
movq 0x8(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x3040
movq (%rsp), %rcx
movq 0x10(%rcx), %rax
movq 0x8(%rsp), %rdx
movzbl 0x1(%rax,%rdx), %eax
movl 0x30(%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jb 0x2fe7
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x8(%rsp), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
subl 0x30(%rax), %ecx
movb %cl, %sil
movq 0x10(%rax), %rcx
movq 0x8(%rsp), %rdx
movb %sil, (%rcx,%rdx)
movq 0x8(%rax), %rdx
movq 0x8(%rsp), %rsi
movq 0x8(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rdx,%rsi,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x2f7c
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x18, %rsp
retq
nopl (%rax)
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::Iter<false>::operator++()
Iter& operator++() noexcept {
            mInfo++;
            mKeyVals++;
            fastForward();
            return *this;
        }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0x8(%rdi)
movq (%rdi), %rax
addq $0x8, %rax
movq %rax, (%rdi)
callq 0x3050
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::Iter<false>::fastForward()
void fastForward() noexcept {
            size_t n = 0;
            while (0U == (n = detail::unaligned_load<size_t>(mInfo))) {
                mInfo += sizeof(size_t);
                mKeyVals += sizeof(size_t);
            }
#if defined(ROBIN_HOOD_DISABLE_INTRINSICS)
            // we know for certain that within the next 8 bytes we'll find a non-zero one.
            if (ROBIN_HOOD_UNLIKELY(0U == detail::unaligned_load<uint32_t>(mInfo))) {
                mInfo += 4;
                mKeyVals += 4;
            }
            if (ROBIN_HOOD_UNLIKELY(0U == detail::unaligned_load<uint16_t>(mInfo))) {
                mInfo += 2;
                mKeyVals += 2;
            }
            if (ROBIN_HOOD_UNLIKELY(0U == *mInfo)) {
                mInfo += 1;
                mKeyVals += 1;
            }
#else
#    if ROBIN_HOOD(LITTLE_ENDIAN)
            auto inc = ROBIN_HOOD_COUNT_TRAILING_ZEROES(n) / 8;
#    else
            auto inc = ROBIN_HOOD_COUNT_LEADING_ZEROES(n) / 8;
#    endif
            mInfo += inc;
            mKeyVals += inc;
#endif
        }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x2a30
movq %rax, %rcx
movq %rcx, 0x18(%rsp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x30a6
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x8(%rax)
movq (%rax), %rcx
addq $0x40, %rcx
movq %rcx, (%rax)
jmp 0x306c
cmpq $0x0, 0x18(%rsp)
je 0x30be
movq 0x18(%rsp), %rax
tzcntq %rax, %rax
movl %eax, 0x4(%rsp)
jmp 0x30c9
movl $0x40, %eax
movl %eax, 0x4(%rsp)
jmp 0x30c9
movl 0x4(%rsp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x14(%rsp)
movl 0x14(%rsp), %edx
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
movl 0x14(%rsp), %edx
movq (%rax), %rcx
movslq %edx, %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
addq $0x28, %rsp
retq
// File: henrixh[P]shittydsa/examples/fenwick.cpp
// Function: main
int main(int, char **)
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ul size, ops;
  cin >> size >> ops;

  Fenwick fen {size};

  char op;
  ul index;
  l diff;
  for (ul i {0}; i < ops; ++i) {
    cin >> op;
    if (op == '+') {
      cin >> index >> diff;
      fen.add(index, diff);
    }

    if (op == '?') {
      cin >> index;
      cout << fen.sum(0, index) << "\n";
    }
  }
  return 0;
}

// Assembly:
subq $0x88, %rsp
movl $0x0, 0x84(%rsp)
movl %edi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
xorl %edi, %edi
callq 0x1060
movq 0x3d34(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq 0x3d2a(%rip), %rdi      # 0x4fe0
addq -0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1090
movq 0x3d16(%rip), %rdi      # 0x4fe0
leaq 0x70(%rsp), %rsi
callq 0x1100
movq %rax, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1100
movq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x1430
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x68(%rsp), %rax
jae 0x13fd
movq 0x3cd0(%rip), %rdi      # 0x4fe0
leaq 0x4f(%rsp), %rsi
callq 0x10f0
jmp 0x131c
movsbl 0x4f(%rsp), %eax
cmpl $0x2b, %eax
jne 0x1384
movq 0x3cb3(%rip), %rdi      # 0x4fe0
leaq 0x40(%rsp), %rsi
callq 0x1100
movq %rax, 0x18(%rsp)
jmp 0x133e
movq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x1080
jmp 0x134f
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x50(%rsp), %rdi
callq 0x14a0
jmp 0x1365
jmp 0x1384
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x1580
jmp 0x1421
movsbl 0x4f(%rsp), %eax
cmpl $0x3f, %eax
jne 0x13e8
movq 0x3c4b(%rip), %rdi      # 0x4fe0
leaq 0x40(%rsp), %rsi
callq 0x1100
jmp 0x13a1
movq 0x40(%rsp), %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x50(%rsp), %rdi
callq 0x1530
movq %rax, 0x10(%rsp)
jmp 0x13bb
movq 0x10(%rsp), %rsi
movq 0x3c09(%rip), %rdi      # 0x4fd0
callq 0x1130
movq %rax, 0x8(%rsp)
jmp 0x13d3
movq 0x8(%rsp), %rdi
leaq 0x1c25(%rip), %rsi      # 0x3004
callq 0x10c0
jmp 0x13e6
jmp 0x13e8
jmp 0x13ea
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x12f9
movl $0x0, 0x84(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x1580
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x1120
nopl (%rax,%rax)
// File: henrixh[P]shittydsa/examples/../src/fenwick.h
// Function: Fenwick::cumulative_sum(unsigned long)
l cumulative_sum(ul index) {
    l res {};
    while (index) {
      res += data[index -1];
      index -= lsb(index);
    }
    return res;
  }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x23e5
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
subq $0x1, %rsi
callq 0x2340
movq (%rax), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2360
movq %rax, %rcx
movq 0x18(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x23a1
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
// File: roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::onInit()
int Echo::onInit()
{
	maxInputSize = 50 * 1024 * 1024;
	maxOutputSize = 50 * 1024 * 1024;

	dstFlow = getConnector("dst");
	// TODO: use more general log
	// after compile the frame with -rdynamic, lib can use tis symbols
	// SYSLOG_INIT("../logs/business.log", LOG_LEVEL_DEBUG, 10*1024*1024, 10);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x3200000, 0x18(%rax)  # imm = 0x3200000
movq $0x3200000, 0x20(%rax)  # imm = 0x3200000
leaq 0x8cfd(%rip), %rdi      # 0xd058
callq 0x3570
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::doEcho(beyondy::Async::Message*)
int Echo::doEcho(Message *req)
{
	int takenMs = 0;
	if (req->getWptr() >= (long)(sizeof(struct proto_h16_head) + sizeof(int))) {
		takenMs = *((int *)(req->data() + sizeof(struct proto_h16_head)));	
	}

	SYSLOG_DEBUG("Echo took %dms", takenMs);
	if (takenMs > 0) usleep((long)takenMs*1000);

	Message *rsp = Message::create(req->getWptr(), req->fd, req->flow);
	memcpy(rsp->data(), req->data(), req->getWptr());

	struct proto_h16_head *h = (struct proto_h16_head *)rsp->data();
	h->cmd = h->cmd + 1;

	/* set response size */
	rsp->setWptr(req->getWptr());

	Message::destroy(req);
	if (sendMessage(rsp) < 0) {
		Message::destroy(rsp);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c70
cmpq $0x14, %rax
jl 0x43cd
movq -0x18(%rbp), %rdi
callq 0x4c90
movl 0x10(%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x43cf
leaq 0xeec2(%rip), %rax      # 0x13298
movq (%rax), %rdi
movl $0x5, %esi
callq 0x3910
cmpl $0x0, %eax
je 0x4408
leaq 0xeea9(%rip), %rax      # 0x13298
movq (%rax), %rdi
movl -0x1c(%rbp), %ecx
movl $0x5, %esi
leaq 0x8c5b(%rip), %rdx      # 0xd05c
movb $0x0, %al
callq 0x9aa0
jmp 0x440a
cmpl $0x0, -0x1c(%rbp)
jle 0x4422
movslq -0x1c(%rbp), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movl %eax, %edi
callq 0x3320
movq -0x18(%rbp), %rdi
callq 0x4c70
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
callq 0x9ea0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4c90
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c90
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c70
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
callq 0x3200
movq -0x28(%rbp), %rdi
callq 0x4c90
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %eax
addl $0x1, %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c70
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x4cb0
movq -0x18(%rbp), %rdi
callq 0x9f10
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4cd0
cmpl $0x0, %eax
jge 0x44e5
movq -0x28(%rbp), %rdi
callq 0x9f10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x44ec
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::doMore(beyondy::Async::Message*)
int Echo::doMore(Message *req)
{
	int takenMs = 0;
	if (req->getWptr() >= (long)(sizeof(struct proto_h16_head) + sizeof(int))) {
		takenMs = *((int *)(req->data() + sizeof(struct proto_h16_head)));	
	}

	SYSLOG_DEBUG("More took %dms", takenMs);
	if (takenMs > 0) usleep((long)takenMs*1000);

	Message *rsp = Message::create(req->getWptr(), req->fd, req->flow);
	memcpy(rsp->data(), req->data(), req->getWptr());

	struct proto_h16_head *h = (struct proto_h16_head *)rsp->data();
	h->cmd = ECHO_CMD_MORE_RSP;

	/* set response size */
	rsp->setWptr(req->getWptr());

	Message::destroy(req);
	if (sendMessage(rsp) < 0) {
		Message::destroy(rsp);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c70
cmpq $0x14, %rax
jl 0x482d
movq -0x18(%rbp), %rdi
callq 0x4c90
movl 0x10(%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x482f
leaq 0xea62(%rip), %rax      # 0x13298
movq (%rax), %rdi
movl $0x5, %esi
callq 0x3910
cmpl $0x0, %eax
je 0x4868
leaq 0xea49(%rip), %rax      # 0x13298
movq (%rax), %rdi
movl -0x1c(%rbp), %ecx
movl $0x5, %esi
leaq 0x8896(%rip), %rdx      # 0xd0f7
movb $0x0, %al
callq 0x9aa0
jmp 0x486a
cmpl $0x0, -0x1c(%rbp)
jle 0x4882
movslq -0x1c(%rbp), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movl %eax, %edi
callq 0x3320
movq -0x18(%rbp), %rdi
callq 0x4c70
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
callq 0x9ea0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4c90
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c90
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c70
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
callq 0x3200
movq -0x28(%rbp), %rdi
callq 0x4c90
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movw $0x5, 0x4(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c70
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x4cb0
movq -0x18(%rbp), %rdi
callq 0x9f10
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4cd0
cmpl $0x0, %eax
jge 0x4939
movq -0x28(%rbp), %rdi
callq 0x9f10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4940
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::onMessage(beyondy::Async::Message*)
int Echo::onMessage(beyondy::Async::Message *req)
{
	SYSLOG_DEBUG("Echo got a message from fd=%d flow=%d msize=%d, byte0=%ld,%d, enQ=%ld,%d, deQ=%ld,%ld", \
		req->fd, req->flow, req->getWptr(),
		req->ts_byte_first.tv_sec, req->ts_byte_first.tv_usec,
		req->ts_enqueue.tv_sec, req->ts_enqueue.tv_usec,
		req->ts_dequeue.tv_sec, req->ts_dequeue.tv_usec);
	struct proto_h16_head *h = (struct proto_h16_head *)req->data();
	int retval = 0;

	if (h->cmd == ECHO_CMD_ECHO_REQ) {
		retval = doEcho(req);
	}
	else if (h->cmd == ECHO_CMD_FORWARD_REQ || h->cmd == ECHO_CMD_MORE_RSP) {
		retval = doForward(req);
	}
	else if (h->cmd == ECHO_CMD_MORE_REQ) {
		retval = doMore(req);
	}
	else {
		SYSLOG_DEBUG("Echo uknown cmd=%d", h->cmd);
	}

	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0xe924(%rip), %rax      # 0x13298
movq (%rax), %rdi
movl $0x5, %esi
callq 0x3910
cmpl $0x0, %eax
je 0x4a23
leaq 0xe907(%rip), %rax      # 0x13298
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4c70
movq -0x50(%rbp), %rdi
movl -0x48(%rbp), %ecx
movl -0x44(%rbp), %r8d
movq %rax, %r9
movq -0x28(%rbp), %rax
movq 0x30(%rax), %r15
movq -0x28(%rbp), %rax
movq 0x38(%rax), %r14
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rbx
movq -0x28(%rbp), %rax
movq 0x48(%rax), %r11
movq -0x28(%rbp), %rax
movq 0x50(%rax), %r10
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x5, %esi
leaq 0x8707(%rip), %rdx      # 0xd106
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movb $0x0, %al
callq 0x9aa0
jmp 0x4a25
movq -0x28(%rbp), %rdi
callq 0x4c90
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %eax
cmpl $0x0, %eax
jne 0x4a5b
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4390
movl %eax, -0x34(%rbp)
jmp 0x4aee
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %eax
cmpl $0x2, %eax
je 0x4a75
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %eax
cmpl $0x5, %eax
jne 0x4a87
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4500
movl %eax, -0x34(%rbp)
jmp 0x4aec
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %eax
cmpl $0x4, %eax
jne 0x4aa6
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x47f0
movl %eax, -0x34(%rbp)
jmp 0x4aea
jmp 0x4aa8
leaq 0xe7e9(%rip), %rax      # 0x13298
movq (%rax), %rdi
movl $0x5, %esi
callq 0x3910
cmpl $0x0, %eax
je 0x4ae6
leaq 0xe7d0(%rip), %rax      # 0x13298
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %ecx
movl $0x5, %esi
leaq 0x867d(%rip), %rdx      # 0xd15c
movb $0x0, %al
callq 0x9aa0
jmp 0x4ae8
jmp 0x4aea
jmp 0x4aec
jmp 0x4aee
movl -0x34(%rbp), %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.h
// Function: Echo::calcMessageSize(beyondy::Async::Message*) const
virtual ssize_t calcMessageSize(beyondy::Async::Message *msg) const {
		uint32_t len;
		memcpy(&len, msg->data() + msg->getRptr(), sizeof(len));

		if (len < sizeof(proto_h16_head) || len > maxInputSize) {
			errno = EINVAL;
			ssize_t retval = (ssize_t)len;
			if (retval > 0) return -retval;
			return retval;
		}
		
		return len;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4c90
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4e20
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl (%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x10, %rax
jb 0x4dd1
movq -0x38(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpq 0x18(%rcx), %rax
jbe 0x4e00
callq 0x3050
movl $0x16, (%rax)
movl -0x1c(%rbp), %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jle 0x4df6
xorl %eax, %eax
subq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4e07
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4e07
movl -0x1c(%rbp), %eax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: attractivechaos[P]udb2/mlib/test.c
// Function: test_int
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	intmap_t h;
	intmap_init(h);
	for (i = 0, x = x0; i < n; ++i) {
		uint32_t key;
		int *p;
		x = hash32(x);
		key = get_key(n, x);
		p = intmap_get(h, key);
#ifndef UDB2_TEST_DEL
		if (p == 0) {
			intmap_set_at(h, key, 1);
			++z;
		} else z += ++*p;
#else
		if (p == 0) {
			intmap_set_at(h, key, 1);
			++z;
		} else intmap_erase(h, key);
#endif
	}
	fprintf(stderr, "# unique keys: %ld; checksum: %u\n", intmap_size(h), z);
	x = intmap_size(h);
	intmap_clear(h);
	return x;
}

// Assembly:
subq $0x68, %rsp
movl %edi, 0x64(%rsp)
movl %esi, 0x60(%rsp)
movl $0x0, 0x54(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x16c0
movl $0x0, 0x5c(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x58(%rsp)
movl 0x5c(%rsp), %eax
cmpl 0x64(%rsp), %eax
jae 0x1667
movl 0x58(%rsp), %edi
callq 0x1250
movl %eax, 0x58(%rsp)
movl 0x64(%rsp), %edi
movl 0x58(%rsp), %esi
callq 0x12c0
movl %eax, 0x1c(%rsp)
leaq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x1970
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1641
leaq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl $0x1, %edx
callq 0x1cd0
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x1655
movq 0x10(%rsp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
addl 0x54(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x1657
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x15de
movq 0x498a(%rip), %rax      # 0x5ff8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2330
movq 0x8(%rsp), %rdi
movq %rax, %rdx
movl 0x54(%rsp), %ecx
leaq 0x2a22(%rip), %rsi      # 0x40b5
movb $0x0, %al
callq 0x1080
leaq 0x20(%rsp), %rdi
callq 0x2330
movl %eax, 0x58(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2370
movl 0x58(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
// File: sun98[P]Mini-DFS/datanode.cpp
// Function: DataServer::operator()()
void DataServer::operator()()
{
    while (true)
    {
        std::unique_lock<std::mutex> lk(mtx);
        cv.wait(lk, [&]() { return !this->finish; });
        if (cmd == "up")
        {
            size_ += bufSize / 1024.0 / 1024.0;
            put();
        }
        else if (cmd == "down")
            read();
        else if (cmd == "loc")
            locate();
        else if (cmd == "down_id")
            fetch();
        this->finish = true;
        lk.unlock();
        cv.notify_all();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
addq $0x28, %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x4980
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rsi
movq %rax, %rdi
addq $0x50, %rdi
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
callq 0x3a90
jmp 0x3947
movq -0x38(%rbp), %rdi
subq $-0x80, %rdi
leaq 0xc6c4(%rip), %rsi      # 0x1001a
callq 0x49c0
movb %al, -0x41(%rbp)
jmp 0x3960
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x3969
jmp 0x39b9
movq -0x38(%rbp), %rdi
cvtsi2sdl 0xa4(%rdi), %xmm1
movsd 0xc68b(%rip), %xmm0     # 0x10008
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x20(%rdi), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rdi)
callq 0x3ae0
jmp 0x399a
jmp 0x3a4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x4a40
jmp 0x3a7d
movq -0x38(%rbp), %rdi
subq $-0x80, %rdi
leaq 0xc655(%rip), %rsi      # 0x1001d
callq 0x49c0
movb %al, -0x42(%rbp)
jmp 0x39d2
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x39db
jmp 0x39e8
movq -0x38(%rbp), %rdi
callq 0x3e50
jmp 0x39e6
jmp 0x3a4a
movq -0x38(%rbp), %rdi
subq $-0x80, %rdi
leaq 0xc62b(%rip), %rsi      # 0x10022
callq 0x49c0
movb %al, -0x43(%rbp)
jmp 0x3a01
movb -0x43(%rbp), %al
testb $0x1, %al
jne 0x3a0a
jmp 0x3a17
movq -0x38(%rbp), %rdi
callq 0x41b0
jmp 0x3a15
jmp 0x3a48
movq -0x38(%rbp), %rdi
subq $-0x80, %rdi
leaq 0xc600(%rip), %rsi      # 0x10026
callq 0x49c0
movb %al, -0x44(%rbp)
jmp 0x3a30
movb -0x44(%rbp), %al
testb $0x1, %al
jne 0x3a39
jmp 0x3a46
movq -0x38(%rbp), %rdi
callq 0x4400
jmp 0x3a44
jmp 0x3a46
jmp 0x3a48
jmp 0x3a4a
jmp 0x3a4c
movq -0x38(%rbp), %rax
movb $0x1, 0xb8(%rax)
leaq -0x18(%rbp), %rdi
callq 0x49f0
jmp 0x3a62
movq -0x38(%rbp), %rdi
addq $0x50, %rdi
callq 0x3510
leaq -0x18(%rbp), %rdi
callq 0x4a40
jmp 0x3914
movq -0x28(%rbp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)
// File: sun98[P]Mini-DFS/datanode.cpp
// Function: DataServer::locate()
void DataServer::locate()
{
    std::string filePath = name_ + "/" + std::to_string(fid) + " " + std::to_string(offset);
    std::ifstream is(filePath);
    if (is)
        bufSize = 1;
    else
        bufSize = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp            # imm = 0x2F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x2e8(%rbp)
leaq 0xbe5d(%rip), %rdx      # 0x1002e
leaq -0x88(%rbp), %rdi
callq 0x4ba0
movq -0x2e8(%rbp), %rax
movl 0xa0(%rax), %esi
leaq -0xa8(%rbp), %rdi
callq 0x4c20
jmp 0x41f8
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x4a80
jmp 0x4211
leaq 0xbffd(%rip), %rdx      # 0x10215
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4b50
jmp 0x4227
movq -0x2e8(%rbp), %rax
movl 0xa8(%rax), %esi
leaq -0xd8(%rbp), %rdi
callq 0x4c20
jmp 0x4242
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x4a80
jmp 0x4258
leaq -0xd8(%rbp), %rdi
callq 0x3210
leaq -0x48(%rbp), %rdi
callq 0x3210
leaq -0x68(%rbp), %rdi
callq 0x3210
leaq -0xa8(%rbp), %rdi
callq 0x3210
leaq -0x88(%rbp), %rdi
callq 0x3210
leaq -0x2e0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0x8, %edx
callq 0x34c0
jmp 0x42a5
movq -0x2e0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x2e0(%rbp,%rax), %rdi
callq 0x3380
movb %al, -0x2e9(%rbp)
jmp 0x42c5
movb -0x2e9(%rbp), %al
testb $0x1, %al
jne 0x42d4
jmp 0x43b8
movq -0x2e8(%rbp), %rax
movl $0x1, 0xa4(%rax)
jmp 0x43c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x4376
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x436a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x4361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x4358
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x3210
leaq -0x48(%rbp), %rdi
callq 0x3210
leaq -0x68(%rbp), %rdi
callq 0x3210
leaq -0xa8(%rbp), %rdi
callq 0x3210
leaq -0x88(%rbp), %rdi
callq 0x3210
jmp 0x43f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x43e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x30e0
jmp 0x43e7
movq -0x2e8(%rbp), %rax
movl $0x0, 0xa4(%rax)
leaq -0x2e0(%rbp), %rdi
callq 0x30e0
leaq -0x28(%rbp), %rdi
callq 0x3210
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x3210
movq -0xb0(%rbp), %rdi
callq 0x3560
nopl (%rax)
// File: sun98[P]Mini-DFS/filetree.cpp
// Function: FileTree::insert_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
bool FileTree::insert_node(const std::string &path, const bool isFile)
{
    TreeNode *parent = nullptr;
    bool isFound = find_node(path, &parent);
    if (isFound)
        return false;

    std::vector<std::string> path_folders = split(path, '/');
    TreeNode *newNode = new TreeNode(path, isFile);
    newNode->parent = parent;
    TreeNode *son = parent->firstSon;
    if (!son)
        parent->firstSon = newNode;
    else
    {
        while (son->nextSibling)
            son = son->nextSibling;
        son->nextSibling = newNode;
    }
    while (son)
        son = son->nextSibling;
    son = newNode;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x52c0
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
je 0x51b7
movb $0x0, -0x1(%rbp)
jmp 0x52a9
movq -0x18(%rbp), %rsi
movb $0x2f, -0x49(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x49(%rbp), %rdx
callq 0x6d60
movl $0x40, %edi
callq 0x3310
movq %rax, -0x78(%rbp)
jmp 0x51dc
movq -0x78(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x19(%rbp), %rdx
callq 0x5510
jmp 0x51ef
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x5249
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x5270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x529e
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x32f0
jmp 0x529e
jmp 0x524b
movq -0x70(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x5264
movq -0x70(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x524b
movq -0x58(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x5272
cmpq $0x0, -0x70(%rbp)
je 0x5287
movq -0x70(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x5272
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movb $0x1, -0x1(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5570
jmp 0x52a9
leaq -0x48(%rbp), %rdi
callq 0x5570
jmp 0x52b7
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x3560
// File: sun98[P]Mini-DFS/filetree.cpp
// Function: FileTree::find_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, TreeNode**) const
bool FileTree::find_node(const std::string &path, TreeNode **last_node) const
{
    std::vector<std::string> path_folders = split(path, '/');
    TreeNode *node = _root->firstSon;
    *last_node = _root;
    for (const auto &name : path_folders)
    {
        while (node && node->value_ != name)
            node = node->nextSibling;
        if (!node)
            return false;
        *last_node = node;
        node = node->firstSon;
    }
    return true && node->isFile;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rsi
movb $0x2f, -0x39(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x39(%rbp), %rdx
callq 0x6d60
movq -0x78(%rbp), %rax
movq (%rax), %rcx
movq 0x30(%rcx), %rcx
movq %rcx, -0x48(%rbp)
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
leaq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x55d0
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5600
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5630
testb $0x1, %al
jne 0x5342
jmp 0x53bb
leaq -0x58(%rbp), %rdi
callq 0x5670
movq %rax, -0x68(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x48(%rbp)
movb %al, -0x79(%rbp)
je 0x536b
movq -0x48(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x5690
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x5374
jmp 0x5382
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x534f
cmpq $0x0, -0x48(%rbp)
jne 0x5396
movb $0x0, -0x1(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x53ce
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x56c0
jmp 0x532f
movq -0x48(%rbp), %rax
movb 0x20(%rax), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x6c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5570
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sun98[P]Mini-DFS/filetree.cpp
// Function: FileTree::list(TreeNode*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::pair<int, int>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::pair<int, int>>>>&)
void FileTree::list(TreeNode *node, std::map<std::string, std::pair<int, int>> &meta)
{
    static int chunkSize = 2 * 1024 * 1024;
    if (node)
    {
        std::cout << meta[node->value_].first << "\t" << (int)ceil(1.0 * meta[node->value_].second / chunkSize) << "\t\t" << node->value_ << std::endl;
        // std::cout << node->value_ << "\t" << std::endl;
        list(node->firstSon, meta);
        list(node->nextSibling, meta);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x54d5
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x56e0
movl (%rax), %esi
movq 0x11b93(%rip), %rdi     # 0x16fc0
callq 0x3530
movq %rax, %rdi
leaq 0xacfd(%rip), %rsi      # 0x10139
callq 0x3300
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x56e0
cvtsi2sdl 0x4(%rax), %xmm1
movsd 0xacd1(%rip), %xmm0     # 0x10130
mulsd %xmm1, %xmm0
cvtsi2sdl 0x11e9d(%rip), %xmm1 # 0x17308
divsd %xmm1, %xmm0
callq 0x30a0
movq -0x28(%rbp), %rdi
cvttsd2si %xmm0, %esi
callq 0x3530
movq %rax, %rdi
leaq 0xacad(%rip), %rsi      # 0x10138
callq 0x3300
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x32d0
movq %rax, %rdi
movq 0x11b02(%rip), %rsi     # 0x16fa8
callq 0x3330
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x53f0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x53f0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sun98[P]Mini-DFS/md5.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const&)
std::vector<std::string> split(const std::string &s, const char &delim)
{
  std::stringstream ss(s);
  std::vector<std::string> res;
  std::string str;
  while (std::getline(ss, str, delim))
    if (!str.empty())
      res.push_back(str);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x1e0(%rbp)
movq %rdi, %rax
movq %rax, -0x1f0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movl $0x10, %edi
movl $0x8, %esi
callq 0x8230
movq -0x1e8(%rbp), %rsi
movl %eax, %edx
leaq -0x1a0(%rbp), %rdi
callq 0x34a0
movq -0x1e0(%rbp), %rdi
movb $0x0, -0x1a1(%rbp)
callq 0x8250
leaq -0x1c8(%rbp), %rdi
callq 0x3410
movq -0x18(%rbp), %rax
movsbl (%rax), %edx
leaq -0x1a0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x3590
movq %rax, -0x1f8(%rbp)
jmp 0x6df9
movq -0x1f8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3380
movb %al, -0x1f9(%rbp)
jmp 0x6e17
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x6e23
jmp 0x6e87
leaq -0x1c8(%rbp), %rdi
callq 0x34f0
testb $0x1, %al
jne 0x6e82
movq -0x1e0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x8270
jmp 0x6e48
jmp 0x6e82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x3210
movq -0x1e0(%rbp), %rdi
callq 0x5570
leaq -0x1a0(%rbp), %rdi
callq 0x3260
jmp 0x6ecb
jmp 0x6dd6
movb $0x1, -0x1a1(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x3210
testb $0x1, -0x1a1(%rbp)
jne 0x6eaf
movq -0x1e0(%rbp), %rdi
callq 0x5570
leaq -0x1a0(%rbp), %rdi
callq 0x3260
movq -0x1f0(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x1d0(%rbp), %rdi
callq 0x3560
nopw (%rax,%rax)
// File: sun98[P]Mini-DFS/md5.cpp
// Function: MD5::init()
void MD5::init()
{
  hi = lo = 0;

  state[0] = 0x67452301;
  state[1] = 0xefcdab89;
  state[2] = 0x98badcfe;
  state[3] = 0x10325476;

  finalized = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x60(%rax)
movl $0x0, 0x64(%rax)
movl $0x67452301, 0x50(%rax) # imm = 0x67452301
movl $0xefcdab89, 0x54(%rax) # imm = 0xEFCDAB89
movl $0x98badcfe, 0x58(%rax) # imm = 0x98BADCFE
movl $0x10325476, 0x5c(%rax) # imm = 0x10325476
movb $0x0, 0x68(%rax)
popq %rbp
retq
nopl (%rax)