LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_single_compressed_diff_block(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, unsigned long, bool, unsigned long, unsigned long)
void create_single_compressed_diff_block(const hpatch_TStreamInput* newData,const hpatch_TStreamInput* oldData,
                                         const hpatch_TStreamOutput* out_diff,const hdiff_TCompress* compressPlugin,
                                         int kMinSingleMatchScore,size_t patchStepMemSize,
                                         bool isUseBigCacheMatch,size_t matchBlockSize,size_t threadNum){
    TAutoMem oldAndNewData;
    loadOldAndNewStream(oldAndNewData,oldData,newData);
    size_t old_size=oldData?(size_t)oldData->streamSize:0;
    unsigned char* pOldData=oldAndNewData.data();
    unsigned char* pNewData=pOldData+old_size;
    create_single_compressed_diff_block(pNewData,pNewData+(size_t)newData->streamSize,pOldData,pOldData+old_size,
                                        out_diff,compressPlugin,kMinSingleMatchScore,
                                        patchStepMemSize,isUseBigCacheMatch,matchBlockSize,threadNum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movb 0x10(%rbp), %al
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movl %r8d, -0x3c(%rbp)
movq %r9, -0x48(%rbp)
andb $0x1, %al
movb %al, -0x49(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x29c00
movq -0x98(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x316b0
jmp 0x32052
cmpq $0x0, -0x28(%rbp)
je 0x3206a
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa0(%rbp)
jmp 0x32075
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x32075
movq -0xa0(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x29c40
movq %rax, -0xa8(%rbp)
jmp 0x32092
movq -0xa8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rdi, %rsi
addq %rax, %rsi
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rax
movq %rdx, %rcx
addq %rax, %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movl -0x3c(%rbp), %r10d
movq -0x48(%rbp), %r11
movq 0x18(%rbp), %r14
movq 0x20(%rbp), %r15
movzbl -0x49(%rbp), %ebx
movq %rsp, %rax
movq %r15, 0x20(%rax)
movq %r14, 0x18(%rax)
andl $0x1, %ebx
movl %ebx, 0x10(%rax)
movq %r11, 0x8(%rax)
movl %r10d, (%rax)
callq 0x31d30
jmp 0x32116
leaq -0x68(%rbp), %rdi
callq 0x29ca0
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x29ca0
movq -0x70(%rbp), %rdi
callq 0x4680
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff_types.h
// Function: hdiff_private::cover_cmp_by_old_t<hpatch_TCover>::operator()(hpatch_TCover const&, hpatch_TCover const&)
inline bool operator ()(const TCover& x,const TCover& y){
            if (x.oldPos!=y.oldPos)
                return x.oldPos<y.oldPos;
            else
                return x.length<y.length;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
je 0x34048
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
setb %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x34060
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
setb %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::TStreamRLE::append(unsigned char const*, unsigned char const*)
void append(const unsigned char* appendData,const unsigned char* appendData_end){
            if (sameCount==0){
                if (appendData!=appendData_end){
                    sameCur=*appendData++;
                    sameCount=1;
                }else{
                    return;
                }
            }
            while (appendData!=appendData_end){
                TByte cur=*appendData++;
                if (cur==sameCur){
                    ++sameCount;
                }else{
                    endSame();
                    sameCur=cur;
                    sameCount=1;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x18(%rax)
jne 0x37ce3
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x37cdf
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb (%rcx), %cl
movb %cl, 0x10(%rax)
movq $0x1, 0x18(%rax)
jmp 0x37ce1
jmp 0x37d42
jmp 0x37ce3
jmp 0x37ce5
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x37d42
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jne 0x37d25
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
jmp 0x37d40
movq -0x28(%rbp), %rdi
callq 0x388a0
movq -0x28(%rbp), %rax
movb -0x19(%rbp), %cl
movb %cl, 0x10(%rax)
movq $0x1, 0x18(%rax)
jmp 0x37ce5
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::bytesRLE_save(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*, int)
void bytesRLE_save(std::vector<unsigned char>& out_ctrlBuf,std::vector<unsigned char>& out_codeBuf,
                   const hpatch_TStreamInput* src,int rle_parameter){
    TStreamRLE rle(out_ctrlBuf,out_codeBuf,rle_parameter);
    TByte buf[kStepSize];
    hpatch_StreamPos_t readPos=0;
    while (readPos<src->streamSize){
        size_t len=kStepSize;
        if (len+readPos>src->streamSize)
            len=(size_t)(src->streamSize-readPos);
        if (!src->read(src,readPos,buf,buf+len))
            throw std::runtime_error("bytesRLE_save() src->read()");
        rle.append(buf,buf+len);
        readPos+=len;
    }
    rle.finishAppend();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4080, %rsp           # imm = 0x4080
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq -0x50(%rbp), %rdi
callq 0x37c00
movq $0x0, -0x4058(%rbp)
movq -0x4058(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x37ecd
movq $0x4000, -0x4060(%rbp) # imm = 0x4000
movq -0x4060(%rbp), %rax
addq -0x4058(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x37e07
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x4058(%rbp), %rax
movq %rax, -0x4060(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x4058(%rbp), %rsi
leaq -0x4050(%rbp), %rdx
leaq -0x4050(%rbp), %rcx
addq -0x4060(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x37e95
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4078(%rbp)
leaq 0x77f93(%rip), %rsi     # 0xafde7
callq 0x4140
jmp 0x37e5b
movq -0x4078(%rbp), %rdi
movq 0xae187(%rip), %rsi     # 0xe5ff0
movq 0xae150(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x4078(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4068(%rbp)
movl %eax, -0x406c(%rbp)
callq 0x42e0
jmp 0x37edf
leaq -0x4050(%rbp), %rsi
leaq -0x4050(%rbp), %rdx
addq -0x4060(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x37c90
movq -0x4060(%rbp), %rax
addq -0x4058(%rbp), %rax
movq %rax, -0x4058(%rbp)
jmp 0x37db9
leaq -0x50(%rbp), %rdi
callq 0x37d50
addq $0x4080, %rsp           # imm = 0x4080
popq %rbp
retq
movq -0x4068(%rbp), %rdi
callq 0x4680
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::bytesRLE_save(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned char const*, int)
void bytesRLE_save(std::vector<TByte>& out_code,
                   const TByte* src,const TByte* src_end,int rle_parameter){
    std::vector<TByte> ctrlBuf;
    std::vector<TByte> codeBuf;

    bytesRLE_save(ctrlBuf,codeBuf,src,src_end,rle_parameter);
    packUInt(out_code,(TUInt)ctrlBuf.size());
    pushBack(out_code,ctrlBuf);
    pushBack(out_code,codeBuf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0xbe70
leaq -0x50(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0xbe70
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
callq 0x37bb0
jmp 0x37f3f
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xbe90
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x37fc0
jmp 0x37f5e
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x37ff0
jmp 0x37f6d
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x37ff0
jmp 0x37f7c
leaq -0x50(%rbp), %rdi
callq 0xbb80
leaq -0x38(%rbp), %rdi
callq 0xbb80
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xbb80
leaq -0x38(%rbp), %rdi
callq 0xbb80
movq -0x58(%rbp), %rdi
callq 0x4680
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::bytesRLE_save(std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*, int)
void bytesRLE_save(std::vector<TByte>& out_code,const hpatch_TStreamInput* src,int rle_parameter){
    std::vector<TByte> ctrlBuf;
    std::vector<TByte> codeBuf;

    bytesRLE_save(ctrlBuf,codeBuf,src,rle_parameter);
    packUInt(out_code,(TUInt)ctrlBuf.size());
    pushBack(out_code,ctrlBuf);
    pushBack(out_code,codeBuf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0xbe70
leaq -0x48(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0xbe70
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq 0x37d80
jmp 0x380a3
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xbe90
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x37fc0
jmp 0x380c2
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x37ff0
jmp 0x380d1
movq -0x8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x37ff0
jmp 0x380e0
leaq -0x48(%rbp), %rdi
callq 0xbb80
leaq -0x30(%rbp), %rdi
callq 0xbb80
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xbb80
leaq -0x30(%rbp), %rdi
callq 0xbb80
movq -0x50(%rbp), %rdi
callq 0x4680
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::maxCodeSize(unsigned char const*, unsigned char const*) const
hpatch_StreamPos_t TSingleStreamRLE0::maxCodeSize(const unsigned char* appendData,const unsigned char* appendData_end) const{
        TLastType lastType=getLastType(*this);
        hpatch_StreamPos_t curLen0=this->len0;
        hpatch_StreamPos_t curLenv=this->uncompressData.size();
        hpatch_StreamPos_t fixedLen=this->fixed_code.size();
        _maxCodeSize(lastType,curLen0,curLenv,fixedLen,appendData,appendData_end);
        _maxCodeSize_end(lastType,curLen0,curLenv,fixedLen);
        return fixedLen;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x38e70
movq -0x40(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movq 0x30(%rdi), %rax
movq %rax, -0x28(%rbp)
addq $0x18, %rdi
callq 0xbe90
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
callq 0xbe90
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %r9
leaq -0x1c(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x381b0
leaq -0x1c(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x382d0
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_maxCodeSize(hdiff_private::TLastType&, unsigned long long&, unsigned long long&, unsigned long long&, unsigned char const*, unsigned char const*)
static void _maxCodeSize(TLastType& lastType,hpatch_StreamPos_t& curLen0,hpatch_StreamPos_t& curLenv,
                             hpatch_StreamPos_t& fixedLen,const unsigned char* appendData,const unsigned char* appendData_end){
        while (appendData!=appendData_end) {
            unsigned char v;
            size_t sLen0=0;
            do {
                v=*appendData++;
                if (0==v)
                    ++sLen0;
                else
                    break;
            }while (appendData!=appendData_end);
            if (sLen0>0){
                if (lastType==lastType_v){
                    fixedLen += _out_uncompressData_codeSize(curLenv);
                    curLenv = 0;
                }
                curLen0+=sLen0;
                lastType=lastType_same;
                if (v==0)
                    break;//appendData==appendData_end
            }
            if (lastType==lastType_same){
                fixedLen += _out_0Data_codeSize(curLen0);
                curLen0 = 0;
            }
            ++curLenv;
            lastType=lastType_v;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x382c3
movq $0x0, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %al
movb %al, -0x31(%rbp)
movzbl -0x31(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x38212
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x38214
jmp 0x38220
jmp 0x38216
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x381e6
cmpq $0x0, -0x40(%rbp)
jbe 0x38279
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x38254
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x38ee0
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movzbl -0x31(%rbp), %eax
cmpl $0x0, %eax
jne 0x38277
jmp 0x382c3
jmp 0x38279
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x382a6
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x39220
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
jmp 0x381d0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_maxCodeSize_end(hdiff_private::TLastType&, unsigned long long&, unsigned long long&, unsigned long long&)
static void _maxCodeSize_end(TLastType& lastType,hpatch_StreamPos_t& curLen0,
                                 hpatch_StreamPos_t& curLenv,hpatch_StreamPos_t& fixedLen){
        if (curLenv>0){
            fixedLen += _out_uncompressData_codeSize(curLenv);
            curLenv=0;
        }
        if (curLen0>0){
            fixedLen += _out_0Data_codeSize(curLen0);
            curLen0=0;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jbe 0x38316
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x38ee0
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jbe 0x38344
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x39220
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::maxCodeSizeByZeroLen(unsigned long long) const
hpatch_StreamPos_t TSingleStreamRLE0::maxCodeSizeByZeroLen(hpatch_StreamPos_t appendZeroLen) const{
        hpatch_StreamPos_t fixedLen=this->fixed_code.size();
        if (appendZeroLen==0) return fixedLen;
        TLastType lastType=getLastType(*this);
        hpatch_StreamPos_t curLen0=this->len0;
        hpatch_StreamPos_t curLenv=this->uncompressData.size();
        curLen0+=appendZeroLen;
        if (lastType==lastType_v){
            fixedLen += _out_uncompressData_codeSize(curLenv);
            curLenv = 0;
        }
        lastType=lastType_same;
        _maxCodeSize_end(lastType,curLen0,curLenv,fixedLen);
        return fixedLen;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0xbe90
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x38382
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x383f6
movq -0x40(%rbp), %rdi
callq 0x38e70
movq -0x40(%rbp), %rdi
movl %eax, -0x24(%rbp)
movq 0x30(%rdi), %rax
movq %rax, -0x30(%rbp)
addq $0x18, %rdi
callq 0xbe90
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x1, -0x24(%rbp)
jne 0x383d2
movq -0x38(%rbp), %rdi
callq 0x38ee0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
leaq -0x24(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x382d0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::maxCodeSize(hpatch_TStreamInput const*) const
hpatch_StreamPos_t TSingleStreamRLE0::maxCodeSize(const hpatch_TStreamInput* appendData) const{
        TLastType lastType=getLastType(*this);
        hpatch_StreamPos_t curLen0=this->len0;
        hpatch_StreamPos_t curLenv=this->uncompressData.size();
        hpatch_StreamPos_t fixedLen=this->fixed_code.size();
        
        TByte buf[kStepSize];
        hpatch_StreamPos_t readPos=0;
        while (readPos<appendData->streamSize){
            size_t len=kStepSize;
            if (len+readPos>appendData->streamSize)
                len=(size_t)(appendData->streamSize-readPos);
            if (!appendData->read(appendData,readPos,buf,buf+len))
                throw std::runtime_error("TSingleStreamRLE0::maxCodeSize() appendData->read()");
            _maxCodeSize(lastType,curLen0,curLenv,fixedLen,buf,buf+len);
            readPos+=len;
        }
        _maxCodeSize_end(lastType,curLen0,curLenv,fixedLen);
        return fixedLen;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4060, %rsp           # imm = 0x4060
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x4058(%rbp)
callq 0x38e70
movq -0x4058(%rbp), %rdi
movl %eax, -0x14(%rbp)
movq 0x30(%rdi), %rax
movq %rax, -0x20(%rbp)
addq $0x18, %rdi
callq 0xbe90
movq -0x4058(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0xbe90
movq %rax, -0x30(%rbp)
movq $0x0, -0x4038(%rbp)
movq -0x4038(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x3857d
movq $0x4000, -0x4040(%rbp) # imm = 0x4000
movq -0x4040(%rbp), %rax
addq -0x4038(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x384ab
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x4038(%rbp), %rax
movq %rax, -0x4040(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x4038(%rbp), %rsi
leaq -0x4030(%rbp), %rdx
leaq -0x4030(%rbp), %rcx
addq -0x4040(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x38539
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4060(%rbp)
leaq 0x7790b(%rip), %rsi     # 0xafe03
callq 0x4140
jmp 0x384ff
movq -0x4060(%rbp), %rdi
movq 0xadae3(%rip), %rsi     # 0xe5ff0
movq 0xadaac(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x4060(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4048(%rbp)
movl %eax, -0x404c(%rbp)
callq 0x42e0
jmp 0x3859f
leaq -0x4030(%rbp), %r8
leaq -0x4030(%rbp), %r9
addq -0x4040(%rbp), %r9
leaq -0x14(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x381b0
movq -0x4040(%rbp), %rax
addq -0x4038(%rbp), %rax
movq %rax, -0x4038(%rbp)
jmp 0x3845d
leaq -0x14(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x382d0
movq -0x30(%rbp), %rax
addq $0x4060, %rsp           # imm = 0x4060
popq %rbp
retq
movq -0x4048(%rbp), %rdi
callq 0x4680
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::appendByZeroLen(unsigned long long)
void TSingleStreamRLE0::appendByZeroLen(hpatch_StreamPos_t appendZeroLen){
        if (appendZeroLen){
            TLastType lastType=getLastType(*this);
            if (lastType==lastType_v)
                _out_uncompressData(*this);
            len0+=appendZeroLen;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x385fa
movq -0x20(%rbp), %rdi
callq 0x38e70
movl %eax, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x385ea
movq -0x20(%rbp), %rdi
callq 0x38f90
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::append(unsigned char const*, unsigned char const*)
void TSingleStreamRLE0::append(const unsigned char* appendData,const unsigned char* appendData_end){
        TLastType lastType=getLastType(*this);
        while (appendData!=appendData_end) {
            unsigned char v;
            size_t sLen0=0;
            do {
                v=*appendData++;
                if (0==v)
                    ++sLen0;
                else
                    break;
            }while (appendData!=appendData_end);
            if (sLen0>0){
                if (lastType==lastType_v)
                    _out_uncompressData(*this);
                len0+=sLen0;
                lastType=lastType_same;
                if (v==0)
                    break;//appendData==appendData_end
            }
            if (lastType==lastType_same)
                _out_0Data(*this);
            uncompressData.push_back(v);
            lastType=lastType_v;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x38e70
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x386da
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x38666
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x38668
jmp 0x38674
jmp 0x3866a
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x3863a
cmpq $0x0, -0x28(%rbp)
jbe 0x386ae
cmpl $0x1, -0x1c(%rbp)
jne 0x3868a
movq -0x30(%rbp), %rdi
callq 0x38f90
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movl $0x0, -0x1c(%rbp)
movzbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0x386ac
jmp 0x386da
jmp 0x386ae
cmpl $0x0, -0x1c(%rbp)
jne 0x386bd
movq -0x30(%rbp), %rdi
callq 0x390c0
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x39140
movl $0x1, -0x1c(%rbp)
jmp 0x38624
addq $0x30, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::append(hpatch_TStreamInput const*)
void TSingleStreamRLE0::append(const hpatch_TStreamInput* appendData){
        TByte buf[kStepSize];
        hpatch_StreamPos_t readPos=0;
        while (readPos<appendData->streamSize){
            size_t len=kStepSize;
            if (len+readPos>appendData->streamSize)
                len=(size_t)(appendData->streamSize-readPos);
            if (!appendData->read(appendData,readPos,buf,buf+len))
                throw std::runtime_error("TSingleStreamRLE0::append() appendData->read()");
            append(buf,buf+len);
            readPos+=len;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4040, %rsp           # imm = 0x4040
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x4038(%rbp)
movq $0x0, -0x4018(%rbp)
movq -0x4018(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x38820
movq $0x4000, -0x4020(%rbp) # imm = 0x4000
movq -0x4020(%rbp), %rax
addq -0x4018(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x38757
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x4018(%rbp), %rax
movq %rax, -0x4020(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x4018(%rbp), %rsi
leaq -0x4010(%rbp), %rdx
leaq -0x4010(%rbp), %rcx
addq -0x4020(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x387e5
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4040(%rbp)
leaq 0x77693(%rip), %rsi     # 0xafe37
callq 0x4140
jmp 0x387ab
movq -0x4040(%rbp), %rdi
movq 0xad837(%rip), %rsi     # 0xe5ff0
movq 0xad800(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x4040(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4028(%rbp)
movl %eax, -0x402c(%rbp)
callq 0x42e0
jmp 0x38829
movq -0x4038(%rbp), %rdi
leaq -0x4010(%rbp), %rsi
leaq -0x4010(%rbp), %rdx
addq -0x4020(%rbp), %rdx
callq 0x38600
movq -0x4020(%rbp), %rax
addq -0x4018(%rbp), %rax
movq %rax, -0x4018(%rbp)
jmp 0x38709
addq $0x4040, %rsp           # imm = 0x4040
popq %rbp
retq
movq -0x4028(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::finishAppend()
void TSingleStreamRLE0::finishAppend(){
        if ((fixed_code.empty())||(len0>0))
            _out_0Data(*this);
        if (!uncompressData.empty())
            _out_uncompressData(*this);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0xce50
testb $0x1, %al
jne 0x38868
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jbe 0x38871
movq -0x10(%rbp), %rdi
callq 0x390c0
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0xce50
testb $0x1, %al
jne 0x3888b
movq -0x10(%rbp), %rdi
callq 0x38f90
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::TStreamRLE::endSame()
inline void endSame(){
            size_t sign=((size_t)(253-(size_t)(TByte)(sameCur-1))) >> (sizeof(size_t)*8-1);
            if (sameCount+sign>kRleMinSameSize){//can rle
                endNoSame();
                rle_pushSame(ctrlBuf,codeBuf,sameCur,sameCount);
                sameCount=0;
            }else{
                notSameCount+=sameCount;
                while (sameCount--)
                    codeBuf.push_back(sameCur);
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movzbl 0x10(%rcx), %eax
subl $0x1, %eax
movzbl %al, %eax
movl %eax, %edx
movl $0xfd, %eax
subq %rdx, %rax
shrq $0x3f, %rax
movq %rax, -0x10(%rbp)
movq 0x18(%rcx), %rax
addq -0x10(%rbp), %rax
cmpq 0x28(%rcx), %rax
jbe 0x3890f
movq -0x18(%rbp), %rdi
callq 0x38960
movq -0x18(%rbp), %rcx
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
movb 0x10(%rcx), %al
movq 0x18(%rcx), %rcx
movzbl %al, %edx
callq 0x389f0
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x3894d
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x18(%rcx)
cmpq $0x0, %rax
je 0x3894b
movq -0x18(%rbp), %rsi
movq 0x8(%rsi), %rdi
addq $0x10, %rsi
callq 0x39140
jmp 0x3891f
jmp 0x3894d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::TStreamRLE::endNoSame()
inline void endNoSame(){
            if (notSameCount>1){
                rle_pushNotSameCtrl(ctrlBuf,notSameCount);
                notSameCount=0;
            }else if (notSameCount==1){
                notSameCount=0;
                TByte cur=codeBuf.back();
                codeBuf.pop_back();
                rle_pushSame(ctrlBuf,codeBuf,cur,1);
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x1, 0x20(%rax)
jbe 0x38999
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq 0x20(%rax), %rsi
callq 0x38ad0
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
jmp 0x389e9
movq -0x18(%rbp), %rax
cmpq $0x1, 0x20(%rax)
jne 0x389e7
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq 0x8(%rax), %rdi
callq 0x30690
movq %rax, %rcx
movq -0x18(%rbp), %rax
movb (%rcx), %cl
movb %cl, -0x9(%rbp)
movq 0x8(%rax), %rdi
callq 0x391b0
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movl $0x1, %ecx
movzbl -0x9(%rbp), %edx
callq 0x389f0
jmp 0x389e9
addq $0x20, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::rle_pushSame(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char, unsigned long long)
static void rle_pushSame(std::vector<TByte>& out_ctrl,std::vector<TByte>& out_code,
                             TByte cur,TUInt count){
        assert(count>0);
        while (count>kMaxBytesRleLen){
            rle_pushSame(out_ctrl,out_code,cur,kMaxBytesRleLen);
            count-=kMaxBytesRleLen;
        }
        enum TByteRleType type;
        if (cur==0)
            type=kByteRleType_rle0;
        else if (cur==255)
            type=kByteRleType_rle255;
        else
            type=kByteRleType_rle;
        const TUInt packCount=(TUInt)(count-1);
        packUIntWithTag(out_ctrl,packCount,type,kByteRleType_bit);
        if (type==kByteRleType_rle)
            out_code.push_back(cur);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x38a12
jmp 0x38a31
leaq 0x7754a(%rip), %rdi     # 0xaff63
leaq 0x7748b(%rip), %rsi     # 0xafeab
movl $0x2b, %edx
leaq 0x7753f(%rip), %rcx     # 0xaff6b
callq 0x4270
jmp 0x38a33
cmpq $0x7fffffff, -0x20(%rbp) # imm = 0x7FFFFFFF
jbe 0x38a63
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movzbl -0x11(%rbp), %edx
callq 0x389f0
movq -0x20(%rbp), %rax
subq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x20(%rbp)
jmp 0x38a33
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x38a75
movl $0x0, -0x24(%rbp)
jmp 0x38a92
movzbl -0x11(%rbp), %eax
cmpl $0xff, %eax
jne 0x38a89
movl $0x1, -0x24(%rbp)
jmp 0x38a90
movl $0x2, -0x24(%rbp)
jmp 0x38a92
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %edx
movl $0x2, %ecx
callq 0x38b10
cmpl $0x2, -0x24(%rbp)
jne 0x38ac6
movq -0x10(%rbp), %rdi
leaq -0x11(%rbp), %rsi
callq 0x39140
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::getLastType(hdiff_private::TSingleStreamRLE0 const&)
inline TLastType getLastType(const TSingleStreamRLE0& self){
        if (self.uncompressData.empty()){
            return lastType_same;
        }else{
            assert(self.len0==0);
            return lastType_v;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0xce50
testb $0x1, %al
jne 0x38e8f
jmp 0x38e98
movl $0x0, -0x4(%rbp)
jmp 0x38ecb
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x38ea5
jmp 0x38ec4
leaq 0x77131(%rip), %rdi     # 0xaffdd
leaq 0x76ff8(%rip), %rsi     # 0xafeab
movl $0xb7, %edx
leaq 0x7712b(%rip), %rcx     # 0xaffea
callq 0x4270
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_uncompressData_codeSize(unsigned long long)
inline hpatch_StreamPos_t _out_uncompressData_codeSize(hpatch_StreamPos_t dataSize){
        hpatch_StreamPos_t codeSize=0;
        hpatch_StreamPos_t saved=0;
        while (dataSize-saved>kMaxBytesRleLen){
            codeSize+=hpatch_packUInt_size(kMaxBytesRleLen);
            codeSize+=kMaxBytesRleLen;
            codeSize+=hpatch_packUInt_size(0);
            saved+=kMaxBytesRleLen;
        }
        codeSize+=hpatch_packUInt_size(dataSize-saved);
        codeSize+=(hpatch_StreamPos_t)(dataSize-saved);
        return codeSize;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
subq -0x18(%rbp), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jbe 0x38f55
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x859b0
movl %eax, %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x859b0
movl %eax, %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x18(%rbp)
jmp 0x38efc
movq -0x8(%rbp), %rdi
subq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x859b0
movl %eax, %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
subq -0x18(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_uncompressData(hdiff_private::TSingleStreamRLE0&)
inline void _out_uncompressData(TSingleStreamRLE0& self){
        size_t saved=0;
        while (self.uncompressData.size()-saved>kMaxBytesRleLen){
            packUInt(self.fixed_code, kMaxBytesRleLen);
            pushBack(self.fixed_code, self.uncompressData.data()+saved,self.uncompressData.data()+saved+kMaxBytesRleLen);
            packUInt(self.fixed_code,0);
            saved+=kMaxBytesRleLen;
        }
        packUInt(self.fixed_code, self.uncompressData.size()-saved);
        pushBack(self.fixed_code, self.uncompressData.data()+saved,self.uncompressData.data()+self.uncompressData.size());
        self.uncompressData.clear();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xbe90
subq -0x10(%rbp), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jbe 0x3902e
movq -0x8(%rbp), %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x38bf0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xbb60
addq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xbb60
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
addq -0x10(%rbp), %rdx
addq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
callq 0x38c20
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x38c80
movq -0x10(%rbp), %rax
addq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x10(%rbp)
jmp 0x38fa4
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xbe90
movq -0x40(%rbp), %rdi
movq %rax, %rsi
subq -0x10(%rbp), %rsi
callq 0x38bf0
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xbb60
addq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xbb60
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xbe90
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq %rax, %rdx
callq 0x38c20
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xce90
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_0Data(hdiff_private::TSingleStreamRLE0&)
inline void _out_0Data(TSingleStreamRLE0& self){
        hpatch_StreamPos_t saved=0;
        while (self.len0-saved>kMaxBytesRleLen){
            packUInt(self.fixed_code,kMaxBytesRleLen);
            packUInt(self.fixed_code,0);
            saved+=kMaxBytesRleLen;
        }
        packUInt(self.fixed_code,(hpatch_StreamPos_t)(self.len0-saved));
        self.len0=0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
subq -0x10(%rbp), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jbe 0x39111
movq -0x8(%rbp), %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x38bf0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x38c80
movq -0x10(%rbp), %rax
addq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x10(%rbp)
jmp 0x390d4
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
subq -0x10(%rbp), %rsi
callq 0x37fc0
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_0Data_codeSize(unsigned long long)
inline hpatch_StreamPos_t _out_0Data_codeSize(hpatch_StreamPos_t len0){
        hpatch_StreamPos_t codeSize=0;
        hpatch_StreamPos_t saved=0;
        while (len0-saved>kMaxBytesRleLen){
            codeSize+=hpatch_packUInt_size(kMaxBytesRleLen);
            codeSize+=hpatch_packUInt_size(0);
            saved+=kMaxBytesRleLen;
        }
        codeSize+=hpatch_packUInt_size((hpatch_StreamPos_t)(len0-saved));
        return codeSize;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
subq -0x18(%rbp), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jbe 0x39287
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x859b0
movl %eax, %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x859b0
movl %eax, %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x18(%rbp)
jmp 0x3923c
movq -0x8(%rbp), %rdi
subq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x859b0
movl %eax, %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::TSuffixString::clear_cache()
void TSuffixString::clear_cache(){
#if (_SSTRING_FAST_MATCH>0)
    if (m_isUsedFastMatch) m_fastMatch.clear();
#endif
    if (m_cached2char_range){
        delete [](TChar*)m_cached2char_range;
        m_cached2char_range=0;
    }
    memset(&m_cached1char_range[0],0,sizeof(void*)*(256+1));
    m_cached_SA_begin=0;
    m_cached_SA_end=0;
    m_lower_bound=(t_lower_bound_func)_lower_bound_TInt32;//safe
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0x40(%rax)
je 0x39557
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x3abe0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x878(%rax)
je 0x39592
movq -0x10(%rbp), %rax
movq 0x878(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x39583
movq -0x18(%rbp), %rdi
callq 0x44a0
movq -0x10(%rbp), %rax
movq $0x0, 0x878(%rax)
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
xorl %esi, %esi
movl $0x808, %edx            # imm = 0x808
callq 0x4210
movq -0x10(%rbp), %rax
movq $0x0, 0x60(%rax)
movq $0x0, 0x68(%rax)
leaq 0x91f(%rip), %rcx       # 0x39ee0
movq %rcx, 0x880(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x396dc
jmp 0x396fb
leaq 0x7695d(%rip), %rdi     # 0xb0040
leaq 0x76969(%rip), %rsi     # 0xb0053
movl $0x114, %edx            # imm = 0x114
leaq 0x7699b(%rip), %rcx     # 0xb0091
callq 0x4270
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, (%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x8(%rdi)
callq 0x2ae80
testb $0x1, %al
jne 0x39719
jmp 0x39740
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
callq 0x39820
movq -0x28(%rbp), %rdx
movq (%rdx), %rdi
movq 0x8(%rdx), %rsi
addq $0x28, %rdx
movq -0x20(%rbp), %rcx
callq 0x398a0
jmp 0x39765
movq -0x28(%rbp), %rdi
addq $0x28, %rdi
callq 0x39860
movq -0x28(%rbp), %rdx
movq (%rdx), %rdi
movq 0x8(%rdx), %rsi
addq $0x10, %rdx
movq -0x20(%rbp), %rcx
callq 0x399e0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x39b20
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x39530
movq -0x10(%rbp), %rdi
movq $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
addq $0x10, %rdi
callq 0x39820
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x39860
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: void hdiff_private::(anonymous namespace)::_suffixString_create<long>(unsigned char const*, unsigned char const*, std::vector<long, std::allocator<long>>&, unsigned long)
static void _suffixString_create(const TChar* src,const TChar* src_end,
                                     std::vector<TSAInt>& out_sstring,size_t threadNum){
        size_t size=(size_t)(src_end-src);
        if (size<0)
            throw std::runtime_error("suffixString_create() error.");
        out_sstring.resize(size);
        if (size<=0) return;
    #ifdef _SA_SORTBY_STD_SORT
        for (TSAInt i=0;i<size;++i)
            out_sstring[i]=i;
        int rt=0;
        try {
            std::sort<TSAInt*,const TSuffixString_compare&>(&out_sstring[0],&out_sstring[0]+size,
                                                            TSuffixString_compare(src,src_end));
        } catch (...) {
            rt=-1;
        }
    #endif
    #ifdef _SA_SORTBY_SAIS
        TSAInt rt=saisxx(src,&out_sstring[0],size);
    #endif
    #ifdef _SA_SORTBY_DIVSUFSORT
        saint_t rt=-1;
        if (sizeof(TSAInt)==8)
            rt=divsufsort64(src,(saidx64_t*)&out_sstring[0],(saidx64_t)size,(int)threadNum);
        else if (sizeof(TSAInt)==4)
            rt=divsufsort(src,(saidx32_t*)&out_sstring[0],(saidx32_t)size,(int)threadNum);
    #endif
       if (rt!=0)
            throw std::runtime_error("suffixString_create() error.");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jae 0x39921
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x76803(%rip), %rsi     # 0xb00ec
callq 0x4140
jmp 0x398f0
movq -0x40(%rbp), %rdi
movq 0xac6f5(%rip), %rsi     # 0xe5ff0
movq 0xac6be(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x42e0
jmp 0x399cb
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3b910
cmpq $0x0, -0x28(%rbp)
ja 0x3993a
jmp 0x399c5
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3ac40
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movl %eax, %ecx
callq 0x519f0
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x399c5
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
leaq 0x7675c(%rip), %rsi     # 0xb00ec
callq 0x4140
jmp 0x39997
movq -0x50(%rbp), %rdi
movq 0xac64e(%rip), %rsi     # 0xe5ff0
movq 0xac617(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x42e0
jmp 0x399cb
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: void hdiff_private::(anonymous namespace)::_build_range256<long>(long const*, long const*, unsigned char const*, unsigned char const*, long const**)
static void _build_range256(const T* SA_begin,const T* SA_end,
                                const TChar* src_begin,const TChar* src_end,
                                const T** range){
        TChar str[1];
        const T* pos=SA_begin;
        for (size_t c=0;c<256;++c){
            str[0]=(TChar)(c);
            pos=_lower_bound(pos,SA_end,str,str+1,src_begin,src_end);
            range[c]=pos;
        }
        range[256]=SA_end;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x100, -0x40(%rbp)     # imm = 0x100
jae 0x3a2ea
movq -0x40(%rbp), %rax
movb %al, -0x29(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x29(%rbp), %rdx
leaq -0x29(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x3a800
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3a28c
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x800(%rax)
addq $0x50, %rsp
popq %rbp
retq
nop