LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f9dd
testl %eax, %eax
jle 0x7bdf
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 0x3fee7
testb %al, %al
je 0x7bc3
incl %r13d
movq %r14, %rdi
movl %r15d, %esi
callq 0x40941
movl %eax, %eax
addq %rax, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
callq 0x4092e
movl %eax, %eax
addq %rax, 0x8(%rsp)
jmp 0x7bd5
incl %ebx
movq %r14, %rdi
movl %r15d, %esi
callq 0x4092e
movl %eax, %eax
addq %rax, %r12
incl %r15d
cmpl %r15d, %ebp
jne 0x7b8c
jmp 0x7bf8
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_O1/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 0x3ff18
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3ffab
testb %al, %al
je 0x7c85
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7b4f
movq %r14, %rdi
callq 0x3ff24
testb %al, %al
je 0x7cb0
movb $0x1, %al
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x52ab7(%rip), %rdi     # 0x5a743
callq 0x44e0
leaq 0x523b8(%rip), %rdi     # 0x5a050
leaq 0x523b7(%rip), %rsi     # 0x5a056
leaq 0x5249e(%rip), %rcx     # 0x5a144
movl $0x9d, %edx
callq 0x4200
leaq 0x52ab7(%rip), %rdi     # 0x5a76e
callq 0x44e0
leaq 0x5238d(%rip), %rdi     # 0x5a050
leaq 0x5238c(%rip), %rsi     # 0x5a056
leaq 0x52473(%rip), %rcx     # 0x5a144
movl $0xa1, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48a3c
testl %eax, %eax
je 0x7d2a
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7c29
movq %r14, %rdi
callq 0x48caf
testl %eax, %eax
je 0x7d55
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x52a59(%rip), %rdi     # 0x5a78a
callq 0x44e0
leaq 0x52313(%rip), %rdi     # 0x5a050
leaq 0x52312(%rip), %rsi     # 0x5a056
leaq 0x52456(%rip), %rcx     # 0x5a1a1
movl $0xab, %edx
callq 0x4200
leaq 0x52a66(%rip), %rdi     # 0x5a7c2
callq 0x44e0
leaq 0x522e8(%rip), %rdi     # 0x5a050
leaq 0x522e7(%rip), %rsi     # 0x5a056
leaq 0x5242b(%rip), %rcx     # 0x5a1a1
movl $0xaf, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4092e
movl %eax, %r15d
movq %r15, %rdi
callq 0x4166a
movq %rax, %r12
leaq (%rax,%r15), %rsi
movq %rbx, %rdi
callq 0x9d84
movq (%rbx), %rsi
addq %r12, %rsi
leaq (%rsi,%r15), %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4397b
movq %rbp, %rdi
movl %r13d, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x40d86
testb %al, %al
je 0x8014
movq (%rbx), %rdx
movq %r12, %rdi
addq %rdx, %rdi
movq %r15, %rsi
movq %r12, %rcx
movl (%rsp), %r8d
movl 0x4(%rsp), %r9d
callq 0x416a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9d84
testq %r14, %r14
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x528a3(%rip), %rdi     # 0x5a8be
callq 0x44e0
leaq 0x52029(%rip), %rdi     # 0x5a050
leaq 0x52028(%rip), %rsi     # 0x5a056
leaq 0x52371(%rip), %rcx     # 0x5a3a6
movl $0xbc, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movl $0x6, %r14d
movl $0x6, %esi
movl $0x8, %edx
callq 0x7d80
testb %al, %al
jne 0x8096
movzbl %bl, %ebp
movl $0x9, %r14d
movq %r15, %rdi
movl $0x9, %esi
movl $0x8, %edx
movl %ebp, %ecx
callq 0x7d80
testb %al, %al
je 0x80c2
movq 0x8(%rsp), %rax
movl %r14d, (%rax)
movq 0x10(%rsp), %rax
movl $0x8, (%rax)
movb $0x1, %r12b
andb $0x1, %r12b
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x9, %r13d
movb $0x1, %r12b
movl $0x1, %ebx
xorl %r14d, %r14d
cmpl $0x6, %ebx
sete %al
cmpl $0x9, %ebx
sete %cl
cmpl $0x8, %r13d
jne 0x80e9
orb %cl, %al
jne 0x80fc
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
movl %ebp, %ecx
callq 0x7d80
testb %al, %al
jne 0x810f
cmpl $0x9, %ebx
leal 0x1(%rbx), %eax
setae %r14b
movl %eax, %ebx
cmpl $0xa, %eax
jne 0x80d3
jmp 0x8124
movq 0x8(%rsp), %rax
movl %ebx, (%rax)
movq 0x10(%rsp), %rax
movl %r13d, (%rax)
testb $0x1, %r14b
je 0x80ac
leal -0x1(%r13), %eax
cmpl $0x2, %r13d
setae %r12b
movl %eax, %r13d
jae 0x80cb
jmp 0x80ac
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f9dd
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl %eax, 0x20(%rsp)
testl %eax, %eax
setg %r12b
movl $0x10000, %r15d         # imm = 0x10000
jle 0x81e5
xorl %r14d, %r14d
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3fee7
testb %al, %al
jne 0x81d7
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4098a
movl %eax, %r13d
subl %ebp, %eax
jbe 0x81bc
cmpl %r15d, %eax
cmovbl %eax, %r15d
movl %eax, 0x24(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x81c0
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x81cd
movl %ebp, %eax
jmp 0x81d0
movq %rsp, %rdi
leaq 0x24(%rsp), %rdx
callq 0xa944
movl %r13d, %eax
cmpl %ebp, %r13d
movl %eax, %ebp
jbe 0x81e5
incl %r14d
cmpl 0x20(%rsp), %r14d
setl %r12b
jne 0x8177
testb $0x1, %r12b
je 0x81ef
xorl %ebx, %ebx
jmp 0x8269
movq (%rsp), %rcx
movq 0x8(%rsp), %rsi
movl $0x1, %ebx
cmpq %rsi, %rcx
sete %dil
je 0x8269
cmpl $0x2, %r15d
jb 0x8269
movq %rsi, %r8
subq %rcx, %r8
sarq $0x2, %r8
cmpq $0x1, %r8
movq %r8, %r9
adcq $0x0, %r9
movl %edi, %eax
cmpq %rsi, %rcx
je 0x8257
movl (%rcx), %eax
xorl %edx, %edx
divl %r15d
testl %edx, %edx
jne 0x825b
movl $0x1, %eax
movq %rax, %r10
cmpq %rax, %r9
je 0x8251
movl (%rcx,%r10,4), %eax
xorl %edx, %edx
divl %r15d
leaq 0x1(%r10), %rax
testl %edx, %edx
je 0x8238
cmpq %r8, %r10
setae %al
testb %al, %al
jne 0x8266
decl %r15d
cmpl $0x1, %r15d
ja 0x8221
jmp 0x8269
movl %r15d, %ebx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x827f
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 0x8295
jmp 0x8295
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x82ae
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x9c53
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 0x437d8
testl %eax, %eax
je 0x9c62
movq 0x8(%r15), %rsi
movq (%rsp), %rcx
movq %r15, %rdi
movq %r13, %rdx
callq 0x9e84
incq %rbp
cmpq %rbp, %rbx
jne 0x9c12
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 0x5078a(%rip), %rsi     # 0x5a400
movq %rax, %rdi
callq 0x4110
movq 0x72363(%rip), %rsi     # 0x7bfe8
movq 0x7232c(%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_O1/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 0x48a3c
testl %eax, %eax
je 0xbbdc
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x48a3c
testl %eax, %eax
je 0xbbe5
movq %rsp, %rdi
movq %r14, %rsi
callq 0x48a3c
testl %eax, %eax
je 0xbbee
leaq 0x80(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rsp, %rdx
movl %ebx, %ecx
callq 0xbc6c
movl %eax, %ebx
jmp 0xbbff
leaq 0x4ea7c(%rip), %rdi     # 0x5a65f
jmp 0xbbf5
leaq 0x4eab1(%rip), %rdi     # 0x5a69d
jmp 0xbbf5
leaq 0x4f5e7(%rip), %rdi     # 0x5b1dc
callq 0x44e0
movl $0x5, %ebx
movq %rsp, %rdi
callq 0x48caf
testl %eax, %eax
jne 0xbc1c
leaq 0x4f608(%rip), %rdi     # 0x5b21a
callq 0x44e0
movl $0x5, %ebx
leaq 0x40(%rsp), %rdi
callq 0x48caf
testl %eax, %eax
jne 0xbc3b
leaq 0x4eaaa(%rip), %rdi     # 0x5a6db
callq 0x44e0
movl $0x5, %ebx
leaq 0x80(%rsp), %rdi
callq 0x48caf
testl %eax, %eax
jne 0xbc5d
leaq 0x4eabc(%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_O1/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
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
movq (%rsi), %r13
movq 0x8(%rsi), %r12
callq 0xc12e
movsd %xmm0, 0x10(%rsp)
movq (%rbx), %r8
movq 0x8(%rbx), %r9
testl %ebp, %ebp
je 0xc089
movq %r15, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
callq 0xfd82
jmp 0xc0a0
movq %r15, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
callq 0xfc13
movl %eax, %ebx
testb %al, %al
je 0xc105
callq 0xc12e
movsd %xmm0, 0x8(%rsp)
movq 0x6ff08(%rip), %r14     # 0x7bfc0
leaq 0x4eb84(%rip), %rsi     # 0x5ac43
movl $0x22, %edx
movq %r14, %rdi
callq 0x4370
leaq 0x4eb93(%rip), %rsi     # 0x5ac66
movl $0xe, %edx
movq %r14, %rdi
callq 0x4370
movsd 0x8(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
movq %r14, %rdi
callq 0x44f0
leaq 0x4eb7a(%rip), %rsi     # 0x5ac75
movl $0x4, %edx
movq %rax, %rdi
jmp 0xc118
movq 0x6feb4(%rip), %rdi     # 0x7bfc0
leaq 0x4eb07(%rip), %rsi     # 0x5ac1a
movl $0x28, %edx
callq 0x4370
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %rsi
movq 0x8(%r12), %rax
subq %rsi, %rax
cmpq %r15, %rax
jne 0xc298
addq %rax, %rsi
movq %r12, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xa064
jmp 0xc2be
subq %r14, %rbx
leaq (%rbx,%r15), %rsi
cmpq %rsi, %rax
jae 0xc2ac
movq %r12, %rdi
callq 0x9d84
addq (%r12), %r15
movq %r15, %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_O1/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 0xcb85
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
leaq 0xc(%rsp), %rdx
callq *0x18(%rbx)
testl %eax, %eax
jne 0xcb6b
movl $0x0, 0xc(%rsp)
movl $0x0, (%rbx)
movl 0xc(%rsp), %ecx
movl %ecx, 0x4(%rbx)
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0x4e987(%rip), %rdi     # 0x5b513
leaq 0x4e997(%rip), %rsi     # 0x5b52a
leaq 0x4e9c2(%rip), %rcx     # 0x5b55c
movl $0x22, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 0xcbbb
movq %rbx, %rdi
callq 0xcb3c
testl %eax, %eax
je 0xcbcc
movq 0x8(%rbx), %rax
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movzbl (%rax,%rcx), %eax
popq %rbx
retq
xorl %eax, %eax
jmp 0xcbca
// File: /workspace/github_cpp_makefile_star2_O1/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 0xccdc
movzbl 0xf(%rsp), %eax
movl %eax, 0x14(%rsp)
movl %eax, %ecx
andl $-0x40, %ecx
cmpl $0x40, %ecx
jne 0xccdc
cmpl $0x4, 0x10(%rsp)
jne 0xccdc
cmpb $0x68, 0xc(%rsp)
jne 0xccdc
cmpb $0x49, 0xd(%rsp)
jne 0xccdc
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 0xccdc
leaq 0xc(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq *%r14
testl %eax, %eax
je 0xccdc
movl 0x10(%rsp), %eax
xorl %ebp, %ebp
movl $0x0, %ecx
testq %rax, %rax
je 0xcca3
xorl %ecx, %ecx
shll $0x8, %ecx
movzbl 0xb(%rsp,%rax), %edx
orl %edx, %ecx
decq %rax
jne 0xcc94
movl %ecx, (%r12)
leaq 0xc(%rsp), %rsi
leaq 0x14(%rsp), %rdx
movq %r15, %rdi
callq *%r14
testl %eax, %eax
je 0xccdc
movl 0x14(%rsp), %eax
xorl %ecx, %ecx
testq %rax, %rax
je 0xccd5
shll $0x8, %ecx
movzbl 0xb(%rsp,%rax), %edx
orl %edx, %ecx
decq %rax
jne 0xccc6
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_O1/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 0xd1e8
movq (%rdi), %r9
leaq 0x8(%rsp), %rax
movq %r9, (%rax)
movq 0x8(%rdi), %r9
movq %r9, 0x8(%rax)
leaq 0x10c(%rip), %r9        # 0xd292
movq %r9, 0x10(%rax)
leaq 0x10b(%rip), %r9        # 0xd29c
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 0xcced
testl %eax, %eax
je 0xd1e1
leaq 0x8(%rsp), %rdi
movl 0x38(%rdi), %esi
callq 0xd207
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0xd1e3
xorl %eax, %eax
addq $0x48, %rsp
retq
leaq 0x4e3f7(%rip), %rdi     # 0x5b5e6
leaq 0x4e334(%rip), %rsi     # 0x5b52a
leaq 0x4e428(%rip), %rcx     # 0x5b625
movl $0x126, %edx            # imm = 0x126
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
cmpl %esi, 0x38(%rdi)
jb 0xd273
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
testl %ebx, %ebx
je 0xd263
movl 0x30(%r14), %ebp
movl 0x34(%r14), %esi
subl %esi, %ebp
cmpl %ebx, %ebp
cmovael %ebx, %ebp
movq 0x20(%r14), %rdi
addq 0x28(%r14), %rsi
movl %ebp, %edx
callq *0x18(%rdi)
testl %eax, %eax
je 0xd25b
movl 0x34(%r14), %ecx
addl %ebp, %ecx
movl 0x30(%r14), %edx
cmpl %edx, %ecx
cmovbl %r15d, %edx
subl %edx, %ecx
movl %ecx, 0x34(%r14)
subl %ebp, 0x38(%r14)
subl %ebp, %ebx
testl %eax, %eax
jne 0xd21b
xorl %eax, %eax
jmp 0xd268
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e496(%rip), %rdi     # 0x5b710
leaq 0x4e2a9(%rip), %rsi     # 0x5b52a
leaq 0x4e4a8(%rip), %rcx     # 0x5b730
movl $0xed, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
testl %ebx, %ebx
je 0xd324
movl 0x38(%r14), %esi
leal (%rsi,%rbx), %eax
subl 0x30(%r14), %eax
jbe 0xd2cb
cmpl %esi, %eax
cmovbl %eax, %esi
movq %r14, %rdi
callq 0xd207
testl %eax, %eax
je 0xd320
movl 0x30(%r14), %eax
movl 0x38(%r14), %ecx
subl %ecx, %eax
jbe 0xd333
cmpl %ebx, %eax
cmovael %ebx, %eax
subl %eax, %ebx
leal (%rax,%rcx), %edx
movl %edx, 0x38(%r14)
addl 0x34(%r14), %ecx
movl 0x30(%r14), %edx
xorl %esi, %esi
cmpl %edx, %ecx
jb 0xd2f5
movl %edx, %esi
movl %ecx, %edi
subl %esi, %edi
leaq 0x1(%r15), %rdx
negl %esi
movb (%r15), %r8b
movq 0x28(%r14), %r9
addl %esi, %ecx
incl %ecx
movb %r8b, (%r9,%rdi)
movq %rdx, %r15
decl %eax
jne 0xd2e9
movb $0x1, %al
movq %rdx, %r15
testb %al, %al
jne 0xd2a9
jmp 0xd32b
xorl %eax, %eax
jmp 0xd31a
movl $0x1, %eax
jmp 0xd32d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4e34a(%rip), %rdi     # 0x5b684
leaq 0x4e1e9(%rip), %rsi     # 0x5b52a
leaq 0x4e369(%rip), %rcx     # 0x5b6b1
movl $0x105, %edx            # imm = 0x105
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xdb51
addq $0x30, %rsp
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xe891
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xe864
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 0xe889
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xe7e9
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq *0x18(%rbx)
testl %eax, %eax
je 0xf547
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf53f
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 0x4c222(%rip), %rsi     # 0x5b77d
movq %rax, %rdi
callq 0x4110
movq 0x6ca7e(%rip), %rsi     # 0x7bfe8
movq 0x6ca47(%rip), %rdx     # 0x7bfb8
movq %r14, %rdi
callq 0x4590
movq %rax, %rbx
movq %r14, %rdi
callq 0x4260
jmp 0xf589
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf5a0
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6433(%rip), %r8       # 0x15a0e
movq %r8, 0x10(%rax)
leaq 0x6464(%rip), %r8       # 0x15a4a
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 0xf60f
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xdb51
addq $0x30, %rsp
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x60(%rsp), %rdi
callq 0x4392d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x4392d
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 0xf743
addq $0x10, %rsp
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xf70f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xf722
jmp 0xf722
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xf73b
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x61c8(%rip), %rcx      # 0x15b74
movq %rcx, (%rdx)
leaq 0x627e(%rip), %rcx      # 0x15c34
movq %rcx, 0x8(%rdx)
movq %rax, %rcx
callq 0xfa32
movq %r14, (%rsp)
leaq 0x8(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %edx
movq %r13, %r8
movq %rbx, %r9
callq 0xf743
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xf9f8
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xfa0f
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 0x1580e
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xfa86
movq %rdi, %rdx
testq %r8, %r8
leaq 0x4ca4e(%rip), %rax     # 0x5c4a0
cmovneq %r8, %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %r8
callq 0x1dcb0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fa90
leaq 0x8(%rsp), %rdi
callq 0x1dbc4
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4be90(%rip), %rdi     # 0x5b91d
leaq 0x4bea3(%rip), %rsi     # 0x5b937
leaq 0x4bec4(%rip), %rcx     # 0x5b95f
movl $0x4e9, %edx            # imm = 0x4E9
callq 0x4200
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1dbc4
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*)
bool check_diff(const TByte* newData,const TByte* newData_end,
                const TByte* oldData,const TByte* oldData_end,
                const TByte* diff,const TByte* diff_end){
    hpatch_TStreamInput  newStream;
    hpatch_TStreamInput  oldStream;
    hpatch_TStreamInput  diffStream;
    mem_as_hStreamInput(&newStream,newData,newData_end);
    mem_as_hStreamInput(&oldStream,oldData,oldData_end);
    mem_as_hStreamInput(&diffStream,diff,diff_end);
    return check_diff(&newStream,&oldStream,&diffStream);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x48(%rsp), %r13
movq %r13, %rdi
callq 0x4392d
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4392d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4392d
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xfb2a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_diff(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamInput const*)
bool check_diff(const hpatch_TStreamInput*  newData,
                const hpatch_TStreamInput*  oldData,
                const hpatch_TStreamInput*  diff){
    const size_t kACacheBufSize=hdiff_kFileIOBufBestSize;
    TAutoMem _cache(kACacheBufSize*(1+8));
    _TCheckOutNewDataStream out_newData(newData,_cache.data(),kACacheBufSize);
    _test_rt(patch_stream_with_cache(&out_newData,oldData,diff,
                                     _cache.data()+kACacheBufSize,_cache.data_end()));
    _test_rt(out_newData.isWriteFinish());
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x480000, %edi         # imm = 0x480000
callq 0x4400
testq %rax, %rax
je 0xfbc1
movq %rax, %rbx
movq %rsp, %rdi
movl $0x80000, %ecx          # imm = 0x80000
movq %r12, %rsi
movq %rax, %rdx
callq 0x2605e
leaq 0x480000(%rbx), %r8
movq %rbx, %rcx
addq $0x80000, %rcx          # imm = 0x80000
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x450b7
testl %eax, %eax
je 0xfbb1
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movb $0x1, %bpl
cmpq 0x8(%rax), %rcx
jne 0xfbb8
movq %rbx, %rdi
callq 0x43b0
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x472c
jmp 0xfbbd
callq 0x470a
xorl %ebp, %ebp
jmp 0xfb9a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4c73a(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x6c404(%rip), %rsi     # 0x7bfe8
movq 0x6c3cd(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
jmp 0xfc0b
movq %rax, %r14
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_compressed_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, hpatch_TDecompress*)
bool check_compressed_diff(const TByte* newData,const TByte* newData_end,
                           const TByte* oldData,const TByte* oldData_end,
                           const TByte* diff,const TByte* diff_end,
                           hpatch_TDecompress* decompressPlugin){
    hpatch_TStreamInput  newStream;
    hpatch_TStreamInput  oldStream;
    hpatch_TStreamInput  diffStream;
    mem_as_hStreamInput(&newStream,newData,newData_end);
    mem_as_hStreamInput(&oldStream,oldData,oldData_end);
    mem_as_hStreamInput(&diffStream,diff,diff_end);
    return check_compressed_diff(&newStream,&oldStream,&diffStream,decompressPlugin);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
callq 0x4392d
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4392d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4392d
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq 0xa0(%rsp), %rcx
callq 0xfc8b
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq