LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: void hdiff_private::(anonymous namespace)::_build_range<long>(long const*, long const*, unsigned char const*, unsigned char const*, long*)
static void _build_range(const T* SA_begin,const T* SA_end,
                             const TChar* src_begin,const TChar* src_end,
                             T* range){
        TChar str[2];
        str[0]=0;
        str[1]=0;
        const T* pos=SA_begin;
        for (size_t cc=0;cc<256*256;++cc){
            //cc is [c0,c1]
            str[0]=(TChar)(cc>>8);
            str[1]=(TChar)(cc&255);
            pos=_lower_bound(pos,SA_end,str,str+2,src_begin,src_end);
            range[cc]=(T)(pos-SA_begin);
        }
        range[256*256]=(T)(SA_end-SA_begin);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb $0x0, -0x2a(%rbp)
movb $0x0, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x10000, -0x40(%rbp)   # imm = 0x10000
jae 0x3a3ae
movq -0x40(%rbp), %rax
shrq $0x8, %rax
movb %al, -0x2a(%rbp)
movq -0x40(%rbp), %rax
andq $0xff, %rax
movb %al, -0x29(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x2a(%rbp), %rdx
leaq -0x2a(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x3a800
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
subq %rax, %rdx
sarq $0x3, %rdx
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3a334
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
subq %rax, %rcx
sarq $0x3, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x80000(%rax)
addq $0x50, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: void hdiff_private::_filter_insert<true>(hdiff_private::TBloomFilter<unsigned int>*, unsigned char const*, unsigned char const*)
static void _filter_insert(TBloomFilter<TFastMatchForSString::THash>* filter,
                               const TChar* src_begin,const TChar* src_end){
        const TChar* cur = src_begin;
        TFastMatchForSString::THash h=TFastMatchForSString::getHash(cur);
        cur+=TFastMatchForSString::kFMMinStrSize;
        do {
    #if (_IS_USED_MULTITHREAD)
            if (isMT)
                filter->insert_MT(h);
            else
    #endif
                filter->insert(h);
            if (cur<src_end)
                h=TFastMatchForSString::rollHash(h,cur++);
            else
                break;
        } while (true);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3abb0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x3cea0
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x3a5a6
movl -0x24(%rbp), %edi
movq -0x20(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
callq 0x3cf10
movl %eax, -0x24(%rbp)
jmp 0x3a5a8
jmp 0x3a5b2
jmp 0x3a5aa
movb $0x1, %al
testb $0x1, %al
jne 0x3a574
jmp 0x3a5b2
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h
// Function: hdiff_private::TBitSet::clear(unsigned long)
void clear(size_t newBitSize){
        size_t count=bitSizeToCount(newBitSize);
        if (newBitSize==m_bitSize){
            if (count>0) memset(m_bits,0,count*sizeof(base_t));
        }else{
            m_bitSize=newBitSize;
            if (m_bits) { delete [] m_bits; m_bits=0; }
            if (count>0){
                m_bits=new base_t[count];
                memset(m_bits,0,count*sizeof(base_t));
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3b0c0
movq -0x20(%rbp), %rcx
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq 0x8(%rcx), %rax
jne 0x3b035
cmpq $0x0, -0x18(%rbp)
jbe 0x3b030
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x4210
jmp 0x3b0b6
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, (%rax)
je 0x3b06c
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x3b061
movq -0x28(%rbp), %rdi
callq 0x44a0
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x18(%rbp)
jbe 0x3b0b4
movq -0x18(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x4210
jmp 0x3b0b6
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h
// Function: hdiff_private::TBloomFilter<unsigned int>::_hash2_32(unsigned long)
static size_t _hash2_32(size_t key){//from: https://gist.github.com/badboy/6267743
        const size_t c2=0x27d4eb2d; // a prime or an odd constant
        key = (key ^ 61) ^ (key >> 16);
        key = key + (key << 3);
        key = key ^ (key >> 4);
        key = key * c2;
        key = key ^ (key >> 15);
        return key;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x27d4eb2d, -0x10(%rbp) # imm = 0x27D4EB2D
movq -0x8(%rbp), %rax
xorq $0x3d, %rax
movq -0x8(%rbp), %rcx
shrq $0x10, %rcx
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shrq $0x4, %rcx
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
imulq $0x27d4eb2d, -0x8(%rbp), %rax # imm = 0x27D4EB2D
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shrq $0xf, %rcx
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h
// Function: hdiff_private::TBloomFilter<unsigned int>::getMask(unsigned long, unsigned long)
static size_t getMask(size_t dataCount,size_t zoom){
        if (zoom<kZoomMin)
            throw std::runtime_error("TBloomFilter::getMask() zoom too small error!");
        size_t bitSize=dataCount*zoom;
        if ((bitSize/zoom)!=dataCount)
            throw std::runtime_error("TBloomFilter::getMask() bitSize too large error!");
        unsigned int bit=10;
        while ( (((size_t)1<<bit)<bitSize) && (bit<sizeof(size_t)*8-1) )
            ++bit;
        return ((size_t)1<<bit)-1;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x3, -0x10(%rbp)
jae 0x3cdca
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
leaq 0x73377(%rip), %rsi     # 0xb0109
callq 0x4140
jmp 0x3cd99
movq -0x38(%rbp), %rdi
movq 0xa924c(%rip), %rsi     # 0xe5ff0
movq 0xa9215(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x42e0
jmp 0x3ce93
movq -0x8(%rbp), %rax
imulq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x10(%rbp)
cmpq -0x8(%rbp), %rax
je 0x3ce39
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x73333(%rip), %rsi     # 0xb0137
callq 0x4140
jmp 0x3ce0b
movq -0x40(%rbp), %rdi
movq 0xa91da(%rip), %rsi     # 0xe5ff0
movq 0xa91a3(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x42e0
jmp 0x3ce93
movl $0xa, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0x3ce68
movl -0x2c(%rbp), %eax
cmpq $0x3f, %rax
setb %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x3ce71
jmp 0x3ce7c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3ce40
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h
// Function: hdiff_private::TBitSet::set_MT(unsigned long)
inline void set_MT(size_t bitIndex){
        //assert(bitIndex<m_bitSize);
      #if (_IS_USED__sync_fetch_and_or)
        __sync_fetch_and_or(&m_bits[bitIndex>>kBaseShr],((base_t)1<<(bitIndex&kBaseMask)));
      #else
        ((std::atomic<base_t>*)&m_bits[bitIndex>>kBaseShr])->fetch_or(((base_t)1<<(bitIndex&kBaseMask)));
      #endif
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rax, %rdx
shrq $0x5, %rdx
leaq (%rcx,%rdx,4), %rcx
movq %rcx, -0x40(%rbp)
movb %al, %cl
movl $0x1, %eax
shll %cl, %eax
movq -0x40(%rbp), %rcx
movq %rcx, -0x8(%rbp)
movl %eax, -0xc(%rbp)
movl $0x5, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, -0x14(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x4, %eax
ja 0x3cfc3
movq -0x30(%rbp), %rax
leaq 0x73072(%rip), %rcx     # 0xb002c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, -0x48(%rbp)
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x38(%rbp), %rcx
movl -0x48(%rbp), %esi
movl %eax, %edx
orl %esi, %edx
lock
cmpxchgl %edx, (%rcx)
sete %cl
movl %eax, -0x4c(%rbp)
testb $0x1, %cl
movl %eax, -0x44(%rbp)
jne 0x3cff4
jmp 0x3cfd2
movl -0x4c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x3d0e4
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, -0x54(%rbp)
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x38(%rbp), %rcx
movl -0x54(%rbp), %esi
movl %eax, %edx
orl %esi, %edx
lock
cmpxchgl %edx, (%rcx)
sete %cl
movl %eax, -0x58(%rbp)
testb $0x1, %cl
movl %eax, -0x50(%rbp)
jne 0x3d030
jmp 0x3d00e
movl -0x58(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x3d0e4
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, -0x60(%rbp)
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x38(%rbp), %rcx
movl -0x60(%rbp), %esi
movl %eax, %edx
orl %esi, %edx
lock
cmpxchgl %edx, (%rcx)
sete %cl
movl %eax, -0x64(%rbp)
testb $0x1, %cl
movl %eax, -0x5c(%rbp)
jne 0x3d06c
jmp 0x3d04a
movl -0x64(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x3d0e4
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, -0x6c(%rbp)
movl (%rax), %eax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
movq -0x38(%rbp), %rcx
movl -0x6c(%rbp), %esi
movl %eax, %edx
orl %esi, %edx
lock
cmpxchgl %edx, (%rcx)
sete %cl
movl %eax, -0x70(%rbp)
testb $0x1, %cl
movl %eax, -0x68(%rbp)
jne 0x3d0a5
jmp 0x3d083
movl -0x70(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x3d0e4
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, -0x78(%rbp)
movl (%rax), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x38(%rbp), %rcx
movl -0x78(%rbp), %esi
movl %eax, %edx
orl %esi, %edx
lock
cmpxchgl %edx, (%rcx)
sete %cl
movl %eax, -0x7c(%rbp)
testb $0x1, %cl
movl %eax, -0x74(%rbp)
jne 0x3d0de
jmp 0x3d0bc
movl -0x7c(%rbp), %eax
movl %eax, -0x18(%rbp)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: hdiff_private::getRegionRleCost(unsigned char const*, unsigned long, unsigned char const*, unsigned char*, unsigned long*)
size_t getRegionRleCost(const unsigned char* d,size_t n,const unsigned char* sub,
                        unsigned char* out_nocompress,size_t* nocompressSize){
    assert((nocompressSize==0)||(*nocompressSize>=n));
    if (sub){
        if (out_nocompress)
            return _getRegionRleCost<true,true>(d,n,sub,out_nocompress,nocompressSize);
        else
            return _getRegionRleCost<true,false>(d,n,sub,0,nocompressSize);
    }else{
        if (out_nocompress)
            return _getRegionRleCost<false,true>(d,n,0,out_nocompress,nocompressSize);
        else
            return _getRegionRleCost<false,false>(d,n,0,0,nocompressSize);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb $0x1, %al
cmpq $0x0, -0x30(%rbp)
movb %al, -0x31(%rbp)
je 0x3d7b9
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
setae %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x3d7c2
jmp 0x3d7c4
jmp 0x3d7e3
leaq 0x72a09(%rip), %rdi     # 0xb01d4
leaq 0x72a2c(%rip), %rsi     # 0xb01fe
movl $0x3e, %edx
leaq 0x72a60(%rip), %rcx     # 0xb023e
callq 0x4270
cmpq $0x0, -0x20(%rbp)
je 0x3d82f
cmpq $0x0, -0x28(%rbp)
je 0x3d810
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x3df90
movq %rax, -0x8(%rbp)
jmp 0x3d871
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
callq 0x3e130
movq %rax, -0x8(%rbp)
jmp 0x3d871
cmpq $0x0, -0x28(%rbp)
je 0x3d855
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
callq 0x3e2b0
movq %rax, -0x8(%rbp)
jmp 0x3d871
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x3e420
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: hdiff_private::TCompressDetect::TCompressDetect()
TCompressDetect::TCompressDetect():m_table(0){
    m_mem.realloc(sizeof(TCharConvTable)+kCacheSize);
    m_table=(TCharConvTable*)m_mem.data();
    m_lastChar=0; //for clear TCharConvTable
    clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq %rdi, %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x29c00
movq -0x20(%rbp), %rdi
movq $0x0, 0x18(%rdi)
movl $0xc0408, %esi          # imm = 0xC0408
callq 0x301a0
jmp 0x3d8bc
movq -0x28(%rbp), %rdi
callq 0x29c40
movq %rax, -0x30(%rbp)
jmp 0x3d8cb
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq %rax, 0x18(%rdi)
movl $0x0, 0x20(%rdi)
callq 0x3d910
jmp 0x3d8e5
addq $0x30, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x29ca0
movq -0x10(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: hdiff_private::TCompressDetect::clear()
void TCompressDetect::clear(){
    if (m_lastChar>=0)
        memset(m_table,0,sizeof(TCharConvTable));
    m_lastChar=-1;
    m_lastPopChar=-1;
    m_cacheBegin=0;
    m_cacheEnd=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x20(%rax)
jl 0x3d93e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
movl $0x40408, %edx          # imm = 0x40408
callq 0x4210
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x24(%rax) # imm = 0xFFFFFFFF
movl $0x0, 0x28(%rax)
movl $0x0, 0x2c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: hdiff_private::TCompressDetect::add_chars(unsigned char const*, unsigned long, unsigned char const*)
void TCompressDetect::add_chars(const unsigned char* d,size_t n,const unsigned char* sub){
    if (n>kCacheSize+sizeof(TCharConvTable)){
        clear();
        size_t skip_n=n-kCacheSize;
        n=kCacheSize;
        d+=skip_n;
        if (sub) sub+=skip_n;
    }
    by_step(this->_add_rle);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x448(%rbp)
cmpq $0xc0408, -0x18(%rbp)   # imm = 0xC0408
jbe 0x3dd83
movq -0x448(%rbp), %rdi
callq 0x3d910
movq -0x18(%rbp), %rax
subq $0x80000, %rax          # imm = 0x80000
movq %rax, -0x28(%rbp)
movq $0x80000, -0x18(%rbp)   # imm = 0x80000
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3dd81
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x3dd83
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x3de59
movq $0x400, -0x438(%rbp) # imm = 0x400
movq -0x438(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x3ddb9
movq -0x18(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rax
movq %rax, -0x440(%rbp)
movq -0x10(%rbp), %rdi
movq -0x438(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x430(%rbp), %rcx
leaq -0x440(%rbp), %r8
callq 0x3d780
movq -0x448(%rbp), %rdi
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x440(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq -0x430(%rbp), %rsi
movq -0x440(%rbp), %rdx
callq 0x3d990
movq -0x438(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3de42
movq -0x438(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x438(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x3dd8b
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TDigestMatcher::getSearchThreadNum() const
size_t TDigestMatcher::getSearchThreadNum()const{
#if (_IS_USED_MULTITHREAD)
    const size_t threadNum=m_mtsets.threadNumForSearch;
    hpatch_StreamPos_t size=m_newData->streamSize;
    if ((threadNum>1)&&(m_oldData->streamSize>=m_kMatchBlockSize)
      &&(size>=kMinParallelSize)&&(size/2>=m_kMatchBlockSize)) {
        const hpatch_StreamPos_t maxThreanNum=size/(kMinParallelSize/2);
        return (threadNum<=maxThreanNum)?threadNum:(size_t)maxThreanNum;
    }else
#endif
    {
        return 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x80(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x18(%rbp)
jbe 0x3e672
movq -0x30(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rax), %rax
cmpq 0xc8(%rcx), %rax
jb 0x3e672
cmpq $0x200000, -0x20(%rbp)  # imm = 0x200000
jb 0x3e672
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
shrq %rax
cmpq 0xc8(%rcx), %rax
jb 0x3e672
movq -0x20(%rbp), %rax
shrq $0x14, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x3e660
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x3e668
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3e67a
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::blockIndexToPos(unsigned long, unsigned long, unsigned long long)
static hpatch_StreamPos_t blockIndexToPos(size_t index,size_t kMatchBlockSize,
                                          hpatch_StreamPos_t streamSize){
    hpatch_StreamPos_t pos=(hpatch_StreamPos_t)index * kMatchBlockSize;
    if (pos+kMatchBlockSize>streamSize)
        pos=streamSize-kMatchBlockSize;
    return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
imulq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x3ef47
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/../qsort_parallel.h
// Function: void sort_parallel<unsigned long, hdiff_private::TIndex_comp, 8192ul, 137ul>(unsigned long*, unsigned long*, hdiff_private::TIndex_comp, unsigned long)
static void sort_parallel(TValue* begin,TValue* end,TCmp cmp,size_t threadNum){
#if (_IS_USED_MULTITHREAD)
        const size_t size=end-begin;
        if ((threadNum>1)&&(size>=kMinQSortParallelSize)){
            const size_t maxThreanNum=size/(kMinQSortParallelSize/2);
            threadNum=(threadNum<=maxThreanNum)?threadNum:maxThreanNum;
            //std::random_shuffle(begin,end); //test shuffle befor parallel sort?
            _sort_parallel_thread<TValue,TCmp,kSampleSize>(begin,end,cmp,threadNum);
        }else
#endif
        {
            std::sort(begin,end,cmp);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x18(%rbp)
jbe 0x3f262
cmpq $0x2000, -0x20(%rbp)    # imm = 0x2000
jb 0x3f262
movq -0x20(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x3f207
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x3f20f
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x40510
jmp 0x3f2a7
movq -0x60(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x58(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x44c00
addq $0x80, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: void hdiff_private::_filter_insert<true>(hdiff_private::TBloomFilter<unsigned long>*, unsigned long const*, unsigned long const*)
static void _filter_insert(TBloomFilter<adler_hash_t>* filter,const adler_uint_t* begin,const adler_uint_t* end){
    while (begin!=end){
        adler_hash_t h=adler_to_hash(*begin++);
#if (_IS_USED_MULTITHREAD)
        if (isMT)
            filter->insert_MT(h);
        else
#endif
            filter->insert(h);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x404a8
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq (%rax), %rdi
callq 0x40500
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x43310
jmp 0x40474
addq $0x20, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::tryLink(hpatch_TCover const&, hpatch_TCover&, hdiff_private::TOldStreamCache&, hdiff_private::TNewStreamCache&)
static void tryLink(const TCover& lastCover,TCover& matchCover,
                        TOldStreamCache& oldStream,TNewStreamCache& newStream){
        if (lastCover.length<=0) return;
        hpatch_StreamPos_t linkOldPos=matchCover.newPos+lastCover.oldPos-lastCover.newPos;
        if (linkOldPos==matchCover.oldPos) return;
        newStream.TBlockStreamCache::resetPos(matchCover.newPos);
        hpatch_StreamPos_t matchedOldPos=linkOldPos;
        hpatch_StreamPos_t curEqLen=getMatchLength(oldStream,newStream,&matchedOldPos,
                                                   newStream.kMatchBlockSize,lastCover);
        size_t unlinkCost=getOldPosCost(matchCover.oldPos,lastCover);
        size_t unlinkCost_link=getOldPosCost(matchedOldPos,lastCover);
        if ((curEqLen>=kMinMatchedLength)
            &&(curEqLen+unlinkCost>=matchCover.length+unlinkCost_link)){
            matchCover.length=curEqLen;
            matchCover.oldPos=matchedOldPos;
            matchCover.newPos=matchCover.newPos-(linkOldPos-matchedOldPos);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
ja 0x41638
jmp 0x41716
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
addq (%rcx), %rax
movq -0x8(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x41665
jmp 0x41716
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x43c10
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x8(%rbp), %r8
leaq -0x30(%rbp), %rdx
callq 0x41830
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x41940
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x41940
movq %rax, -0x48(%rbp)
cmpq $0x10, -0x38(%rbp)
jb 0x41716
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
addq -0x48(%rbp), %rcx
cmpq %rcx, %rax
jb 0x41716
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
subq -0x30(%rbp), %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::getMatchLength(hdiff_private::TOldStreamCache&, hdiff_private::TNewStreamCache&, unsigned long long*, unsigned long, hpatch_TCover const&)
static hpatch_StreamPos_t getMatchLength(TOldStreamCache& oldStream,TNewStreamCache& newStream,
                                             hpatch_StreamPos_t* pOldPos,size_t kMatchBlockSize,
                                             const TCover& lastCover){
        if (oldStream.resetPos(*pOldPos)&&
            (0==memcmp(oldStream.data(),newStream.data(),kMatchBlockSize))){
            const hpatch_StreamPos_t newPos=newStream.pos();
            size_t feq_len=oldStream.forward_equal_length(newStream);
            if (newPos-feq_len<lastCover.newPos+lastCover.length)
                feq_len=(size_t)(newPos-(lastCover.newPos+lastCover.length));
            hpatch_StreamPos_t beq_len=oldStream.loop_backward_equal_length(newStream);
            *pOldPos=(*pOldPos)-feq_len;
            return feq_len+kMatchBlockSize+beq_len;
        }else{
            return 0;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x4aa70
testb $0x1, %al
jne 0x41865
jmp 0x41922
movq -0x10(%rbp), %rdi
callq 0x425f0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x425f0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x4190
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x41922
movq -0x18(%rbp), %rdi
callq 0x497d0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4aac0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x30(%rbp), %rdx
addq 0x10(%rdx), %rcx
cmpq %rcx, %rax
jae 0x418ed
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x30(%rbp), %rdx
addq 0x10(%rdx), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4aba0
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
subq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
addq -0x28(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4192a
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TStreamCache::resetPos(unsigned long, unsigned long long, unsigned long)
inline bool resetPos(size_t kBackupCacheSize,hpatch_StreamPos_t streamPos,size_t kMinCacheDataSize){
        if (_is_hit_cache(kBackupCacheSize,streamPos,kMinCacheDataSize)){
            cachePos=cacheSize-(size_t)(m_readPosEnd-streamPos);
            return true; //hit cache
        }
        return _resetPos_continue(kBackupCacheSize,streamPos,kMinCacheDataSize);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x42a90
testb $0x1, %al
jne 0x425a7
jmp 0x425c4
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rcx
movq 0x10(%rax), %rdx
subq -0x20(%rbp), %rdx
subq %rdx, %rcx
movq %rcx, 0x30(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x425de
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x42ae0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h
// Function: hdiff_private::TBloomFilter<unsigned long>::_hash2_64(unsigned long)
static size_t _hash2_64(T key){
        key = (~key) + (key << 18); // key = (key << 18) - key - 1;
        key = key ^ (key >> 31);
        key = key * 21; // key = (key + (key << 2)) + (key << 4);
        key = key ^ (key >> 11);
        key = key + (key << 6);
        key = key ^ (key >> 22);
        return (size_t)key;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
xorq $-0x1, %rax
movq -0x8(%rbp), %rcx
shlq $0x12, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shrq $0x1f, %rcx
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
imulq $0x15, -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shrq $0xb, %rcx
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shrq $0x16, %rcx
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: bool hdiff_private::TIndex_comp::operator()<unsigned long>(unsigned long, unsigned long) const
inline bool operator()(TIndex x,TIndex y)const {
        adler_uint_t xd=blocks[x];
        adler_uint_t yd=blocks[y];
        if (xd!=yd)
            return xd<yd;
        else
            return _cmp(x+1,y+1,n,kMaxDeep,blocks);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq (%rax), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, -0x28(%rbp)
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x44f06
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
setb %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x44f2f
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
movq (%rax), %r8
callq 0x45bb0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: bool hdiff_private::TIndex_comp::_cmp<unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long const*)
static bool _cmp(TIndex x,TIndex y,size_t n,size_t kMaxDeep,
                     const adler_uint_t* blocks) {
        if (x!=y) {} else{ return false; }
        size_t deep=n-((x>y)?x:y);
        deep=(deep<=kMaxDeep)?deep:kMaxDeep;
        for (size_t i=0;i<deep;++i){
            adler_uint_t xd=blocks[x++];
            adler_uint_t yd=blocks[y++];
            if (xd!=yd)
                return xd<yd;
        }
        return x>y;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x45bd4
jmp 0x45bdd
movb $0x0, -0x1(%rbp)
jmp 0x45cb8
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x45bf9
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x45c01
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x45c24
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x45c2c
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x45ca8
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x45c98
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
setb %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x45cb8
jmp 0x45c9a
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x45c3c
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
seta %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TNewStreamCache::roll()
inline bool roll(){
        //warning: after running _loop_backward_cache(),cache roll logic is failure
        if (dataLength()>kMatchBlockSize){
            const unsigned char* cur_datas=data();
            roll_digest=adler_roll(roll_digest,kMatchBlockSize,cur_datas[0],cur_datas[kMatchBlockSize]);
            ++cachePos;
            return true;
        }else{
            if (!TBlockStreamCache::resetPos(pos()+1)) return false;
            --cachePos;
            return roll();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x49800
movq -0x20(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0x496d3
movq -0x20(%rbp), %rdi
callq 0x425f0
movq -0x20(%rbp), %rcx
movq %rax, -0x18(%rbp)
movq 0x48(%rcx), %rdi
movq 0x40(%rcx), %rsi
movq -0x18(%rbp), %rax
movb (%rax), %dl
movq -0x18(%rbp), %rax
movq 0x40(%rcx), %rcx
movzbl %dl, %edx
movzbl (%rax,%rcx), %ecx
callq 0x41760
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x48(%rax)
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x49710
movq -0x20(%rbp), %rdi
callq 0x497d0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
callq 0x43c10
testb $0x1, %al
jne 0x496f6
movb $0x0, -0x1(%rbp)
jmp 0x49710
movq -0x20(%rbp), %rdi
movq 0x30(%rdi), %rax
addq $-0x1, %rax
movq %rax, 0x30(%rdi)
callq 0x49660
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TBlockStreamCache::forward_equal_length(hdiff_private::TBlockStreamCache const&) const
size_t forward_equal_length(const TBlockStreamCache& y)const{
        size_t y_len=(size_t)(y.pos()-y.m_readPos);
        size_t len=(size_t)(pos()-m_readPos);
        len=(len<y_len)?len:y_len;
        const unsigned char* px=data();
        const unsigned char* py=y.data();
        size_t i=0;
        for (;i<len;++i){
            if (*(--px) != *(--py)) break;
        }
        return i;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x497d0
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x18(%rbp)
callq 0x497d0
movq -0x40(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x4ab16
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x4ab1e
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x425f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x425f0
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x4ab8e
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rbp)
movzbl -0x1(%rax), %eax
movq -0x30(%rbp), %rcx
movq %rcx, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rbp)
movzbl -0x1(%rcx), %ecx
cmpl %ecx, %eax
je 0x4ab7e
jmp 0x4ab8e
jmp 0x4ab80
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4ab48
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TOldStreamCache::loop_backward_equal_length(hdiff_private::TBlockStreamCache&)
hpatch_StreamPos_t loop_backward_equal_length(TBlockStreamCache& y){
        if (!_loop_backward_cache(kMatchBlockSize,1)) return 0;
        if (!y._loop_backward_cache(kMatchBlockSize,1)) return 0;
        hpatch_StreamPos_t eq_len=0;
        while(true){
            const size_t xLen=dataLength();
            size_t len=y.dataLength();
            len=(len>=xLen)?xLen:len;
            const unsigned char* px=data();
            const unsigned char* py=y.data();
            for (size_t i=0;i<len;++i){
                if (px[i]!=py[i])
                    return eq_len+i;
            }
            eq_len+=len;
            if ((len==xLen)&(cacheSize<maxCacheSize))
                _doGrowCacheSize();
            if (!_loop_backward_cache(len,1)) break;
            if (!y._loop_backward_cache(len,1)) break;
        }
        return eq_len;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movq 0x40(%rdi), %rsi
movl $0x1, %edx
callq 0x4adc0
testb $0x1, %al
jne 0x4abd7
movq $0x0, -0x8(%rbp)
jmp 0x4ad2b
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rdi
movq 0x40(%rax), %rsi
movl $0x1, %edx
callq 0x4adc0
testb $0x1, %al
jne 0x4abfe
movq $0x0, -0x8(%rbp)
jmp 0x4ad2b
movq $0x0, -0x20(%rbp)
movq -0x50(%rbp), %rdi
callq 0x49800
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x49800
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x4ac34
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x4ac3c
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x425f0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x425f0
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x4acad
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4ac9d
movq -0x20(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4ad2b
jmp 0x4ac9f
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x4ac66
movq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movq 0x28(%rdx), %rcx
cmpq 0x50(%rdx), %rcx
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x4acee
movq -0x50(%rbp), %rdi
callq 0x4ae10
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0x4adc0
testb $0x1, %al
jne 0x4ad06
jmp 0x4ad23
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0x4adc0
testb $0x1, %al
jne 0x4ad1e
jmp 0x4ad23
jmp 0x4ac06
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TOldStreamCache::_doMinCacheSize()
inline void _doMinCacheSize(){
        cache    +=cacheSize-minCacheSize;
        cacheSize=minCacheSize;
        cachePos =minCacheSize;
        m_readPos=(cachedLength()<=cacheSize)?m_readPos:m_readPosEnd-cacheSize;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movq 0x28(%rdi), %rax
subq 0x48(%rdi), %rax
addq 0x20(%rdi), %rax
movq %rax, 0x20(%rdi)
movq 0x48(%rdi), %rax
movq %rax, 0x28(%rdi)
movq 0x48(%rdi), %rax
movq %rax, 0x30(%rdi)
callq 0x43220
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
ja 0x4ad91
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x4ada1
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rax
subq 0x28(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TOldStreamCache::_doGrowCacheSize()
inline void _doGrowCacheSize(){
        const size_t growSize=(cacheSize*2<=maxCacheSize)?cacheSize:(maxCacheSize-cacheSize);
        cache    -=growSize;
        cacheSize+=growSize;
        cachePos +=growSize;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x28(%rcx), %rax
shlq %rax
cmpq 0x50(%rcx), %rax
ja 0x4ae3b
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x4ae4b
movq -0x18(%rbp), %rcx
movq 0x50(%rcx), %rax
subq 0x28(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq 0x20(%rax), %rcx
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rcx
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TCompressedStream::TCompressedStream(hpatch_TStreamOutput const*, unsigned long long, unsigned long long)
TCompressedStream::TCompressedStream(const hpatch_TStreamOutput*  _out_code,
                                     hpatch_StreamPos_t _writePos,hpatch_StreamPos_t _kLimitOutCodeSize)
:out_code(_out_code),out_pos(_writePos),out_posLimitEnd(_writePos+_kLimitOutCodeSize),
_writeToPos_back(0),_is_overLimit(false){
    this->streamImport=this;
    this->streamSize=0;
    this->read_writed=0;
    this->write=_write_code;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq $0x0, 0x38(%rax)
movb $0x0, 0x40(%rax)
movq %rax, (%rax)
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
leaq 0x6(%rip), %rcx         # 0x4c500
movq %rcx, 0x18(%rax)
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TCompressedStream::_write_code(hpatch_TStreamOutput const*, unsigned long long, unsigned char const*, unsigned char const*)
hpatch_BOOL TCompressedStream::_write_code(const hpatch_TStreamOutput* stream,hpatch_StreamPos_t writeToPos,
                                           const unsigned char* data,const unsigned char* data_end){
    assert(data<data_end);
    TCompressedStream* self=(TCompressedStream*)stream->streamImport;
    checki(self->_writeToPos_back==writeToPos,"TCompressedStream::write() writeToPos error!");
    size_t dataLen=(size_t)(data_end-data);
    self->_writeToPos_back=writeToPos+dataLen;
    
    if ((self->_is_overLimit)||(self->out_pos+dataLen>self->out_posLimitEnd)){
        self->_is_overLimit=true;
    }else{
        if (!self->out_code->write(self->out_code,self->out_pos,data,data_end)) return hpatch_FALSE;
        self->out_pos+=dataLen;
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x4c524
jmp 0x4c543
leaq 0x64402(%rip), %rdi     # 0xb092d
leaq 0x64409(%rip), %rsi     # 0xb093b
movl $0x41, %edx
leaq 0x6444d(%rip), %rcx     # 0xb098b
callq 0x4270
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x4c5af
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
leaq 0x644b5(%rip), %rsi     # 0xb0a2c
callq 0x4140
jmp 0x4c57e
movq -0x50(%rbp), %rdi
movq 0x99a67(%rip), %rsi     # 0xe5ff0
movq 0x99a30(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x42e0
jmp 0x4c64c
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rcx
addq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rax
testb $0x1, 0x40(%rax)
jne 0x4c5ee
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
addq -0x48(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jbe 0x4c5f8
movq -0x30(%rbp), %rax
movb $0x1, 0x40(%rax)
jmp 0x4c63c
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x4c62c
movl $0x0, -0x4(%rbp)
jmp 0x4c643
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)