LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: long (anonymous namespace)::getEqualLengthLimit<1041l>(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*)
static TInt getEqualLengthLimit(const TByte* x,const TByte* x_end,
                          const TByte* y,const TByte* y_end){
    const TInt xLen=(TInt)(x_end-x);
    const TInt yLen=(TInt)(y_end-y);
    TInt maxEqLen=(xLen<yLen)?xLen:yLen;
    if (kMaxEqLenLimit)
        maxEqLen=(maxEqLen<=kMaxEqLenLimit)?maxEqLen:kMaxEqLenLimit;
    for (TInt i=0; i<maxEqLen; ++i) {
        if (x[i]!=y[i])
            return i;
    }
    return maxEqLen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x23ac6
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x23ace
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x411, -0x40(%rbp)     # imm = 0x411
jg 0x23aea
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x23af5
movl $0x411, %eax            # imm = 0x411
movq %rax, -0x58(%rbp)
jmp 0x23af5
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x23b45
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x23b35
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x23b4d
jmp 0x23b37
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x23b05
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h
// Function: unsigned int hdiff_private::_getUIntCost<unsigned long>(unsigned long)
static unsigned int _getUIntCost(_UInt v){
    if ((sizeof(_UInt)<8)||((v>>28)>>28)==0) {
        int cost=1;
        _UInt t;
        if ((t=(v>>28))) { v=t; cost+=4; }
        if ((t=(v>>14))) { v=t; cost+=2; }
        if ((t=(v>> 7))) { v=t; ++cost; }
        return cost;
    }else{
        return 9;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq $0x1c, %rax
shrq $0x1c, %rax
cmpq $0x0, %rax
jne 0x23c32
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rax
shrq $0x1c, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x23be4
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
shrq $0xe, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x23c07
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
shrq $0x7, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x23c2a
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x23c39
movl $0x9, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::TOldCover::Link((anonymous namespace)::TOldCover const&)
inline void Link(const TOldCover& next){//共线的2覆盖线合并链接.
            assert(isCollinear(next));
            assert(oldPos<=next.oldPos);
            length = (next.oldPos-oldPos)+next.length;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
callq 0x23c40
testb $0x1, %al
jne 0x23c97
jmp 0x23c99
jmp 0x23cb8
leaq 0x8b5b4(%rip), %rdi     # 0xaf254
leaq 0x8b0db(%rip), %rsi     # 0xaed82
movl $0x5d, %edx
leaq 0x8b5b3(%rip), %rcx     # 0xaf266
callq 0x4270
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jg 0x23cca
jmp 0x23ce9
leaq 0x8b5d4(%rip), %rdi     # 0xaf2a5
leaq 0x8b0aa(%rip), %rsi     # 0xaed82
movl $0x5e, %edx
leaq 0x8b582(%rip), %rcx     # 0xaf266
callq 0x4270
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq (%rax), %rcx
movq -0x10(%rbp), %rdx
addq 0x10(%rdx), %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::select_cover(std::vector<(anonymous namespace)::TOldCover, std::allocator<(anonymous namespace)::TOldCover>>&, unsigned long, (anonymous namespace)::TDiffData const&, int, (anonymous namespace)::TDiffLimit*, bool)
static void select_cover(std::vector<TOldCover>& covers,size_t cover_begin,const TDiffData& diff,
                         int kMinSingleMatchScore,TDiffLimit* diffLimit,bool isCanExtendCover){
    if (diffLimit==0){
        TCompressDetect  nocover_detect;
        TCompressDetect  cover_detect;
        _select_cover(covers,cover_begin,diff,kMinSingleMatchScore,nocover_detect,cover_detect,0,isCanExtendCover);
    }else{
        _select_cover(covers,cover_begin,diff,kMinSingleMatchScore,diffLimit->nocover_detect,
                      diffLimit->cover_detect,diffLimit,isCanExtendCover);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x24514
leaq -0x60(%rbp), %rdi
callq 0x3d880
leaq -0x90(%rbp), %rdi
callq 0x3d880
jmp 0x24488
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movzbl -0x29(%rbp), %r8d
andl $0x1, %r8d
movq %rsp, %rax
movl %r8d, 0x8(%rax)
movq $0x0, (%rax)
leaq -0x60(%rbp), %r8
leaq -0x90(%rbp), %r9
callq 0x246e0
jmp 0x244c0
leaq -0x90(%rbp), %rdi
callq 0x3d970
leaq -0x60(%rbp), %rdi
callq 0x3d970
jmp 0x2454c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x24509
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3d970
leaq -0x60(%rbp), %rdi
callq 0x3d970
jmp 0x24555
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %r8
movq -0x28(%rbp), %rax
movq 0x30(%rax), %r9
movq -0x28(%rbp), %r10
movb -0x29(%rbp), %al
andb $0x1, %al
movq %r10, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x246e0
addq $0xb0, %rsp
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::_clipLenByLimit(unsigned long long&, unsigned long long)
static inline hpatch_StreamPos_t _clipLenByLimit(hpatch_StreamPos_t& clen,hpatch_StreamPos_t kMaxLen){
        hpatch_StreamPos_t alen=clen;
        assert(alen>kMaxLen);
        do{
            alen=(alen+1)>>1;
        } while (alen>kMaxLen);
        clen-=alen;
        return alen;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0x24ed7
jmp 0x24ef6
leaq 0x8a464(%rip), %rdi     # 0xaf342
leaq 0x89e9d(%rip), %rsi     # 0xaed82
movl $0x21a, %edx            # imm = 0x21A
leaq 0x8a45e(%rip), %rcx     # 0xaf34f
callq 0x4270
jmp 0x24ef8
movq -0x18(%rbp), %rax
addq $0x1, %rax
shrq %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x24ef8
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::assert_covers_safe(hdiff_private::TCovers const&, unsigned long long, unsigned long long)
static void assert_covers_safe(const TCovers& covers,hpatch_StreamPos_t newSize,hpatch_StreamPos_t oldSize){
        hpatch_StreamPos_t lastNewEnd=0;
        for (size_t i=0;i<covers.coverCount();++i){
            TCover cover;
            covers.covers(i,&cover);
            assert_cover_safe(cover,lastNewEnd,newSize,oldSize);
            lastNewEnd=cover.newPos+cover.length;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2af30
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jae 0x24fd1
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x2af50
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x40(%rbp), %rdi
callq 0x25000
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x24f74
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::TDiffResearchCover::endResearchCover()
inline void endResearchCover(){
        if (limitCoverHitEndPos_back!=_kNullCoverHitEndPos){
            TOldCover& cover=covers[limitCoverIndex_back];
            cover.oldPos+=(TInt)limitCoverHitEndPos_back;
            cover.newPos+=(TInt)limitCoverHitEndPos_back;
            cover.length-=(TInt)limitCoverHitEndPos_back;
            limitCoverHitEndPos_back=_kNullCoverHitEndPos;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $-0x1, 0x60(%rax)
je 0x256b0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x58(%rax), %rsi
callq 0x1fb50
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq 0x60(%rax), %rdx
movq -0x10(%rbp), %rcx
addq (%rcx), %rdx
movq %rdx, (%rcx)
movq 0x60(%rax), %rdx
movq -0x10(%rbp), %rcx
addq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rcx)
movq 0x60(%rax), %rsi
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
subq %rsi, %rdx
movq %rdx, 0x10(%rcx)
movq $-0x1, 0x60(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::TDiffResearchCover::_researchRange((anonymous namespace)::TDiffLimit*)
void _researchRange(TDiffLimit* diffLimit){
        search_and_dispose_cover(curCovers,diff,sstring,kMinSingleMatchScore,diffLimit,isCanExtendCover);
        if (curCovers.empty()) return;
        reCovers.insert(reCovers.end(),curCovers.begin(),curCovers.end());
        curCovers.clear();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rax, %rdi
addq $0x40, %rdi
movq 0x8(%rax), %rsi
movq 0x18(%rax), %rdx
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %r8
movb 0x68(%rax), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x1f340
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
callq 0x1cb70
testb $0x1, %al
jne 0x2570f
jmp 0x25711
jmp 0x25782
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x28, %rax
movq %rax, -0x48(%rbp)
addq $0x28, %rdi
callq 0x1edf0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1ee20
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
callq 0x1ee60
movq -0x40(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x40, %rdi
callq 0x1edf0
movq -0x48(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x1ed40
movq -0x40(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0x40, %rdi
callq 0x25790
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h
// Function: hdiff_private::pushBack(std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*)
static void pushBack(std::vector<unsigned char>& out_buf,const hpatch_TStreamInput* data){
    const size_t kStepSize=hpatch_kStreamCacheSize*2;
    unsigned char buf[kStepSize];
    out_buf.reserve(out_buf.size()+(size_t)data->streamSize);
    hpatch_StreamPos_t curPos=0;
    while (curPos<data->streamSize){
        size_t len=kStepSize;
        if (curPos+len>data->streamSize)
            len=(size_t)(data->streamSize-curPos);
        if (!data->read(data,curPos,buf,buf+len))
            throw std::runtime_error("pushBack() data->read() error!");
        pushBack(out_buf,buf,len);
        curPos+=len;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2050, %rsp           # imm = 0x2050
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x2000, -0x18(%rbp)    # imm = 0x2000
movq -0x8(%rbp), %rax
movq %rax, -0x2048(%rbp)
movq -0x8(%rbp), %rdi
callq 0xbe90
movq -0x2048(%rbp), %rdi
movq %rax, %rsi
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rsi
callq 0x2b0a0
movq $0x0, -0x2028(%rbp)
movq -0x2028(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x2877e
movq $0x2000, -0x2030(%rbp) # imm = 0x2000
movq -0x2028(%rbp), %rax
addq -0x2030(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x286bf
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x2028(%rbp), %rax
movq %rax, -0x2030(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x2028(%rbp), %rsi
leaq -0x2020(%rbp), %rdx
leaq -0x2020(%rbp), %rcx
addq -0x2030(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x2874d
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2050(%rbp)
leaq 0x86f40(%rip), %rsi     # 0xaf64c
callq 0x4140
jmp 0x28713
movq -0x2050(%rbp), %rdi
movq 0xbd8cf(%rip), %rsi     # 0xe5ff0
movq 0xbd898(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x2050(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2038(%rbp)
movl %eax, -0x203c(%rbp)
callq 0x42e0
jmp 0x28787
movq -0x8(%rbp), %rdi
leaq -0x2020(%rbp), %rsi
movq -0x2030(%rbp), %rdx
callq 0x287a0
movq -0x2030(%rbp), %rax
addq -0x2028(%rbp), %rax
movq %rax, -0x2028(%rbp)
jmp 0x28671
addq $0x2050, %rsp           # imm = 0x2050
popq %rbp
retq
movq -0x2038(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::pushCompressCode(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>> const&)
inline static void pushCompressCode(std::vector<TByte>& out_diff,
                                        const std::vector<TByte>& compress_code,
                                        const std::vector<TByte>& data){
        if (compress_code.empty())
            pushBack(out_diff,data);
        else
            pushBack(out_diff,compress_code);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xce50
testb $0x1, %al
jne 0x288d3
jmp 0x288e2
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x285b0
jmp 0x288ef
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x285b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::pushCompressCode(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>> const&, hpatch_TStreamInput const*)
inline static void pushCompressCode(std::vector<TByte>& out_diff,
                                        const std::vector<TByte>& compress_code,
                                        const hpatch_TStreamInput* data){
        if (compress_code.empty())
            pushBack(out_diff,data);
        else
            pushBack(out_diff,compress_code);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xce50
testb $0x1, %al
jne 0x28923
jmp 0x28932
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x28620
jmp 0x2893f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x285b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::_getSubDiff(std::vector<unsigned char, std::allocator<unsigned char>>&, (anonymous namespace)::TDiffData const&, (anonymous namespace)::TOldCover const&)
static void _getSubDiff(std::vector<TByte>& subDiff,const TDiffData& diff,const TOldCover& cover){
        subDiff.resize(cover.length);
        const TByte* pnew=diff.newData+cover.newPos;
        const TByte* pold=diff.oldData+cover.oldPos;
        for (size_t i=0;i<subDiff.size();++i)
            subDiff[i]=pnew[i]-pold[i];
    }

// 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 -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xbeb0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
addq (%rcx), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0xbe90
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x2934d
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movb %al, -0x39(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x14d10
movb -0x39(%rbp), %cl
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x292f3
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::_getIs0(unsigned char const*, unsigned long)
static bool _getIs0(const TByte* data,size_t length){
        for (size_t i=0; i<length; ++i) {
            if (data[i]==0)
                continue;
            else
                return false;
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x293a5
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x29391
jmp 0x29397
movb $0x0, -0x1(%rbp)
jmp 0x293a9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x29374
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::hpi_getSavedSizeBytes(unsigned long)
static inline TByte hpi_getSavedSizeBytes(TUInt size){
        check(size==(hpi_pos_t)size);
        TByte bytes=0; 
        while (size>0){
            ++bytes;
            size>>=8;
        }
        return bytes;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
je 0x294bb
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
leaq 0x865dd(%rip), %rsi     # 0xafa63
callq 0x4140
jmp 0x2948d
movq -0x20(%rbp), %rdi
movq 0xbcb58(%rip), %rsi     # 0xe5ff0
movq 0xbcb21(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x42e0
jmp 0x294e5
movb $0x0, -0x15(%rbp)
cmpq $0x0, -0x8(%rbp)
jbe 0x294dc
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
shrq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x294bf
movb -0x15(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x4680
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::hpi_saveSize(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned long)
static inline void hpi_saveSize(std::vector<TByte>& buf,TUInt size){
        check(size==(hpi_pos_t)size);
        while (size>0){
            buf.push_back((TByte)size);
            size>>=8;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
je 0x2955f
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
leaq 0x86539(%rip), %rsi     # 0xafa63
callq 0x4140
jmp 0x29531
movq -0x28(%rbp), %rdi
movq 0xbcab4(%rip), %rsi     # 0xe5ff0
movq 0xbca7d(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x42e0
jmp 0x29590
jmp 0x29561
cmpq $0x0, -0x10(%rbp)
jbe 0x2958a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb %al, -0x1d(%rbp)
leaq -0x1d(%rbp), %rsi
callq 0x30440
movq -0x10(%rbp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x29561
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h
// Function: hdiff_private::TVectorAsStreamOutput::TVectorAsStreamOutput(std::vector<unsigned char, std::allocator<unsigned char>>&)
explicit TVectorAsStreamOutput(std::vector<unsigned char>& _dst):dst(_dst){
        this->streamImport=this;
        this->streamSize=hpatch_kNullStreamPos;
        this->read_writed=_read;
        this->write=_write;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq %rax, (%rax)
movq $-0x1, 0x8(%rax)
leaq 0x1716(%rip), %rcx      # 0x2b200
movq %rcx, 0x10(%rax)
leaq 0x17ab(%rip), %rcx      # 0x2b2a0
movq %rcx, 0x18(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h
// Function: hdiff_private::TSuffixString::SA(long) const
inline TInt SA(TInt i)const{//return m_SA[i];//排好序的后缀字符串数组.
        if (isUseLargeSA())
            return m_SA_large[i];
        else
            return (TInt)m_SA_limit[i];
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x2ae80
testb $0x1, %al
jne 0x2ae43
jmp 0x2ae5d
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rsi
callq 0x2aeb0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2ae75
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
callq 0x2aed0
movslq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h
// Function: hdiff_private::TCovers::covers(unsigned long, hpatch_TCover*) const
inline void covers(size_t index,TCover* out_cover)const{
        if (_isCover32) {
            const hpatch_TCover32& c32=((const hpatch_TCover32*)_covers)[index];
            out_cover->oldPos=c32.oldPos;
            out_cover->newPos=c32.newPos;
            out_cover->length=c32.length;
        }else{
            *out_cover=((const hpatch_TCover*)_covers)[index];
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
testb $0x1, 0x20(%rax)
je 0x2afb5
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0xc, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x2afdf
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h
// Function: hdiff_private::TVectorAsStreamOutput::_read(hpatch_TStreamOutput const*, unsigned long long, unsigned char*, unsigned char*)
static hpatch_BOOL _read(const struct hpatch_TStreamOutput* stream,hpatch_StreamPos_t readFromPos,
                             unsigned char* out_data,unsigned char* out_data_end){
        const TVectorAsStreamOutput* self=(const TVectorAsStreamOutput*)stream->streamImport;
        const std::vector<unsigned char>& src=self->dst;
        size_t readLen=out_data_end-out_data;
        if (readFromPos+readLen>src.size()) return hpatch_FALSE;
        memcpy(out_data,src.data()+(size_t)readFromPos,readLen);
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rdi
callq 0xbe90
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jbe 0x2b268
movl $0x0, -0x4(%rbp)
jmp 0x2b294
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
callq 0x14be0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
addq -0x18(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x4320
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h
// Function: hdiff_private::TVectorAsStreamOutput::_write(hpatch_TStreamOutput const*, unsigned long long, unsigned char const*, unsigned char const*)
static hpatch_BOOL _write(const hpatch_TStreamOutput* stream,
                            const hpatch_StreamPos_t writeToPos,
                            const unsigned char* data,const unsigned char* data_end){
        TVectorAsStreamOutput* self=(TVectorAsStreamOutput*)stream->streamImport;
        std::vector<unsigned char>& dst=self->dst;
        size_t writeLen=(size_t)(data_end-data);
        if (writeToPos>dst.size()) return hpatch_FALSE;
        if  (dst.size()==writeToPos){
            dst.insert(dst.end(),data,data_end);
        }else{
            if (writeToPos+writeLen!=(size_t)(writeToPos+writeLen)) return hpatch_FALSE;
            if (dst.size()<writeToPos+writeLen)
                dst.resize((size_t)(writeToPos+writeLen));
            memcpy(&dst[(size_t)writeToPos],data,writeLen);
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
callq 0xbe90
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jbe 0x2b307
movl $0x0, -0x4(%rbp)
jmp 0x2b3bc
movq -0x38(%rbp), %rdi
callq 0xbe90
cmpq -0x18(%rbp), %rax
jne 0x2b353
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rdi
callq 0xcf50
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xcf80
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x48(%rbp), %rsi
callq 0xe540
movq %rax, -0x58(%rbp)
jmp 0x2b3b5
movq -0x18(%rbp), %rax
addq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
addq -0x40(%rbp), %rcx
cmpq %rcx, %rax
je 0x2b371
movl $0x0, -0x4(%rbp)
jmp 0x2b3bc
movq -0x38(%rbp), %rdi
callq 0xbe90
movq -0x18(%rbp), %rcx
addq -0x40(%rbp), %rcx
cmpq %rcx, %rax
jae 0x2b398
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x40(%rbp), %rsi
callq 0xbeb0
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x14d10
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x4320
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h
// Function: hdiff_private::TCoversBuf::_push_cover(hpatch_TOutputCovers*, hpatch_TCover const*)
static hpatch_BOOL _push_cover(struct hpatch_TOutputCovers* out_covers,const TCover* cover){
        TCoversBuf* self=(TCoversBuf*)out_covers;
        if (self->_isCover32) {
            hpatch_TCover32 c32;
            c32.oldPos=(hpatch_uint32_t)cover->oldPos;
            c32.newPos=(hpatch_uint32_t)cover->newPos;
            c32.length=(hpatch_uint32_t)cover->length;
            self->m_covers_limit.push_back(c32);
            self->_update(self->m_covers_limit);
        }else{
            self->m_covers_larger.push_back(*cover);
            self->_update(self->m_covers_larger);
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x20(%rax)
je 0x2b576
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2b780
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x28, %rsi
callq 0x2b7f0
jmp 0x2b598
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
movq -0x10(%rbp), %rsi
callq 0x2b840
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
callq 0x2b8b0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h
// Function: hdiff_private::TCoversBuf::_collate_covers(hpatch_TOutputCovers*)
static void _collate_covers(struct hpatch_TOutputCovers* out_covers){
        TCoversBuf* self=(TCoversBuf*)out_covers;
        if (self->_isCover32){
            tm_collate_covers(self->m_covers_limit);
            self->_update(self->m_covers_limit);
        }else{
            tm_collate_covers(self->m_covers_larger);
            self->_update(self->m_covers_larger);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x20(%rax)
je 0x2b5ee
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x28950
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x2b7f0
jmp 0x2b60c
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x28cd0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
callq 0x2b8b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h
// Function: hdiff_private::TAutoMem::realloc(unsigned long)
inline void realloc(size_t newSize){
            if (newSize<=capacity()){
                _data_end=_data+newSize;
            }else{
                unsigned char* _new_data=(unsigned char*)::realloc(_data,newSize);
                if (_new_data==0) throw std::runtime_error("TAutoMem::TAutoMem() realloc() error!");
                _data=_new_data;
                _data_end=_new_data+newSize;
                _capacity_end=_data_end;
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x30280
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
ja 0x301e5
movq -0x38(%rbp), %rax
movq (%rax), %rcx
addq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x3026f
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x45e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x30250
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x7f5cd(%rip), %rsi     # 0xaf7e8
callq 0x4140
jmp 0x30222
movq -0x40(%rbp), %rdi
movq 0xb5dc3(%rip), %rsi     # 0xe5ff0
movq 0xb5d8c(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x42e0
jmp 0x30275
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
addq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x4680
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: hdiff_private::TMatchBlock::getPackedCover()
void TMatchBlock::getPackedCover(){
    std::sort(blockCovers.begin(),blockCovers.end(),cover_cmp_by_old_t<hpatch_TCover>());
    _getPackedCovers<false>(oldData_end-oldData,blockCovers,packedCoversForOld);
    std::sort(blockCovers.begin(),blockCovers.end(),cover_cmp_by_new_t<hpatch_TCover>());
    _getPackedCovers<true>(newData_end-newData,blockCovers,packedCoversForNew);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x40, %rdi
callq 0x2c410
movq -0x40(%rbp), %rdi
movq %rax, -0x10(%rbp)
addq $0x40, %rdi
callq 0x2c280
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x33310
movq -0x40(%rbp), %rdx
movq 0x20(%rdx), %rdi
movq 0x18(%rdx), %rax
subq %rax, %rdi
movq %rdx, %rsi
addq $0x40, %rsi
addq $0x58, %rdx
callq 0x30b40
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
callq 0x2c410
movq -0x40(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x40, %rdi
callq 0x2c280
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2e3b0
movq -0x40(%rbp), %rdx
movq 0x8(%rdx), %rdi
movq (%rdx), %rax
subq %rax, %rdi
movq %rdx, %rsi
addq $0x40, %rsi
addq $0x70, %rdx
callq 0x30cd0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: hdiff_private::doPackData(unsigned char*, unsigned char*, std::vector<hpatch_TCover, std::allocator<hpatch_TCover>> const&)
static unsigned char* doPackData(unsigned char* data,unsigned char* data_end,
                                     const std::vector<TPackedCover>& packedCovers){
        unsigned char* dst=data;
        for (size_t i=0;i<packedCovers.size();++i){
            const TPackedCover& cv=packedCovers[i];
            assert(dst==data+cv.newPos);
            memmove(data+cv.newPos,data+cv.oldPos,(size_t)cv.length);
            dst=data+cv.newPos+cv.length;
        }
        return dst;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2c560
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x30fa9
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x334f0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %rdx
addq 0x8(%rdx), %rcx
cmpq %rcx, %rax
jne 0x30f3d
jmp 0x30f5c
leaq 0x7ecbd(%rip), %rdi     # 0xafc01
leaq 0x7ecca(%rip), %rsi     # 0xafc15
movl $0x6f, %edx
leaq 0x7eced(%rip), %rcx     # 0xafc44
callq 0x4270
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
addq 0x8(%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x30(%rbp), %rax
addq (%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x45c0
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
addq 0x8(%rcx), %rax
movq -0x30(%rbp), %rcx
addq 0x10(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x30ef4
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: hdiff_private::doUnpackData(unsigned char*, unsigned char*, std::vector<hpatch_TCover, std::allocator<hpatch_TCover>> const&)
static void doUnpackData(unsigned char* data,unsigned char* data_end,
                             const std::vector<TPackedCover>& packedCovers){
        unsigned char* lastEnd=data_end;
        for (size_t i=packedCovers.size();i>0;--i){
            const TPackedCover& cv=packedCovers[i-1];
            unsigned char* dst=data+cv.oldPos;
            memmove(dst,data+cv.newPos,(size_t)cv.length);
            unsigned char* dstEnd=dst+cv.length;
            memset(dstEnd,0,lastEnd-dstEnd);
            lastEnd=dst;
        }
        memset(data+0,0,lastEnd-data);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2c560
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x31354
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
subq $0x1, %rsi
callq 0x334f0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
addq (%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x30(%rbp), %rax
addq 0x8(%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x45c0
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
addq 0x10(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x40(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x4210
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x312c9
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x4210
addq $0x40, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: void hdiff_private::doClipCover<true>(void*, unsigned long, bool, std::vector<hpatch_TCover, std::allocator<hpatch_TCover>> const&, std::vector<hpatch_TCover, std::allocator<hpatch_TCover>>&)
static 
    void doClipCover(void* pcovers,size_t coverCount,bool isCover32,
                    const std::vector<TPackedCover>& packedCovers,
                    std::vector<hpatch_TCover>& out_clipCovers){
        if (coverCount==0) return;
        if (isCover32)
            _clipCover<hpatch_TCover32,hpatch_uint32_t,isNew>(
                (hpatch_TCover32*)pcovers,coverCount,packedCovers,out_clipCovers);
        else
            _clipCover<hpatch_TCover,hpatch_StreamPos_t,isNew>(
                (hpatch_TCover*)pcovers,coverCount,packedCovers,out_clipCovers);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x31398
jmp 0x313ca
testb $0x1, -0x11(%rbp)
je 0x313b5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x32580
jmp 0x313ca
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x328a0
addq $0x30, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: void hdiff_private::sortCover<false>(void*, unsigned long, bool)
static 
    void sortCover(void* pcovers,size_t coverCount,bool isCover32){
        if (coverCount==0) return;
        if (isCover32)
            _sortCover<hpatch_TCover32,isNew>((hpatch_TCover32*)pcovers,coverCount);
        else
            _sortCover<hpatch_TCover,isNew>((hpatch_TCover*)pcovers,coverCount);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x31430
jmp 0x31452
testb $0x1, -0x11(%rbp)
je 0x31445
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x32bc0
jmp 0x31452
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x32bf0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_compressed_diff_block(unsigned char*, unsigned char*, unsigned char*, unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>&, hdiff_TCompress const*, int, bool, unsigned long, unsigned long)
void create_compressed_diff_block(unsigned char* newData,unsigned char* newData_end,
                                  unsigned char* oldData,unsigned char* oldData_end,
                                  std::vector<unsigned char>& out_diff,const hdiff_TCompress* compressPlugin,
                                  int kMinSingleMatchScore,bool isUseBigCacheMatch,
                                  size_t matchBlockSize,size_t threadNum){
    if (matchBlockSize==0){
        create_compressed_diff(newData,newData_end,oldData,oldData_end,
                               out_diff,compressPlugin,kMinSingleMatchScore,isUseBigCacheMatch,0,threadNum);
        return;
    }
    TCoversOptimMB<TMatchBlock> coversOp(newData,newData_end,oldData,oldData_end,matchBlockSize,threadNum);
    create_compressed_diff(newData,coversOp.matchBlock->newData_end_cur,oldData,coversOp.matchBlock->oldData_end_cur,
                           out_diff,compressPlugin,kMinSingleMatchScore,isUseBigCacheMatch,&coversOp,threadNum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movb 0x18(%rbp), %al
movl 0x10(%rbp), %r10d
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
andb $0x1, %al
movb %al, -0x41(%rbp)
cmpq $0x0, 0x20(%rbp)
jne 0x319e0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movl 0x10(%rbp), %r11d
movb -0x41(%rbp), %r10b
movq 0x28(%rbp), %rax
xorl %ebx, %ebx
andb $0x1, %r10b
movl %r11d, (%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x197c0
jmp 0x31a62
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x20(%rbp), %r9
movq 0x28(%rbp), %rdi
movq %rsp, %rax
movq %rdi, (%rax)
leaq -0x118(%rbp), %rbx
movq %rbx, %rdi
callq 0x333b0
movq -0x18(%rbp), %rdi
movq -0xd8(%rbp), %rax
movq -0x28(%rbp), %rdx
movq 0x10(%rax), %rsi
movq 0x28(%rax), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movl 0x10(%rbp), %r10d
movq 0x28(%rbp), %r14
movzbl -0x41(%rbp), %r11d
movq %rsp, %rax
movq %r14, 0x18(%rax)
movq %rbx, 0x10(%rax)
andl $0x1, %r11d
movl %r11d, 0x8(%rax)
movl %r10d, (%rax)
callq 0x197c0
jmp 0x31a56
leaq -0x118(%rbp), %rdi
callq 0x33460
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x33460
movq -0x120(%rbp), %rdi
callq 0x4680
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_compressed_diff_block(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, bool, unsigned long, unsigned long)
void create_compressed_diff_block(const hpatch_TStreamInput* newData,const hpatch_TStreamInput* oldData,
                                  const hpatch_TStreamOutput* out_diff,const hdiff_TCompress* compressPlugin,
                                  int kMinSingleMatchScore,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_compressed_diff_block(pNewData,pNewData+(size_t)newData->streamSize,pOldData,pOldData+old_size,
                                 out_diff,compressPlugin,kMinSingleMatchScore,isUseBigCacheMatch,matchBlockSize,threadNum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movb %r9b, %al
movq 0x18(%rbp), %r9
movq 0x10(%rbp), %r9
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
andb $0x1, %al
movb %al, -0x35(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x29c00
movq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x316b0
jmp 0x31c46
cmpq $0x0, -0x20(%rbp)
je 0x31c5e
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x31c69
xorl %eax, %eax
movq %rax, -0x88(%rbp)
jmp 0x31c69
movq -0x88(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x29c40
movq %rax, -0x90(%rbp)
jmp 0x31c86
movq -0x90(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rdi, %rsi
addq %rax, %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rax
movq %rdx, %rcx
addq %rax, %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movl -0x34(%rbp), %r10d
movq 0x10(%rbp), %rbx
movq 0x18(%rbp), %r14
movzbl -0x35(%rbp), %r11d
movq %rsp, %rax
movq %r14, 0x18(%rax)
movq %rbx, 0x10(%rax)
andl $0x1, %r11d
movl %r11d, 0x8(%rax)
movl %r10d, (%rax)
callq 0x31aa0
jmp 0x31cf6
leaq -0x50(%rbp), %rdi
callq 0x29ca0
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x29ca0
movq -0x58(%rbp), %rdi
callq 0x4680
nopl (%rax)