LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_updateVirtualVCE
bool UnZipper_updateVirtualVCE(UnZipper* self,bool isDataNormalized,size_t zipCESize){
    ZipFilePos_t endCentralDirectory_pos=0;
    ZipFilePos_t centralDirectory_pos=(ZipFilePos_t)(self->stream->streamSize-zipCESize);
    ZipFilePos_t v2sign_topPos=0;
    check(_UnZipper_searchEndCentralDirectory(self,&endCentralDirectory_pos));
    check(UnZipper_searchApkV2Sign(self->stream,centralDirectory_pos,&v2sign_topPos,0,&self->_isHaveV3Sign));
    ZipFilePos_t fileDataEndPos=0;
    self->_vce=self->_cache_fvce+(v2sign_topPos-fileDataEndPos);
    self->_centralDirectory=self->_vce+(centralDirectory_pos-v2sign_topPos);
    self->_endCentralDirectory=self->_vce+(endCentralDirectory_pos-v2sign_topPos);
    self->_isDataNormalized=isDataNormalized;
    
    bool isFileDataOffsetMatch=true;
    check(_UnZipper_vce_normalized(self,isFileDataOffsetMatch,&fileDataEndPos));
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x10(%rsp), %rsi
movl %eax, (%rsi)
movq (%rdi), %rcx
movq 0x8(%rcx), %r15
movl %eax, 0xc(%rsp)
callq 0x3fe8e
testb %al, %al
je 0x40501
subq %r14, %r15
movq (%rbx), %rdi
movl %r15d, %esi
leaq 0x8b(%rbx), %r8
leaq 0xc(%rsp), %r14
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x3f264
leaq 0x14(%rsp), %rdx
movl $0x0, (%rdx)
movl (%r14), %eax
movq %rax, %rcx
addq 0xa0(%rbx), %rcx
movq %rcx, 0x98(%rbx)
subl %eax, %r15d
addq %rcx, %r15
movq %r15, 0x50(%rbx)
movl 0x10(%rsp), %esi
subl %eax, %esi
addq %rcx, %rsi
movq %rsi, 0x48(%rbx)
movb %bpl, 0x89(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4009d
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19b48(%rip), %rdi     # 0x5a050
leaq 0x1fdd2(%rip), %rsi     # 0x602e1
leaq 0x1ff66(%rip), %rcx     # 0x6047c
movl $0x222, %edx            # imm = 0x222
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_fileEntry_endOffset
ZipFilePos_t UnZipper_fileEntry_endOffset(const UnZipper* self,int fileIndex){
    ZipFilePos_t result=UnZipper_fileData_offset(self,fileIndex)
                        +UnZipper_file_compressedSize(self,fileIndex);
    TDataDescriptor desc=(TDataDescriptor)self->_dataDescriptors[fileIndex];
    if (desc==kDataDescriptor_12)
        result+=12;
    else if (desc==kDataDescriptor_16)
        result+=16;
    return result;
}

// Assembly:
movq 0x78(%rdi), %rcx
movslq %esi, %rdx
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rsi
movl (%rax,%rdx,4), %eax
addl (%rcx,%rdx,4), %eax
movzbl (%rsi,%rdx), %ecx
cmpl $0x2, %ecx
je 0x40578
cmpl $0x1, %ecx
jne 0x4057b
addl $0xc, %eax
retq
addl $0x10, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_dataStream_copyTo
bool UnZipper_dataStream_copyTo(UnZipper* self,const hpatch_TStreamInput* dataStream,
                                hpatch_StreamPos_t data_begin,hpatch_StreamPos_t data_end,
                                const hpatch_TStreamOutput* outStream,hpatch_StreamPos_t writeToPos){
    TByte* buf=self->_buf;
    assert(data_begin<=data_end);
    assert(data_end<=dataStream->streamSize);
    while (data_begin<data_end) {
        ZipFilePos_t readLen=kBufSize;
        if (readLen>(data_end-data_begin)) readLen=(ZipFilePos_t)(data_end-data_begin);
        check(dataStream->read(dataStream,data_begin,buf,buf+readLen));
        check(outStream->write(outStream,writeToPos,buf,buf+readLen));
        writeToPos+=readLen;
        data_begin+=readLen;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
cmpq %rcx, %rdx
ja 0x406d5
movq %rcx, %r15
movq %rsi, %rax
cmpq %rcx, 0x8(%rsi)
jb 0x406f4
movq %rdx, %r12
cmpq %r15, %rdx
jae 0x40686
movq %r9, %rbx
movq 0x90(%rdi), %rbp
movq %r15, 0x8(%rsp)
movq %rax, (%rsp)
subq %r12, %r15
movl $0x4000, %ecx           # imm = 0x4000
cmpq %rcx, %r15
cmovaeq %rcx, %r15
leaq (%r15,%rbp), %r14
movq %rax, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq *0x10(%rax)
testl %eax, %eax
je 0x40697
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %r13
movq %rbp, %rdx
movq %r14, %rcx
callq *0x18(%rdi)
testl %eax, %eax
je 0x406b6
addq %r15, %rbx
addq %r15, %r12
movq 0x8(%rsp), %r15
cmpq %r15, %r12
movq (%rsp), %rax
movq %r13, %rbp
jb 0x40631
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x199b2(%rip), %rdi     # 0x5a050
leaq 0x1fc3c(%rip), %rsi     # 0x602e1
leaq 0x1fedf(%rip), %rcx     # 0x6058b
movl $0x2a3, %edx            # imm = 0x2A3
callq 0x4200
leaq 0x19993(%rip), %rdi     # 0x5a050
leaq 0x1fc1d(%rip), %rsi     # 0x602e1
leaq 0x1fec0(%rip), %rcx     # 0x6058b
movl $0x2a4, %edx            # imm = 0x2A4
callq 0x4200
leaq 0x1fe9a(%rip), %rdi     # 0x60576
leaq 0x1fbfe(%rip), %rsi     # 0x602e1
leaq 0x1fea1(%rip), %rcx     # 0x6058b
movl $0x29e, %edx            # imm = 0x29E
callq 0x4200
leaq 0x1ff33(%rip), %rdi     # 0x6062e
leaq 0x1fbdf(%rip), %rsi     # 0x602e1
leaq 0x1fe82(%rip), %rcx     # 0x6058b
movl $0x29f, %edx            # imm = 0x29F
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_fileData_decompressTo
bool UnZipper_fileData_decompressTo(UnZipper* self,int fileIndex,
                                    const hpatch_TStreamOutput* outStream,hpatch_StreamPos_t writeToPos){
    if (!UnZipper_file_isCompressed(self,fileIndex)){
        return UnZipper_fileData_copyTo(self,fileIndex,outStream,writeToPos);
    }
    
    uint16_t compressType=_file_compressType(self,fileIndex);
    check(Z_DEFLATED==compressType);

    ZipFilePos_t file_offset=UnZipper_fileData_offset(self,fileIndex);
    ZipFilePos_t file_compressedSize=UnZipper_file_compressedSize(self,fileIndex);
    ZipFilePos_t file_data_size=UnZipper_file_uncompressedSize(self,fileIndex);
    
    return UnZipper_compressedData_decompressTo(self,self->stream,file_offset,file_offset+file_compressedSize,
                                                file_data_size,outStream,writeToPos);
}

// Assembly:
pushq %rax
movq %rcx, %rax
movq %rdx, %r9
movq 0x50(%rdi), %r8
movq 0x58(%rdi), %rdx
movslq %esi, %rcx
movl (%rdx,%rcx,4), %r10d
movzwl 0xa(%r8,%r10), %edx
cmpl $0x8, %edx
je 0x409c9
testl %edx, %edx
jne 0x409ef
movq (%rdi), %rsi
movq 0x60(%rdi), %r8
movq 0x78(%rdi), %rdx
movl (%rdx,%rcx,4), %edx
movl (%r8,%rcx,4), %ecx
addl %edx, %ecx
movq %r9, %r8
movq %rax, %r9
callq 0x405ea
jmp 0x409eb
movq 0x78(%rdi), %rdx
movl (%rdx,%rcx,4), %edx
movq (%rdi), %rsi
movq 0x60(%rdi), %r11
movl 0x18(%r8,%r10), %r8d
movl (%r11,%rcx,4), %ecx
addl %edx, %ecx
movq %rax, (%rsp)
callq 0x40713
movb $0x1, %al
popq %rcx
retq
leaq 0x1965a(%rip), %rdi     # 0x5a050
leaq 0x1f8e4(%rip), %rsi     # 0x602e1
leaq 0x1fc4b(%rip), %rcx     # 0x6064f
movl $0x2b3, %edx            # imm = 0x2B3
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: newThreadWork(unsigned long, unsigned long, unsigned long, int, int)
TZipThreadWork* newThreadWork(size_t _inputDataSize,size_t _codeSize,size_t _writePos,
                              int _compressLevel,int _compressMemLevel){
    TZipThreadWork* self=(TZipThreadWork*)malloc(sizeof(TZipThreadWork)+_inputDataSize+_codeSize);
    if (self==0) return 0;// error;
    self->inputData=(TByte*)self + sizeof(TZipThreadWork);
    self->inputDataSize=_inputDataSize;
    self->code=self->inputData+_inputDataSize;
    self->codeSize=_codeSize;
    self->writePos=_writePos;
    self->compressLevel=_compressLevel;
    self->compressMemLevel=_compressMemLevel;
    return self;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
addq %rsi, %rdi
addq $0x30, %rdi
callq 0x4400
testq %rax, %rax
je 0x40a5a
leaq 0x30(%rax), %rcx
movq %rcx, (%rax)
movq %r12, 0x10(%rax)
leaq (%rax,%r12), %rcx
addq $0x30, %rcx
movq %rcx, 0x8(%rax)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
movl %ebp, 0x28(%rax)
movl %ebx, 0x2c(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_close
bool Zipper_close(Zipper* self){
#if (_IS_USED_MULTITHREAD)
    if (self->_append_stream.threadWork){
        freeThreadWork(self->_append_stream.threadWork);
        self->_append_stream.threadWork=0;
    }
    if (self->_threadWorks){
        self->_threadNum=1;
        delete self->_threadWorks;
        self->_threadWorks=0;
    }
#endif
    
    self->_stream=0;
    self->_fileEntryCount=0;
    if (self->_fileStream.m_file) { check(hpatch_TFileStreamOutput_close(&self->_fileStream)); }
    if (self->_append_stream.compressHandle!=0){
        void* compressHandle=self->_append_stream.compressHandle;
        self->_append_stream.compressHandle=0;
        check(self->_append_stream.compressor->closeCompressHandle(self->_append_stream.compressor,compressHandle));
    }
    if (self->_buf) { free(self->_buf); self->_buf=0; }
    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xf8(%rdi), %rdi
testq %rdi, %rdi
je 0x40a92
callq 0x43b0
movq $0x0, 0xf8(%rbx)
movq 0x158(%rbx), %r14
testq %r14, %r14
je 0x40ac8
movl $0x1, 0x154(%rbx)
movq %r14, %rdi
callq 0x40b74
movl $0x40, %esi
movq %r14, %rdi
callq 0x4300
movq $0x0, 0x158(%rbx)
movq $0x0, (%rbx)
movl $0x0, 0x60(%rbx)
cmpq $0x0, 0x28(%rbx)
je 0x40aea
leaq 0x8(%rbx), %rdi
callq 0x486aa
testl %eax, %eax
je 0x40b35
movq 0x108(%rbx), %rsi
testq %rsi, %rsi
je 0x40b0f
movq $0x0, 0x108(%rbx)
movq 0x100(%rbx), %rdi
callq *0x18(%rdi)
testb %al, %al
je 0x40b54
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x40b2b
callq 0x43b0
movq $0x0, 0x138(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x19514(%rip), %rdi     # 0x5a050
leaq 0x1f79e(%rip), %rsi     # 0x602e1
leaq 0x1fb6c(%rip), %rcx     # 0x606b6
movl $0x374, %edx            # imm = 0x374
callq 0x4200
leaq 0x194f5(%rip), %rdi     # 0x5a050
leaq 0x1f77f(%rip), %rsi     # 0x602e1
leaq 0x1fb4d(%rip), %rcx     # 0x606b6
movl $0x378, %edx            # imm = 0x378
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_by_multi_thread
void Zipper_by_multi_thread(Zipper* self,int threadNum){
    assert(self->_fileEntryCount==0);
    assert(self->_threadNum<=1);
    assert(self->_threadWorks==0);
#if (_IS_USED_MULTITHREAD)
    threadNum=(threadNum<=self->_fileEntryMaxCount)?threadNum:self->_fileEntryMaxCount;
    self->_threadNum=(threadNum>=1)?threadNum:1;
    if (isUsedMT(self)){
        try {
            self->_threadWorks=new TZipThreadWorks(self,self->_threadNum-1);
            self->_threadWorks->start_threads(self->_threadNum-1,TZipThreadWorks::run,self->_threadWorks,false);
        } catch (...) {
            self->_threadNum=1; //close multi-thread
            if (self->_threadWorks){
                delete self->_threadWorks;
                self->_threadWorks=0;
            } 
        }
    }
#else
    self->_threadNum=1;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x0, 0x60(%rdi)
jne 0x40e61
movq %rdi, %rbx
cmpl $0x2, 0x154(%rdi)
jge 0x40e80
cmpq $0x0, 0x158(%rbx)
jne 0x40e9f
movl 0x5c(%rbx), %eax
cmpl %esi, %eax
cmovll %eax, %esi
movl $0x1, %ebp
cmpl $0x2, %esi
cmovgel %esi, %ebp
movl %ebp, 0x154(%rbx)
jl 0x40e58
movl $0x40, %edi
callq 0x42f0
movq %rax, %r14
decl %ebp
movq %rax, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x43108
movq %r14, 0x158(%rbx)
movl 0x154(%rbx), %r12d
cmpl $0x2, %r12d
jl 0x40e58
decl %r12d
xorl %ebp, %ebp
leaq 0x236c(%rip), %r15      # 0x431a4
incq 0x20(%r14)
movl $0x1, %edi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x48827
incl %ebp
cmpl %ebp, %r12d
jne 0x40e38
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f8ed(%rip), %rdi     # 0x60755
leaq 0x1f472(%rip), %rsi     # 0x602e1
leaq 0x1f8f8(%rip), %rcx     # 0x6076e
movl $0x3b1, %edx            # imm = 0x3B1
callq 0x4200
leaq 0x1f912(%rip), %rdi     # 0x60799
leaq 0x1f453(%rip), %rsi     # 0x602e1
leaq 0x1f8d9(%rip), %rcx     # 0x6076e
movl $0x3b2, %edx            # imm = 0x3B2
callq 0x4200
leaq 0x1f907(%rip), %rdi     # 0x607ad
leaq 0x1f434(%rip), %rsi     # 0x602e1
leaq 0x1f8ba(%rip), %rcx     # 0x6076e
movl $0x3b3, %edx            # imm = 0x3B3
callq 0x4200
movq %rax, %r15
movl $0x40, %esi
movq %r14, %rdi
callq 0x4300
jmp 0x40f03
movq %rax, %rdi
callq 0x4120
decq 0x20(%r14)
movq %r14, %rdi
callq 0x42de4
callq 0x4520
jmp 0x40e58
movq %rax, %r15
callq 0x4520
jmp 0x40f03
movq %rax, %rdi
callq 0x9b7c
movq %rax, %r15
movq %r15, %rdi
callq 0x4120
movl $0x1, 0x154(%rbx)
movq 0x158(%rbx), %r14
testq %r14, %r14
je 0x40f41
movq %r14, %rdi
callq 0x40b74
movl $0x40, %esi
movq %r14, %rdi
callq 0x4300
movq $0x0, 0x158(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4520
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_openFile
bool Zipper_openFile(Zipper* self,const char* zipFileName,int fileEntryMaxCount,
                     int ZipAlignSize,int compressLevel,int compressMemLevel,
                     size_t normalizeSoPageAlign,bool pageAlignCompatible,TPageAlignState pageAlignState){
    assert(self->_fileStream.m_file==0);
    check(hpatch_TFileStreamOutput_open(&self->_fileStream,zipFileName,(hpatch_StreamPos_t)(-1)));
    hpatch_TFileStreamOutput_setRandomOut(&self->_fileStream,hpatch_TRUE);
    bool result=Zipper_openStream(self,&self->_fileStream.base,fileEntryMaxCount,
                                  ZipAlignSize,compressLevel,compressMemLevel,
                                  normalizeSoPageAlign,pageAlignCompatible,pageAlignState);
    if (!result){
        hpatch_TFileStreamOutput_close(&self->_fileStream);
        self->_fileStream.m_file=0;
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x28(%rdi)
jne 0x40fd5
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rdi, %r12
leaq 0x8(%rdi), %r13
movq %r13, %rdi
movq $-0x1, %rdx
callq 0x48055
testl %eax, %eax
je 0x40ff4
movl 0x50(%rsp), %eax
movb 0x48(%rsp), %cl
movq 0x40(%rsp), %r10
movl $0x1, 0x44(%r12)
subq $0x8, %rsp
movzbl %cl, %r11d
movq %r12, %rdi
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
pushq %rax
pushq %r11
pushq %r10
callq 0x40bf5
addq $0x20, %rsp
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f7e7(%rip), %rdi     # 0x607c3
leaq 0x1f2fe(%rip), %rsi     # 0x602e1
leaq 0x1f7f5(%rip), %rcx     # 0x607df
movl $0x3cb, %edx            # imm = 0x3CB
callq 0x4200
leaq 0x19055(%rip), %rdi     # 0x5a050
leaq 0x1f2df(%rip), %rsi     # 0x602e1
leaq 0x1f7d6(%rip), %rcx     # 0x607df
movl $0x3cc, %edx            # imm = 0x3CC
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_compressData
size_t Zipper_compressData(const unsigned char* data,size_t dataSize,unsigned char* out_code,
                           size_t codeSize,int kCompressLevel,int kCompressMemLevel){
    const int kCodeBufSize=1024;
    TByte codeBuf[kCodeBufSize];
    hdiff_TStreamOutput stream;
    mem_as_hStreamOutput(&stream,out_code,out_code+codeSize);
    _zlib_TCompress* compressHandle=_zlib_compress_open_by(_zlib_compressPlugin,kCompressLevel,kCompressMemLevel,
                                                           &stream,codeBuf,kCodeBufSize);
    if (compressHandle==0) return 0;//error;
    int outStream_isCanceled=0;//false
    hpatch_StreamPos_t curWritedPos=0;
    int is_data_end=true;
    if (!_zlib_compress_part(compressHandle,data,data+dataSize,
                             is_data_end,&curWritedPos,&outStream_isCanceled)) return 0;//error
    if (!_zlib_compress_close_by(_zlib_compressPlugin,compressHandle)) return 0;//error
    return (size_t)curWritedPos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x430, %rsp            # imm = 0x430
movl %r9d, %ebx
movl %r8d, %ebp
movq %rsi, %r14
movq %rdi, %r15
leaq (%rcx,%rdx), %rax
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x433f7
leaq 0x3a975(%rip), %rdi     # 0x7bbc0
leaq 0x30(%rsp), %r8
movl $0x400, %r9d            # imm = 0x400
movl %ebp, %esi
movl %ebx, %edx
movq %r12, %rcx
callq 0x412ff
testq %rax, %rax
je 0x412d4
movq %rax, %rbx
leaq 0xc(%rsp), %r9
movl $0x0, (%r9)
movq %rsp, %r8
movq $0x0, (%r8)
addq %r15, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x413ba
testl %eax, %eax
je 0x412d4
cmpq $0x0, 0x50(%rbx)
je 0x412ea
movq %rbx, %rdi
addq $0x18, %rdi
callq 0x4a16a
movl %eax, %ebp
xorl %r14d, %r14d
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41c0
cmpl $-0x3, %ebp
movq (%rsp), %rax
cmoveq %rax, %r14
testl %ebp, %ebp
cmoveq %rax, %r14
jmp 0x412d7
xorl %r14d, %r14d
movq %r14, %rax
addq $0x430, %rsp            # imm = 0x430
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41c0
movq (%rsp), %r14
jmp 0x412d7
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/../../HDiffPatch/compress_plugin_demo.h
// Function: zlib_compress_open_by(hdiff_TCompress const*, int, int, hpatch_TStreamOutput const*, unsigned char*, unsigned long)
static _zlib_TCompress*  _zlib_compress_open_by(const hdiff_TCompress* compressPlugin,
                                                    int compressLevel,int compressMemLevel,
                                                    const hpatch_TStreamOutput* out_code,
                                                    unsigned char* _mem_buf,size_t _mem_buf_size){
        #define __MAX_TS(a,b)  ((a)>=(b)?(a):(b))
        const hpatch_size_t kZlibAlign=__MAX_TS(__MAX_TS(sizeof(hpatch_StreamPos_t),sizeof(void*)),sizeof(uLongf));
        #undef __MAX_TS
        unsigned char* _mem_buf_end=_mem_buf+_mem_buf_size;
        unsigned char* self_at=(unsigned char*)_hpatch_align_upper(_mem_buf,kZlibAlign);
        if (self_at>=_mem_buf_end) return 0;
        return _zlib_compress_open_at(compressPlugin,compressLevel,compressMemLevel,out_code,
                                      (_zlib_TCompress*)self_at,_mem_buf_end-self_at);
    }

// Assembly:
pushq %rbx
movq %r8, %rbx
addq %r8, %r9
addq $0x7, %rbx
andq $-0x8, %rbx
subq %rbx, %r9
jbe 0x41397
cmpq $0x88, %r9
jbe 0x4139b
movl %edx, %r8d
leaq 0x18(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x18(%rbx)
leaq 0x88(%rbx), %rdx
movq %rdx, 0x8(%rbx)
addq $-0x88, %r9
movq %r9, 0x10(%rbx)
movq %rcx, (%rbx)
movq %rdx, 0x30(%rbx)
movl %r9d, 0x38(%rbx)
movsbl 0x30(%rdi), %ecx
movl 0x38(%rdi), %r9d
leaq 0x17f1d(%rip), %r10     # 0x59293
movq %rax, %rdi
movl $0x8, %edx
pushq $0x70
pushq %r10
callq 0x49e97
addq $0x10, %rsp
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmoveq %rbx, %rax
jmp 0x41399
xorl %eax, %eax
popq %rbx
retq
leaq 0x17e19(%rip), %rdi     # 0x591bb
leaq 0x1fc98(%rip), %rsi     # 0x61041
leaq 0x17e5f(%rip), %rcx     # 0x5920f
movl $0x8d, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/../../HDiffPatch/compress_plugin_demo.h
// Function: zlib_compress_close_by(hdiff_TCompress const*, _zlib_TCompress*)
static hpatch_BOOL _zlib_compress_close_by(const hdiff_TCompress* compressPlugin,_zlib_TCompress* self){
        hpatch_BOOL result=hpatch_TRUE;
        if (!self) return result;
        if (self->c_stream.state!=0){
            int ret=deflateEnd(&self->c_stream);
            result=(Z_OK==ret)|(Z_DATA_ERROR==ret);
        }
        memset(self,0,sizeof(_zlib_TCompress));
        return result;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4155d
movq %rdi, %rbx
cmpq $0x0, 0x50(%rdi)
je 0x41564
leaq 0x18(%rbx), %rdi
callq 0x4a16a
testl %eax, %eax
sete %cl
cmpl $-0x3, %eax
sete %al
orb %cl, %al
movzbl %al, %ebp
jmp 0x41569
movl $0x1, %ebp
jmp 0x41578
movl $0x1, %ebp
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41c0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_file_append_stream::_append_part_input(hpatch_TStreamOutput const*, unsigned long long, unsigned char const*, unsigned char const*)
hpatch_BOOL Zipper_file_append_stream::_append_part_input(const hpatch_TStreamOutput* stream,hpatch_StreamPos_t pos,
                                                          const unsigned char *part_data,
                                                          const unsigned char *part_data_end){
    Zipper_file_append_stream* append_state=(Zipper_file_append_stream*)stream->streamImport;
    assert(append_state->inputPos==pos);
    size_t partSize=(size_t)(part_data_end-part_data);
    append_state->inputPos+=partSize;
    if (append_state->inputPos>append_state->streamSize) return hpatch_FALSE;//error
    int is_data_end=(append_state->inputPos==append_state->streamSize);
#if (_IS_USED_MULTITHREAD)
    if (append_state->threadWork){
        memcpy(append_state->threadWork->inputData+append_state->inputPos-partSize,part_data,partSize);
        return hpatch_TRUE;
    } else
#endif
    if (append_state->compressHandle){
        hpatch_StreamPos_t curWritedPos=append_state->outputPos;
        if(!append_state->compressor->compressPart(append_state->compressHandle,part_data,
                                part_data_end,is_data_end,&curWritedPos)) return hpatch_FALSE;//error
        assert(curWritedPos==append_state->outputPos);
        return hpatch_TRUE;
    }else{
        return _append_part_output(stream,append_state->outputPos,part_data,part_data_end);
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq (%rdi), %rbx
cmpq %rsi, 0x20(%rbx)
jne 0x41642
movq %rcx, %r8
subq %rdx, %r8
leaq (%r8,%rsi), %r9
movq %r9, 0x20(%rbx)
xorl %eax, %eax
cmpq 0x8(%rbx), %r9
ja 0x415cd
sete %r9b
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x415d3
addq (%rax), %rsi
movq %rsi, %rdi
movq %rdx, %rsi
movq %r8, %rdx
callq 0x4290
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x41637
movzbl %r9b, %r9d
movq 0x28(%rbx), %rsi
leaq 0x8(%rsp), %r8
movq %rsi, (%r8)
movq 0x40(%rbx), %r10
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r9d, %ecx
callq *0x10(%r10)
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x415cd
movq 0x8(%rsp), %rcx
movl $0x1, %eax
cmpq 0x28(%rbx), %rcx
je 0x415cd
leaq 0x1f2dd(%rip), %rdi     # 0x608fc
leaq 0x1ecbb(%rip), %rsi     # 0x602e1
leaq 0x1f22e(%rip), %rcx     # 0x6085b
movl $0x511, %edx            # imm = 0x511
callq 0x4200
movq 0x28(%rbx), %rsi
callq 0x41662
jmp 0x415c8
leaq 0x1f1f6(%rip), %rdi     # 0x6083f
leaq 0x1ec91(%rip), %rsi     # 0x602e1
leaq 0x1f204(%rip), %rcx     # 0x6085b
movl $0x502, %edx            # imm = 0x502
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_file_append_stream::_append_part_output(hpatch_TStreamOutput const*, unsigned long long, unsigned char const*, unsigned char const*)
hpatch_BOOL Zipper_file_append_stream::_append_part_output(const hpatch_TStreamOutput* stream,hpatch_StreamPos_t pos,
                                                           const unsigned char *part_data,
                                                           const unsigned char *part_data_end){
    Zipper_file_append_stream* append_state=(Zipper_file_append_stream*)stream->streamImport;
    assert(append_state->outputPos==pos);
    size_t partSize=(size_t)(part_data_end-part_data);
    append_state->outputPos+=partSize;
    return _write(append_state->self,part_data,partSize);
}

// Assembly:
pushq %rax
movq (%rdi), %rax
cmpq %rsi, 0x28(%rax)
jne 0x4168c
subq %rdx, %rcx
addq %rcx, %rsi
movq %rsi, 0x28(%rax)
movq 0x30(%rax), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x416ab
movl $0x1, %eax
popq %rcx
retq
leaq 0x1f28f(%rip), %rdi     # 0x60922
leaq 0x1ec47(%rip), %rsi     # 0x602e1
leaq 0x1f29e(%rip), %rcx     # 0x6093f
movl $0x51c, %edx            # imm = 0x51C
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: write(Zipper*, unsigned char const*, unsigned long)
static bool _write(Zipper* self,const TByte* data,size_t len){
    size_t curBufLen=self->_curBufLen;
    if (((curBufLen>0)||(len*2<=kBufSize)) && (curBufLen+len<=kBufSize)){//to buf
        memcpy(self->_buf+curBufLen,data,len);
        self->_curBufLen=curBufLen+len;
    }else{
        if (curBufLen>0)
            check(_writeFlush(self));
        check(self->_stream->write(self->_stream,self->_curFilePos-self->_curBufLen,data,data+len));
    }
    self->_curFilePos+=(ZipFilePos_t)len;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x140(%rdi), %rdi
testq %rdi, %rdi
sete %al
leaq (%rdx,%rdx), %rcx
cmpq $0x4001, %rcx           # imm = 0x4001
setae %cl
testb %al, %cl
jne 0x41719
leaq (%rdi,%rbx), %r12
cmpq $0x4000, %r12           # imm = 0x4000
ja 0x41703
addq 0x138(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x4290
movq %r12, 0x140(%r14)
jmp 0x41733
testq %rdi, %rdi
je 0x41719
movq %r14, %rdi
callq 0x42910
movq 0x140(%r14), %rax
jmp 0x4171b
xorl %eax, %eax
movq (%r14), %rdi
movl 0x58(%r14), %esi
subq %rax, %rsi
leaq (%r15,%rbx), %rcx
movq %r15, %rdx
callq *0x18(%rdi)
testl %eax, %eax
je 0x41743
addl %ebx, 0x58(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x18906(%rip), %rdi     # 0x5a050
leaq 0x1eb90(%rip), %rsi     # 0x602e1
leaq 0x1f9af(%rip), %rcx     # 0x61107
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: dispose_filishedThreadWork(Zipper*, bool)
static bool _dispose_filishedThreadWork(Zipper* self,bool isWait){
    while (true) {
        TZipThreadWork* work=self->_threadWorks->haveFinishWork(isWait);
        if (work){
            bool ret=(work->codeSize>0);
            if (ret) check(_writeBack(self,work->writePos,work->code,work->codeSize));
            freeThreadWork(work);
            if (!ret) 
                return false;
        }else{
            return true;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x158(%rdi), %rdi
movb $0x1, %bl
cmpl $0x0, 0x38(%rdi)
je 0x4256a
leaq 0x38(%rdi), %r12
movzbl %sil, %ebp
addq $0x8, %rdi
movl %ebp, %esi
callq 0x489ec
testq %rax, %rax
je 0x4256a
movq %rax, %r15
decl (%r12)
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x42560
movq 0x8(%r15), %rdx
movq 0x20(%r15), %rsi
movq (%r14), %rdi
addq %rdx, %rcx
callq *0x18(%rdi)
testl %eax, %eax
je 0x42575
movq %r15, %rdi
callq 0x43b0
movq 0x158(%r14), %rdi
leaq 0x38(%rdi), %r12
cmpl $0x0, 0x38(%rdi)
jne 0x42510
jmp 0x4256a
movq %r15, %rdi
callq 0x43b0
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17ad4(%rip), %rdi     # 0x5a050
leaq 0x1dd5e(%rip), %rsi     # 0x602e1
leaq 0x1ecd9(%rip), %rcx     # 0x61263
movl $0x3f7, %edx            # imm = 0x3F7
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_file_append_copy
bool Zipper_file_append_copy(Zipper* self,UnZipper* srcZip,int srcFileIndex,bool isAlwaysReCompress){
    bool dataIsCompressed=isAlwaysReCompress?false:UnZipper_file_isCompressed(srcZip,srcFileIndex);
    check(Zipper_file_append_begin(self,srcZip,srcFileIndex,dataIsCompressed,
                                   UnZipper_file_uncompressedSize(srcZip,srcFileIndex),
                                   UnZipper_file_compressedSize(srcZip,srcFileIndex)));
    if (isAlwaysReCompress){
        check(UnZipper_fileData_decompressTo(srcZip,srcFileIndex,&self->_append_stream));
    }else{
        check(UnZipper_fileData_copyTo(srcZip,srcFileIndex,&self->_append_stream));
    }
    check(Zipper_file_append_end(self));
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %rax
movq 0x58(%rsi), %rcx
movslq %edx, %r15
movl (%rcx,%r15,4), %edx
testl %r12d, %r12d
je 0x42645
xorl %ecx, %ecx
jmp 0x4264e
cmpw $0x0, 0xa(%rax,%rdx)
setne %cl
movl 0x18(%rax,%rdx), %r8d
movq 0x60(%r14), %rax
movl (%rax,%r15,4), %r9d
movl 0x94(%rbx), %eax
movl 0x98(%rbx), %r10d
movzbl %cl, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
pushq %r10
pushq %rax
callq 0x4177e
addq $0x10, %rsp
testb %al, %al
je 0x426d4
leaq 0xc0(%rbx), %r8
testb %r12b, %r12b
je 0x426a1
movq %r14, %rdi
movl %ebp, %esi
movq %r8, %rdx
xorl %ecx, %ecx
callq 0x40983
jmp 0x426c1
movq (%r14), %rsi
movq 0x60(%r14), %rax
movq 0x78(%r14), %rcx
movl (%rcx,%r15,4), %edx
movl (%rax,%r15,4), %ecx
addl %edx, %ecx
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x405ea
movq %rbx, %rdi
callq 0x4224c
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17975(%rip), %rdi     # 0x5a050
leaq 0x1dbff(%rip), %rsi     # 0x602e1
leaq 0x1e484(%rip), %rcx     # 0x60b6d
movl $0x5c8, %edx            # imm = 0x5C8
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_fileHeader_append
bool Zipper_fileHeader_append(Zipper* self,UnZipper* srcZip,int srcFileIndex){
    int curFileIndex=self->_fileHeaderCount;
    check(curFileIndex < self->_fileEntryCount);
    self->_fileHeaderCount=curFileIndex+1;
    if (curFileIndex==0)
        self->_centralDirectory_pos=self->_curFilePos;
    return _write_fileHeaderInfo(self,curFileIndex,srcZip,srcFileIndex,true);
}

// Assembly:
movl %edx, %ecx
movq %rsi, %rdx
movl 0x9c(%rdi), %esi
cmpl 0x60(%rdi), %esi
jge 0x42746
leal 0x1(%rsi), %eax
movl %eax, 0x9c(%rdi)
testl %esi, %esi
jne 0x4273b
movl 0x58(%rdi), %eax
movl %eax, 0xa0(%rdi)
xorl %esi, %esi
movl $0x1, %r8d
jmp 0x41b0a
pushq %rax
leaq 0x17902(%rip), %rdi     # 0x5a050
leaq 0x1db8c(%rip), %rsi     # 0x602e1
leaq 0x1e44f(%rip), %rcx     # 0x60bab
movl $0x5da, %edx            # imm = 0x5DA
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: writeFlush(Zipper*)
static bool _writeFlush(Zipper* self){
    size_t curBufLen=self->_curBufLen;
    if (curBufLen>0){
        self->_curBufLen=0;
        check(self->_stream->write(self->_stream,self->_curFilePos-curBufLen,self->_buf,self->_buf+curBufLen));
    }
    return true;
}

// Assembly:
pushq %rax
movq 0x140(%rdi), %rcx
testq %rcx, %rcx
je 0x42945
movq $0x0, 0x140(%rdi)
movq (%rdi), %rax
movl 0x58(%rdi), %esi
subq %rcx, %rsi
movq 0x138(%rdi), %rdx
addq %rdx, %rcx
movq %rax, %rdi
callq *0x18(%rax)
testl %eax, %eax
je 0x42947
popq %rax
retq
leaq 0x17702(%rip), %rdi     # 0x5a050
leaq 0x1d98c(%rip), %rsi     # 0x602e1
leaq 0x1e985(%rip), %rcx     # 0x612e1
movl $0x3dc, %edx            # imm = 0x3DC
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_file_append_set_new_crc32
bool Zipper_file_append_set_new_crc32(Zipper* self,uint32_t newCrc32){
    check(!self->_isUpdateCrc32);
    self->_isUpdateCrc32=true;
    self->_newCrc32=newCrc32;
    return true;
}

// Assembly:
cmpb $0x1, 0x148(%rdi)
je 0x4297f
movb $0x1, 0x148(%rdi)
movl %esi, 0x14c(%rdi)
movb $0x1, %al
retq
pushq %rax
leaq 0x176c9(%rip), %rdi     # 0x5a050
leaq 0x1d953(%rip), %rsi     # 0x602e1
leaq 0x1e28c(%rip), %rcx     # 0x60c21
movl $0x5fd, %edx            # imm = 0x5FD
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_file_append_set_new_isCompress
bool Zipper_file_append_set_new_isCompress(Zipper* self,bool newIsCompress){
    check(!self->_isUpdateIsCompress);
    self->_isUpdateIsCompress=true;
    self->_newIsCompress=newIsCompress;
    return true;
}

// Assembly:
cmpb $0x1, 0x150(%rdi)
je 0x429f2
movb $0x1, 0x150(%rdi)
movb %sil, 0x151(%rdi)
movb $0x1, %al
retq
pushq %rax
leaq 0x17656(%rip), %rdi     # 0x5a050
leaq 0x1d8e0(%rip), %rsi     # 0x602e1
leaq 0x1e253(%rip), %rcx     # 0x60c5b
movl $0x609, %edx            # imm = 0x609
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/../../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_decompress_close(hpatch_TDecompress*, void*)
static hpatch_BOOL _zlib_decompress_close(struct hpatch_TDecompress* decompressPlugin,
                                              hpatch_decompressHandle decompressHandle){
        _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
        hpatch_BOOL result=_zlib_decompress_close_by(decompressPlugin,self);
        if (self) free(self);
        return result;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x408f6
movl %eax, %ebp
testq %rbx, %rbx
je 0x42cb0
movq %rbx, %rdi
callq 0x43b0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/../../HDiffPatch/decompress_plugin_demo.h
// Function: _zlib_do_inflate(void*)
static hpatch_BOOL __zlib_do_inflate(hpatch_decompressHandle decompressHandle){
        _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
        uInt avail_out_back,avail_in_back;
        int ret;
        hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
        if ((self->d_stream.avail_in==0)&&(codeLen>0)) {
            size_t readLen=self->dec_buf_size;
            if (readLen>codeLen) readLen=(size_t)codeLen;
            self->d_stream.next_in=self->dec_buf;
            if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf,
                                        self->dec_buf+readLen)) return hpatch_FALSE;//error;
            self->d_stream.avail_in=(uInt)readLen;
            self->code_begin+=readLen;
            codeLen-=readLen;
        }
        
        avail_out_back=self->d_stream.avail_out;
        avail_in_back=self->d_stream.avail_in;
        ret=inflate(&self->d_stream,Z_NO_FLUSH);
        if (ret==Z_OK){
            if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
                _dec_onDecErr_rt();//error;
        }else if (ret==Z_STREAM_END){
            if (self->d_stream.avail_in+codeLen>0){ //next compress node!
                if (!_zlib_reset_for_next_node(&self->d_stream))
                    _dec_onDecErr_rt();//error;
            }else{//all end
                if (self->d_stream.avail_out!=0)
                    _dec_onDecErr_rt();//error;
            }
        }else{
            _dec_onDecErr_rt();//error;
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %r15
subq %rsi, %r15
movl 0x30(%rdi), %r12d
testl %r12d, %r12d
sete %al
testq %r15, %r15
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x42d14
movq 0x20(%rbx), %r12
cmpq %r15, %r12
cmovaeq %r15, %r12
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rdx
movq %rdx, 0x28(%rbx)
leaq (%rdx,%r12), %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x42d51
movl %r12d, 0x30(%rbx)
addq %r12, (%rbx)
subq %r12, %r15
leaq 0x28(%rbx), %r14
movl 0x48(%rbx), %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x4e888
cmpl $0x1, %eax
je 0x42d40
testl %eax, %eax
jne 0x42d6c
movl $0x1, %eax
cmpl %r12d, 0x30(%rbx)
jne 0x42d97
cmpl %ebp, 0x48(%rbx)
je 0x42d6c
jmp 0x42d97
movl 0x30(%rbx), %r12d
addq %r12, %r15
jne 0x42d55
cmpl $0x0, 0x48(%rbx)
jne 0x42d6c
jmp 0x42d92
xorl %eax, %eax
jmp 0x42d97
movq 0x28(%rbx), %r15
movq 0x40(%rbx), %r13
movl 0x48(%rbx), %ebp
movq %r14, %rdi
callq 0x4e659
testl %eax, %eax
je 0x42d83
xorl %eax, %eax
cmpl $0x0, 0x9c(%rbx)
jne 0x42d97
movl $0x3, 0x9c(%rbx)
jmp 0x42d97
movq %r13, 0x40(%rbx)
movq %r15, 0x28(%rbx)
movl %ebp, 0x48(%rbx)
movl %r12d, 0x30(%rbx)
movl $0x1, %eax
addq $0x8, %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/patch/Zipper.cpp
// Function: (anonymous namespace)::TMt_base::on_error()
void on_error(){
        {
            CAutoLocker _auto_locker(_locker.locker);
            if (_is_on_error) return;
            _is_on_error=true;
        }
        closeAndClear();
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq $0x0, (%rsp)
movb $0x0, 0x8(%rsp)
testq %rax, %rax
je 0x42e37
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x2095c
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq (%rsp), %rcx
movq %rcx, (%rdi)
movq %rax, (%rsp)
movb 0x8(%rsp), %al
movb %al, 0x8(%rdi)
movb $0x1, 0x8(%rsp)
callq 0x20946
movb 0x18(%rbx), %al
cmpb $0x1, %al
jne 0x42e48
movq %rsp, %rdi
callq 0x20946
jmp 0x42e5c
movb $0x1, 0x18(%rbx)
movq %rsp, %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x42da6
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: zlib_compressPart(void*, unsigned char const*, unsigned char const*, int, unsigned long long*)
static bool _zlib_compressPart(void* compressHandle,const unsigned char* part_data,const unsigned char* part_data_end,
                               int is_data_end,hpatch_StreamPos_t* curWritedPos){
    int outStream_isCanceled=0;
    int ret=_zlib_compress_part((_zlib_TCompress*)compressHandle,part_data,part_data_end,
                                     is_data_end,curWritedPos,&outStream_isCanceled);
    if (outStream_isCanceled) return false;
    return ret!=0;    
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
movq %rbx, %r9
callq 0x413ba
cmpl $0x0, (%rbx)
sete %cl
testl %eax, %eax
setne %al
andb %cl, %al
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: TZipThreadWorks::run(int, void*)
static void run(int threadIndex,void* workData){
        TZipThreadWorks* self=(TZipThreadWorks*)workData;
        _auto_thread_end_t _thread_end(*self);
        while (TZipThreadWork* work=self->getWork()){
            self->doWork(work);
            self->endWork(work);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x8(%rsi), %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x489ec
movq %rax, %r15
testq %rax, %rax
je 0x43206
movq 0x10(%r15), %rsi
movq (%r15), %rdi
movq 0x8(%r15), %rdx
movq 0x18(%r15), %rcx
movl 0x28(%r15), %r8d
movl 0x2c(%r15), %r9d
callq 0x41212
testq %rax, %rax
je 0x431ec
cmpq 0x18(%r15), %rax
je 0x431f4
movq $0x0, 0x18(%r15)
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x489e4
jmp 0x431b0
addq $0x28, %rbx
movl $0x1, %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x489e4
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x9b7c
movq %rax, %r14
movq %rbx, %rdi
callq 0x42e76
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: hpatch_packUIntWithTag
hpatch_BOOL hpatch_packUIntWithTag(TByte** out_code,TByte* out_code_end,
                                   hpatch_StreamPos_t uValue,hpatch_uint highTag,
                                   const hpatch_uint kTagBit){//写入整数并前进指针.
    TByte*          pcode=*out_code;
    const hpatch_StreamPos_t kMaxValueWithTag=((hpatch_StreamPos_t)1<<(7-kTagBit))-1;
    TByte           codeBuf[hpatch_kMaxPackedUIntBytes];
    TByte*          codeEnd=codeBuf;
#ifdef __RUN_MEM_SAFE_CHECK
    //static const hpatch_uint kPackMaxTagBit=7;
    //assert((0<=kTagBit)&&(kTagBit<=kPackMaxTagBit));
    //assert((highTag>>kTagBit)==0);
#endif
    while (uValue>kMaxValueWithTag) {
        *codeEnd=uValue&((1<<7)-1); ++codeEnd;
        uValue>>=7;
    }
#ifdef __RUN_MEM_SAFE_CHECK
    if ((out_code_end-pcode)<(1+(codeEnd-codeBuf))) return _hpatch_FALSE;
#endif
    *pcode=(TByte)( (TByte)uValue | (highTag<<(8-kTagBit))
                   | (((codeBuf!=codeEnd)?1:0)<<(7-kTagBit))  );
    ++pcode;
    while (codeBuf!=codeEnd) {
        --codeEnd;
        *pcode=(*codeEnd) | (TByte)(((codeBuf!=codeEnd)?1:0)<<7);
        ++pcode;
    }
    *out_code=pcode;
    return hpatch_TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
movl %ecx, %r10d
movl $0x7, %r9d
subl %r8d, %r9d
movq %rdx, %r11
movl %r9d, %ecx
shrq %cl, %r11
movq (%rdi), %rbx
leaq -0xb(%rsp), %rax
testq %r11, %r11
je 0x4329d
leaq -0xb(%rsp), %r11
movl %edx, %ecx
andb $0x7f, %cl
movb %cl, (%r11)
incq %r11
shrq $0x7, %rdx
movq %rdx, %r14
movl %r9d, %ecx
shrq %cl, %r14
testq %r14, %r14
jne 0x4327e
jmp 0x432a0
movq %rax, %r11
subq %rbx, %rsi
movq %r11, %rcx
subq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rsi
jle 0x4330f
movb $0x8, %cl
subb %r8b, %cl
shll %cl, %r10d
orl %edx, %r10d
leaq -0xb(%rsp), %rax
xorl %edx, %edx
cmpq %r11, %rax
setne %dl
movl %r9d, %ecx
shll %cl, %edx
orl %r10d, %edx
leaq 0x1(%rbx), %rcx
movb %dl, (%rbx)
cmpq %r11, %rax
je 0x43304
decq %r11
cmpq %rax, %r11
setne %sil
shlb $0x7, %sil
orb (%r11), %sil
leaq 0x1(%rcx), %rdx
leaq -0x1(%r11), %r8
movb %sil, (%rcx)
movq %rdx, %rcx
cmpq %rax, %r11
movq %r8, %r11
jne 0x432de
jmp 0x43307
movq %rcx, %rdx
movq %rdx, (%rdi)
movl $0x1, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: hpatch_packUIntWithTag_size
hpatch_uint hpatch_packUIntWithTag_size(hpatch_StreamPos_t uValue,const hpatch_uint kTagBit){
    const hpatch_StreamPos_t kMaxValueWithTag=((hpatch_StreamPos_t)1<<(7-kTagBit))-1;
    hpatch_uint size=0;
    while (uValue>kMaxValueWithTag) {
        ++size;
        uValue>>=7;
    }
    ++size;
    return size;
}

// Assembly:
movl $0x7, %ecx
subl %esi, %ecx
movq %rdi, %rax
shrq %cl, %rax
testq %rax, %rax
je 0x4333c
movl $0x1, %eax
shrq $0x7, %rdi
movq %rdi, %rdx
shrq %cl, %rdx
incl %eax
testq %rdx, %rdx
jne 0x4332a
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: hpatch_unpackUIntWithTag
hpatch_BOOL hpatch_unpackUIntWithTag(const TByte** src_code,const TByte* src_code_end,
                                     hpatch_StreamPos_t* result,const hpatch_uint kTagBit){//读出整数并前进指针.
#ifdef __RUN_MEM_SAFE_CHECK
    //const hpatch_uint kPackMaxTagBit=7;
#endif
    hpatch_StreamPos_t  value;
    TByte               code;
    const TByte*        pcode=*src_code;
    
#ifdef __RUN_MEM_SAFE_CHECK
    //assert(kTagBit<=kPackMaxTagBit);
    if (src_code_end<=pcode) return _hpatch_FALSE;
#endif
    code=*pcode; ++pcode;
    value=code&((1<<(7-kTagBit))-1);
    if ((code&(1<<(7-kTagBit)))!=0){
        do {
#ifdef __RUN_MEM_SAFE_CHECK
            if ((value>>(sizeof(value)*8-7))!=0) return _hpatch_FALSE;//cannot save 7bit
            if (src_code_end==pcode) return _hpatch_FALSE;
#endif
            code=*pcode; ++pcode;
            value=(value<<7) | (code&((1<<7)-1));
        } while ((code&(1<<7))!=0);
    }
    (*src_code)=pcode;
    *result=value;
    return hpatch_TRUE;
}

// Assembly:
movq (%rdi), %r9
cmpq %rsi, %r9
jae 0x433a6
movzbl (%r9), %r11d
incq %r9
movb $0x7, %r8b
subb %cl, %r8b
movl $0x1, %eax
movl $0x1, %r10d
movl %r8d, %ecx
shll %cl, %r10d
decl %r10d
andl %r11d, %r10d
movzbl %r8b, %ecx
btl %ecx, %r11d
jae 0x4339f
movq %r10, %rcx
shrq $0x39, %rcx
jne 0x433a6
cmpq %rsi, %r9
je 0x433a6
movzbl (%r9), %ecx
incq %r9
shlq $0x7, %r10
movl %ecx, %r8d
andl $0x7f, %r8d
orq %r8, %r10
testb %cl, %cl
js 0x43378
movq %r9, (%rdi)
movq %r10, (%rdx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: mem_as_hStreamInput
const hpatch_TStreamInput* mem_as_hStreamInput(hpatch_TStreamInput* out_stream,
                                               const unsigned char* mem,const unsigned char* mem_end){
    out_stream->streamImport=(void*)mem;
    out_stream->streamSize=mem_end-mem;
    out_stream->read=_read_mem_stream;
    return out_stream;
}

// Assembly:
movq %rdi, %rax
movq %rsi, (%rdi)
subq %rsi, %rdx
movq %rdx, 0x8(%rdi)
leaq 0x5(%rip), %rcx         # 0x433c2
movq %rcx, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: mem_as_hStreamOutput
const hpatch_TStreamOutput* mem_as_hStreamOutput(hpatch_TStreamOutput* out_stream,
                                                 unsigned char* mem,unsigned char* mem_end){
    out_stream->streamImport=mem;
    out_stream->streamSize=mem_end-mem;
    out_stream->read_writed=(_read_mem_stream_t)_read_mem_stream;
    out_stream->write=_write_mem_stream;
    return out_stream;
}

// Assembly:
movq %rdi, %rax
movq %rsi, (%rdi)
subq %rsi, %rdx
movq %rdx, 0x8(%rdi)
leaq -0x49(%rip), %rcx       # 0x433c2
movq %rcx, 0x10(%rdi)
leaq 0x5(%rip), %rcx         # 0x4341b
movq %rcx, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: hpatch_deccompress_mem
hpatch_BOOL hpatch_deccompress_mem(hpatch_TDecompress* decompressPlugin,
                                   const unsigned char* code,const unsigned char* code_end,
                                   unsigned char* out_data,unsigned char* out_data_end){
    hpatch_decompressHandle dec=0;
    hpatch_BOOL result,colose_rt;
    hpatch_TStreamInput  codeStream;
    mem_as_hStreamInput(&codeStream,code,code_end);
    dec=decompressPlugin->open(decompressPlugin,(out_data_end-out_data),
                               &codeStream,0,codeStream.streamSize);
    if (dec==0) return _hpatch_FALSE;
    result=decompressPlugin->decompress_part(dec,out_data,out_data_end);
    colose_rt=decompressPlugin->close(decompressPlugin,dec);
    assert(colose_rt);
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r8
movq %rdi, %rbx
movq %rsp, %rdx
movq %rsi, (%rdx)
subq %rsi, %r8
movq %r8, 0x8(%rdx)
leaq -0xbe(%rip), %rax       # 0x433c2
movq %rax, 0x10(%rdx)
movq %r14, %rsi
subq %rcx, %rsi
xorl %r12d, %r12d
xorl %ecx, %ecx
callq *0x8(%rdi)
testq %rax, %rax
je 0x434b6
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x18(%rbx)
movl %eax, %r12d
movq %rbx, %rdi
movq %r13, %rsi
callq *0x10(%rbx)
testl %eax, %eax
je 0x434c7
movl %r12d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1deb6(%rip), %rdi     # 0x61384
leaq 0x1deb9(%rip), %rsi     # 0x6138e
leaq 0x1deda(%rip), %rcx     # 0x613b6
movl $0xbd, %edx
callq 0x4200