LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::TSuffixString::resetSuffixString(unsigned char const*, unsigned char const*, unsigned long)
void TSuffixString::resetSuffixString(const TChar* src_begin,const TChar* src_end,size_t threadNum){
    assert(src_begin<=src_end);
    m_src_begin=src_begin;
    m_src_end=src_end;
    if (isUseLargeSA()){
        _clearVector(m_SA_limit);
        _suffixString_create(m_src_begin,m_src_end,m_SA_large,threadNum);
    }else{
        assert(sizeof(TInt32)==4);
        _clearVector(m_SA_large);
        _suffixString_create(m_src_begin,m_src_end,m_SA_limit,threadNum);
    }
    build_cache(threadNum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
ja 0x1bfca
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rdx, %r12
subq %rsi, %r12
testq $-0x80000000, %r12      # imm = 0x80000000
je 0x1bf56
movq 0x10(%r14), %rdi
movq 0x20(%r14), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
testq %rdi, %rdi
je 0x1bf08
subq %rdi, %rsi
callq 0x4300
movq (%r14), %r15
movq 0x8(%r14), %r13
movq %r13, %r12
subq %r15, %r12
leaq 0x28(%r14), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1cc34
cmpq %r15, %r13
je 0x1bfb1
movq (%rbp), %rsi
movq %r15, %rdi
movq %r12, %rdx
movl %ebx, %ecx
callq 0x26688
testl %eax, %eax
je 0x1bfb1
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x40b13(%rip), %rsi     # 0x5ca5c
movq %rax, %rdi
callq 0x4110
jmp 0x1c005
movq 0x28(%r14), %rdi
movq 0x38(%r14), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq $0x0, 0x38(%r14)
testq %rdi, %rdi
je 0x1bf88
subq %rdi, %rsi
callq 0x4300
movq (%r14), %r15
movq 0x8(%r14), %r13
movq %r13, %r12
subq %r15, %r12
leaq 0x10(%r14), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1cdd4
cmpq %r15, %r13
je 0x1bfb1
movq (%rbp), %rsi
movq %r15, %rdi
movl %r12d, %edx
movl %ebx, %ecx
callq 0x2c488
testl %eax, %eax
jne 0x1bfe9
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c0e4
leaq 0x409df(%rip), %rdi     # 0x5c9b0
leaq 0x409eb(%rip), %rsi     # 0x5c9c3
leaq 0x40a22(%rip), %rcx     # 0x5ca01
movl $0x114, %edx            # imm = 0x114
callq 0x4200
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x40a5f(%rip), %rsi     # 0x5ca5c
movq %rax, %rdi
callq 0x4110
movq 0x5ffdc(%rip), %rsi     # 0x7bfe8
movq 0x5ffa5(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x1c01d
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::TSuffixString::clear()
void TSuffixString::clear(){
    clear_cache();
    m_src_begin=0;
    m_src_end=0;
    _clearVector(m_SA_limit);
    _clearVector(m_SA_large);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1bd7c
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rsi
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
testq %rdi, %rdi
je 0x1c0bf
subq %rdi, %rsi
callq 0x4300
xorps %xmm0, %xmm0
movq 0x28(%rbx), %rdi
movq 0x38(%rbx), %rsi
movups %xmm0, 0x28(%rbx)
movq $0x0, 0x38(%rbx)
testq %rdi, %rdi
je 0x1c0e1
subq %rdi, %rsi
popq %rbx
jmp 0x4300
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::(anonymous namespace)::_lower_bound_TInt32(int const*, int const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, int 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
cmpq %rdi, %rsi
je 0x1c6bf
movq %rdi, %rax
movq 0x40(%rsp), %r11
movq %rcx, %r10
subq %rdx, %r10
movq %r11, %rbx
movq %rsi, %rdi
subq %rax, %rdi
sarq %rdi
andq $-0x4, %rdi
leaq (%rax,%rdi), %r14
cmpq %rbx, %r11
movq %rbx, %r15
cmovbq %r11, %r15
movslq (%rax,%rdi), %r12
addq %r8, %r12
movq %r9, %r13
subq %r12, %r13
leaq (%rdx,%r15), %rbp
cmpq %rcx, %rbp
je 0x1c695
leaq (%r12,%r15), %rdi
cmpq %r9, %rdi
je 0x1c69a
movb (%rbp), %bpl
cmpb %bpl, (%rdi)
jne 0x1c69f
incq %r15
cmpq $0x2000, %r15           # imm = 0x2000
jb 0x1c66c
jmp 0x1c6ba
movq %r10, %rbx
jmp 0x1c6b0
movq %r13, %r15
jmp 0x1c6a1
jae 0x1c6ad
addq $0x4, %r14
movq %r14, %rax
movq %r15, %r11
jmp 0x1c6b3
movq %r15, %rbx
movq %r14, %rsi
cmpq %rax, %rsi
jne 0x1c644
jmp 0x1c6c2
movq %r14, %rax
jmp 0x1c6c2
movq %rsi, %rax
subq 0x38(%rsp), %rax
sarq $0x2, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1cbee
cmpq $0x20, %r15
jb 0x1cc0c
movq (%r14), %rdi
shlq $0x2, %rbx
jmp 0x1cc24
movq %rsi, 0x8(%r14)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1cc06
callq 0x43e0
movq $0x0, (%r14)
cmpq $0x20, %r15
jae 0x1cc12
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 0x41c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1cfaf
movq %rsi, %rax
mulq %rdi
jo 0x1cfcd
movl $0xa, %ecx
movl $0x1, %edx
shlq %cl, %rdx
cmpq $0x3e, %rcx
ja 0x1cfa1
incq %rcx
cmpq %rax, %rdx
jb 0x1cf8b
decq %rdx
movq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x3fab6(%rip), %rsi     # 0x5ca79
movq %rax, %rdi
callq 0x4110
jmp 0x1cfe9
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x3fac6(%rip), %rsi     # 0x5caa7
movq %rax, %rdi
callq 0x4110
movq 0x5eff8(%rip), %rsi     # 0x7bfe8
movq 0x5efc1(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x1d001
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d04e
cmpq %rsi, (%r8)
jb 0x1d075
testq %rdx, %rdx
je 0x1d063
testq %rcx, %rcx
jne 0x1d4d5
xorl %ecx, %ecx
jmp 0x1d5af
xorl %edx, %edx
testq %rcx, %rcx
jne 0x1d660
xorl %ecx, %ecx
jmp 0x1d6fd
pushq %rax
leaq 0x3fae3(%rip), %rdi     # 0x5cb60
leaq 0x3fb06(%rip), %rsi     # 0x5cb8a
leaq 0x3fb3f(%rip), %rcx     # 0x5cbca
movl $0x3e, %edx
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0xc0408, %edi          # imm = 0xC0408
callq 0x4400
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
testq %rax, %rax
je 0x1d0f1
movq %rax, (%rbx)
movq %rax, %rcx
addq $0xc0408, %rcx          # imm = 0xC0408
movq %rcx, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movl $0x40408, %edx          # imm = 0x40408
movq %rax, %rdi
xorl %esi, %esi
callq 0x41c0
movsd 0x3fa69(%rip), %xmm0    # 0x5cb50
movups %xmm0, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %r15
leaq 0x3f20a(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x5eed4(%rip), %rsi     # 0x7bfe8
movq 0x5ee9d(%rip), %rdx     # 0x7bfb8
movq %r15, %rdi
callq 0x4590
movq %rax, %r14
jmp 0x1d133
movq %rax, %r14
movq %r15, %rdi
callq 0x4260
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1d14e
callq 0x43b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d170
movq 0x18(%rbx), %rdi
movl $0x40408, %edx          # imm = 0x40408
xorl %esi, %esi
callq 0x41c0
movsd 0x3f9d8(%rip), %xmm0    # 0x5cb50
movups %xmm0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d1c3
testq %rdx, %rdx
je 0x1d28e
movzbl (%rsi), %eax
movl %eax, 0x20(%rdi)
movq 0x18(%rdi), %rcx
incl 0x4(%rcx,%rax,4)
incq %rsi
decq %rdx
testq %rdx, %rdx
je 0x1d28e
xorl %eax, %eax
xorl %ecx, %ecx
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 0x1d258
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 0x1d251
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 0x1d282
movl $0x0, 0x2c(%rdi)
incq %rcx
cmpq %rcx, %rdx
jne 0x1d1d0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d35a
movl 0x20(%rdi), %r9d
testl %r9d, %r9d
js 0x1d35c
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rcx
xorl %edi, %edi
xorl %eax, %eax
movzbl (%rsi,%rdi), %r8d
movzbl %r9b, %r10d
movl 0x4(%rcx,%r10,4), %r9d
shll $0xa, %r10d
leal (%r10,%r8,4), %r10d
movl 0x404(%rcx,%r10), %r10d
incl %r9d
movq %r10, %r11
shlq $0xb, %r11
cmpq %r9, %r11
jbe 0x1d32d
movq %r10, %r11
shlq $0x8, %r11
leaq 0x8(%rax), %rbx
cmpq %r9, %r11
cmovaeq %rax, %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), %rax
cmpq %r9, %r11
cmovaeq %r14, %rax
cmovbq %r11, %r10
addq %r10, %r10
cmpq %r9, %r10
adcq $0x1, %rax
jmp 0x1d331
addq $0xc, %rax
incq %rdi
movl %r8d, %r9d
cmpq %rdi, %rdx
jne 0x1d2b1
addq $0x7, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x3, %rdx
popq %rbx
popq %r14
jmp 0x1d35c
xorl %edx, %edx
movq %rdx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d3cb
cmpl $0x0, 0x20(%r15)
js 0x1d39d
movq 0x18(%r15), %rdi
movl $0x40408, %edx          # imm = 0x40408
xorl %esi, %esi
callq 0x41c0
movsd 0x3f7ab(%rip), %xmm0    # 0x5cb50
movups %xmm0, 0x20(%r15)
addq %r12, %r14
addq $-0x80000, %r14         # imm = 0xFFF80000
testq %rbx, %rbx
leaq -0x80000(%rbx,%r12), %rax
cmovneq %rax, %rbx
movl $0x80000, %r12d         # imm = 0x80000
jmp 0x1d3d0
testq %r12, %r12
je 0x1d424
leaq 0x10(%rsp), %r13
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 0x1d044
movq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1d1a0
addq %rbp, %r14
leaq (%rbx,%rbp), %rax
testq %rbx, %rbx
cmovneq %rax, %rbx
subq %rbp, %r12
jne 0x1d3d5
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp
// Function: unsigned long hdiff_private::_getRegionRleCost<false, 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:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x1d680
xorl %eax, %eax
xorl %r9d, %r9d
cmpb $0x0, (%rdi,%r9)
jne 0x1d683
incq %r9
cmpq %r9, %rsi
jne 0x1d66f
jmp 0x1d6ed
xorl %r9d, %r9d
cmpq %rsi, %r9
jae 0x1d6eb
xorl %edx, %edx
xorl %eax, %eax
movq %r9, %r10
leaq 0x1(%r9), %rbx
cmpq %rbx, %rsi
cmovaq %rsi, %rbx
movb (%rdi,%r9), %r11b
leaq -0x1(%rbx), %r14
movq %r9, %r15
cmpq %r15, %r14
je 0x1d6ba
leaq 0x1(%r15), %r9
cmpb 0x1(%rdi,%r15), %r11b
movq %r9, %r15
je 0x1d6a5
jmp 0x1d6bd
movq %rbx, %r9
leal 0x1(%r11), %ebx
cmpb $0x1, %bl
ja 0x1d6cb
incq %rax
jmp 0x1d6e4
movq %r9, %rbx
subq %r10, %rbx
cmpq $0x2, %rbx
sbbq $0x0, %rax
addq $0x2, %rax
movb %r11b, (%rcx,%rdx)
incq %rdx
cmpq %rsi, %r9
jb 0x1d68c
jmp 0x1d6ef
xorl %eax, %eax
xorl %edx, %edx
testq %r8, %r8
je 0x1d6f7
movq %rdx, (%r8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d866
movq (%rdi), %rax
movq 0xc8(%rdi), %rdx
cmpq %rdx, 0x8(%rax)
jb 0x1d866
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
cmpq $0x200000, %rax         # imm = 0x200000
jb 0x1d866
movq %rax, %rsi
shrq %rsi
cmpq %rdx, %rsi
jb 0x1d866
shrq $0x14, %rax
cmpq %rax, %rcx
cmovbq %rcx, %rax
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x8(%rdi), %rax
movq 0xc8(%rdi), %rdx
movq 0x10(%rcx), %r15
movq 0x8(%rax), %r14
movl $0x1, %ecx
lock
xaddq %rcx, 0x18(%rbx)
cmpq %r15, %rcx
jae 0x1fa26
movq %rdi, %r12
decq %rdx
movq %rdx, 0x10(%rsp)
subq %rdx, %r14
leaq 0x28(%rsp), %r13
movq %rcx, %rax
imulq %r14, %rax
xorl %edx, %edx
divq %r15
movq %rax, %rbp
incq %rcx
movq %r14, %rax
cmpq %r15, %rcx
jae 0x1f9d5
imulq %r14, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r15
addq 0x10(%rsp), %rax
movq 0x8(%r12), %rsi
cmpq 0x8(%rsi), %rax
ja 0x1fa35
movq %r13, %rdi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x43bc0
movq (%rbx), %r9
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
callq 0x1e02e
movl $0x1, %ecx
lock
xaddq %rcx, 0x18(%rbx)
cmpq %r15, %rcx
jb 0x1f9af
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d2ff(%rip), %rdi     # 0x5cd3b
leaq 0x3d221(%rip), %rsi     # 0x5cc64
leaq 0x3d320(%rip), %rcx     # 0x5cd6a
movl $0x2ce, %edx            # imm = 0x2CE
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x50, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x80(%rsp), %r14
movq %rsi, 0x28(%rsp)
cmpq $0x2, %rdx
jb 0x1fdf1
movq %rdx, %r12
movq %rdx, %rcx
shrq %rcx
leaq 0x30(%rsp), %r13
movq %rcx, (%r13)
subq %rcx, %r12
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1fe7c
leaq 0x48(%rsp), %r15
movq %rax, (%r15)
leaq -0x6d(%rip), %rsi       # 0x1fd36
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq %r15, %rdx
movq %r14, %r8
movq %r13, %r9
callq 0x20da6
movq (%r15), %rsi
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r12, %rdx
callq 0x1fd36
leaq 0x20(%rsp), %rdi
callq 0x4580
cmpq $0x0, 0x20(%rsp)
je 0x1fe59
jmp 0x1fe77
movq 0x10(%r14), %rax
movq %rax, 0x40(%rsp)
movups (%r14), %xmm0
movaps %xmm0, 0x30(%rsp)
cmpq %r15, %rbx
je 0x1fe59
movq %r15, %rax
subq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21528
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21652
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpq $0x0, 0x20(%rsp)
jne 0x1fe77
movq %rax, %rdi
callq 0x45e0
callq 0x40b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2038e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rdx
movq (%rdi), %r13
addq %rdx, %r13
subq 0x8(%rdi), %r13
cmpq (%rsi), %r13
je 0x20380
movq %rcx, %r15
movq 0x10(%rcx), %rax
movq 0x38(%rcx), %rsi
movq 0x40(%rcx), %rcx
leaq (%rcx,%rdx), %rdi
cmpq %rax, %rdi
ja 0x20309
movq 0x8(%r15), %rdi
addq %rsi, %rdi
cmpq %rdx, %rdi
ja 0x20309
subq %rax, %rdx
addq 0x28(%r15), %rdx
movq %rdx, 0x30(%r15)
jmp 0x20315
movq %r15, %rdi
callq 0x206dc
movq 0x40(%r15), %rcx
leaq 0x10(%rsp), %rdx
movq %r13, (%rdx)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %r8
callq 0x2038f
cmpq $0x10, %rax
jb 0x20380
movq %rax, %r15
movq 0x10(%rsp), %rdi
movq (%r14), %r12
movq 0x10(%r14), %r14
movq %rdi, 0x8(%rsp)
movq %r12, %rsi
movq %r14, %rdx
callq 0x204b6
movq %rax, %rbp
movq (%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x204b6
addq %r15, %rax
addq 0x10(%rbx), %rbp
cmpq %rbp, %rax
jb 0x20380
movq %r15, 0x10(%rbx)
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
subq %r13, %rax
addq %rax, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %rdx
movq 0x38(%rdi), %rsi
movq 0x40(%rdi), %rcx
leaq (%rcx,%rdx), %rdi
movq 0x8(%r12), %r8
movq 0x10(%r12), %rax
cmpq %rax, %rdi
setbe %r10b
leaq (%r8,%rsi), %r9
cmpq %rdx, %r9
setbe %r11b
testb %r11b, %r10b
jne 0x20410
movq 0x28(%r12), %r9
movq 0x48(%r12), %r10
subq %r10, %r9
addq %r9, 0x20(%r12)
movq %rax, %r11
subq %r8, %r11
movq %rax, %r9
subq %r10, %r9
cmpq %r10, %r11
cmovbeq %r8, %r9
movq %r10, 0x28(%r12)
movq %r10, 0x30(%r12)
movq %r9, 0x8(%r12)
addq %rsi, %r9
cmpq %rax, %rdi
ja 0x20429
cmpq %rdx, %r9
ja 0x20429
subq %rax, %rdx
addq 0x28(%r12), %rdx
movq %rdx, 0x30(%r12)
jmp 0x2043a
movq %r12, %rdi
callq 0x206dc
testb %al, %al
je 0x20459
movq 0x30(%r12), %rdx
addq 0x20(%r12), %rdx
movq 0x30(%r15), %r13
movq 0x20(%r15), %rsi
addq %r13, %rsi
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x4310
testl %eax, %eax
je 0x2045d
xorl %eax, %eax
jmp 0x204a7
movq %rbx, (%rsp)
movq %rbp, %rbx
movq 0x10(%r15), %rbp
subq 0x28(%r15), %rbp
addq %r13, %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x22d72
movq %rbp, %rcx
subq %rax, %rcx
movq 0x10(%rbx), %rdx
addq 0x8(%rbx), %rdx
subq %rdx, %rbp
cmpq %rdx, %rcx
cmovaeq %rax, %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x22dd8
subq %rbp, (%r14)
addq (%rsp), %rax
addq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %rcx, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rbp
addq %rdx, %rbx
cmpq %rbp, %rbx
ja 0x207ac
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), %rax
movq 0x28(%rdi), %rcx
cmpq %rcx, %r13
cmovaeq %rcx, %r13
testq %rax, %rax
je 0x20788
movq $0x0, 0x8(%rsp)
xorl %ecx, %ecx
movb %cl, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movb %cl, 0x8(%rdi)
callq 0x2095c
leaq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq $0x0, (%rdi)
movq %rax, 0x8(%rsp)
movb $0x0, 0x8(%rdi)
movb $0x1, 0x10(%rsp)
callq 0x20946
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x207d8
leaq 0x8(%rsp), %rdi
callq 0x20946
jmp 0x20796
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x207d8
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 $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x207c3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x20871
leaq (%r14,%r13), %rax
movq %rax, %rbp
subq %rsi, %rbp
setbe %cl
cmpq %rax, %rdx
setb %al
orb %cl, %al
je 0x208be
testq %r14, %r14
je 0x208ed
movq (%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq *0x10(%rdi)
testl %eax, %eax
jne 0x208ed
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x3c570(%rip), %rsi     # 0x5cdd4
movq %rax, %rdi
callq 0x4110
jmp 0x20918
movq %rdx, %r13
movq %r12, %rsi
subq %rbp, %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x4510
cmpq %r14, %rbp
je 0x208ed
movq (%r15), %rdi
addq %rbp, %rbx
movq %r13, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq *0x10(%rdi)
testl %eax, %eax
jne 0x208ed
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x3c520(%rip), %rsi     # 0x5cdd4
movq %rax, %rdi
callq 0x4110
jmp 0x20918
movq %r12, %rdi
subq %rbp, %rdi
subq %rdx, %rsi
addq %r12, %rsi
movq %rbp, %rdx
callq 0x4510
subq %rbp, %r14
je 0x208ed
movq (%r15), %rdi
addq %rbx, %r14
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x208fc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x3c4c4(%rip), %rsi     # 0x5cdd4
movq %rax, %rdi
callq 0x4110
movq 0x5b6c9(%rip), %rsi     # 0x7bfe8
movq 0x5b692(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x20932
jmp 0x20932
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2144a
xorl %eax, %eax
retq
pushq %r14
pushq %rbx
movq %rsi, %rax
cmovaq %rdi, %rax
subq %rax, %rdx
cmpq %rcx, %rdx
cmovaeq %rcx, %rdx
testq %rdx, %rdx
je 0x214d9
leaq 0x1(%rdi), %rcx
movq (%r8,%rdi,8), %rax
leaq 0x1(%rsi), %r9
movq (%r8,%rsi,8), %r10
movb $0x1, %r11b
cmpq %r10, %rax
jne 0x214bb
leaq (%rdx,%rdi), %r11
leaq (%rdx,%rsi), %rbx
leaq (%r8,%rsi,8), %r14
addq $0x8, %r14
leaq (%r8,%rdi,8), %rdi
addq $0x8, %rdi
leaq -0x1(%rdx), %r8
xorl %esi, %esi
cmpq %rsi, %r8
je 0x214d3
movq (%rdi,%rsi,8), %rax
movq (%r14,%rsi,8), %r10
incq %rsi
cmpq %r10, %rax
je 0x21499
cmpq %rdx, %rsi
setb %r11b
addq %rsi, %r9
addq %rsi, %rcx
xorl %edx, %edx
cmpq %r10, %rax
setb %dl
xorl %eax, %eax
cmpq %r9, %rcx
seta %al
testb %r11b, %r11b
cmovnel %edx, %eax
jmp 0x214df
movq %rbx, %rsi
movq %r11, %rdi
cmpq %rsi, %rdi
seta %al
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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)
movq $0x0, 0x38(%rdi)
movb $0x0, 0x40(%rdi)
movq %rdi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x6(%rip), %rax         # 0x233ae
movq %rax, 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x23407
movq (%rdi), %rbx
cmpq %rsi, 0x38(%rbx)
jne 0x23426
movq %rcx, %r14
subq %rdx, %r14
addq %r14, %rsi
movq %rsi, 0x38(%rbx)
cmpb $0x0, 0x40(%rbx)
jne 0x233e1
movq 0x28(%rbx), %rsi
leaq (%rsi,%r14), %rax
cmpq 0x30(%rbx), %rax
jbe 0x233f2
movb $0x1, 0x40(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x20(%rbx), %rdi
callq *0x18(%rdi)
testl %eax, %eax
je 0x23403
addq %r14, 0x28(%rbx)
jmp 0x233e5
xorl %eax, %eax
jmp 0x233ea
leaq 0x39e55(%rip), %rdi     # 0x5d263
leaq 0x39e5c(%rip), %rsi     # 0x5d271
leaq 0x39ea5(%rip), %rcx     # 0x5d2c1
movl $0x41, %edx
callq 0x4200
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x39f28(%rip), %rsi     # 0x5d362
movq %rax, %rdi
callq 0x4110
movq 0x58b9f(%rip), %rsi     # 0x7bfe8
movq 0x58b68(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TCoversStream::TCoversStream(hdiff_private::TCovers const&, unsigned long long)
TCoversStream::TCoversStream(const TCovers& _covers,hpatch_StreamPos_t cover_buf_size)
:covers(_covers),curCodePos(0),curCodePos_end(0),
readedCoverCount(0),lastOldEnd(0),lastNewEnd(0),_readFromPos_back(0){
    assert(kCodeBufSize>=hpatch_kMaxPackedUIntBytes*3);
    _code_mem.realloc(kCodeBufSize);
    this->streamImport=this;
    this->streamSize=cover_buf_size;
    this->read=_read;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x20(%rdi)
movl $0x80000, %edi          # imm = 0x80000
callq 0x4400
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movq $0x0, 0x68(%rbx)
testq %rax, %rax
je 0x234cf
movq %rax, 0x28(%rbx)
addq $0x80000, %rax          # imm = 0x80000
movq %rax, 0x30(%rbx)
movq %rax, 0x38(%rbx)
movq %rbx, (%rbx)
movq %r14, 0x8(%rbx)
leaq 0x73(%rip), %rax        # 0x23538
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %r15
leaq 0x38e2c(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x58af6(%rip), %rsi     # 0x7bfe8
movq 0x58abf(%rip), %rdx     # 0x7bfb8
movq %r15, %rdi
callq 0x4590
movq %rax, %r14
jmp 0x23511
movq %rax, %r14
movq %r15, %rdi
callq 0x4260
addq $0x28, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x23530
callq 0x43b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TCoversStream::getDataSize(hdiff_private::TCovers const&)
hpatch_StreamPos_t TCoversStream::getDataSize(const TCovers& covers){
    size_t n=covers.coverCount();
    hpatch_StreamPos_t cover_buf_size=0;
    hpatch_StreamPos_t lastOldEnd=0;
    hpatch_StreamPos_t lastNewEnd=0;
    for (size_t i=0; i<n; ++i) {
        TCover cover;
        covers.covers(i,&cover);
        assert(cover.newPos>=lastNewEnd);
        __private_packCover(hpatch_StreamPos_t,_packUIntWithTag_size,_packUInt_size,
                            &cover_buf_size,0,cover,lastOldEnd,lastNewEnd);
        lastOldEnd=cover.oldPos+cover.length;//! +length
        lastNewEnd=cover.newPos+cover.length;
    }
    return cover_buf_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, (%rsp)
movq 0x18(%rdi), %rsi
testq %rsi, %rsi
je 0x2385e
movl $0x8, %r13d
xorl %edx, %edx
xorl %ecx, %ecx
xorl %ebp, %ebp
movq %rsi, 0x10(%rsp)
movq (%rsp), %rsi
movq 0x10(%rsi), %rax
cmpb $0x1, 0x20(%rsi)
jne 0x237de
movl -0x8(%rax,%r13), %ebx
movl -0x4(%rax,%r13), %r12d
movl (%rax,%r13), %r14d
jmp 0x237ec
movq -0x10(%rax,%r13,2), %rbx
movq -0x8(%rax,%r13,2), %r12
movq (%rax,%r13,2), %r14
movq %r12, %r15
subq %rdx, %r15
jb 0x2386f
movq %rbx, %rax
subq %rcx, %rax
negq %rax
movq %rbx, %rdi
subq %rcx, %rdi
cmovbq %rax, %rdi
movl $0x1, %esi
callq 0x43313
movl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x43313
movl %eax, %eax
addq %rax, %rbp
movq %r14, %rdi
xorl %esi, %esi
callq 0x43313
movl %eax, %eax
addq %rbp, %rax
addq 0x8(%rsp), %rax
addq %r14, %rbx
addq %r14, %r12
addq $0xc, %r13
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %rbp
movq 0x10(%rsp), %rsi
decq %rsi
jne 0x237bb
jmp 0x23860
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x39b42(%rip), %rdi     # 0x5d3b8
leaq 0x399f4(%rip), %rsi     # 0x5d271
leaq 0x39b4d(%rip), %rcx     # 0x5d3d1
movl $0xa6, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TNewDataDiffStream::_initByRange(unsigned long, unsigned long long, unsigned long long)
void TNewDataDiffStream::_initByRange(size_t coveri,hpatch_StreamPos_t newDataPos,hpatch_StreamPos_t newDataPosEnd){
    _init(getDataSizeByRange(covers,coveri,newDataPos,newDataPosEnd));
    _coveri=coveri;
    _newDataPos=newDataPos;

    readedCoverCount=_coveri;
    lastNewEnd=_newDataPos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x20(%rdi), %rdi
callq 0x23a90
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x30(%r15)
xorl %ecx, %ecx
movq %rcx, 0x50(%r15)
movq %r15, (%r15)
movq %rax, 0x8(%r15)
leaq -0x1b8(%rip), %rax      # 0x238ba
movq %rax, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r14, 0x58(%r15)
movq %rbx, 0x60(%r15)
movq %r14, 0x48(%r15)
movq %rbx, 0x40(%r15)
popq %rbx
popq %r14
popq %r15
retq