LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: zipFileData_isSame(UnZipper*, int, UnZipper*, int)
bool zipFileData_isSame(UnZipper* selfZip,int selfIndex,UnZipper* srcZip,int srcIndex){
    uint32_t selfFileSize=UnZipper_file_uncompressedSize(selfZip,selfIndex);
    if (selfFileSize!=UnZipper_file_uncompressedSize(srcZip,srcIndex)) return false;
    if (selfFileSize==0) return true;
    std::vector<TByte> buf(selfFileSize*2);
    hpatch_TStreamOutput stream;
    mem_as_hStreamOutput(&stream,buf.data(),buf.data()+selfFileSize);
    check(UnZipper_fileData_decompressTo(selfZip,selfIndex,&stream));
    mem_as_hStreamOutput(&stream,buf.data()+selfFileSize,buf.data()+selfFileSize*2);
    check(UnZipper_fileData_decompressTo(srcZip,srcIndex,&stream));
    return 0==memcmp(buf.data(),buf.data()+selfFileSize,selfFileSize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r13
callq 0x40520
movl %eax, %r15d
movq %r14, %rdi
movl %ebx, %esi
callq 0x40520
cmpl %eax, %r15d
jne 0x7378
testl %r15d, %r15d
je 0x737c
leal (%r15,%r15), %r12d
movq %rsp, %rdi
leaq 0x18(%rsp), %rdx
movq %r12, %rsi
callq 0x9a74
movq %rsp, %rax
movq (%rax), %rsi
movl %r15d, %r15d
leaq (%rsi,%r15), %rdx
leaq 0x18(%rsp), %rdi
callq 0x433f7
leaq 0x18(%rsp), %rdx
movq %r13, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x40983
testb %al, %al
je 0x738f
movq (%rsp), %rax
leaq (%rax,%r15), %rsi
addq %rax, %r12
leaq 0x18(%rsp), %rdi
movq %r12, %rdx
callq 0x433f7
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
callq 0x40983
testb %al, %al
je 0x73ba
movq (%rsp), %r14
leaq (%r14,%r15), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x4310
testl %eax, %eax
sete %bl
testq %r14, %r14
je 0x737e
movq 0x10(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x4300
jmp 0x737e
xorl %ebx, %ebx
jmp 0x737e
movb $0x1, %bl
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x53528(%rip), %rdi     # 0x5a8be
callq 0x44e0
leaq 0x52cae(%rip), %rdi     # 0x5a050
leaq 0x52cad(%rip), %rsi     # 0x5a056
leaq 0x52cbc(%rip), %rcx     # 0x5a06c
movl $0x39, %edx
callq 0x4200
leaq 0x53102(%rip), %rdi     # 0x5a4c3
callq 0x44e0
leaq 0x52c83(%rip), %rdi     # 0x5a050
leaq 0x52c82(%rip), %rsi     # 0x5a056
leaq 0x52c91(%rip), %rcx     # 0x5a06c
movl $0x3b, %edx
callq 0x4200
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x73fe
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getZipIsSame(char const*, char const*, int, bool*)
bool getZipIsSame(const char* oldZipPath,const char* newZipPath,
                  int newApkFilesRemoved,bool* out_isOldHaveApkV2Sign){
    hpatch_TFileStreamInput    oldZipStream;
    hpatch_TFileStreamInput    newZipStream;
    bool            result=true;
    bool            _isInClear=false;
    
    hpatch_TFileStreamInput_init(&oldZipStream);
    hpatch_TFileStreamInput_init(&newZipStream);
    check_clear(hpatch_TFileStreamInput_open(&oldZipStream,oldZipPath));
    check_clear(hpatch_TFileStreamInput_open(&newZipStream,newZipPath));
    result=getZipIsSameWithStream(&oldZipStream.base,&newZipStream.base,
                                  newApkFilesRemoved,out_isOldHaveApkV2Sign);
clear:
    _isInClear=true;
    check_clear(hpatch_TFileStreamInput_close(&newZipStream));
    check_clear(hpatch_TFileStreamInput_close(&oldZipStream));
    return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
callq 0x47d02
testl %eax, %eax
je 0x78ee
movq %rsp, %rdi
movq %r14, %rsi
callq 0x47d02
testl %eax, %eax
je 0x7919
leaq 0x40(%rsp), %rdi
movq %rsp, %r14
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x7406
movl %eax, %ebx
movq %r14, %rdi
callq 0x47fd6
testl %eax, %eax
je 0x7944
leaq 0x40(%rsp), %rdi
callq 0x47fd6
testl %eax, %eax
je 0x796f
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x52d6a(%rip), %rdi     # 0x5a65f
callq 0x44e0
leaq 0x5274f(%rip), %rdi     # 0x5a050
leaq 0x5274e(%rip), %rsi     # 0x5a056
leaq 0x527fa(%rip), %rcx     # 0x5a109
movl $0x7a, %edx
callq 0x4200
leaq 0x52d7d(%rip), %rdi     # 0x5a69d
callq 0x44e0
leaq 0x52724(%rip), %rdi     # 0x5a050
leaq 0x52723(%rip), %rsi     # 0x5a056
leaq 0x527cf(%rip), %rcx     # 0x5a109
movl $0x7b, %edx
callq 0x4200
leaq 0x52d90(%rip), %rdi     # 0x5a6db
callq 0x44e0
leaq 0x526f9(%rip), %rdi     # 0x5a050
leaq 0x526f8(%rip), %rsi     # 0x5a056
leaq 0x527a4(%rip), %rcx     # 0x5a109
movl $0x80, %edx
callq 0x4200
leaq 0x52d99(%rip), %rdi     # 0x5a70f
callq 0x44e0
leaq 0x526ce(%rip), %rdi     # 0x5a050
leaq 0x526cd(%rip), %rsi     # 0x5a056
leaq 0x52779(%rip), %rcx     # 0x5a109
movl $0x81, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getCompressedFilesInfosWithZip(UnZipper const*, TCompressedFilesInfos*)
bool getCompressedFilesInfosWithZip(const UnZipper* zip,TCompressedFilesInfos* out_infos){
    TCompressedFilesInfos infos={0};
    int fcount=UnZipper_fileCount(zip);
    for (int i=0;i<fcount;++i){
            if (UnZipper_file_isCompressed(zip,i)){
            infos.compressedCount++;
            infos.sumCompressedSize+=UnZipper_file_compressedSize(zip,i);
            infos.sumCompressedUncompressedSize+=UnZipper_file_uncompressedSize(zip,i);
        }else{
            infos.uncompressedCount++;
            infos.sumUncompressedSize+=UnZipper_file_uncompressedSize(zip,i);
        }
    }
    *out_infos=infos;
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
callq 0x3f577
testl %eax, %eax
jle 0x7a2a
movl %eax, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movl %r15d, %esi
callq 0x3fadd
testb %al, %al
je 0x7a0e
incl %r13d
movq %r14, %rdi
movl %r15d, %esi
callq 0x40533
movl %eax, %eax
addq %rax, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
callq 0x40520
movl %eax, %eax
addq %rax, 0x8(%rsp)
jmp 0x7a20
incl %ebx
movq %r14, %rdi
movl %r15d, %esi
callq 0x40520
movl %eax, %eax
addq %rax, %r12
incl %r15d
cmpl %r15d, %ebp
jne 0x79d7
jmp 0x7a43
xorl %r13d, %r13d
xorl %r12d, %r12d
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
movl %ebx, (%rax)
movl %r13d, 0x4(%rax)
movq %r12, 0x8(%rax)
movq (%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x18(%rax)
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getCompressedFilesInfosWithStream(hpatch_TStreamInput const*, TCompressedFilesInfos*)
bool getCompressedFilesInfosWithStream(const hpatch_TStreamInput* zipStream,TCompressedFilesInfos* out_infos){
    UnZipper            zip;
    bool            result=true;
    bool            _isInClear=false;
    UnZipper_init(&zip);
    check_clear(UnZipper_openStream(&zip,zipStream));
    result=getCompressedFilesInfosWithZip(&zip,out_infos);
clear:
    _isInClear=true;
    check_clear(UnZipper_close(&zip));
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x3fb0c
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3fb9f
testb %al, %al
je 0x7ad0
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x799a
movq %r14, %rdi
callq 0x3fb18
testb %al, %al
je 0x7afb
movb $0x1, %al
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x52c6c(%rip), %rdi     # 0x5a743
callq 0x44e0
leaq 0x5256d(%rip), %rdi     # 0x5a050
leaq 0x5256c(%rip), %rsi     # 0x5a056
leaq 0x52653(%rip), %rcx     # 0x5a144
movl $0x9d, %edx
callq 0x4200
leaq 0x52c6c(%rip), %rdi     # 0x5a76e
callq 0x44e0
leaq 0x52542(%rip), %rdi     # 0x5a050
leaq 0x52541(%rip), %rsi     # 0x5a056
leaq 0x52628(%rip), %rcx     # 0x5a144
movl $0xa1, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getCompressedFilesInfos(char const*, TCompressedFilesInfos*)
bool getCompressedFilesInfos(const char* zipPath,TCompressedFilesInfos* out_infos){
    hpatch_TFileStreamInput    zipStream;
    bool            result=true;
    bool            _isInClear=false;
    
    hpatch_TFileStreamInput_init(&zipStream);
    check_clear(hpatch_TFileStreamInput_open(&zipStream,zipPath));
    result=getCompressedFilesInfosWithStream(&zipStream.base,out_infos);
clear:
    _isInClear=true;
    check_clear(hpatch_TFileStreamInput_close(&zipStream));
    return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x47d02
testl %eax, %eax
je 0x7b75
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7a74
movq %r14, %rdi
callq 0x47fd6
testl %eax, %eax
je 0x7ba0
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x52c0e(%rip), %rdi     # 0x5a78a
callq 0x44e0
leaq 0x524c8(%rip), %rdi     # 0x5a050
leaq 0x524c7(%rip), %rsi     # 0x5a056
leaq 0x5260b(%rip), %rcx     # 0x5a1a1
movl $0xab, %edx
callq 0x4200
leaq 0x52c1b(%rip), %rdi     # 0x5a7c2
callq 0x44e0
leaq 0x5249d(%rip), %rdi     # 0x5a050
leaq 0x5249c(%rip), %rsi     # 0x5a056
leaq 0x525e0(%rip), %rcx     # 0x5a1a1
movl $0xaf, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getNormalizedCompressedCode(UnZipper*, int, std::vector<unsigned char, std::allocator<unsigned char>>&, int, int)
static bool getNormalizedCompressedCode(UnZipper* selfZip,int selfIndex,
                                        std::vector<TByte>& out_compressedCode,
                                        int zlibCompressLevel,int zlibCompressMemLevel){
    size_t selfFileSize=UnZipper_file_uncompressedSize(selfZip,selfIndex);
    size_t maxCodeSize=Zipper_compressData_maxCodeSize(selfFileSize);
    std::vector<TByte>& buf(out_compressedCode);
    buf.resize(maxCodeSize+selfFileSize);
    hpatch_TStreamOutput stream;
    mem_as_hStreamOutput(&stream,buf.data()+maxCodeSize,buf.data()+maxCodeSize+selfFileSize);
    check(UnZipper_fileData_decompressTo(selfZip,selfIndex,&stream));
    size_t compressedSize=Zipper_compressData(buf.data()+maxCodeSize,selfFileSize,buf.data(),
                                              maxCodeSize,zlibCompressLevel,zlibCompressMemLevel);
    buf.resize(compressedSize);
    return compressedSize>0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, 0x4(%rsp)
movl %ecx, (%rsp)
movq %rdx, %rbx
movl %esi, %r13d
movq %rdi, %rbp
callq 0x40520
movl %eax, %r15d
movq %r15, %rdi
callq 0x411dc
movq %rax, %r12
leaq (%rax,%r15), %rsi
movq %rbx, %rdi
callq 0x9b50
movq (%rbx), %rsi
addq %r12, %rsi
leaq (%rsi,%r15), %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x433f7
movq %rbp, %rdi
movl %r13d, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x40983
testb %al, %al
je 0x7e6b
movq (%rbx), %rdx
movq %r12, %rdi
addq %rdx, %rdi
movq %r15, %rsi
movq %r12, %rcx
movl (%rsp), %r8d
movl 0x4(%rsp), %r9d
callq 0x41212
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9b50
testq %r14, %r14
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x52a4c(%rip), %rdi     # 0x5a8be
callq 0x44e0
leaq 0x521d2(%rip), %rdi     # 0x5a050
leaq 0x521d1(%rip), %rsi     # 0x5a056
leaq 0x5251a(%rip), %rcx     # 0x5a3a6
movl $0xbc, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r13d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x6, %ebp
movl $0x8, %r12d
movl $0x6, %esi
movl $0x8, %edx
callq 0x7bcb
testb %al, %al
jne 0x7ef3
movzbl %r13b, %r13d
movl $0x9, %ebp
movl $0x8, %r12d
movq %r15, %rdi
movl $0x9, %esi
movl $0x8, %edx
movl %r13d, %ecx
callq 0x7bcb
testb %al, %al
je 0x7f0a
movl %ebp, (%r14)
movl %r12d, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x9, %r12d
movl $0x1, %ebp
cmpl $0x6, %ebp
sete %al
cmpl $0x9, %ebp
sete %cl
cmpl $0x8, %r12d
jne 0x7f2b
orb %cl, %al
jne 0x7f3f
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x7bcb
testb %al, %al
jne 0x7ef3
incl %ebp
cmpl $0xa, %ebp
jne 0x7f15
leal -0x1(%r12), %ecx
xorl %eax, %eax
cmpl $0x1, %r12d
movl %ecx, %r12d
ja 0x7f10
jmp 0x7efb
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x3f577
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testl %eax, %eax
jle 0x8060
movl %eax, %ebp
movl $0x10000, %r15d         # imm = 0x10000
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3fadd
testb %al, %al
jne 0x7fee
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4057c
movl %eax, %r13d
subl %r12d, %eax
jbe 0x8067
cmpl %r15d, %eax
cmovbl %eax, %r15d
movl %eax, 0x24(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x7fde
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x7feb
movq %rsp, %rdi
leaq 0x24(%rsp), %rdx
callq 0xa6e8
movl %r13d, %r12d
incl %r14d
cmpl %r14d, %ebp
jne 0x7f94
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movl $0x1, %ebx
cmpq %rsi, %rdi
je 0x8072
cmpl $0x2, %r15d
jb 0x8072
subq %rdi, %rsi
sarq $0x2, %rsi
cmpq $0x1, %rsi
movq %rsi, %r8
adcq $0x0, %r8
movl (%rdi), %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r15d
testl %edx, %edx
jne 0x8051
movl $0x1, %eax
movq %rax, %r9
cmpq %rax, %r8
je 0x804c
movl (%rdi,%r9,4), %eax
xorl %edx, %edx
divl %r15d
leaq 0x1(%r9), %rax
testl %edx, %edx
je 0x8033
cmpq %rsi, %r9
jae 0x806f
leal -0x1(%r15), %eax
cmpl $0x3, %r15d
movl %eax, %r15d
jae 0x8023
jmp 0x8072
movl $0x1, %ebx
jmp 0x8084
movq (%rsp), %rdi
xorl %ebx, %ebx
jmp 0x8072
movl %r15d, %ebx
testq %rdi, %rdi
je 0x8084
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x809a
jmp 0x809a
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x80b3
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdx, %rdx
je 0x9a1f
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %ebp, %ebp
leaq 0xd(%rsp), %r13
movl %r12d, %edx
movl (%r14,%rbp,4), %r12d
notl %edx
addl %r12d, %edx
movq %r13, (%rsp)
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x43254
testl %eax, %eax
je 0x9a2e
movq 0x8(%r15), %rsi
movq (%rsp), %rcx
movq %r15, %rdi
movq %r13, %rdx
callq 0x9c50
incq %rbp
cmpq %rbp, %rbx
jne 0x99de
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x509be(%rip), %rsi     # 0x5a400
movq %rax, %rdi
callq 0x4110
movq 0x72597(%rip), %rsi     # 0x7bfe8
movq 0x72560(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/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 %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
callq 0x47d02
testl %eax, %eax
je 0xb9c1
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x47d02
testl %eax, %eax
je 0xb9ca
movq %rsp, %rdi
movq %r14, %rsi
callq 0x47d02
testl %eax, %eax
je 0xb9d3
leaq 0x80(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rsp, %rdx
movl %ebx, %ecx
callq 0xba51
movl %eax, %ebx
jmp 0xb9e4
leaq 0x4ec97(%rip), %rdi     # 0x5a65f
jmp 0xb9da
leaq 0x4eccc(%rip), %rdi     # 0x5a69d
jmp 0xb9da
leaq 0x4f802(%rip), %rdi     # 0x5b1dc
callq 0x44e0
movl $0x5, %ebx
movq %rsp, %rdi
callq 0x47fd6
testl %eax, %eax
jne 0xba01
leaq 0x4f823(%rip), %rdi     # 0x5b21a
callq 0x44e0
movl $0x5, %ebx
leaq 0x40(%rsp), %rdi
callq 0x47fd6
testl %eax, %eax
jne 0xba20
leaq 0x4ecc5(%rip), %rdi     # 0x5a6db
callq 0x44e0
movl $0x5, %ebx
leaq 0x80(%rsp), %rdi
callq 0x47fd6
testl %eax, %eax
jne 0xba42
leaq 0x4ecd7(%rip), %rdi     # 0x5a70f
callq 0x44e0
movl $0x5, %ebx
movl %ebx, %eax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/Differ.cpp
// Function: HPatchZ_check(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>> const&, hpatch_TDecompress*, bool)
static bool HPatchZ_check(const std::vector<TByte>& oldData,const std::vector<TByte>& newData,
                          const std::vector<TByte>& diffData,hpatch_TDecompress* decompressPlugin,bool isSD){
    const size_t oldDataSize=oldData.size();
    const size_t newDataSize=newData.size();
    
    const TByte* newData0=newData.data();
    const TByte* oldData0=oldData.data();
    
    double time1=clock_s();
    bool checkRet;
    if (!isSD){
        checkRet=check_compressed_diff(newData0,newData0+newDataSize,oldData0,oldData0+oldDataSize,
                                       diffData.data(),diffData.data()+diffData.size(),decompressPlugin);
    }else{
        checkRet=check_single_compressed_diff(newData0,newData0+newDataSize,oldData0,oldData0+oldDataSize,
                                              diffData.data(),diffData.data()+diffData.size(),decompressPlugin);
    }
    if (!checkRet){
        std::cout<<"\n  hpatchz check hdiffz result error!!!\n";
        return false;
    }else{
        double time2=clock_s();
        std::cout<<"  hpatchz check hdiffz result ok!\n";
        std::cout<<"  patch time: "<<(time2-time1)<<" s\n\n";
        return true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
callq 0xbf0e
movsd %xmm0, 0x10(%rsp)
movq (%rbp), %r8
movq 0x8(%rbp), %r9
cmpb $0x0, 0x50(%rsp)
je 0xbe66
movq %r12, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xfa42
jmp 0xbe7b
movq %r12, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xf8d3
testb %al, %al
je 0xbee5
callq 0xbf0e
movsd %xmm0, 0x8(%rsp)
movq 0x7012f(%rip), %rbx     # 0x7bfc0
leaq 0x4edab(%rip), %rsi     # 0x5ac43
movl $0x22, %edx
movq %rbx, %rdi
callq 0x4370
leaq 0x4edba(%rip), %rsi     # 0x5ac66
movl $0xe, %edx
movq %rbx, %rdi
callq 0x4370
movsd 0x8(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x44f0
leaq 0x4eda1(%rip), %rsi     # 0x5ac75
movl $0x4, %edx
movq %rax, %rdi
callq 0x4370
movb $0x1, %al
jmp 0xbeff
movq 0x700d4(%rip), %rdi     # 0x7bfc0
leaq 0x4ed27(%rip), %rsi     # 0x5ac1a
movl $0x28, %edx
callq 0x4370
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rdi), %rax
movq 0x20(%rax), %r12
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
cmpq %rsi, %rcx
jne 0xc089
addq %r15, %rax
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9e38
jmp 0xc0b2
subq %r14, %rbx
leaq (%rbx,%r15), %rsi
cmpq %rsi, %rcx
jae 0xc0a1
movq %r12, %rdi
callq 0x9b50
movq (%r12), %rax
addq %r15, %rax
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4290
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
subq $0x10, %rsp
movl 0x4(%rdi), %eax
movl %eax, 0xc(%rsp)
cmpl (%rdi), %eax
jne 0xc917
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
leaq 0xc(%rsp), %rdx
callq *0x18(%rbx)
testl %eax, %eax
je 0xc8ff
movl 0xc(%rsp), %eax
movl $0x0, (%rbx)
movl %eax, 0x4(%rbx)
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x4ebf5(%rip), %rdi     # 0x5b513
leaq 0x4ec05(%rip), %rsi     # 0x5b52a
leaq 0x4ec30(%rip), %rcx     # 0x5b55c
movl $0x22, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
movl (%rdi), %eax
cmpl 0x4(%rdi), %eax
jne 0xc94f
movq %rbx, %rdi
callq 0xc8d4
testl %eax, %eax
je 0xc960
movl (%rbx), %eax
movq 0x8(%rbx), %rcx
leal 0x1(%rax), %edx
movl %edx, (%rbx)
movl %eax, %eax
movzbl (%rcx,%rax), %eax
popq %rbx
retq
xorl %eax, %eax
jmp 0xc95e
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0xc(%rsp), %rsi
callq *%r14
xorl %ebp, %ebp
testl %eax, %eax
je 0xca6c
movzbl 0xf(%rsp), %eax
movl %eax, %ecx
andl $-0x40, %ecx
cmpl $0x40, %ecx
jne 0xca6c
cmpl $0x4, 0x10(%rsp)
jne 0xca6c
cmpb $0x68, 0xc(%rsp)
jne 0xca6c
cmpb $0x49, 0xd(%rsp)
jne 0xca6c
movzbl 0xe(%rsp), %ecx
movl %ecx, (%r13)
movl %eax, %ecx
andl $0x7, %ecx
movl %ecx, 0x10(%rsp)
shrl $0x3, %eax
andl $0x7, %eax
movl %eax, 0x14(%rsp)
cmpl $0x5, %ecx
setae %cl
cmpl $0x5, %eax
setae %al
orb %cl, %al
jne 0xca6c
leaq 0xc(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq *%r14
testl %eax, %eax
je 0xca6c
movl 0x10(%rsp), %eax
xorl %ebp, %ebp
movl $0x0, %ecx
testq %rax, %rax
je 0xca33
xorl %ecx, %ecx
shll $0x8, %ecx
movzbl 0xb(%rsp,%rax), %edx
orl %edx, %ecx
decq %rax
jne 0xca24
movl %ecx, (%r12)
leaq 0xc(%rsp), %rsi
leaq 0x14(%rsp), %rdx
movq %r15, %rdi
callq *%r14
testl %eax, %eax
je 0xca6c
movl 0x14(%rsp), %eax
xorl %ecx, %ecx
testq %rax, %rax
je 0xca65
shll $0x8, %ecx
movzbl 0xb(%rsp,%rax), %edx
orl %edx, %ecx
decq %rax
jne 0xca56
movl %ecx, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/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:
subq $0x48, %rsp
leal 0x2(%rcx), %eax
cmpl %r8d, %eax
ja 0xcf4d
movups (%rdi), %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
leaq 0x115(%rip), %r9        # 0xd002
movq %r9, 0x10(%rax)
leaq 0x114(%rip), %r9        # 0xd00c
movq %r9, 0x18(%rax)
movq %rdi, 0x20(%rax)
movq %rdx, 0x28(%rax)
movl %ecx, 0x30(%rax)
movq $0x0, 0x34(%rax)
testl %ecx, %ecx
cmoveq %rdi, %rax
movl %ecx, %r9d
addq %rdx, %r9
subl %ecx, %r8d
movq %rax, %rdi
movq %r9, %rdx
movl %r8d, %ecx
callq 0xca7d
testl %eax, %eax
je 0xcf46
movq %rsp, %rdi
movl 0x38(%rdi), %esi
callq 0xcf6c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0xcf48
xorl %eax, %eax
addq $0x48, %rsp
retq
leaq 0x4e692(%rip), %rdi     # 0x5b5e6
leaq 0x4e5cf(%rip), %rsi     # 0x5b52a
leaq 0x4e6c3(%rip), %rcx     # 0x5b625
movl $0x126, %edx            # imm = 0x126
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl %esi, 0x38(%rdi)
jb 0xcfe3
movl %esi, %ebp
movl $0x1, %ebx
testl %esi, %esi
je 0xcfd8
movq %rdi, %r14
movl 0x30(%rdi), %r15d
movl 0x34(%rdi), %eax
xorl %r12d, %r12d
subl %eax, %r15d
cmpl %ebp, %r15d
cmovael %ebp, %r15d
movq 0x20(%r14), %rdi
movl %eax, %esi
addq 0x28(%r14), %rsi
movl %r15d, %edx
callq *0x18(%rdi)
testl %eax, %eax
je 0xcfd6
movl 0x34(%r14), %eax
addl %r15d, %eax
movl 0x30(%r14), %ecx
cmpl %ecx, %eax
movl %ecx, %edx
cmovbl %r12d, %edx
subl %edx, %eax
movl %eax, 0x34(%r14)
subl %r15d, 0x38(%r14)
subl %r15d, %ebp
movl %ecx, %r15d
jne 0xcf91
jmp 0xcfd8
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e726(%rip), %rdi     # 0x5b710
leaq 0x4e539(%rip), %rsi     # 0x5b52a
leaq 0x4e738(%rip), %rcx     # 0x5b730
movl $0xed, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c
// Function: hpatchi_listener_extra_write_new
static hpi_BOOL _hpatchi_listener_extra_write_new(hpatchi_listener_t* listener,const hpi_byte* data,hpi_size_t data_size){
    hpatchi_listener_extra_t* self=(hpatchi_listener_extra_t*)listener;
    while (data_size){
        hpi_size_t posi;
        hpi_size_t cur_len=data_size+self->cached_data_len;
        if (cur_len>self->write_extra_size){//need out cached data by _wrap_listener->write_new()
            cur_len-=self->write_extra_size;
            cur_len=(cur_len<=self->cached_data_len)?cur_len:self->cached_data_len;
            if (!_hpatchi_listener_extra_out(self,cur_len)) return _hpi_FALSE;
        }
        assert(self->cached_data_len<self->write_extra_size);

        cur_len=self->write_extra_size-self->cached_data_len;
        cur_len=(cur_len<=data_size)?cur_len:data_size;
        data_size-=cur_len;
        posi=self->cached_data_pos+self->cached_data_len;
        self->cached_data_len+=cur_len;
        while (cur_len--){//save data to cache
            posi-=(posi<self->write_extra_size)?0:self->write_extra_size;
            self->write_extra[posi++]=*data++;
        }
    }
    return hpi_TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebx
testl %edx, %edx
je 0xd0a3
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r15
movl 0x30(%r15), %eax
movl 0x38(%r15), %esi
leal (%rsi,%r14), %ecx
subl %eax, %ecx
jbe 0xd053
cmpl %esi, %ecx
cmovbl %ecx, %esi
movq %r15, %rdi
callq 0xcf6c
testl %eax, %eax
je 0xd0a1
movl 0x30(%r15), %eax
movl 0x38(%r15), %esi
subl %esi, %eax
jbe 0xd0b1
cmpl %r14d, %eax
cmovael %r14d, %eax
subl %eax, %r14d
leal (%rax,%rsi), %ecx
movl %ecx, 0x38(%r15)
addl 0x34(%r15), %esi
movq %r12, %rcx
movl 0x30(%r15), %edi
xorl %edx, %edx
cmpl %edi, %esi
jb 0xd07b
movl %edi, %edx
movl %esi, %edi
subl %edx, %edi
leaq 0x1(%rcx), %r12
negl %edx
movb (%rcx), %cl
movq 0x28(%r15), %r8
addl %edx, %esi
incl %esi
movb %cl, (%r8,%rdi)
movq %r12, %rcx
decl %eax
jne 0xd06f
testl %r14d, %r14d
jne 0xd02a
jmp 0xd0a3
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4e5cc(%rip), %rdi     # 0x5b684
leaq 0x4e46b(%rip), %rsi     # 0x5b52a
leaq 0x4e5eb(%rip), %rcx     # 0x5b6b1
movl $0x105, %edx            # imm = 0x105
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, %r14
movl 0x60(%rsp), %eax
movb 0x68(%rsp), %r8b
movq 0x70(%rsp), %r10
movq 0x78(%rsp), %r11
xorl %r15d, %r15d
movq %rsp, %r9
movq %r15, 0x10(%r9)
xorps %xmm0, %xmm0
movaps %xmm0, (%r9)
movzbl %r8b, %r12d
leaq 0x18(%rsp), %r8
pushq $0x1
pushq %r11
pushq %r15
pushq %r10
pushq %r12
pushq %rax
callq 0xd8b0
addq $0x30, %rsp
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xe554
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xe527
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xe54c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movl 0x50(%rsp), %eax
movb 0x58(%rsp), %r10b
movaps 0x60(%rsp), %xmm0
xorps %xmm1, %xmm1
leaq 0x20(%rsp), %r8
movaps %xmm1, (%r8)
movq $0x0, 0x10(%r8)
movups %xmm0, 0x10(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x8(%rsp)
movl %eax, (%rsp)
callq 0xe4ac
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq *0x18(%rbx)
testl %eax, %eax
je 0xf207
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf1ff
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %r14
leaq 0x4c562(%rip), %rsi     # 0x5b77d
movq %rax, %rdi
callq 0x4110
movq 0x6cdbe(%rip), %rsi     # 0x7bfe8
movq 0x6cd87(%rip), %rdx     # 0x7bfb8
movq %r14, %rdi
callq 0x4590
movq %rax, %rbx
movq %r14, %rdi
callq 0x4260
jmp 0xf249
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf260
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
subq $0x50, %rsp
movl 0x60(%rsp), %r10d
movq 0x68(%rsp), %r11
movb 0x70(%rsp), %bl
movups 0x78(%rsp), %xmm0
leaq 0x28(%rsp), %rax
movq %r8, 0x20(%rax)
movq %rax, (%rax)
movq $-0x1, 0x8(%rax)
leaq 0x642f(%rip), %r8       # 0x156ca
movq %r8, 0x10(%rax)
leaq 0x6460(%rip), %r8       # 0x15706
movq %r8, 0x18(%rax)
movups %xmm0, 0x18(%rsp)
movzbl %bl, %r8d
movl %r8d, 0x10(%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, (%rsp)
movq %rax, %r8
callq 0xf2cf
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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*, hpatch_TStreamOutput const*, 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,
                                   const hpatch_TStreamOutput* out_diff,
                                   const hdiff_TCompress* compressPlugin,int kMinSingleMatchScore,
                                   size_t patchStepMemSize,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);

    hpatch_TStreamInput _newStream;
    hpatch_TStreamInput _oldStream;
    mem_as_hStreamInput(&_newStream,diff.newData,diff.newData_end);
    mem_as_hStreamInput(&_oldStream,diff.oldData,diff.oldData_end);
    const TCovers _covers((void*)covers.data(),covers.size(),
                          sizeof(*covers.data())==sizeof(hpatch_TCover32));
    serialize_single_compressed_diff(&_newStream,&_oldStream,false,_covers,
                                     out_diff,compressPlugin,patchStepMemSize);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %rbx
movq %r8, %r14
movl 0xd0(%rsp), %eax
movb 0xe0(%rsp), %r8b
movq 0xe8(%rsp), %r10
movq 0xf0(%rsp), %r11
xorl %r15d, %r15d
movq %rsp, %r9
movq %r15, 0x10(%r9)
xorps %xmm0, %xmm0
movaps %xmm0, (%r9)
movzbl %r8b, %r12d
leaq 0x20(%rsp), %r8
pushq $0x1
pushq %r11
pushq %r15
pushq %r10
pushq %r12
pushq %rax
callq 0xd8b0
addq $0x30, %rsp
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x60(%rsp), %rdi
callq 0x433a9
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x433a9
movq 0xd8(%rsp), %rax
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
subq %rdx, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rsi
leaq 0x80(%rsp), %rcx
movq %rdx, 0x10(%rcx)
movq %rsi, 0x18(%rcx)
movb $0x0, 0x20(%rcx)
movq $0x0, (%rcx)
subq $0x8, %rsp
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
xorl %edx, %edx
movq %r14, %r8
movq %rbx, %r9
pushq %rax
callq 0xf403
addq $0x10, %rsp
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xf3cf
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xf3e2
jmp 0xf3e2
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xf3fb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %r9, %r14
movq %r8, %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x8(%rsi), %rcx
orq 0x8(%rdi), %rcx
movq %rdx, %r13
shrq $0x20, %rcx
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rdx
movups %xmm0, 0x10(%rdx)
sete 0x20(%rdx)
movq 0x90(%rsp), %r8
movups %xmm0, 0x28(%rdx)
movups %xmm0, 0x38(%rdx)
movups %xmm0, 0x48(%rdx)
leaq 0x61cc(%rip), %rcx      # 0x15838
movq %rcx, (%rdx)
leaq 0x6290(%rip), %rcx      # 0x15906
movq %rcx, 0x8(%rdx)
movq %rax, %rcx
callq 0xf6f2
movq %r14, (%rsp)
leaq 0x8(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %edx
movq %r13, %r8
movq %rbx, %r9
callq 0xf403
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xf6b8
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xf6cf
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x154d4
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %rbx
cmpq $0x0, (%rdx)
je 0xf746
movq %rdi, %rdx
testq %r8, %r8
leaq 0x4cd8e(%rip), %rax     # 0x5c4a0
cmovneq %r8, %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %r8
callq 0x1d86c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fa54
leaq 0x8(%rsp), %rdi
callq 0x1d780
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4c1d0(%rip), %rdi     # 0x5b91d
leaq 0x4c1e3(%rip), %rsi     # 0x5b937
leaq 0x4c204(%rip), %rcx     # 0x5b95f
movl $0x4e9, %edx            # imm = 0x4E9
callq 0x4200
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1d780
movq %rbx, %rdi
callq 0x45e0