LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
subq -0x18(%rbp), %rax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x7f920
testb $0x1, %al
jne 0x80348
leaq 0x2cf40(%rip), %rdi     # 0xad270
leaq 0x33653(%rip), %rsi     # 0xb398a
movl $0x222, %edx            # imm = 0x222
leaq 0x3381e(%rip), %rcx     # 0xb3b61
callq 0x4270
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
movq -0x8(%rbp), %r8
addq $0x8b, %r8
leaq -0x24(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x7e5f0
testb $0x1, %al
jne 0x8038f
leaq 0x2cef9(%rip), %rdi     # 0xad270
leaq 0x3360c(%rip), %rsi     # 0xb398a
movl $0x223, %edx            # imm = 0x223
leaq 0x337d7(%rip), %rcx     # 0xb3b61
callq 0x4270
movl $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rcx
movl -0x24(%rbp), %eax
subl -0x28(%rbp), %eax
movl %eax, %eax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movl -0x20(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, %eax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movl -0x1c(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, %eax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movb -0x9(%rbp), %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x89(%rax)
movb $0x1, -0x29(%rbp)
movq -0x8(%rbp), %rdi
movb -0x29(%rbp), %al
leaq -0x28(%rbp), %rdx
andb $0x1, %al
movzbl %al, %esi
callq 0x7fd00
testb $0x1, %al
jne 0x8043f
leaq 0x2ce49(%rip), %rdi     # 0xad270
leaq 0x3355c(%rip), %rsi     # 0xb398a
movl $0x22b, %edx            # imm = 0x22B
leaq 0x33727(%rip), %rcx     # 0xb3b61
callq 0x4270
movb $0x1, %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x80620
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x80520
movl %eax, %ecx
movl -0x18(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x805f8
movl -0x10(%rbp), %eax
addl $0xc, %eax
movl %eax, -0x10(%rbp)
jmp 0x80609
cmpl $0x2, -0x14(%rbp)
jne 0x80607
movl -0x10(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x10(%rbp)
jmp 0x80609
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_fileEntry_offset_unsafe
ZipFilePos_t UnZipper_fileEntry_offset_unsafe(const UnZipper* self,int fileIndex){
    if (self->_fileEntryOffsets)
        return self->_fileEntryOffsets[fileIndex];
    //_UnZipper_vce_normalized set fileEntry offset 0
    const TByte* headBuf=fileHeaderBuf(self,fileIndex);
    return self->_fileDataOffsets[fileIndex]-30-readUInt16(headBuf+28)-readUInt16(headBuf+30);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x80674
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
jmp 0x806cf
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7eb20
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x1e, %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
addq $0x1c, %rdi
callq 0x7eac0
movw %ax, %cx
movl -0x28(%rbp), %eax
movzwl %cx, %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
addq $0x1e, %rdi
callq 0x7eac0
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_fileData_copyTo
bool UnZipper_fileData_copyTo(UnZipper* self,int fileIndex,
                              const hpatch_TStreamOutput* outStream,hpatch_StreamPos_t writeToPos){
    ZipFilePos_t fileSavedSize=UnZipper_file_compressedSize(self,fileIndex);
    ZipFilePos_t fileDataOffset=UnZipper_fileData_offset(self,fileIndex);
    return UnZipper_dataStream_copyTo(self,self->stream,fileDataOffset,
                                      fileDataOffset+fileSavedSize,outStream,writeToPos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x80520
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x80620
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x28(%rbp), %eax
movl %eax, %edx
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
callq 0x80750
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x8078b
jmp 0x807aa
leaq 0x334fc(%rip), %rdi     # 0xb3c8e
leaq 0x331f1(%rip), %rsi     # 0xb398a
movl $0x29e, %edx            # imm = 0x29E
leaq 0x334fe(%rip), %rcx     # 0xb3ca3
callq 0x4270
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x807ba
jmp 0x807d9
leaq 0x33585(%rip), %rdi     # 0xb3d46
leaq 0x331c2(%rip), %rsi     # 0xb398a
movl $0x29f, %edx            # imm = 0x29F
leaq 0x334cf(%rip), %rcx     # 0xb3ca3
callq 0x4270
jmp 0x807db
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x808b0
movl $0x4000, -0x3c(%rbp)    # imm = 0x4000
movl -0x3c(%rbp), %eax
movq -0x20(%rbp), %rcx
subq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x8080b
movq -0x20(%rbp), %rax
subq -0x18(%rbp), %rax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl -0x3c(%rbp), %r8d
addq %r8, %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x80850
leaq 0x2ca38(%rip), %rdi     # 0xad270
leaq 0x3314b(%rip), %rsi     # 0xb398a
movl $0x2a3, %edx            # imm = 0x2A3
leaq 0x33458(%rip), %rcx     # 0xb3ca3
callq 0x4270
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl -0x3c(%rbp), %r8d
addq %r8, %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x80895
leaq 0x2c9f3(%rip), %rdi     # 0xad270
leaq 0x33106(%rip), %rsi     # 0xb398a
movl $0x2a4, %edx            # imm = 0x2A4
leaq 0x33413(%rip), %rcx     # 0xb3ca3
callq 0x4270
movl -0x3c(%rbp), %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x3c(%rbp), %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x807db
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/../../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_decompress_open_by(hpatch_TDecompress*, hpatch_TStreamInput const*, unsigned long long, unsigned long long, int, unsigned char*, unsigned long)
static _zlib_TDecompress*  _zlib_decompress_open_by(hpatch_TDecompress* decompressPlugin,
                                                        const hpatch_TStreamInput* codeStream,
                                                        hpatch_StreamPos_t code_begin,
                                                        hpatch_StreamPos_t code_end,
                                                        int  isSavedWindowBits,
                                                        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_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,isSavedWindowBits,
                                        (_zlib_TDecompress*)self_at,_mem_buf_end-self_at);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq $0x8, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
addq $0x7, %rax
andq $-0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x80acc
movq $0x0, -0x8(%rbp)
jmp 0x80afc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x50(%rbp), %r9
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %r10
subq %r10, %rax
movq %rax, (%rsp)
callq 0x842a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/../../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_is_decompress_finish(hpatch_TDecompress const*, void*)
static hpatch_inline int _zlib_is_decompress_finish(const hpatch_TDecompress* decompressPlugin,
                                                        hpatch_decompressHandle decompressHandle){
        _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
        unsigned char _empty=0;
        while (self->code_begin!=self->code_end){ //for end tag code
            self->d_stream.next_out = &_empty;
            self->d_stream.avail_out=0;
            if (!__zlib_do_inflate(self)){
                self->d_stream.next_out=0;
                return hpatch_FALSE;//error;
            }
        }
        self->d_stream.next_out=0;
        return   (self->code_begin==self->code_end)
                &(self->d_stream.avail_in==0)
                &(self->d_stream.avail_out==0);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x80c19
movq -0x20(%rbp), %rax
leaq -0x21(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x20(%rbp), %rdi
callq 0x846f0
cmpl $0x0, %eax
jne 0x80c17
movq -0x20(%rbp), %rax
movq $0x0, 0x40(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x80c65
jmp 0x80bcc
movq -0x20(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movq -0x20(%rbp), %rcx
cmpl $0x0, 0x30(%rcx)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
movq -0x20(%rbp), %rcx
cmpl $0x0, 0x48(%rcx)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7f2e0
testb $0x1, %al
jne 0x80d95
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x806e0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x80e34
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x80450
movw %ax, -0x2a(%rbp)
movzwl -0x2a(%rbp), %ecx
movl $0x8, %eax
cmpl %ecx, %eax
je 0x80dd1
leaq 0x2c4b7(%rip), %rdi     # 0xad270
leaq 0x32bca(%rip), %rsi     # 0xb398a
movl $0x2b3, %edx            # imm = 0x2B3
leaq 0x32f9b(%rip), %rcx     # 0xb3d67
callq 0x4270
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x80620
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x80520
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x80480
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl -0x30(%rbp), %eax
movl %eax, %edx
movl -0x30(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl -0x38(%rbp), %eax
movl %eax, %r8d
movq -0x20(%rbp), %r9
movq -0x28(%rbp), %rax
movq %rax, (%rsp)
callq 0x808c0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
addq -0x18(%rbp), %rdi
callq 0x44d0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x80e81
movq $0x0, -0x8(%rbp)
jmp 0x80ee3
movq -0x30(%rbp), %rcx
addq $0x30, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x80f59
movq -0x8(%rbp), %rax
movq 0xf8(%rax), %rdi
callq 0x85570
movq -0x8(%rbp), %rax
movq $0x0, 0xf8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x80fb0
movq -0x8(%rbp), %rax
movl $0x1, 0x154(%rax)
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x80fa1
movq -0x18(%rbp), %rdi
callq 0x855a0
movq -0x18(%rbp), %rdi
movl $0x40, %esi
callq 0x43b0
movq -0x8(%rbp), %rax
movq $0x0, 0x158(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x81004
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x8edd0
cmpl $0x0, %eax
jne 0x81002
leaq 0x2c286(%rip), %rdi     # 0xad270
leaq 0x32999(%rip), %rsi     # 0xb398a
movl $0x374, %edx            # imm = 0x374
leaq 0x32dd1(%rip), %rcx     # 0xb3dce
callq 0x4270
jmp 0x81004
movq -0x8(%rbp), %rax
cmpq $0x0, 0x108(%rax)
je 0x81075
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x108(%rax)
movq -0x8(%rbp), %rax
movq 0x100(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x100(%rcx), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
testb $0x1, %al
jne 0x81073
leaq 0x2c215(%rip), %rdi     # 0xad270
leaq 0x32928(%rip), %rsi     # 0xb398a
movl $0x378, %edx            # imm = 0x378
leaq 0x32d60(%rip), %rcx     # 0xb3dce
callq 0x4270
jmp 0x81075
movq -0x8(%rbp), %rax
cmpq $0x0, 0x138(%rax)
je 0x810a2
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
callq 0x4460
movq -0x8(%rbp), %rax
movq $0x0, 0x138(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: (anonymous namespace)::TMt_base::start_threads(int, void (*)(int, void*), void*, bool)
bool start_threads(int threadCount,TThreadRunCallBackProc threadProc,void* workData,bool isUseThisThread){
        for (int i=0;i<threadCount;++i){
            if (isUseThisThread&&(i==threadCount-1)){
                thread_on(1);
                threadProc(i,workData);
            }else{
                thread_on(1);
                try{
                    thread_parallel(1,threadProc,workData,0,i);
                }catch(...){
                    thread_on(-1);
                    on_error();
                    return false;
                }
            }
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x81657
testb $0x1, -0x29(%rbp)
je 0x815ca
movl -0x30(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x815ca
movq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0x84bd0
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
callq *%rax
jmp 0x81647
movq -0x48(%rbp), %rdi
movl $0x1, %esi
movl %esi, -0x4c(%rbp)
callq 0x84bd0
movl -0x4c(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x30(%rbp), %r8d
xorl %ecx, %ecx
callq 0x8f270
jmp 0x815f3
jmp 0x81645
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x4150
movq -0x48(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x84bd0
jmp 0x8161a
movq -0x48(%rbp), %rdi
callq 0x84bf0
jmp 0x81625
movb $0x0, -0x1(%rbp)
callq 0x45d0
jmp 0x8165b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x45d0
jmp 0x81643
jmp 0x81666
jmp 0x81647
jmp 0x81649
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8158e
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x4680
movq %rax, %rdi
callq 0x89d0
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x20(%rbp), %eax
movb 0x18(%rbp), %al
movq 0x10(%rbp), %r10
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x816ba
jmp 0x816d9
leaq 0x3281a(%rip), %rdi     # 0xb3edb
leaq 0x322c2(%rip), %rsi     # 0xb398a
movl $0x3cb, %edx            # imm = 0x3CB
leaq 0x32823(%rip), %rcx     # 0xb3ef7
callq 0x4270
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
movq $-0x1, %rdx
callq 0x8e140
cmpl $0x0, %eax
jne 0x81715
leaq 0x2bb73(%rip), %rdi     # 0xad270
leaq 0x32286(%rip), %rsi     # 0xb398a
movl $0x3cc, %edx            # imm = 0x3CC
leaq 0x327e7(%rip), %rcx     # 0xb3ef7
callq 0x4270
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x817a0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
movl -0x20(%rbp), %r9d
movq 0x10(%rbp), %r11
movb -0x21(%rbp), %r10b
movl 0x20(%rbp), %eax
andb $0x1, %r10b
movq %r11, (%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x810b0
andb $0x1, %al
movb %al, -0x22(%rbp)
testb $0x1, -0x22(%rbp)
jne 0x8178a
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x8edd0
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movb -0x22(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
movl $0x400, -0x34(%rbp)     # imm = 0x400
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq -0x28(%rbp), %rdx
leaq -0x460(%rbp), %rdi
callq 0x85c10
movq 0x64a5f(%rip), %rdi     # 0xe65b8
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
leaq -0x440(%rbp), %r8
leaq -0x460(%rbp), %rcx
movl $0x400, %r9d            # imm = 0x400
callq 0x81c30
movq %rax, -0x468(%rbp)
cmpq $0x0, -0x468(%rbp)
jne 0x81b96
movq $0x0, -0x8(%rbp)
jmp 0x81c1d
movl $0x0, -0x46c(%rbp)
movq $0x0, -0x478(%rbp)
movl $0x1, -0x47c(%rbp)
movq -0x468(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x18(%rbp), %rdx
movl -0x47c(%rbp), %ecx
leaq -0x478(%rbp), %r8
leaq -0x46c(%rbp), %r9
callq 0x81cc0
cmpl $0x0, %eax
jne 0x81bf0
movq $0x0, -0x8(%rbp)
jmp 0x81c1d
movq 0x649c1(%rip), %rdi     # 0xe65b8
movq -0x468(%rbp), %rsi
callq 0x81f30
cmpl $0x0, %eax
jne 0x81c12
movq $0x0, -0x8(%rbp)
jmp 0x81c1d
movq -0x478(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x82183
jmp 0x821a2
leaq 0x31eb0(%rip), %rdi     # 0xb403a
leaq 0x317f9(%rip), %rsi     # 0xb398a
movl $0x51c, %edx            # imm = 0x51C
leaq 0x31eba(%rip), %rcx     # 0xb4057
callq 0x4270
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x821f0
andb $0x1, %al
movzbl %al, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
ja 0x82229
movq -0x18(%rbp), %rax
shlq %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x8226d
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x8226d
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
addq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4320
movq -0x20(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x140(%rax)
jmp 0x822fc
cmpq $0x0, -0x20(%rbp)
jbe 0x822a2
movq -0x8(%rbp), %rdi
callq 0x83df0
testb $0x1, %al
jne 0x822a0
leaq 0x2afe8(%rip), %rdi     # 0xad270
leaq 0x316fb(%rip), %rsi     # 0xb398a
movl $0x3e7, %edx            # imm = 0x3E7
leaq 0x3244e(%rip), %rcx     # 0xb46e9
callq 0x4270
jmp 0x822a2
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rdi
movq -0x8(%rbp), %rcx
movl 0x58(%rcx), %ecx
movl %ecx, %esi
movq -0x8(%rbp), %rcx
subq 0x140(%rcx), %rsi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x822fa
leaq 0x2af8e(%rip), %rdi     # 0xad270
leaq 0x316a1(%rip), %rsi     # 0xb398a
movl $0x3e8, %edx            # imm = 0x3E8
leaq 0x323f4(%rip), %rcx     # 0xb46e9
callq 0x4270
jmp 0x822fc
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x857e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8358b
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
seta %al
andb $0x1, %al
movb %al, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0x83574
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
callq 0x85500
testb $0x1, %al
jne 0x83572
leaq 0x29d16(%rip), %rdi     # 0xad270
leaq 0x30429(%rip), %rsi     # 0xb398a
movl $0x589, %edx            # imm = 0x589
leaq 0x31378(%rip), %rcx     # 0xb48e5
callq 0x4270
jmp 0x83574
movq -0x20(%rbp), %rdi
callq 0x85570
testb $0x1, -0x21(%rbp)
jne 0x83589
movb $0x0, -0x1(%rbp)
jmp 0x83596
jmp 0x83591
movb $0x1, -0x1(%rbp)
jmp 0x83596
jmp 0x834f4
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
je 0x83837
xorl %eax, %eax
movb %al, -0x17(%rbp)
jmp 0x83846
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7f2e0
movb %al, -0x17(%rbp)
movb -0x17(%rbp), %al
andb $0x1, %al
movb %al, -0x16(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movb -0x16(%rbp), %al
movb %al, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x80480
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x80520
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %r8
movl %eax, %ecx
movb -0x18(%rbp), %al
movl %ecx, %ecx
movl %ecx, %r9d
andb $0x1, %al
movzbl %al, %ecx
callq 0x82320
testb $0x1, %al
jne 0x838ce
leaq 0x299ba(%rip), %rdi     # 0xad270
leaq 0x300cd(%rip), %rsi     # 0xb398a
movl $0x5c8, %edx            # imm = 0x5C8
leaq 0x309bc(%rip), %rcx     # 0xb4285
callq 0x4270
testb $0x1, -0x15(%rbp)
je 0x83914
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rdx
addq $0xc0, %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x80d50
testb $0x1, %al
jne 0x83912
leaq 0x29976(%rip), %rdi     # 0xad270
leaq 0x30089(%rip), %rsi     # 0xb398a
movl $0x5ca, %edx            # imm = 0x5CA
leaq 0x30978(%rip), %rcx     # 0xb4285
callq 0x4270
jmp 0x83954
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rdx
addq $0xc0, %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x806e0
testb $0x1, %al
jne 0x83952
leaq 0x29936(%rip), %rdi     # 0xad270
leaq 0x30049(%rip), %rsi     # 0xb398a
movl $0x5cc, %edx            # imm = 0x5CC
leaq 0x30938(%rip), %rcx     # 0xb4285
callq 0x4270
jmp 0x83954
movq -0x8(%rbp), %rdi
callq 0x83280
testb $0x1, %al
jne 0x83980
leaq 0x29908(%rip), %rdi     # 0xad270
leaq 0x3001b(%rip), %rsi     # 0xb398a
movl $0x5ce, %edx            # imm = 0x5CE
leaq 0x3090a(%rip), %rcx     # 0xb4285
callq 0x4270
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x9c(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jl 0x83a4b
leaq 0x2983d(%rip), %rdi     # 0xad270
leaq 0x2ff50(%rip), %rsi     # 0xb398a
movl $0x5da, %edx            # imm = 0x5DA
leaq 0x3087d(%rip), %rcx     # 0xb42c3
callq 0x4270
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x9c(%rax)
cmpl $0x0, -0x18(%rbp)
jne 0x83a72
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xa0(%rax)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movl $0x1, %r8d
callq 0x827f0
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jbe 0x83e82
movq -0x8(%rbp), %rax
movq $0x0, 0x140(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rdi
movq -0x8(%rbp), %rcx
movl 0x58(%rcx), %ecx
movl %ecx, %esi
subq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rdx
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
addq -0x10(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x83e80
leaq 0x29408(%rip), %rdi     # 0xad270
leaq 0x2fb1b(%rip), %rsi     # 0xb398a
movl $0x3dc, %edx            # imm = 0x3DC
leaq 0x30b19(%rip), %rcx     # 0xb4994
callq 0x4270
jmp 0x83e82
movb $0x1, %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x148(%rax)
je 0x83ecb
leaq 0x293bd(%rip), %rdi     # 0xad270
leaq 0x2fad0(%rip), %rsi     # 0xb398a
movl $0x5fd, %edx            # imm = 0x5FD
leaq 0x30473(%rip), %rcx     # 0xb4339
callq 0x4270
movq -0x8(%rbp), %rax
movb $0x1, 0x148(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14c(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x150(%rax)
je 0x83f60
leaq 0x29328(%rip), %rdi     # 0xad270
leaq 0x2fa3b(%rip), %rsi     # 0xb398a
movl $0x609, %edx            # imm = 0x609
leaq 0x30418(%rip), %rcx     # 0xb4373
callq 0x4270
movq -0x8(%rbp), %rax
movb $0x1, 0x150(%rax)
movb -0x9(%rbp), %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x151(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: find_ApkV2orV3SignTag_in_c_string(char const*)
static bool _find_ApkV2orV3SignTag_in_c_string(const char* data){
        const char* kApkTag="X-Android-APK-Signed";
        const char* pos=strstr(data,kApkTag);
        if (pos==0) return false;
        pos+=strlen(kApkTag);
        const char* posEnd=strchr(pos,'\n');
        if (posEnd==0) posEnd=data+strlen(data);
        const char* posBegin=strchr(pos,':');
        if ((posBegin==0)||(posBegin>=posEnd)) return false;
        ++posBegin;
        while ((posBegin<posEnd)&&isspace(*posBegin)) ++posBegin;
        while ((posBegin<posEnd)&&isspace(posEnd[-1])) --posEnd;
        if (posBegin>=posEnd) return false;
        return '2'==(*posBegin);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x304aa(%rip), %rax     # 0xb447d
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x40a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x83ff8
movb $0x0, -0x1(%rbp)
jmp 0x84118
movq -0x18(%rbp), %rdi
callq 0x4180
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0xa, %esi
callq 0x4130
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x84041
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4180
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x4130
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x84064
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x8406d
movb $0x0, -0x1(%rbp)
jmp 0x84118
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x39(%rbp)
jae 0x8409d
movq -0x30(%rbp), %rax
movsbl (%rax), %edi
callq 0x4070
cmpl $0x0, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x840a6
jmp 0x840b4
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x84079
jmp 0x840b6
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x3a(%rbp)
jae 0x840db
movq -0x28(%rbp), %rax
movsbl -0x1(%rax), %edi
callq 0x4070
cmpl $0x0, %eax
setne %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0x840e4
jmp 0x840f2
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x840b6
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x84102
movb $0x0, -0x1(%rbp)
jmp 0x84118
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
movl $0x32, %eax
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x10(%rax), %rsi
leaq -0x18(%rbp), %rdi
callq 0x42c30
movq -0x28(%rbp), %rax
movb 0x18(%rax), %al
testb $0x1, %al
je 0x84c25
movl $0x1, -0x1c(%rbp)
jmp 0x84c34
movq -0x28(%rbp), %rax
movb $0x1, 0x18(%rax)
movl $0x0, -0x1c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x42f60
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x84c48
jmp 0x84c46
jmp 0x84c51
movq -0x28(%rbp), %rdi
callq 0x84a30
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: extraFieldNormalize(unsigned char*, unsigned char const*, int)
static int _extraFieldNormalize(TByte* dstBuf,const TByte* extraFieldBuf,int extraFieldLen){
        assert(extraFieldLen<=kMaxExtraFieldLen);
        int result=0;
        while (extraFieldLen>=4){// skip non-standard data when extraFieldLen<4
            const uint16_t dataID=readUInt16(extraFieldBuf);
            const int nodeSize=4+(int)readUInt16(extraFieldBuf+2);
            if (nodeSize>extraFieldLen)
                break; //non-standard data, skip remaining
            if (((dataID==0)&&(nodeSize==4)) || (dataID==ALIGNMENT_ZIP_EXTRA_DATA_FIELD_HEADER_ID)){
                //skip empty data
            }else{ //copy original data
                memcpy(dstBuf+result,extraFieldBuf,nodeSize);
                result+=nodeSize;
            }
            extraFieldBuf+=nodeSize;
            extraFieldLen-=nodeSize;
        }
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0xffff, -0x14(%rbp)    # imm = 0xFFFF
jg 0x8522e
jmp 0x8524d
leaq 0x2f610(%rip), %rdi     # 0xb4845
leaq 0x2e74e(%rip), %rsi     # 0xb398a
movl $0x41a, %edx            # imm = 0x41A
leaq 0x2f61e(%rip), %rcx     # 0xb4866
callq 0x4270
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x14(%rbp)
jl 0x852e9
movq -0x10(%rbp), %rdi
callq 0x7eac0
movw %ax, -0x1a(%rbp)
movq -0x10(%rbp), %rdi
addq $0x2, %rdi
callq 0x7eac0
movzwl %ax, %eax
addl $0x4, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x8528b
jmp 0x852e9
movzwl -0x1a(%rbp), %eax
cmpl $0x0, %eax
jne 0x8529a
cmpl $0x4, -0x20(%rbp)
je 0x852a5
movzwl -0x1a(%rbp), %eax
cmpl $0xd935, %eax           # imm = 0xD935
jne 0x852a7
jmp 0x852c8
movq -0x8(%rbp), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x4320
movl -0x20(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x85254
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: writeAlignSkip(Zipper*, unsigned long)
inline static bool _writeAlignSkip(Zipper* self,size_t alignSkipLen){
    const size_t bufSize =16;
    const TByte _alignSkipBuf[bufSize]={0};
    while (alignSkipLen>0) {
        size_t wlen=alignSkipLen;
        if (wlen>bufSize) wlen=bufSize;
        check(_write(self,_alignSkipBuf,wlen));
        alignSkipLen-=wlen;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x10, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4210
cmpq $0x0, -0x10(%rbp)
jbe 0x853cb
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x10, -0x38(%rbp)
jbe 0x85386
movq $0x10, -0x38(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x821f0
testb $0x1, %al
jne 0x853ba
leaq 0x27ece(%rip), %rdi     # 0xad270
leaq 0x2e5e1(%rip), %rsi     # 0xb398a
movl $0x410, %edx            # imm = 0x410
leaq 0x2f4e7(%rip), %rcx     # 0xb489c
callq 0x4270
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x85368
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
leaq -0x34(%rbp), %r9
callq 0x81cc0
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x854ad
movb $0x0, -0x1(%rbp)
jmp 0x854b9
cmpl $0x0, -0x38(%rbp)
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)