LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: int const* hdiff_private::(anonymous namespace)::_lower_bound<int>(int const*, int const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long)
inline static const T* _lower_bound(const T* rbegin,const T* rend,
                                        const TChar* str,const TChar* str_end,
                                        const TChar* src_begin,const TChar* src_end,
                                        size_t min_eq=0){
#ifdef _SA_MATCHBY_STD_LOWER_BOUND
        return std::lower_bound<const T*,StringToken,const TSuffixString_compare&>
                    (rbegin,rend,StringToken(str,str_end),TSuffixString_compare(src_begin,src_end));
#else
        size_t left_eq=min_eq;
        size_t right_eq=min_eq;
        while (size_t len=(size_t)(rend-rbegin)) {
            const T* mid=__select_mid(rbegin,len);
            size_t eq_len=(left_eq<=right_eq)?left_eq:right_eq;
            const TChar* vs=str+eq_len;
            const TChar* ss=src_begin+(*mid)+eq_len;
            bool is_less;
            while (true) {
                if (vs==str_end) { is_less=false; break; };
                if (ss==src_end) { is_less=true;  break; };
                TInt sub=(*ss)-(*vs);
                if (!sub) {
                    ++vs;
                    ++ss;
                    ++eq_len;
                    const int kMaxCmpLength_forLimitRangeDiff=1024*8; 
                    if (eq_len<kMaxCmpLength_forLimitRangeDiff) //only for optimize limitRange match speed
                        continue;
                    else
                        return mid;
                }else{
                    is_less=(sub<0);
                    break;
                }
            }
            if (is_less){
                left_eq=eq_len;
                rbegin=mid+1;
            }else{
                right_eq=eq_len;
                rend=mid;
            }
        }
        return rbegin;
#endif
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rax
movq 0x38(%rsp), %r10
movq %rcx, %rdi
subq %rdx, %rdi
movq %r10, %r11
movq %r10, %r14
movq %rsi, %rbx
movq %rbx, %r15
subq %rax, %r15
je 0x189e6
movq %rbx, %rsi
movq %r14, %r10
sarq %r15
andq $-0x4, %r15
leaq (%rax,%r15), %rbx
cmpq %r14, %r11
cmovbq %r11, %r14
movslq (%rax,%r15), %r15
addq %r8, %r15
leaq (%rdx,%r14), %r12
leaq (%r15,%r14), %r13
cmpq %rcx, %r12
je 0x189c8
cmpq %r9, %r13
je 0x189d1
movb (%r12), %bpl
cmpb %bpl, (%r13)
jne 0x189cd
incq %r14
cmpq $0x2000, %r14           # imm = 0x2000
jb 0x1899e
jmp 0x189e3
movq %rdi, %r14
jmp 0x18977
jae 0x18977
jmp 0x189d7
movq %r9, %r14
subq %r15, %r14
addq $0x4, %rbx
movq %rbx, %rax
movq %r14, %r11
jmp 0x18971
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x1f(%rsi), %r15
movq %r15, %rbx
shrq $0x5, %rbx
cmpq %rsi, 0x8(%rdi)
jne 0x18b92
cmpq $0x20, %r15
jb 0x18bad
movq (%r14), %rdi
shlq $0x2, %rbx
jmp 0x18bc5
movq %rsi, 0x8(%r14)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x18ba7
callq 0x4400
andq $0x0, (%r14)
cmpq $0x20, %r15
jae 0x18bb3
popq %rbx
popq %r14
popq %r15
retq
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x4030
movq %rax, (%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x41f0
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq %rdi, %rax
shrq $0x10, %rax
xorq %rdi, %rax
xorq $0x3d, %rax
leaq (%rax,%rax,8), %rax
movq %rax, %rcx
shrq $0x4, %rcx
xorq %rax, %rcx
imulq $0x27d4eb2d, %rcx, %rcx # imm = 0x27D4EB2D
movq %rcx, %rax
shrq $0xf, %rax
xorq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
cmpq $0x2, %rsi
jbe 0x190f6
movq %rsi, %rax
mulq %rdi
jo 0x19112
pushq $0xa
popq %rcx
pushq $0x1
popq %rsi
movq %rsi, %rdx
shlq %cl, %rdx
cmpq $0x3e, %rcx
ja 0x190e8
incq %rcx
cmpq %rax, %rdx
jb 0x190d4
decq %rdx
movq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x38a99(%rip), %rsi     # 0x51ba1
movq %rax, %rdi
callq 0x4120
jmp 0x1912c
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x38aab(%rip), %rsi     # 0x51bcf
movq %rax, %rdi
callq 0x4120
movq 0x5beb5(%rip), %rsi     # 0x74fe8
movq 0x5be7e(%rip), %rdx     # 0x74fb8
movq %rbx, %rdi
callq 0x45b0
jmp 0x19144
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
testq %r8, %r8
je 0x1928e
cmpq %rsi, (%r8)
jb 0x192b5
testq %rdx, %rdx
je 0x192a3
testq %rcx, %rcx
jne 0x19673
xorl %ecx, %ecx
jmp 0x19713
xorl %edx, %edx
testq %rcx, %rcx
jne 0x197a0
xorl %ecx, %ecx
jmp 0x19819
pushq %rax
leaq 0x389c3(%rip), %rdi     # 0x51c80
leaq 0x389e6(%rip), %rsi     # 0x51caa
leaq 0x38a1f(%rip), %rcx     # 0x51cea
pushq $0x3e
popq %rdx
callq 0x4230
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x11e94
andq $0x0, 0x18(%rbx)
movl $0xc0408, %esi          # imm = 0xC0408
movq %rbx, %rdi
callq 0x139d4
movq (%rbx), %rax
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19322
movq %rax, %r14
movq %rbx, %rdi
callq 0x13a5c
movq %r14, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
cmpl $0x0, 0x20(%rdi)
js 0x1933c
movq 0x18(%rbx), %rdi
movl $0x40408, %edx          # imm = 0x40408
xorl %esi, %esi
callq 0x41f0
movsd 0x3892c(%rip), %xmm0    # 0x51c70
movups %xmm0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: hdiff_private::TCompressDetect::_add_rle(unsigned char const*, unsigned long)
void TCompressDetect::_add_rle(const unsigned char* d,size_t n){
    if (m_lastChar<0){
        if (n==0) return;
        m_lastChar=d[0];
        ++m_table->sum1char[m_lastChar];
        ++d;
        --n;
    }
    for (size_t i=0;i<n;++i) {
        unsigned char cur=d[i];
        ++m_table->sum1char[cur];
        ++m_table->sum2char[m_lastChar*256+cur];
        m_lastChar=cur;
        
        if (m_table->sum==kCacheSize){
            --m_table->sum;
            unsigned char pop=m_table->cache[m_cacheBegin++];
            if (m_cacheBegin==kCacheSize) m_cacheBegin=0;
            --m_table->sum1char[pop];
            if (m_lastPopChar>=0){
                --m_table->sum2char[m_lastPopChar*256+pop];
            }
            m_lastPopChar=pop;
        }
        ++m_table->sum;
        m_table->cache[m_cacheEnd++]=cur;
        if (m_cacheEnd==kCacheSize) m_cacheEnd=0;
    }
}

// Assembly:
cmpl $0x0, 0x20(%rdi)
jns 0x19373
testq %rdx, %rdx
je 0x19437
movzbl (%rsi), %eax
movl %eax, 0x20(%rdi)
movq 0x18(%rdi), %rcx
incl 0x4(%rcx,%rax,4)
incq %rsi
decq %rdx
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %rdx
je 0x19437
movzbl (%rsi,%rcx), %r8d
movq 0x18(%rdi), %r9
leal (,%r8,4), %r10d
incl 0x4(%r9,%r10)
movslq 0x20(%rdi), %r11
shlq $0xa, %r11
orq %r10, %r11
incl 0x404(%r9,%r11)
movl %r8d, 0x20(%rdi)
movl (%r9), %r10d
cmpl $0x80000, %r10d         # imm = 0x80000
jne 0x19408
movl $0x7ffff, (%r9)         # imm = 0x7FFFF
movl 0x28(%rdi), %r10d
leal 0x1(%r10), %r11d
movl %r11d, 0x28(%rdi)
movzbl 0x40404(%r9,%r10), %r10d
cmpl $0x80000, %r11d         # imm = 0x80000
cmovel %eax, %r11d
movl %r11d, 0x28(%rdi)
decl 0x4(%r9,%r10,4)
movl 0x24(%rdi), %r11d
testl %r11d, %r11d
js 0x19401
shll $0x8, %r11d
orl %r10d, %r11d
decl 0x404(%r9,%r11,4)
movl %r10d, 0x24(%rdi)
movl (%r9), %r10d
incl %r10d
movl %r10d, (%r9)
movl 0x2c(%rdi), %r10d
leal 0x1(%r10), %r11d
movl %r11d, 0x2c(%rdi)
movb %r8b, 0x40404(%r9,%r10)
cmpl $0x80000, 0x2c(%rdi)    # imm = 0x80000
jne 0x1942f
andl $0x0, 0x2c(%rdi)
incq %rcx
jmp 0x19377
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: hdiff_private::TCompressDetect::_cost_rle(unsigned char const*, unsigned long) const
size_t TCompressDetect::_cost_rle(const unsigned char* d,size_t n)const{
    //assert(kCacheSize*2^(kCompressDetectMaxBit-1)<2^32);
    const unsigned int kCompressDetectDivBit=12;
    const unsigned int kCompressDetectMaxBit=12;
    if (n==0) return 0;
    if (m_lastChar<0) return n;
    size_t        codeSize=0;
    unsigned char last=m_lastChar;
    for (size_t i=0;i<n;++i) {
        unsigned char cur=d[i];
        size_t rab=m_table->sum2char[last*256+cur];
        size_t ra =1+m_table->sum1char[last];
        last=cur;
        if ((rab<<(kCompressDetectMaxBit-1))>ra){
            if ((rab<<8)<ra) { rab<<=8; codeSize+=8; }
            if ((rab<<4)<ra) { rab<<=4; codeSize+=4; }
            if ((rab<<2)<ra) { rab<<=2; codeSize+=2; }
            if ((rab<<1)<ra) { codeSize+=1; }
            ++codeSize;
        }else{
            codeSize+=kCompressDetectMaxBit;
        }
    }
    return (codeSize+((kCompressDetectDivBit>>1)+1))/kCompressDetectDivBit;
}

// Assembly:
testq %rdx, %rdx
je 0x1950a
movq %rdx, %rax
movl 0x20(%rdi), %r9d
testl %r9d, %r9d
js 0x19509
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rdx
xorl %ecx, %ecx
xorl %edi, %edi
cmpq %rdi, %rax
je 0x194f0
movzbl (%rsi,%rdi), %r8d
movzbl %r9b, %r10d
movl 0x4(%rdx,%r10,4), %r9d
shll $0xa, %r10d
leal (%r10,%r8,4), %r10d
movl 0x404(%rdx,%r10), %r10d
incl %r9d
movq %r10, %r11
shlq $0xb, %r11
cmpq %r9, %r11
jbe 0x194e1
movq %r10, %r11
shlq $0x8, %r11
leaq 0x8(%rcx), %rbx
cmpq %r9, %r11
cmovaeq %rcx, %rbx
cmovaeq %r10, %r11
movq %r11, %r10
shlq $0x4, %r10
leaq 0x4(%rbx), %r14
cmpq %r9, %r10
cmovaeq %rbx, %r14
cmovaeq %r11, %r10
leaq (,%r10,4), %r11
leaq 0x2(%r14), %rcx
cmpq %r9, %r11
cmovaeq %r14, %rcx
cmovbq %r11, %r10
addq %r10, %r10
cmpq %r9, %r10
adcq $0x1, %rcx
jmp 0x194e5
addq $0xc, %rcx
incq %rdi
movl %r8d, %r9d
jmp 0x1945c
addq $0x7, %rcx
movabsq $0xc, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpq $0xc0409, %rdx          # imm = 0xC0409
jb 0x1955b
movq %r15, %rdi
callq 0x19322
addq %r12, %r14
addq $-0x80000, %r14         # imm = 0xFFF80000
testq %rbx, %rbx
leaq -0x80000(%rbx,%r12), %rax
cmovneq %rax, %rbx
movl $0x80000, %r12d         # imm = 0x80000
leaq 0x10(%rsp), %r13
testq %r12, %r12
je 0x195b4
movl $0x400, %eax            # imm = 0x400
cmpq %rax, %r12
movl $0x400, %ebp            # imm = 0x400
cmovbq %r12, %rbp
movq %rbp, 0x8(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r13, %rcx
leaq 0x8(%rsp), %r8
callq 0x19284
movq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x19350
addq %rbp, %r14
leaq (%rbx,%rbp), %rax
testq %rbx, %rbx
cmovneq %rax, %rbx
subq %rbp, %r12
jmp 0x19560
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: unsigned long hdiff_private::_getRegionRleCost<true, true>(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){
        size_t bufi=0;
        size_t i=0;
        size_t cost=0;
        while ((i<n)&&(d[i]==(is_sub_on?sub[i]:0)))
            ++i;
        while(i<n){
            unsigned char v=(is_sub_on?(unsigned char)(d[i]-sub[i]):d[i]);
            size_t i0=i; ++i;
            while ((i<n)&&(v==(is_sub_on?(unsigned char)(d[i]-sub[i]):d[i])))
                ++i;
            if ((v==0)|(v==255)){
                ++cost;
            }else{
                cost+=(i-i0<=1)?1:2;
                if (is_out_on)
                    out_nocompress[bufi++]=v;
            }
        }
        if (nocompressSize) *nocompressSize=bufi;
        return cost;
    }

// Assembly:
xorl %r10d, %r10d
cmpq %r10, %rsi
je 0x1968a
movb (%rdi,%r10), %al
cmpb (%rdx,%r10), %al
jne 0x1968d
incq %r10
jmp 0x19676
movq %rsi, %r10
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %r9d, %r9d
xorl %eax, %eax
cmpq %rsi, %r10
jae 0x19704
movb (%rdi,%r10), %bpl
movb (%rdx,%r10), %r14b
movl %ebp, %ebx
subb %r14b, %bl
leaq 0x1(%r10), %r11
cmpq %rsi, %r11
jae 0x196c8
movb (%rdi,%r11), %r15b
subb (%rdx,%r11), %r15b
incq %r11
cmpb %r15b, %bl
je 0x196ae
decq %r11
jmp 0x196cb
movq %rsi, %r11
cmpb %r14b, %bpl
setne %bpl
cmpb $-0x1, %bl
setne %r14b
testb %r14b, %bpl
jne 0x196e6
incq %rax
movq %r11, %r10
jmp 0x19698
movq %r11, %r14
subq %r10, %r14
cmpq $0x2, %r14
sbbq $0x0, %rax
addq $0x2, %rax
movb %bl, (%rcx,%r9)
incq %r9
movq %r11, %r10
jmp 0x19698
testq %r8, %r8
popq %rbx
popq %r14
popq %r15
popq %rbp
je 0x19712
movq %r9, (%r8)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq 0x80(%rdi), %rcx
cmpq $0x2, %rcx
jb 0x19904
movq (%rdi), %rax
movq 0xc8(%rdi), %rdx
cmpq %rdx, 0x8(%rax)
jb 0x19904
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
cmpq $0x200000, %rax         # imm = 0x200000
jb 0x19904
movq %rax, %rsi
shrq %rsi
cmpq %rdx, %rsi
jb 0x19904
shrq $0x14, %rax
cmpq %rax, %rcx
cmovbq %rcx, %rax
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TDigestMatcher::_search_cover_thread(hpatch_TOutputCovers*, unsigned char*, void*)
void TDigestMatcher::_search_cover_thread(hpatch_TOutputCovers* out_covers,
                                          unsigned char* pmem,void* mt_data){
#if (_IS_USED_MULTITHREAD)
    const size_t kPartPepeatSize=m_kMatchBlockSize-1;
    mt_data_t& mt=*(mt_data_t*)mt_data;
    const uint_work workCount=mt.workCount;
    const hpatch_StreamPos_t rollCount=m_newData->streamSize-(m_kMatchBlockSize-1);
    std::atomic<uint_work>& workIndex=*(std::atomic<uint_work>*)&mt.workIndex;
    while (true){
        uint_work curWorkIndex=workIndex++;
        if (curWorkIndex>=workCount) break;
        hpatch_StreamPos_t new_begin=rollCount*curWorkIndex/workCount;
        hpatch_StreamPos_t new_end=(curWorkIndex+1<workCount)?rollCount*(curWorkIndex+1)/workCount:rollCount;
        assert(new_end+kPartPepeatSize<=m_newData->streamSize);
        TStreamInputClip newClip;
        TStreamInputClip_init(&newClip,m_newData,new_begin,new_end+kPartPepeatSize);
        _search_cover(&newClip.base,new_begin,out_covers,pmem,
                      mt.newDataLocker.locker,mt.dataLocker.locker);
    }
#endif 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
movq 0x8(%rdi), %rax
movq 0xc8(%rdi), %rcx
decq %rcx
movq 0x10(%rbx), %r15
movq 0x8(%rax), %r14
movq %rcx, 0x20(%rsp)
subq %rcx, %r14
leaq 0x28(%rsp), %r13
pushq $0x1
popq %rcx
lock
xaddq %rcx, 0x18(%rbx)
cmpq %r15, %rcx
jae 0x1ae64
movq %rcx, %rax
imulq %r14, %rax
xorl %edx, %edx
divq %r15
movq %rax, %rbp
incq %rcx
movq %r14, %rax
cmpq %r15, %rcx
jae 0x1ae21
imulq %r14, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r15
addq 0x20(%rsp), %rax
movq 0x8(%r12), %rsi
cmpq 0x8(%rsi), %rax
ja 0x1ae73
movq %r13, %rdi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x3ac32
movq (%rbx), %r9
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
callq 0x19e6c
jmp 0x1aded
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x36fe1(%rip), %rdi     # 0x51e5b
leaq 0x36f03(%rip), %rsi     # 0x51d84
leaq 0x37002(%rip), %rcx     # 0x51e8a
movl $0x2ce, %edx            # imm = 0x2CE
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq %rbx, %r14
je 0x1b092
movq (%r14), %rsi
addq $0x8, %r14
movq %r15, %rdi
callq 0x1bbf2
jmp 0x1b07c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/../qsort_parallel.h
// Function: void _sort_parallel_thread<unsigned long, hdiff_private::TIndex_comp, 137ul>(unsigned long*, unsigned long*, hdiff_private::TIndex_comp, unsigned long)
static void _sort_parallel_thread(TValue* begin,TValue* end,TCmp cmp,size_t threadNum){
        if (threadNum>1){
            const size_t rightWeight=(threadNum>>1);
            const size_t leftWeight=threadNum-rightWeight;
            TValue* mid;
            const bool _kIsPartitionNotMerge=true;
            if (_kIsPartitionNotMerge){ // partition
                //mid=begin+__index_by_ratio(size,leftWeight,threadNum); std::nth_element(begin,mid,end,cmp); //for test 
                //mid=std::_Partition_by_median_guess_unchecked(begin, end, cmp).first; //for test by vc
                mid=_sort_parallel_partition<TValue,TCmp,kSampleSize>(begin,end,cmp,leftWeight,rightWeight);
            }else{
                mid=begin+__index_by_ratio(end-begin,leftWeight,threadNum);
            }

            std::thread threadRight(_sort_parallel_thread<TValue,TCmp,kSampleSize>,
                                    mid,end,cmp,rightWeight);
            _sort_parallel_thread<TValue,TCmp,kSampleSize>(begin,mid,cmp,leftWeight);
            threadRight.join();
            
            if (!_kIsPartitionNotMerge){ //merge
                std::inplace_merge(begin,mid,end,cmp);
            }
        }else{
            std::sort(begin,end,cmp);
            //printf("parallel sort size: %" PRIu64 " \n",(hpatch_StreamPos_t)(end-begin));
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq %rsi, 0x28(%rsp)
cmpq $0x2, %rdx
jb 0x1b157
movq %rdx, %rbx
leaq 0x70(%rsp), %r15
movq %rdx, %rcx
shrq %rcx
leaq 0x38(%rsp), %r12
movq %rcx, (%r12)
subq %rcx, %rbx
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1b181
leaq 0x30(%rsp), %r13
movq %rax, (%r13)
leaq -0x65(%rip), %rsi       # 0x1b098
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq %r13, %rdx
movq %r15, %r8
movq %r12, %r9
callq 0x1c17c
movq (%r13), %rsi
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1b098
leaq 0x20(%rsp), %rdi
callq 0x45a0
leaq 0x20(%rsp), %rdi
callq 0x11f70
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1c8a3
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x11f70
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/../qsort_parallel.h
// Function: unsigned long* _sort_parallel_partition<unsigned long, hdiff_private::TIndex_comp, 137ul>(unsigned long*, unsigned long*, hdiff_private::TIndex_comp, unsigned long, unsigned long)
static TValue* _sort_parallel_partition(TValue* begin,TValue* end,TCmp cmp,
                                             size_t leftWeight=1,size_t rightWeight=1){
        const size_t size=end-begin;
        size_t samples[kSampleSize];
        const size_t _kIndexStep=size/kSampleSize+1;
        size_t curIndex=0;
        for(size_t i=0;i<kSampleSize;i++,curIndex+=_kIndexStep){
            size_t ri=(curIndex+(size_t)rand()) % size;  //multi thread safe
            samples[i]=ri;
        }
        const bool _kIsSortNotNth=false;
        if (_kIsSortNotNth) std::sort(samples,samples+kSampleSize,_sort_parallel_TCmpi<TValue,TCmp>(begin,cmp));
        size_t _pivot_i=__index_by_ratio(kSampleSize,leftWeight,(leftWeight+rightWeight));
        if (!_kIsSortNotNth) std::nth_element(samples,samples+_pivot_i,samples+kSampleSize,_sort_parallel_TCmpi<TValue,TCmp>(begin,cmp));
        size_t pivot=samples[_pivot_i];
        std::swap(begin[0],begin[pivot]);
        TValue x(begin[0]);
        size_t mid=0;
        for (size_t i=mid+1;i<size;++i){
            if (cmp(begin[i],x))
                std::swap(begin[++mid],begin[i]);
        }
        std::swap(begin[0],begin[mid]);
        return begin+mid;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x490(%rsp), %r15
subq %rdi, %r14
sarq $0x3, %r14
xorl %r13d, %r13d
movl $0x89, %ecx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %rbp
incq %rbp
xorl %r12d, %r12d
cmpq $0x89, %r12
je 0x1b1ee
callq 0x40b0
cltq
addq %r13, %rax
xorl %edx, %edx
divq %r14
movq %rdx, 0x10(%rsp,%r12,8)
incq %r12
addq %rbp, %r13
jmp 0x1b1c9
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
addq %rax, %rcx
imulq $0x89, %rax, %rax
xorl %r13d, %r13d
xorl %edx, %edx
divq %rcx
leaq (%rsp,%rax,8), %r12
addq $0x10, %r12
leaq 0x458(%rsp), %rdx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rcx
movq %r15, %r8
callq 0x1c221
movq (%r12), %rax
movq (%rbx), %rcx
movq (%rbx,%rax,8), %rdx
movq %rdx, (%rbx)
movq %rcx, (%rbx,%rax,8)
movq (%rbx), %r12
pushq $0x1
popq %rbp
cmpq %r14, %rbp
jae 0x1b276
movq (%rbx,%rbp,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x1c254
testb %al, %al
je 0x1b271
movq 0x8(%rbx,%r13,8), %rax
movq (%rbx,%rbp,8), %rcx
movq %rcx, 0x8(%rbx,%r13,8)
incq %r13
movq %rax, (%rbx,%rbp,8)
incq %rbp
jmp 0x1b244
leaq (%rbx,%r13,8), %rax
movq (%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rbx)
movq %rcx, (%rax)
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpq $0x0, 0x10(%rdi)
je 0x1b532
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rsi
movq (%rdi), %rbp
addq %rsi, %rbp
subq 0x8(%rdi), %rbp
cmpq (%rbx), %rbp
je 0x1b524
movq %rcx, %r15
movq %rdx, %r12
movq %rcx, %rdi
callq 0x1bdc6
movq %rsp, %rdx
movq %rbp, (%rdx)
movq 0x40(%r15), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %r8
callq 0x1b533
cmpq $0x10, %rax
jb 0x1b524
movq %rax, %r15
movq (%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1b5d7
movq %rax, %r13
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x1b5d7
addq %r15, %rax
addq 0x10(%rbx), %r13
cmpq %r13, %rax
jb 0x1b524
movq %r15, 0x10(%rbx)
movq %r12, (%rbx)
subq %rbp, %r12
addq %r12, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdx), %rsi
callq 0x1e334
testb %al, %al
je 0x1b57a
movq 0x20(%r12), %rdi
addq 0x30(%r12), %rdi
movq 0x30(%r15), %r13
movq 0x20(%r15), %rsi
addq %r13, %rsi
movq %rbx, %rdx
callq 0x4350
testl %eax, %eax
je 0x1b58b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, (%rsp)
movq 0x10(%r15), %rbp
subq 0x28(%r15), %rbp
addq %r13, %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x1e372
movq %rbp, %rcx
subq %rax, %rcx
movq (%rsp), %rsi
movq 0x10(%rsi), %rdx
addq 0x8(%rsi), %rdx
subq %rdx, %rbp
cmpq %rdx, %rcx
cmovaeq %rax, %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x1e3e0
subq %rbp, (%r14)
addq %rbx, %rax
addq %rbp, %rax
jmp 0x1b57c
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TStreamCache::_resetPos_continue(unsigned long, unsigned long long, unsigned long)
bool _resetPos_continue(size_t kBackupCacheSize,hpatch_StreamPos_t streamPos,size_t kMinCacheDataSize){
        //stream:[...     |                |                   |                  |                      |      ...]
        //             readPos (streamPos-kBackupCacheSize) streamPos (streamPos+kMinCacheDataSize) (readPosEnd)
        //cache:     [    |                                    |                  |                      ]
        //           0                                   (init cachePos)                              cacheSize
        hpatch_StreamPos_t streamSize=stream->streamSize;
        if (streamPos+kMinCacheDataSize>streamSize) return false;
        hpatch_StreamPos_t readPos=(streamPos>=kBackupCacheSize)?(streamPos-kBackupCacheSize):0;
        size_t readLen=((streamSize-readPos)>=cacheSize)?cacheSize:(size_t)(streamSize-readPos);
#if (_IS_USED_MULTITHREAD)
        if (m_locker){
            CAutoLocker _autoLocker(m_locker);
            _resetPos_continue_read(readPos,readLen);
        }else
#endif
        {
            _resetPos_continue_read(readPos,readLen);
        }
        m_readPos=readPos;
        m_readPosEnd=readPos+readLen;
        cachePos=cacheSize-(size_t)(m_readPosEnd-streamPos);
        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rbp
addq %rdx, %rbx
cmpq %rbp, %rbx
ja 0x1b8db
movq %rdx, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq %rdx, %rax
subq %rsi, %rax
cmovaeq %rax, %r12
movq %rbp, %r13
subq %r12, %r13
movq 0x18(%rdi), %rsi
movq 0x28(%rdi), %rax
cmpq %rax, %r13
cmovaeq %rax, %r13
testq %rsi, %rsi
je 0x1b8b7
leaq 0x8(%rsp), %rdi
callq 0x1b906
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1b964
leaq 0x8(%rsp), %rdi
callq 0x1bacc
jmp 0x1b8c5
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1b964
movq %r12, 0x8(%r15)
addq %r12, %r13
movq %r13, 0x10(%r15)
subq %r13, %r14
addq 0x28(%r15), %r14
movq %r14, 0x30(%r15)
cmpq %rbp, %rbx
setbe %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1bacc
movq %rbx, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TStreamCache::_resetPos_continue_read(unsigned long long, unsigned long)
void _resetPos_continue_read(hpatch_StreamPos_t readPos,size_t readLen){
        unsigned char* dst=cache+cacheSize-readLen;
        if ((m_readPosEnd>readPos)&&(m_readPos<=readPos)){
            size_t moveLen=(size_t)(m_readPosEnd-readPos);
            memmove(dst,cache+cacheSize-moveLen,moveLen);
            readStream(stream,readPos+moveLen,dst+moveLen,readLen-moveLen);
        }else if ((m_readPos<readPos+readLen)&&(m_readPosEnd>=readPos+readLen)){
            size_t moveLen=(size_t)(readPos+readLen-m_readPos);
            memmove(dst+readLen-moveLen,cachedData(),moveLen);
            readStream(stream,readPos,dst,readLen-moveLen);
        }else{
            readStream(stream,readPos,dst,readLen);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq 0x20(%rdi), %r12
addq 0x28(%rdi), %r12
movq %r12, %rbx
subq %rdx, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
movq %rdx, %rbp
subq %r13, %rbp
setbe %al
cmpq %r13, %rsi
seta %cl
orb %al, %cl
je 0x1b9fb
leaq (%r14,%r13), %rax
movq %rax, %rbp
subq %rsi, %rbp
setbe %cl
cmpq %rax, %rdx
setb %al
orb %cl, %al
je 0x1ba46
testq %r14, %r14
je 0x1ba75
movq (%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq *0x10(%rdi)
testl %eax, %eax
jne 0x1ba75
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x36506(%rip), %rsi     # 0x51ef4
movq %rax, %rdi
callq 0x4120
jmp 0x1ba9e
movq %rdx, %r13
movq %r12, %rsi
subq %rbp, %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x4540
cmpq %r14, %rbp
je 0x1ba75
movq (%r15), %rdi
addq %rbp, %rbx
movq %r13, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq *0x10(%rdi)
testl %eax, %eax
jne 0x1ba75
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x364b8(%rip), %rsi     # 0x51ef4
movq %rax, %rdi
callq 0x4120
jmp 0x1ba9e
movq %r12, %rdi
subq %rbp, %rdi
subq %rdx, %rsi
addq %r12, %rsi
movq %rbp, %rdx
callq 0x4540
subq %rbp, %r14
je 0x1ba75
movq (%r15), %rdi
addq %rbx, %r14
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x1ba84
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x3645e(%rip), %rsi     # 0x51ef4
movq %rax, %rdi
callq 0x4120
movq 0x59543(%rip), %rsi     # 0x74fe8
movq 0x5950c(%rip), %rdx     # 0x74fb8
movq %rbx, %rdi
callq 0x45b0
jmp 0x1bab8
jmp 0x1bab8
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq %rdi, %rax
notq %rax
shlq $0x12, %rdi
addq %rax, %rdi
movq %rdi, %rax
shrq $0x1f, %rax
xorq %rdi, %rax
imulq $0x15, %rax, %rax
movq %rax, %rcx
shrq $0xb, %rcx
xorq %rax, %rcx
imulq $0x41, %rcx, %rcx
movq %rcx, %rax
shrq $0x16, %rax
xorq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq (%rdi), %r8
movq (%r8,%rdx,8), %rax
cmpq %rax, (%r8,%rsi,8)
jne 0x1c27d
incq %rsi
incq %rdx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
jmp 0x1c7e2
setb %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpq %rsi, %rdi
jne 0x1c7eb
xorl %eax, %eax
jmp 0x1c854
movq %rsi, %rax
cmovaq %rdi, %rax
subq %rax, %rdx
cmpq %rcx, %rdx
cmovaeq %rcx, %rdx
leaq (%rdx,%rsi), %rax
leaq (%rdx,%rdi), %rcx
pushq $0x1
popq %r9
leaq (%rdx,%r9), %r10
cmpq $0x1, %r10
je 0x1c840
movq (%r8,%rdi,8), %r10
incq %rdi
movq (%r8,%rsi,8), %r11
incq %rsi
decq %r9
cmpq %r11, %r10
je 0x1c808
negq %r9
cmpq %rdx, %r9
setb %dl
cmpq %r11, %r10
setb %r8b
movq %rsi, %rax
movq %rdi, %rcx
jmp 0x1c842
xorl %edx, %edx
xorl %esi, %esi
cmpq %rax, %rcx
seta %sil
movzbl %r8b, %eax
testb %dl, %dl
cmovel %esi, %eax
andb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x28(%rbx), %rcx
movq 0x40(%rbx), %r14
movq %rcx, %r15
subq %rax, %r15
cmpq %r14, %r15
ja 0x1de20
movq 0x10(%rbx), %rdx
subq %rcx, %rax
leaq (%rax,%rdx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1bdc6
testb %al, %al
je 0x1de6c
movq 0x30(%rbx), %rax
decq %rax
movq %rax, 0x30(%rbx)
jmp 0x1dde6
movq 0x20(%rbx), %rdx
movq 0x48(%rbx), %rcx
movzbl (%rdx,%rax), %esi
addq %rax, %rdx
movzbl (%r14,%rdx), %edx
leaq 0x576c5(%rip), %rdi     # 0x75500
movq (%rdi), %rdi
movl (%rdi,%rsi,4), %esi
movq %rcx, %r8
shrq $0x20, %r8
subl %esi, %ecx
addl (%rdi,%rdx,4), %ecx
movl %r14d, %edx
imull %esi, %edx
notl %edx
addl %r8d, %edx
addl %ecx, %edx
shlq $0x20, %rdx
orq %rcx, %rdx
movq %rdx, 0x48(%rbx)
incq %rax
movq %rax, 0x30(%rbx)
cmpq %r14, %r15
seta %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x40(%rdi), %rsi
pushq $0x1
popq %rdx
callq 0x1e4e8
testb %al, %al
je 0x1e49f
movq 0x40(%r14), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x1e4e8
testb %al, %al
je 0x1e49f
xorl %r15d, %r15d
pushq $0x1
popq %r12
movq 0x28(%r14), %rax
movq 0x30(%r14), %rdx
movq %rax, %rcx
subq %rdx, %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdi
subq %rdi, %rsi
cmpq %rcx, %rsi
movq %rcx, %r13
cmovbq %rsi, %r13
addq 0x20(%r14), %rdx
addq 0x20(%rbx), %rdi
xorl %r8d, %r8d
cmpq %r8, %r13
je 0x1e463
movb (%rdx,%r8), %r9b
cmpb (%rdi,%r8), %r9b
jne 0x1e4a4
incq %r8
jmp 0x1e44f
cmpq %rcx, %rsi
jb 0x1e476
cmpq 0x50(%r14), %rax
jae 0x1e476
movq %r14, %rdi
callq 0x1e502
addq %r13, %r15
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1e4e8
testb %al, %al
je 0x1e4a7
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1e4e8
testb %al, %al
jne 0x1e421
jmp 0x1e4a7
xorl %r15d, %r15d
jmp 0x1e4a7
addq %r8, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq 0x28(%rdi), %rax
movq 0x48(%rdi), %rcx
subq %rcx, %rax
addq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rdx
movq %rdx, %rsi
subq %rax, %rsi
subq %rcx, %rdx
cmpq %rcx, %rsi
cmovbeq %rax, %rdx
movq %rdx, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq 0x28(%rdi), %rax
movq 0x50(%rdi), %rcx
leaq (%rax,%rax), %rdx
movq %rcx, %rsi
subq %rax, %rsi
cmpq %rcx, %rdx
cmovbeq %rax, %rsi
subq %rsi, 0x20(%rdi)
addq %rsi, %rax
movq %rax, 0x28(%rdi)
addq %rsi, 0x30(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq %rsi, 0x20(%rdi)
movq %rdx, 0x28(%rdi)
addq %rdx, %rcx
movq %rcx, 0x30(%rdi)
andq $0x0, 0x38(%rdi)
movb $0x0, 0x40(%rdi)
movq %rdi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x5(%rip), %rax         # 0x1e9fa
movq %rax, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
cmpq %rcx, %rdx
jae 0x1ea51
movq (%rdi), %rbx
cmpq %rsi, 0x38(%rbx)
jne 0x1ea6e
movq %rcx, %r14
subq %rdx, %r14
addq %r14, %rsi
movq %rsi, 0x38(%rbx)
cmpb $0x0, 0x40(%rbx)
jne 0x1ea2d
movq 0x28(%rbx), %rsi
leaq (%rsi,%r14), %rax
cmpq 0x30(%rbx), %rax
jbe 0x1ea3c
movb $0x1, 0x40(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x20(%rbx), %rdi
callq *0x18(%rdi)
testl %eax, %eax
je 0x1ea4d
addq %r14, 0x28(%rbx)
jmp 0x1ea31
xorl %eax, %eax
jmp 0x1ea34
leaq 0x3392b(%rip), %rdi     # 0x52383
leaq 0x33932(%rip), %rsi     # 0x52391
leaq 0x3397b(%rip), %rcx     # 0x523e1
pushq $0x41
popq %rdx
callq 0x4230
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x33a02(%rip), %rsi     # 0x52482
movq %rax, %rdi
callq 0x4120
movq 0x56559(%rip), %rsi     # 0x74fe8
movq 0x56522(%rip), %rdx     # 0x74fb8
movq %rbx, %rdi
callq 0x45b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x4600
nop