LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getCompressedIsNormalized(UnZipper*, int*, int*, bool)
bool getCompressedIsNormalized(UnZipper* zip,int* out_zlibCompressLevel,
                               int* out_zlibCompressMemLevel,bool testReCompressedByApkV2Sign){
    if (getCompressedIsNormalizedBy(zip,kDefaultZlibCompressLevel,kDefaultZlibCompressMemLevel,testReCompressedByApkV2Sign)){
        *out_zlibCompressLevel=kDefaultZlibCompressLevel;
        *out_zlibCompressMemLevel=kDefaultZlibCompressMemLevel;
        return true;
    }
    if (getCompressedIsNormalizedBy(zip,Z_BEST_COMPRESSION,kDefaultZlibCompressMemLevel,testReCompressedByApkV2Sign)){
        *out_zlibCompressLevel=Z_BEST_COMPRESSION;
        *out_zlibCompressMemLevel=kDefaultZlibCompressMemLevel;
        return true;
    }
    for (int ml=MAX_MEM_LEVEL;ml>=1;--ml){
        for (int cl=Z_BEST_SPEED;cl<=Z_BEST_COMPRESSION;++cl){
            if ((cl==kDefaultZlibCompressLevel)&(ml==kDefaultZlibCompressMemLevel)) continue;
            if ((cl==Z_BEST_COMPRESSION)&(ml==kDefaultZlibCompressMemLevel)) continue;
            if (getCompressedIsNormalizedBy(zip,cl,ml,testReCompressedByApkV2Sign)){
                *out_zlibCompressLevel=cl;
                *out_zlibCompressMemLevel=ml;
                return true;
            }
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rdi
movb -0x21(%rbp), %al
movl $0x6, %esi
movl $0x8, %edx
andb $0x1, %al
movzbl %al, %ecx
callq 0x98e0
testb $0x1, %al
jne 0x9d1c
jmp 0x9d39
movq -0x18(%rbp), %rax
movl $0x6, (%rax)
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9e36
movq -0x10(%rbp), %rdi
movb -0x21(%rbp), %al
movl $0x9, %esi
movl $0x8, %edx
andb $0x1, %al
movzbl %al, %ecx
callq 0x98e0
testb $0x1, %al
jne 0x9d5a
jmp 0x9d77
movq -0x18(%rbp), %rax
movl $0x9, (%rax)
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9e36
movl $0x9, -0x28(%rbp)
cmpl $0x1, -0x28(%rbp)
jl 0x9e32
movl $0x1, -0x2c(%rbp)
cmpl $0x9, -0x2c(%rbp)
jg 0x9e22
cmpl $0x6, -0x2c(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x8, -0x28(%rbp)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x9dbb
jmp 0x9e14
cmpl $0x9, -0x2c(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x8, -0x28(%rbp)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x9ddd
jmp 0x9e14
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x28(%rbp), %edx
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x98e0
testb $0x1, %al
jne 0x9dfa
jmp 0x9e12
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9e36
jmp 0x9e14
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9d8f
jmp 0x9e24
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x9d7e
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getBaseAlignSize_unsafe(UnZipper*)
size_t getBaseAlignSize_unsafe(UnZipper* self){
    int fCount=UnZipper_fileCount(self);
    ZipFilePos_t minOffset=1024*64; //set search max AlignSize
    std::vector<ZipFilePos_t> offsetList;
    ZipFilePos_t lastDataPos=0;
    for (int i=0; i<fCount; ++i) {
        if (UnZipper_file_isCompressed(self,i)) continue;
        const ZipFilePos_t dataPos=UnZipper_fileData_offset(self,i);
        if (dataPos<=lastDataPos) return 0; // not normalized
        ZipFilePos_t offset=dataPos-lastDataPos;
        lastDataPos=dataPos;
        if (offset<minOffset) minOffset=offset;
        offsetList.push_back(offset);
    }
    if (offsetList.empty())
        return 1;
    for (ZipFilePos_t align=minOffset; align>1; --align) {
        if (_isAligned(offsetList,align))
            return align;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7ea90
movl %eax, -0x14(%rbp)
movl $0x10000, -0x18(%rbp)   # imm = 0x10000
leaq -0x30(%rbp), %rdi
callq 0xbf40
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x9f37
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x7f2e0
movb %al, -0x55(%rbp)
jmp 0x9ea3
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x9eac
jmp 0x9ec8
jmp 0x9f29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xc010
jmp 0x9fbc
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x80620
movl %eax, -0x5c(%rbp)
jmp 0x9ed9
movl -0x5c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x34(%rbp), %eax
ja 0x9efb
movq $0x0, -0x8(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0x9fa9
movl -0x48(%rbp), %eax
subl -0x34(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x9f18
movl -0x50(%rbp), %eax
movl %eax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xbf60
jmp 0x9f27
jmp 0x9f29
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x9e86
leaq -0x30(%rbp), %rdi
callq 0xbfd0
testb $0x1, %al
jne 0x9f46
jmp 0x9f57
movq $0x1, -0x8(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0x9fa9
movl -0x18(%rbp), %eax
movl %eax, -0x54(%rbp)
cmpl $0x1, -0x54(%rbp)
jbe 0x9f9a
movl -0x54(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0x9fd0
movb %al, -0x5d(%rbp)
jmp 0x9f74
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x9f7d
jmp 0x9f8d
movl -0x54(%rbp), %eax
movq %rax, -0x8(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0x9fa9
jmp 0x9f8f
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x9f5d
movq $0x1, -0x8(%rbp)
movl $0x1, -0x4c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xc010
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: isAligned(std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int)
static bool _isAligned(const std::vector<ZipFilePos_t>& offsetList,ZipFilePos_t alignSize){
    for (size_t i=0; i<offsetList.size(); ++i) {
        if ((offsetList[i]%alignSize)!=0)
            return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc360
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xa033
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xca30
movl (%rax), %eax
xorl %edx, %edx
divl -0x14(%rbp)
cmpl $0x0, %edx
je 0xa023
movb $0x0, -0x1(%rbp)
jmp 0xa037
jmp 0xa025
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x9fe7
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/../../HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h
// Function: void hdiff_private::packUIntWithTag<unsigned int>(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned int, int, int)
inline static void packUIntWithTag(std::vector<unsigned char>& out_code,_UInt uValue,
                                   int highTag,const int kTagBit){
    unsigned char  codeBuf[hpatch_kMaxPackedUIntBytes];
    unsigned char* codeEnd=codeBuf;
    if (!hpatch_packUIntWithTag(&codeEnd,codeBuf+hpatch_kMaxPackedUIntBytes,uValue,highTag,kTagBit))
        throw std::runtime_error("packUIntWithTag<_UInt>() hpatch_packUIntWithTag() error!");
    out_code.insert(out_code.end(),codeBuf,codeEnd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
leaq -0x1f(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x1f(%rbp), %rsi
addq $0xb, %rsi
movl -0xc(%rbp), %eax
movl %eax, %edx
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r8d
leaq -0x28(%rbp), %rdi
callq 0x85850
cmpl $0x0, %eax
jne 0xb6ff
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
leaq 0xa253b(%rip), %rsi     # 0xadc05
callq 0x4140
jmp 0xb6d1
movq -0x58(%rbp), %rdi
movq 0xda914(%rip), %rsi     # 0xe5ff0
movq 0xda8dd(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x42e0
jmp 0xb740
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcf50
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xcf80
movq -0x60(%rbp), %rdi
leaq -0x1f(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rsi
callq 0xceb0
movq %rax, -0x50(%rbp)
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: pushIncList(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned int const*, unsigned long)
static void pushIncList(std::vector<TByte>& out_data,const uint32_t* list,size_t count){
    uint32_t backValue=~(uint32_t)0;
    for (size_t i=0;i<count;++i){
        uint32_t curValue=list[i];
        packUInt(out_data,(uint32_t)(curValue-(uint32_t)(backValue+1)));
        backValue=curValue;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xb7b3
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
subl %eax, %esi
callq 0xb640
movl -0x2c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xb773
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/src/diff/../../HDiffPatch/libHDiffPatch/HDiff/diff_types.h
// Function: hdiff_compress_mem(hdiff_TCompress const*, unsigned char*, unsigned char*, unsigned char const*, unsigned char const*)
static hpatch_inline
    size_t hdiff_compress_mem(const hdiff_TCompress* compressPlugin,
                              unsigned char* out_code,unsigned char* out_code_end,
                              const unsigned char* data,const unsigned char* data_end){
        hpatch_TStreamOutput codeStream;
        hpatch_TStreamInput  dataStream;
        mem_as_hStreamOutput(&codeStream,out_code,out_code_end);
        mem_as_hStreamInput(&dataStream,data,data_end);
        hpatch_StreamPos_t codeLen=compressPlugin->compress(compressPlugin,&codeStream,&dataStream);
        if (codeLen!=(size_t)codeLen) return 0; //error
        return (size_t)codeLen;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x85c10
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x85b30
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq *%rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x78(%rbp), %rax
je 0xb82f
movq $0x0, -0x8(%rbp)
jmp 0xb837
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/Differ.cpp
// Function: checkZipDiff(char const*, char const*, char const*, int)
TCheckZipDiffResult checkZipDiff(const char* oldZipPath,const char* newZipPath,const char* diffFileName,int threadNum){
    hpatch_TFileStreamInput    oldZipStream;
    hpatch_TFileStreamInput    newZipStream;
    hpatch_TFileStreamInput    diffStream;
    TCheckZipDiffResult result=CHECK_OTHER_ERROR;
    bool            _isInClear=false;
    
    hpatch_TFileStreamInput_init(&oldZipStream);
    hpatch_TFileStreamInput_init(&newZipStream);
    hpatch_TFileStreamInput_init(&diffStream);
    checkC(hpatch_TFileStreamInput_open(&oldZipStream,oldZipPath));
    checkC(hpatch_TFileStreamInput_open(&newZipStream,newZipPath));
    checkC(hpatch_TFileStreamInput_open(&diffStream,diffFileName));
    result=checkZipDiffWithStream(&oldZipStream.base,&newZipStream.base,&diffStream.base,threadNum);
clear:
    _isInClear=true;
    checkC(hpatch_TFileStreamInput_close(&diffStream));
    checkC(hpatch_TFileStreamInput_close(&newZipStream));
    checkC(hpatch_TFileStreamInput_close(&oldZipStream));
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x5, -0xe4(%rbp)
movb $0x0, -0xe5(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x12940
leaq -0xa0(%rbp), %rdi
callq 0x12940
leaq -0xe0(%rbp), %rdi
callq 0x12940
movq -0x8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x8da90
cmpl $0x0, %eax
jne 0x13c26
leaq 0x998c7(%rip), %rdi     # 0xad4cc
movb $0x0, %al
callq 0x4060
movl $0x5, -0xe4(%rbp)
testb $0x1, -0xe5(%rbp)
jne 0x13c24
jmp 0x13cba
jmp 0x13c26
movq -0x10(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x8da90
cmpl $0x0, %eax
jne 0x13c60
leaq 0x99904(%rip), %rdi     # 0xad546
movb $0x0, %al
callq 0x4060
movl $0x5, -0xe4(%rbp)
testb $0x1, -0xe5(%rbp)
jne 0x13c5e
jmp 0x13cba
jmp 0x13c60
movq -0x18(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x8da90
cmpl $0x0, %eax
jne 0x13c9a
leaq 0x9a0e4(%rip), %rdi     # 0xadd60
movb $0x0, %al
callq 0x4060
movl $0x5, -0xe4(%rbp)
testb $0x1, -0xe5(%rbp)
jne 0x13c98
jmp 0x13cba
jmp 0x13c9a
leaq -0x60(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x13d80
movl %eax, -0xe4(%rbp)
movb $0x1, -0xe5(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x8e030
cmpl $0x0, %eax
jne 0x13cf7
leaq 0x9a0c6(%rip), %rdi     # 0xadd9f
movb $0x0, %al
callq 0x4060
movl $0x5, -0xe4(%rbp)
testb $0x1, -0xe5(%rbp)
jne 0x13cf5
jmp 0x13cba
jmp 0x13cf7
leaq -0xa0(%rbp), %rdi
callq 0x8e030
cmpl $0x0, %eax
jne 0x13d2d
leaq 0x99876(%rip), %rdi     # 0xad585
movb $0x0, %al
callq 0x4060
movl $0x5, -0xe4(%rbp)
testb $0x1, -0xe5(%rbp)
jne 0x13d2b
jmp 0x13cba
jmp 0x13d2d
leaq -0x60(%rbp), %rdi
callq 0x8e030
cmpl $0x0, %eax
jne 0x13d63
leaq 0x99878(%rip), %rdi     # 0xad5ba
movb $0x0, %al
callq 0x4060
movl $0x5, -0xe4(%rbp)
testb $0x1, -0xe5(%rbp)
jne 0x13d61
jmp 0x13cba
jmp 0x13d63
movl -0xe4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/Differ.cpp
// Function: getIsEqual(hpatch_TStreamInput const*, hpatch_TStreamInput const*)
static bool getIsEqual(const hpatch_TStreamInput* x,const hpatch_TStreamInput* y){
    size_t dataSize=(size_t)x->streamSize;
    assert(dataSize==x->streamSize);
    assert((((size_t)(dataSize<<1))>>1) == dataSize);
    if (dataSize!=y->streamSize)
        return false;
    if (dataSize>0){
        std::vector<TByte> _buf;
        _buf.resize(dataSize*2);
        TByte* buf=_buf.data();
        if (!x->read(x,0,buf,buf+dataSize)) return false;
        if (!y->read(y,0,buf+dataSize,buf+dataSize*2)) return false;
        if (0!=memcmp(buf,buf+dataSize,dataSize)) return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1458c
jmp 0x145ab
leaq 0x9a278(%rip), %rdi     # 0xae80b
leaq 0x99deb(%rip), %rsi     # 0xae385
movl $0x142, %edx            # imm = 0x142
leaq 0x9a27d(%rip), %rcx     # 0xae823
callq 0x4270
movq -0x20(%rbp), %rax
shlq %rax
shrq %rax
cmpq -0x20(%rbp), %rax
jne 0x145bd
jmp 0x145dc
leaq 0x9a2a9(%rip), %rdi     # 0xae86d
leaq 0x99dba(%rip), %rsi     # 0xae385
movl $0x143, %edx            # imm = 0x143
leaq 0x9a24c(%rip), %rcx     # 0xae823
callq 0x4270
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x145f3
movb $0x0, -0x1(%rbp)
jmp 0x146fe
cmpq $0x0, -0x20(%rbp)
jbe 0x146fa
leaq -0x38(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0xbe70
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq %rsi, %rsi
callq 0xbeb0
jmp 0x1461d
leaq -0x38(%rbp), %rdi
callq 0xbb60
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movq 0x10(%rdi), %rax
movq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rsi
movq %rdx, %rcx
addq %rsi, %rcx
xorl %esi, %esi
callq *%rax
movl %eax, -0x64(%rbp)
jmp 0x14649
movl -0x64(%rbp), %eax
cmpl $0x0, %eax
jne 0x1467b
movb $0x0, -0x1(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0x146e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xbb80
jmp 0x14709
movq -0x18(%rbp), %rdi
movq 0x10(%rdi), %rax
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rsi
movq %rcx, %rdx
addq %rsi, %rdx
leaq (%rcx,%rsi,2), %rcx
xorl %esi, %esi
callq *%rax
movl %eax, -0x68(%rbp)
jmp 0x1469e
movl -0x68(%rbp), %eax
cmpl $0x0, %eax
jne 0x146b3
movb $0x0, -0x1(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0x146e4
movq -0x50(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4190
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x146dd
movb $0x0, -0x1(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0x146e4
movl $0x0, -0x54(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xbb80
movl -0x54(%rbp), %eax
testl %eax, %eax
je 0x146f8
jmp 0x146f6
jmp 0x146fe
jmp 0x146fa
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/Differ.cpp
// Function: TVectorStreamOutput::_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){
            TVectorStreamOutput* self=(TVectorStreamOutput*)stream->streamImport;
            std::vector<TByte>& dst=self->dst;
            size_t writeLen=(size_t)(data_end-data);
            if  (dst.size()==writeToPos){
                dst.insert(dst.end(),data,data_end);
            }else{
                assert((size_t)(writeToPos+writeLen)==writeToPos+writeLen);
                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 $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0xbe90
cmpq -0x10(%rbp), %rax
jne 0x14c8a
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
callq 0xcf50
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xcf80
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rsi
callq 0xe540
movq %rax, -0x50(%rbp)
jmp 0x14d04
movq -0x10(%rbp), %rax
addq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
addq -0x38(%rbp), %rcx
cmpq %rcx, %rax
jne 0x14ca1
jmp 0x14cc0
leaq 0x99a9b(%rip), %rdi     # 0xae743
leaq 0x996d6(%rip), %rsi     # 0xae385
movl $0x161, %edx            # imm = 0x161
leaq 0x99abb(%rip), %rcx     # 0xae776
callq 0x4270
movq -0x30(%rbp), %rdi
callq 0xbe90
movq -0x10(%rbp), %rcx
addq -0x38(%rbp), %rcx
cmpq %rcx, %rax
jae 0x14ce7
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x38(%rbp), %rsi
callq 0xbeb0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x14d10
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x4320
movl $0x1, %eax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpi_cache_update
hpi_BOOL _cache_update(struct _TInputCache* self){
    //    [                    cache  buf                        ]
    hpi_size_t len=self->cache_end;
    assert(len==self->cache_begin); //empty
    if (!self->read_code(self->inputStream,self->cache_buf,&len))
        len=0;
    //    |                                   len|               |
    self->cache_begin=0;
    self->cache_end=len;
    return len!=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x17e23
jmp 0x17e42
leaq 0x96b1f(%rip), %rdi     # 0xae949
leaq 0x96b2f(%rip), %rsi     # 0xae960
movl $0x22, %edx
leaq 0x96b55(%rip), %rcx     # 0xae992
callq 0x4270
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rsi
leaq -0xc(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x17e6c
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, -0xc(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpi_cache_read_1byte
hpi_fast_uint8 _cache_read_1byte(struct _TInputCache* self){
    if (self->cache_begin!=self->cache_end){
__cache_read_1byte:
        return self->cache_buf[self->cache_begin++];
    }
    if(_cache_update(self))
        goto __cache_read_1byte;
    else
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
je 0x17edd
jmp 0x17ebd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdx
movl (%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, (%rdx)
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x17ef4
movq -0x10(%rbp), %rdi
callq 0x17e00
cmpl $0x0, %eax
je 0x17eed
jmp 0x17ebd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpatch_lite_open
hpi_BOOL hpatch_lite_open(hpi_TInputStreamHandle diff_data,hpi_TInputStream_read read_diff,
                          hpi_compressType* out_compress_type,hpi_pos_t* out_newSize,hpi_pos_t* out_uncompressSize){
    #define kHPatchLite_versionCode     1
    hpi_size_t lenn=hpi_kHeadSize;
    hpi_size_t lenu;
    hpi_byte   buf[(hpi_kHeadSize>sizeof(hpi_pos_t))?hpi_kHeadSize:sizeof(hpi_pos_t)];
    
    _CHECK(read_diff(diff_data,buf,&lenn));
    //HPatchLite type tag 2byte, version code(high 2bit)
    lenu=buf[3];
    _SAFE_CHECK((lenn==hpi_kHeadSize)&(buf[0]=='h')&(buf[1]=='I')&((lenu>>6)==kHPatchLite_versionCode));
    *out_compress_type=buf[2]; //compress type
    lenn=lenu&7; //newSize bytes(low 3bit)
    lenu=(lenu>>3)&7; //uncompressSize bytes(mid 3bit)

    _SAFE_CHECK((lenn<=sizeof(hpi_pos_t))&(lenu<=sizeof(hpi_pos_t)));
    _CHECK(read_diff(diff_data,buf,&lenn));
    *out_newSize=_hpi_readSize(buf,lenn);
    _CHECK(read_diff(diff_data,buf,&lenu));
    *out_uncompressSize=_hpi_readSize(buf,lenu);
    return hpi_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl $0x4, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x17f46
movl $0x0, -0x4(%rbp)
jmp 0x1805f
movzbl -0x39(%rbp), %eax
movl %eax, -0x38(%rbp)
cmpl $0x4, -0x34(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movzbl -0x3c(%rbp), %ecx
cmpl $0x68, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
movzbl -0x3b(%rbp), %ecx
cmpl $0x49, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
movl -0x38(%rbp), %ecx
shrl $0x6, %ecx
cmpl $0x1, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x17fa2
movl $0x0, -0x4(%rbp)
jmp 0x1805f
movzbl -0x3a(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x38(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
shrl $0x3, %eax
andl $0x7, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpq $0x4, %rax
setbe %al
andb $0x1, %al
movzbl %al, %eax
movl -0x38(%rbp), %ecx
cmpq $0x4, %rcx
setbe %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x17ff0
movl $0x0, -0x4(%rbp)
jmp 0x1805f
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x18010
movl $0x0, -0x4(%rbp)
jmp 0x1805f
leaq -0x3c(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x18070
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x18044
movl $0x0, -0x4(%rbp)
jmp 0x1805f
leaq -0x3c(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x18070
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpi_readSize
static hpi_pos_t _hpi_readSize(const hpi_byte* buf,hpi_size_t len){
    hpi_pos_t v=0;
    while(len--){
        v=(v<<8)|(hpi_pos_t)buf[len];
    }
    return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x180aa
movl -0x10(%rbp), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0x18082
movl -0x10(%rbp), %eax
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: cache_unpackUInt
static hpi_pos_t _cache_unpackUInt(_TInputCache* self,hpi_pos_t v,hpi_fast_uint8 isNext){
    while (isNext){
        hpi_fast_uint8 b=_cache_read_1byte(self);
        v=(v<<7)|(b&127);
        isNext=b>>7;
    }
    return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x18310
movq -0x8(%rbp), %rdi
callq 0x17ea0
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
shll $0x7, %eax
movl -0x14(%rbp), %ecx
andl $0x7f, %ecx
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %eax
shrl $0x7, %eax
movl %eax, -0x10(%rbp)
jmp 0x182e2
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: patch_copy_diff
static hpi_BOOL _patch_copy_diff(hpatchi_listener_t* out_newData,
                                 _TInputCache* diff,hpi_pos_t copyLength){
    while (copyLength>0){
        hpi_size_t decodeStep=diff->cache_end-diff->cache_begin;
        if (decodeStep==0){
            _CHECK(_cache_update(diff));
            decodeStep=diff->cache_end-diff->cache_begin;
        }
        if (decodeStep>copyLength)
            decodeStep=(hpi_size_t)copyLength;
        _CHECK(out_newData->write_new(out_newData,diff->cache_buf+diff->cache_begin,decodeStep));
        diff->cache_begin+=decodeStep;
        copyLength-=(hpi_pos_t)decodeStep;
    }
    return hpi_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jbe 0x183d3
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x1837a
movq -0x18(%rbp), %rdi
callq 0x17e00
cmpl $0x0, %eax
jne 0x1836a
movl $0x0, -0x4(%rbp)
jmp 0x183da
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jbe 0x18388
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rsi
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rsi
movl -0x20(%rbp), %edx
callq *%rax
cmpl $0x0, %eax
jne 0x183b8
movl $0x0, -0x4(%rbp)
jmp 0x183da
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x18333
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpatchi_inplaceB
hpi_BOOL hpatchi_inplaceB(hpatchi_listener_t* listener,hpi_pos_t newSize,
                          hpi_byte* temp_cache,hpi_size_t extraSafeSize_in_temp_cache,hpi_size_t temp_cache_size){
    hpi_BOOL result;
    hpatchi_listener_extra_t extra_listener;
    assert(temp_cache_size>=hpi_kMinCacheSize+extraSafeSize_in_temp_cache);
    _hpatchi_listener_extra_init(&extra_listener,listener,temp_cache,extraSafeSize_in_temp_cache);
    result=hpatch_lite_patch(extraSafeSize_in_temp_cache?&extra_listener.base:listener,newSize,
                             temp_cache+extraSafeSize_in_temp_cache,temp_cache_size-extraSafeSize_in_temp_cache);
    return result&&_hpatchi_listener_extra_out(&extra_listener,extra_listener.cached_data_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jb 0x1874c
jmp 0x1876b
leaq 0x962c9(%rip), %rdi     # 0xaea1c
leaq 0x96206(%rip), %rsi     # 0xae960
movl $0x126, %edx            # imm = 0x126
leaq 0x962f5(%rip), %rcx     # 0xaea5b
callq 0x4270
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq -0x68(%rbp), %rdi
callq 0x187f0
cmpl $0x0, -0x1c(%rbp)
je 0x1878f
leaq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x18797
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %eax
addq %rax, %rdx
movl -0x20(%rbp), %ecx
subl -0x1c(%rbp), %ecx
callq 0x180b0
movl %eax, -0x24(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x24(%rbp)
movb %al, -0x71(%rbp)
je 0x187d6
movl -0x30(%rbp), %esi
leaq -0x68(%rbp), %rdi
callq 0x18880
cmpl $0x0, %eax
setne %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpatchi_listener_extra_init
static hpi_inline
void _hpatchi_listener_extra_init(hpatchi_listener_extra_t* self,hpatchi_listener_t* wrap_listener,
                                  hpi_byte* write_extra,hpi_size_t write_extra_size){
    self->base.diff_data=wrap_listener->diff_data;
    self->base.read_diff=wrap_listener->read_diff; 
    self->base.read_old=_hpatchi_listener_extra_read_old;
    self->base.write_new=_hpatchi_listener_extra_write_new; 
    self->_wrap_listener=wrap_listener;
    self->write_extra=write_extra;
    self->write_extra_size=write_extra_size;
    self->cached_data_pos=0;
    self->cached_data_len=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
leaq 0x174(%rip), %rcx       # 0x189a0
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
leaq 0x1b5(%rip), %rcx       # 0x189f0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x34(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x38(%rax)
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpatchi_listener_extra_out
static hpi_BOOL _hpatchi_listener_extra_out(hpatchi_listener_extra_t* self,hpi_size_t out_size){
    assert(out_size<=self->cached_data_len);
    while (out_size){
        hpi_size_t cur_len=self->write_extra_size-self->cached_data_pos;
        cur_len=(cur_len<=out_size)?cur_len:out_size;
        if (!self->_wrap_listener->write_new(self->_wrap_listener,self->write_extra+self->cached_data_pos,cur_len))
            return _hpi_FALSE;
        self->cached_data_pos+=cur_len;
        self->cached_data_pos-=(self->cached_data_pos<self->write_extra_size)?0:self->write_extra_size;
        self->cached_data_len-=cur_len;
        out_size-=cur_len;
    }
    return hpi_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x38(%rcx), %eax
ja 0x1889d
jmp 0x188bc
leaq 0x962a2(%rip), %rdi     # 0xaeb46
leaq 0x960b5(%rip), %rsi     # 0xae960
movl $0xed, %edx
leaq 0x962af(%rip), %rcx     # 0xaeb66
callq 0x4270
jmp 0x188be
cmpl $0x0, -0x14(%rbp)
je 0x1898a
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x34(%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
ja 0x188e9
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x188ef
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl 0x34(%rcx), %ecx
addq %rcx, %rsi
movl -0x18(%rbp), %edx
callq *%rax
cmpl $0x0, %eax
jne 0x1892e
movl $0x0, -0x4(%rbp)
jmp 0x18991
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x34(%rax), %ecx
movl %ecx, 0x34(%rax)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jae 0x18952
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0x1895c
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x34(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x34(%rax)
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x38(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x38(%rax)
movl -0x18(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x188be
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: create_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>&, int, bool, unsigned long)
void create_diff(const TByte* newData,const TByte* newData_end,
                 const TByte* oldData,const TByte* oldData_end,
                 std::vector<TByte>& out_diff,
                 int kMinSingleMatchScore,bool isUseBigCacheMatch,size_t threadNum){
    TDiffData diff;
    std::vector<TOldCover> covers;
    get_diff(newData,newData_end,oldData,oldData_end,diff,covers,
             kMinSingleMatchScore,isUseBigCacheMatch,0,0,threadNum);
    serialize_diff(diff,covers,out_diff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq 0x18(%rbp), %rax
movb 0x10(%rbp), %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
andb $0x1, %al
movb %al, -0x2d(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x18c60
movq -0x80(%rbp), %r9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq 0x18(%rbp), %r11
movzbl -0x2d(%rbp), %r10d
movq %rsp, %rax
movq %r11, 0x20(%rax)
andl $0x1, %r10d
movl %r10d, 0x8(%rax)
movl %r8d, (%rax)
movl $0x1, 0x28(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x10(%rax)
leaq -0x50(%rbp), %r8
callq 0x18c80
jmp 0x18c11
movq -0x28(%rbp), %rdx
leaq -0x50(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x19390
jmp 0x18c24
leaq -0x68(%rbp), %rdi
callq 0x19760
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x19760
movq -0x70(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: create_compressed_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>&, hdiff_TCompress const*, int, bool, ICoverLinesListener*, unsigned long)
void create_compressed_diff(const TByte* newData,const TByte* newData_end,
                            const TByte* oldData,const TByte* oldData_end,
                            std::vector<TByte>& out_diff,const hdiff_TCompress* compressPlugin,
                            int kMinSingleMatchScore,bool isUseBigCacheMatch,
                            ICoverLinesListener* listener,size_t threadNum){
    TDiffData diff;
    std::vector<TOldCover> covers;
    get_diff(newData,newData_end,oldData,oldData_end,diff,covers,
             kMinSingleMatchScore,isUseBigCacheMatch,listener,0,threadNum);
    serialize_compressed_diff(diff,covers,out_diff,compressPlugin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xb8, %rsp
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movb 0x18(%rbp), %al
movl 0x10(%rbp), %r10d
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
andb $0x1, %al
movb %al, -0x39(%rbp)
leaq -0x78(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x18c60
movq -0x90(%rbp), %r9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl 0x10(%rbp), %r8d
movq 0x20(%rbp), %r11
movq 0x28(%rbp), %rbx
movzbl -0x39(%rbp), %r10d
movq %rsp, %rax
movq %rbx, 0x20(%rax)
movq %r11, 0x10(%rax)
andl $0x1, %r10d
movl %r10d, 0x8(%rax)
movl %r8d, (%rax)
movl $0x1, 0x28(%rax)
movq $0x0, 0x18(%rax)
leaq -0x60(%rbp), %r8
callq 0x18c80
jmp 0x19860
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
leaq -0x60(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x198b0
jmp 0x19877
leaq -0x78(%rbp), %rdi
callq 0x19760
addq $0xb8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x19760
movq -0x80(%rbp), %rdi
callq 0x4680
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: create_compressed_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, bool, ICoverLinesListener*, unsigned long)
void create_compressed_diff(const TByte* newData,const TByte* newData_end,
                            const TByte* oldData,const TByte* oldData_end,
                            const hpatch_TStreamOutput* out_diff,const hdiff_TCompress* compressPlugin,
                            int kMinSingleMatchScore,bool isUseBigCacheMatch,
                            ICoverLinesListener* listener,size_t threadNum){
    std::vector<unsigned char> _out_diff;
    create_compressed_diff(newData,newData_end,oldData,oldData_end,_out_diff,
                           compressPlugin,kMinSingleMatchScore,isUseBigCacheMatch,listener,threadNum);
    checki(out_diff->write(out_diff,0,_out_diff.data(),_out_diff.data()+_out_diff.size()),"create_compressed_diff() out_diff->write");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
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)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0xbe70
movq -0x78(%rbp), %r8
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r9
movl 0x10(%rbp), %r10d
movq 0x20(%rbp), %rbx
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 0x19f9d
movq -0x38(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x88(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xbb60
movq -0xa8(%rbp), %rdi
movq %rax, -0x90(%rbp)
callq 0xbb60
movq -0xa8(%rbp), %rdi
movq %rax, -0xa0(%rbp)
callq 0xbe90
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rdx
movq %rax, %rsi
movq -0x88(%rbp), %rax
addq %rsi, %rcx
xorl %esi, %esi
callq *%rax
movl %eax, -0x7c(%rbp)
jmp 0x1a014
movl -0x7c(%rbp), %eax
cmpl $0x0, %eax
jne 0x1a085
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
leaq 0x94b8e(%rip), %rsi     # 0xaebc8
callq 0x4140
jmp 0x1a041
movq -0xb0(%rbp), %rdi
movq 0xcbfa1(%rip), %rsi     # 0xe5ff0
movq 0xcbf6a(%rip), %rdx     # 0xe5fc0
callq 0x4630
jmp 0x1a0ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1a09a
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
callq 0x42e0
jmp 0x1a09a
leaq -0x60(%rbp), %rdi
callq 0xbb80
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0xbb80
movq -0x68(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: create_single_compressed_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>&, hdiff_TCompress const*, int, unsigned long, bool, ICoverLinesListener*, unsigned long)
void create_single_compressed_diff(const TByte* newData,const TByte* newData_end,
                                   const TByte* oldData,const TByte* oldData_end,
                                   std::vector<unsigned char>& out_diff,
                                   const hdiff_TCompress* compressPlugin,int kMinSingleMatchScore,
                                   size_t patchStepMemSize,bool isUseBigCacheMatch,
                                   ICoverLinesListener* listener,size_t threadNum){
    TVectorAsStreamOutput outDiffStream(out_diff);
    create_single_compressed_diff(newData,newData_end,oldData,oldData_end,&outDiffStream,
                                  compressPlugin,kMinSingleMatchScore,patchStepMemSize,
                                  isUseBigCacheMatch,listener,threadNum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movb 0x20(%rbp), %al
movq 0x18(%rbp), %r10
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)
movq -0x38(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x29ac0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r9
movl 0x10(%rbp), %r14d
movq 0x18(%rbp), %rbx
movb -0x41(%rbp), %r11b
movq 0x28(%rbp), %r10
movq 0x30(%rbp), %rax
leaq -0x70(%rbp), %r8
andb $0x1, %r11b
movl %r14d, (%rsp)
movq %rbx, 0x8(%rsp)
movzbl %r11b, %r11d
movl %r11d, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x1a160
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: create_single_compressed_diff_stream(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamOutput const*, hdiff_TCompress const*, unsigned long, unsigned long, hdiff_TMTSets_s const*)
void create_single_compressed_diff_stream(const hpatch_TStreamInput*  newData,
                                          const hpatch_TStreamInput*  oldData,
                                          const hpatch_TStreamOutput* out_diff,
                                          const hdiff_TCompress* compressPlugin,
                                          size_t kMatchBlockSize,size_t patchStepMemSize,
                                          const hdiff_TMTSets_s* mtsets){
    TCoversBuf covers(newData->streamSize,oldData->streamSize);
    get_match_covers_by_block(newData,oldData,&covers,kMatchBlockSize,mtsets);
    serialize_single_compressed_diff(newData,oldData,true,covers,
                                     out_diff,compressPlugin,patchStepMemSize);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq 0x10(%rbp), %rax
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 -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq -0x88(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x29b40
movq -0xa0(%rbp), %rdx
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x1a710
jmp 0x1a698
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
movq -0x30(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movl $0x1, %edx
leaq -0x88(%rbp), %rcx
callq 0x1a330
jmp 0x1a6c5
leaq -0x88(%rbp), %rdi
callq 0x29bd0
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x29bd0
movq -0x90(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: get_match_covers_by_block(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TOutputCovers*, unsigned long, hdiff_TMTSets_s const*)
void get_match_covers_by_block(const hpatch_TStreamInput* newData,const hpatch_TStreamInput* oldData,
                               hpatch_TOutputCovers* out_covers,size_t kMatchBlockSize,const hdiff_TMTSets_s* mtsets){
    assert(out_covers->push_cover!=0);
    TDigestMatcher matcher(oldData,newData,kMatchBlockSize,mtsets?*mtsets:hdiff_TMTSets_s_kEmpty);
    matcher.search_cover(out_covers);
    //todo: + extend_cover_stream ?
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1a73b
jmp 0x1a75a
leaq 0x94626(%rip), %rdi     # 0xaed68
leaq 0x94639(%rip), %rsi     # 0xaed82
movl $0x4e9, %edx            # imm = 0x4E9
leaq 0x94655(%rip), %rcx     # 0xaedaa
callq 0x4270
movq -0x10(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1a78f
movq -0x28(%rbp), %rax
movq %rax, -0x128(%rbp)
jmp 0x1a79f
leaq 0x9535a(%rip), %rax     # 0xafaf0
movq %rax, -0x128(%rbp)
jmp 0x1a79f
movq -0x110(%rbp), %rcx
movq -0x118(%rbp), %rdx
movq -0x120(%rbp), %rsi
movq -0x128(%rbp), %r8
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3e680
movq -0x130(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3ffc0
jmp 0x1a7e0
leaq -0xf8(%rbp), %rdi
callq 0x3e580
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x3e580
movq -0x100(%rbp), %rdi
callq 0x4680
nop