LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x84cf0
movq -0x18(%rbp), %rdi
callq 0x85720
movq %rax, -0x40(%rbp)
jmp 0x85643
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x85685
movq -0x28(%rbp), %rdi
callq 0x85740
jmp 0x8565d
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x857b0
jmp 0x8566c
jmp 0x85634
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x84d10
jmp 0x85694
leaq -0x20(%rbp), %rdi
callq 0x84d10
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: TZipThreadWorks::doWork(TZipThreadWork*)
inline static void doWork(TZipThreadWork* work){
        size_t rsize=Zipper_compressData(work->inputData,work->inputDataSize,work->code,work->codeSize,
                                         work->compressLevel,work->compressMemLevel);
        if ((rsize==0)||(rsize!=work->codeSize))
            work->codeSize=0; //error or code size overflow
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %r8d
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %r9d
callq 0x81b10
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x85799
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x857a5
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: TZipThreadWorks::haveFinishWork(bool)
TZipThreadWork* haveFinishWork(bool isWait){
        if (_curWorkCount==0) return 0;
        TZipThreadWork* result=(TZipThreadWork*)data_chan.accept(isWait);
        if (result) --_curWorkCount;
        return result;
    }

// 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 %rax, -0x28(%rbp)
movl 0x38(%rax), %eax
cmpl $0x0, %eax
jne 0x8580e
movq $0x0, -0x8(%rbp)
jmp 0x85843
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x8f930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8583b
movq -0x28(%rbp), %rax
movl 0x38(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x38(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x7, %eax
subl -0xc(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x859ff
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
shrq $0x7, %rax
movq %rax, -0x8(%rbp)
jmp 0x859de
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x85a44
movl $0x0, -0x4(%rbp)
jmp 0x85b1c
movq -0x40(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movzbl -0x31(%rbp), %eax
movl $0x7, %ecx
subl -0x24(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
cltq
movq %rax, -0x30(%rbp)
movzbl -0x31(%rbp), %eax
movl $0x7, %ecx
subl -0x24(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x85aff
jmp 0x85a97
movq -0x30(%rbp), %rax
shrq $0x39, %rax
cmpq $0x0, %rax
je 0x85aae
movl $0x0, -0x4(%rbp)
jmp 0x85b1c
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x85ac1
movl $0x0, -0x4(%rbp)
jmp 0x85b1c
movq -0x40(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
shlq $0x7, %rax
movzbl -0x31(%rbp), %ecx
andl $0x7f, %ecx
movslq %ecx, %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movzbl -0x31(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x85a97
jmp 0x85aff
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
leaq 0x17(%rip), %rcx        # 0x85b80
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: read_mem_stream
static hpatch_BOOL _read_mem_stream(const hpatch_TStreamInput* stream,hpatch_StreamPos_t readFromPos,
                                        unsigned char* out_data,unsigned char* out_data_end){
        const unsigned char* src=(const unsigned char*)stream->streamImport;
        hpatch_size_t readLen=out_data_end-out_data;
#ifdef __RUN_MEM_SAFE_CHECK
        if (readFromPos>stream->streamSize) return _hpatch_FALSE;
        if (readLen>(hpatch_StreamPos_t)(stream->streamSize-readFromPos)) return _hpatch_FALSE;
#endif
        memcpy(out_data,src+readFromPos,readLen);
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x85bc9
movl $0x0, -0x4(%rbp)
jmp 0x85c03
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x85be7
movl $0x0, -0x4(%rbp)
jmp 0x85c03
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x4320
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
leaq -0xc9(%rip), %rcx       # 0x85b80
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
leaq 0x18(%rip), %rcx        # 0x85c70
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: write_mem_stream
static hpatch_BOOL _write_mem_stream(const hpatch_TStreamOutput* stream,hpatch_StreamPos_t writeToPos,
                                         const unsigned char* data,const unsigned char* data_end){
        unsigned char* out_dst=(unsigned char*)stream->streamImport;
        hpatch_size_t writeLen=data_end-data;
#ifdef __RUN_MEM_SAFE_CHECK
        if (writeToPos>stream->streamSize) return _hpatch_FALSE;
        if (writeLen>(hpatch_StreamPos_t)(stream->streamSize-writeToPos)) return _hpatch_FALSE;
#endif
        memcpy(out_dst+writeToPos,data,writeLen);
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x85cb9
movl $0x0, -0x4(%rbp)
jmp 0x85cf3
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x85cd7
movl $0x0, -0x4(%rbp)
jmp 0x85cf3
movq -0x30(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x4320
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x85b30
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rcx
subq %rcx, %rsi
movq -0x58(%rbp), %r8
leaq -0x60(%rbp), %rdx
xorl %ecx, %ecx
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x85d6c
movl $0x0, -0x4(%rbp)
jmp 0x85dc7
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq *%rax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq *%rax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x85da2
jmp 0x85dc1
leaq 0x2ec27(%rip), %rdi     # 0xb49d0
leaq 0x2ec2a(%rip), %rsi     # 0xb49da
movl $0xbd, %edx
leaq 0x2ec46(%rip), %rcx     # 0xb4a02
callq 0x4270
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamInputClip_init
void TStreamInputClip_init(TStreamInputClip* self,const hpatch_TStreamInput*  srcStream,
                           hpatch_StreamPos_t clipBeginPos,hpatch_StreamPos_t clipEndPos){
    assert(self!=0);
    assert(srcStream!=0);
    assert(clipBeginPos<=clipEndPos);
    assert(clipEndPos<=srcStream->streamSize);
    self->srcStream=srcStream;
    self->clipBeginPos=clipBeginPos;
    self->base.streamImport=self;
    self->base.streamSize=clipEndPos-clipBeginPos;
    self->base.read=_TStreamInputClip_read;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x866a1
jmp 0x866c0
leaq 0x2e483(%rip), %rdi     # 0xb4b2b
leaq 0x2e32b(%rip), %rsi     # 0xb49da
movl $0x18f, %edx            # imm = 0x18F
leaq 0x2e478(%rip), %rcx     # 0xb4b33
callq 0x4270
cmpq $0x0, -0x10(%rbp)
je 0x866c9
jmp 0x866e8
leaq 0x2e4d7(%rip), %rdi     # 0xb4ba7
leaq 0x2e303(%rip), %rsi     # 0xb49da
movl $0x190, %edx            # imm = 0x190
leaq 0x2e450(%rip), %rcx     # 0xb4b33
callq 0x4270
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x866f4
jmp 0x86713
leaq 0x2acdd(%rip), %rdi     # 0xb13d8
leaq 0x2e2d8(%rip), %rsi     # 0xb49da
movl $0x191, %edx            # imm = 0x191
leaq 0x2e425(%rip), %rcx     # 0xb4b33
callq 0x4270
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x86723
jmp 0x86742
leaq 0x2e48a(%rip), %rdi     # 0xb4bb4
leaq 0x2e2a9(%rip), %rsi     # 0xb49da
movl $0x192, %edx            # imm = 0x192
leaq 0x2e3f6(%rip), %rcx     # 0xb4b33
callq 0x4270
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
subq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
leaq 0x10(%rip), %rcx        # 0x86790
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamInputClip_read
static hpatch_BOOL _TStreamInputClip_read(const hpatch_TStreamInput* stream,
                                              hpatch_StreamPos_t readFromPos,
                                              unsigned char* out_data,unsigned char* out_data_end){
        TStreamInputClip* self=(TStreamInputClip*)stream->streamImport;
#ifdef __RUN_MEM_SAFE_CHECK
        if (readFromPos+(out_data_end-out_data)>self->base.streamSize) return _hpatch_FALSE;
#endif
        return self->srcStream->read(self->srcStream,readFromPos+self->clipBeginPos,out_data,out_data_end);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x867d8
movl $0x0, -0x4(%rbp)
jmp 0x86805
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rcx
addq 0x28(%rcx), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamOutputClip_init
void TStreamOutputClip_init(TStreamOutputClip* self,const hpatch_TStreamOutput*  srcStream,
                            hpatch_StreamPos_t clipBeginPos,hpatch_StreamPos_t clipEndPos){
    assert(self!=0);
    assert(srcStream!=0);
    assert(clipBeginPos<=clipEndPos);
    assert(clipEndPos<=srcStream->streamSize);
    self->srcStream=srcStream;
    self->clipBeginPos=clipBeginPos;
    self->base.streamImport=self;
    self->base.streamSize=clipEndPos-clipBeginPos;
    ((TStreamInputClip*)self)->base.read=_TStreamInputClip_read;
    self->base.write=_TStreamOutputClip_write;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x86831
jmp 0x86850
leaq 0x2e2f3(%rip), %rdi     # 0xb4b2b
leaq 0x2e19b(%rip), %rsi     # 0xb49da
movl $0x1a6, %edx            # imm = 0x1A6
leaq 0x2e38b(%rip), %rcx     # 0xb4bd6
callq 0x4270
cmpq $0x0, -0x10(%rbp)
je 0x86859
jmp 0x86878
leaq 0x2e347(%rip), %rdi     # 0xb4ba7
leaq 0x2e173(%rip), %rsi     # 0xb49da
movl $0x1a7, %edx            # imm = 0x1A7
leaq 0x2e363(%rip), %rcx     # 0xb4bd6
callq 0x4270
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x86884
jmp 0x868a3
leaq 0x2ab4d(%rip), %rdi     # 0xb13d8
leaq 0x2e148(%rip), %rsi     # 0xb49da
movl $0x1a8, %edx            # imm = 0x1A8
leaq 0x2e338(%rip), %rcx     # 0xb4bd6
callq 0x4270
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x868b3
jmp 0x868d2
leaq 0x2e2fa(%rip), %rdi     # 0xb4bb4
leaq 0x2e119(%rip), %rsi     # 0xb49da
movl $0x1a9, %edx            # imm = 0x1A9
leaq 0x2e309(%rip), %rcx     # 0xb4bd6
callq 0x4270
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
subq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
leaq -0x180(%rip), %rcx      # 0x86790
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
leaq 0x11(%rip), %rcx        # 0x86930
movq %rcx, 0x18(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamOutputClip_write
static hpatch_BOOL _TStreamOutputClip_write(const hpatch_TStreamOutput* stream,
                                                hpatch_StreamPos_t writePos,
                                                const unsigned char* data,const unsigned char* data_end){
    TStreamOutputClip* self=(TStreamOutputClip*)stream->streamImport;
#ifdef __RUN_MEM_SAFE_CHECK
    if (writePos+(data_end-data)>self->base.streamSize) return _hpatch_FALSE;
#endif
    return self->srcStream->write(self->srcStream,writePos+self->clipBeginPos,data,data_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x86978
movl $0x0, -0x4(%rbp)
jmp 0x869a5
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rcx
addq 0x28(%rcx), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamCacheClip_readType_end
hpatch_BOOL _TStreamCacheClip_readType_end(TStreamCacheClip* sclip,TByte endTag,
                                           char out_type[hpatch_kMaxPluginTypeLength+1]){
    const TByte* type_begin;
    hpatch_size_t i;
    hpatch_size_t readLen=hpatch_kMaxPluginTypeLength+1;
    if (readLen>_TStreamCacheClip_leaveSize(sclip))
        readLen=(hpatch_size_t)_TStreamCacheClip_leaveSize(sclip);
    type_begin=_TStreamCacheClip_accessData(sclip,readLen);
    if (type_begin==0) return _hpatch_FALSE;//not found
    for (i=0; i<readLen; ++i) {
        if (type_begin[i]!=endTag)
            continue;
        else{
            memcpy(out_type,type_begin,i);  out_type[i]='\0';
            _TStreamCacheClip_skipData_noCheck(sclip,i+1);
            return hpatch_TRUE;
        }
    }
    return _hpatch_FALSE;//not found
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x104, -0x38(%rbp)     # imm = 0x104
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq (%rdx), %rcx
movq -0x10(%rbp), %rdx
movq 0x28(%rdx), %rdx
movq -0x10(%rbp), %rsi
subq 0x20(%rsi), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x86a1f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq 0x20(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x86ac0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x86a40
movl $0x0, -0x4(%rbp)
jmp 0x86ab7
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x86ab0
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
je 0x86a68
jmp 0x86aa2
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x4320
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x86ab7
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x86a48
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch_private.h
// Function: TStreamCacheClip_accessData
hpatch_inline static //error return 0
unsigned char* _TStreamCacheClip_accessData(TStreamCacheClip* sclip,hpatch_size_t readSize){
    //assert(readSize<=sclip->cacheEnd);
    if (readSize>_TStreamCacheClip_cachedSize(sclip)){
        if (!_TStreamCacheClip_updateCache(sclip)) return 0;
        if (readSize>_TStreamCacheClip_cachedSize(sclip)) return 0;
    }
    return &sclip->cacheBuf[sclip->cacheBegin];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq 0x20(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x86b26
movq -0x10(%rbp), %rdi
callq 0x86b50
cmpl $0x0, %eax
jne 0x86b01
movq $0x0, -0x8(%rbp)
jmp 0x86b3a
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq 0x20(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x86b24
movq $0x0, -0x8(%rbp)
jmp 0x86b3a
jmp 0x86b26
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x20(%rcx), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamCacheClip_updateCache
hpatch_BOOL _TStreamCacheClip_updateCache(TStreamCacheClip* sclip){
    TByte* buf0=&sclip->cacheBuf[0];
    const hpatch_StreamPos_t streamSize=sclip->streamPos_end-sclip->streamPos;
    hpatch_size_t readSize=sclip->cacheBegin;
    if (readSize>streamSize)
        readSize=(hpatch_size_t)streamSize;
    if (readSize==0) return hpatch_TRUE;
    if (!_TStreamCacheClip_isCacheEmpty(sclip)){
        memmove(buf0+(hpatch_size_t)(sclip->cacheBegin-readSize),
                buf0+sclip->cacheBegin,_TStreamCacheClip_cachedSize(sclip));
    }
    if (!sclip->srcStream->read(sclip->srcStream,sclip->streamPos,
                                buf0+(sclip->cacheEnd-readSize),buf0+sclip->cacheEnd))
        return _hpatch_FALSE;//read error
    sclip->cacheBegin-=readSize;
    sclip->streamPos+=readSize;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x86b99
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x86bac
movl $0x1, -0x4(%rbp)
jmp 0x86c64
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x86bf2
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
subq -0x28(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
addq 0x20(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x10(%rbp), %rax
subq 0x20(%rax), %rdx
callq 0x45c0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq -0x28(%rbp), %rcx
addq %rcx, %rdx
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %r8
addq 0x28(%r8), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x86c3c
movl $0x0, -0x4(%rbp)
jmp 0x86c64
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamCacheClip_skipData
hpatch_BOOL _TStreamCacheClip_skipData(TStreamCacheClip* sclip,hpatch_StreamPos_t skipLongSize){
    while (skipLongSize>0) {
        hpatch_size_t len=sclip->cacheEnd;
        if (len>skipLongSize)
            len=(hpatch_size_t)skipLongSize;
        if (_TStreamCacheClip_accessData(sclip,len)){
            _TStreamCacheClip_skipData_noCheck(sclip,len);
            skipLongSize-=len;
        }else{
            return _hpatch_FALSE;
        }
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x86ce4
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x86ca5
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x86ac0
cmpq $0x0, %rax
je 0x86cd9
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x86ce2
movl $0x0, -0x4(%rbp)
jmp 0x86ceb
jmp 0x86c80
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamCacheClip_unpackUIntWithTag
hpatch_BOOL _TStreamCacheClip_unpackUIntWithTag(TStreamCacheClip* sclip,hpatch_StreamPos_t* result,const hpatch_uint kTagBit){
    TByte* curCode,*codeBegin;
    hpatch_size_t readSize=hpatch_kMaxPackedUIntBytes;
    const hpatch_StreamPos_t dataSize=_TStreamCacheClip_leaveSize(sclip);
    if (readSize>dataSize)
        readSize=(hpatch_size_t)dataSize;
    codeBegin=_TStreamCacheClip_accessData(sclip,readSize);
    if (codeBegin==0) return _hpatch_FALSE;
    curCode=codeBegin;
    _SAFE_CHECK_DO(hpatch_unpackUIntWithTag((const TByte**)&curCode,codeBegin+readSize,result,kTagBit));
    _TStreamCacheClip_skipData_noCheck(sclip,(hpatch_size_t)(curCode-codeBegin));
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0xb, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq 0x20(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jbe 0x86d53
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x86ac0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x86d74
movl $0x0, -0x4(%rbp)
jmp 0x86dc2
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rsi
addq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq -0x28(%rbp), %rdi
callq 0x85a10
cmpl $0x0, %eax
jne 0x86da2
movl $0x0, -0x4(%rbp)
jmp 0x86dc2
jmp 0x86da4
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamCacheClip_readDataTo
hpatch_BOOL _TStreamCacheClip_readDataTo(TStreamCacheClip* sclip,TByte* out_buf,TByte* bufEnd){
    hpatch_size_t readLen=_TStreamCacheClip_cachedSize(sclip);
    hpatch_size_t outLen=bufEnd-out_buf;
    if (readLen>=outLen)
        readLen=outLen;
    memcpy(out_buf,&sclip->cacheBuf[sclip->cacheBegin],readLen);
    sclip->cacheBegin+=readLen;
    outLen-=readLen;
    if (outLen){
        out_buf += readLen;
        if (outLen<(sclip->cacheEnd>>1)){
            if (!_TStreamCacheClip_updateCache(sclip)) return _hpatch_FALSE;
#ifdef __RUN_MEM_SAFE_CHECK
            if (outLen>_TStreamCacheClip_cachedSize(sclip)) return _hpatch_FALSE;
#endif
            return _TStreamCacheClip_readDataTo(sclip, out_buf, bufEnd);
        }else{
            if (!sclip->srcStream->read(sclip->srcStream,sclip->streamPos,
                                        out_buf,bufEnd)) return _hpatch_FALSE;
            sclip->streamPos+=outLen;
        }
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x20(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x86e19
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
addq 0x20(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x4320
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x86f15
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x86ed2
movq -0x10(%rbp), %rdi
callq 0x86b50
cmpl $0x0, %eax
jne 0x86e9a
movl $0x0, -0x4(%rbp)
jmp 0x86f1c
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq 0x20(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x86ebc
movl $0x0, -0x4(%rbp)
jmp 0x86f1c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x86dd0
movl %eax, -0x4(%rbp)
jmp 0x86f1c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x86f05
movl $0x0, -0x4(%rbp)
jmp 0x86f1c
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x86f15
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TStreamCacheClip_addDataTo
hpatch_BOOL _TStreamCacheClip_addDataTo(TStreamCacheClip* self,unsigned char* dst,hpatch_size_t addLen){
    const unsigned char* src=_TStreamCacheClip_readData(self,addLen);
    if (src==0) return _hpatch_FALSE;
    addData(dst,src,addLen);
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x86f90
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x86f65
movl $0x0, -0x4(%rbp)
jmp 0x86f7d
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x86620
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch_private.h
// Function: TStreamCacheClip_init
hpatch_inline static
void _TStreamCacheClip_init(TStreamCacheClip* sclip,const hpatch_TStreamInput* srcStream,
                            hpatch_StreamPos_t streamPos,hpatch_StreamPos_t streamPos_end,
                            unsigned char* aCache,hpatch_size_t cacheSize){
    assert((streamPos<=streamPos_end)&&(streamPos_end<=(srcStream?srcStream->streamSize:0)));
    sclip->streamPos=streamPos;
    sclip->streamPos_end=streamPos_end;
    sclip->srcStream=srcStream;
    sclip->cacheBuf=aCache;
    sclip->cacheBegin=cacheSize;
    sclip->cacheEnd=cacheSize;
}

// 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 -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x8723e
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x87227
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x8722f
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x8722f
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpq %rcx, %rax
ja 0x8723e
jmp 0x8725d
leaq 0x2df26(%rip), %rdi     # 0xb516b
leaq 0x2df70(%rip), %rsi     # 0xb51bc
movl $0x55, %edx
leaq 0x2df94(%rip), %rcx     # 0xb51ec
callq 0x4270
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TOutStreamCache_flush
hpatch_BOOL _TOutStreamCache_flush(_TOutStreamCache* self){
    hpatch_size_t curSize=self->cacheCur;
    if (curSize>0){
        if (!__TOutStreamCache_writeStream(self,self->cacheBuf,curSize))
            return _hpatch_FALSE;
        self->cacheCur=0;
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x8734e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x87360
cmpl $0x0, %eax
jne 0x87342
movl $0x0, -0x4(%rbp)
jmp 0x87355
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: _TOutStreamCache_writeStream
static hpatch_inline hpatch_BOOL __TOutStreamCache_writeStream(_TOutStreamCache* self,const TByte* data,hpatch_size_t dataSize){
    if (!self->dstStream->write(self->dstStream,self->writeToPos,data,data+dataSize))
        return _hpatch_FALSE;
    self->writeToPos+=dataSize;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x873ab
movl $0x0, -0x4(%rbp)
jmp 0x873c0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TOutStreamCache_write
hpatch_BOOL _TOutStreamCache_write(_TOutStreamCache* self,const TByte* data,hpatch_size_t dataSize){
    while (dataSize>0) {
        hpatch_size_t copyLen;
        hpatch_size_t curSize=self->cacheCur;
        if ((dataSize>=self->cacheEnd)&&(curSize==0)){
            return __TOutStreamCache_writeStream(self,data,dataSize);
        }
        copyLen=self->cacheEnd-curSize;
        copyLen=(copyLen<=dataSize)?copyLen:dataSize;
        memcpy(self->cacheBuf+curSize,data,copyLen);
        self->cacheCur=curSize+copyLen;
        data+=copyLen;
        dataSize-=copyLen;
        if (self->cacheCur==self->cacheEnd){
            if (!_TOutStreamCache_flush(self))
                return _hpatch_FALSE;
        }
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x874d1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jb 0x87429
cmpq $0x0, -0x30(%rbp)
jne 0x87429
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x87360
movl %eax, -0x4(%rbp)
jmp 0x874d8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x8744d
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x87455
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
addq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x4320
movq -0x30(%rbp), %rcx
addq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x874cc
movq -0x10(%rbp), %rdi
callq 0x87300
cmpl $0x0, %eax
jne 0x874ca
movl $0x0, -0x4(%rbp)
jmp 0x874d8
jmp 0x874cc
jmp 0x873e4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TOutStreamCache_fill
hpatch_BOOL _TOutStreamCache_fill(_TOutStreamCache* self,hpatch_byte fillValue,hpatch_StreamPos_t fillLength){
    while (fillLength>0){
        hpatch_size_t curSize=self->cacheCur;
        hpatch_size_t runStep=self->cacheEnd-curSize;
        runStep=(runStep<=fillLength)?runStep:(hpatch_size_t)fillLength;
        memset(self->cacheBuf+curSize,fillValue,runStep);
        self->cacheCur=curSize+runStep;
        fillLength-=runStep;
        if (self->cacheCur==self->cacheEnd){
            if (!_TOutStreamCache_flush(self))
                return _hpatch_FALSE;
        }
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x875bc
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x87541
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x87549
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
addq -0x28(%rbp), %rdi
movzbl -0x11(%rbp), %eax
movq -0x30(%rbp), %rdx
movzbl %al, %esi
callq 0x4210
movq -0x28(%rbp), %rcx
addq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x875b7
movq -0x10(%rbp), %rdi
callq 0x87300
cmpl $0x0, %eax
jne 0x875b5
movl $0x0, -0x4(%rbp)
jmp 0x875c3
jmp 0x875b7
jmp 0x87506
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TOutStreamCache_copyFromStream
hpatch_BOOL _TOutStreamCache_copyFromStream(_TOutStreamCache* self,const hpatch_TStreamInput* src,
                                            hpatch_StreamPos_t srcPos,hpatch_StreamPos_t copyLength){
    while (copyLength>0){
        hpatch_size_t curSize=self->cacheCur;
        hpatch_size_t runStep=self->cacheEnd-curSize;
        hpatch_byte* buf=self->cacheBuf+curSize;
        runStep=(runStep<=copyLength)?runStep:(hpatch_size_t)copyLength;
        if (!src->read(src,srcPos,buf,buf+runStep))
             return _hpatch_FALSE;
        srcPos+=runStep;
        self->cacheCur=curSize+runStep;
        copyLength-=runStep;
        if (self->cacheCur==self->cacheEnd){
            if (!_TOutStreamCache_flush(self))
                return _hpatch_FALSE;
        }
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x876ca
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x87633
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x8763b
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x40(%rbp), %rcx
addq -0x38(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x8766f
movl $0x0, -0x4(%rbp)
jmp 0x876d1
movq -0x38(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rcx
addq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x876c5
movq -0x10(%rbp), %rdi
callq 0x87300
cmpl $0x0, %eax
jne 0x876c3
movl $0x0, -0x4(%rbp)
jmp 0x876d1
jmp 0x876c5
jmp 0x875e8
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TOutStreamCache_copyFromClip
hpatch_BOOL _TOutStreamCache_copyFromClip(_TOutStreamCache* self,TStreamCacheClip* src,hpatch_StreamPos_t copyLength){
    while (copyLength>0){
        const TByte* data;
        hpatch_size_t runStep=(src->cacheEnd<=copyLength)?src->cacheEnd:(hpatch_size_t)copyLength;
        data=_TStreamCacheClip_readData(src,runStep);
        if (data==0) return
            _hpatch_FALSE;
        if (!_TOutStreamCache_write(self,data,runStep))
            return _hpatch_FALSE;
        copyLength-=runStep;
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x8777f
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpq -0x20(%rbp), %rax
ja 0x8771b
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x87723
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x86f90
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8774c
movl $0x0, -0x4(%rbp)
jmp 0x87786
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x873d0
cmpl $0x0, %eax
jne 0x8776b
movl $0x0, -0x4(%rbp)
jmp 0x87786
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x876f4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: getCompressedDiffInfo
hpatch_BOOL getCompressedDiffInfo(hpatch_compressedDiffInfo* out_diffInfo,
                                  const hpatch_TStreamInput* compressedDiff){
    _THDiffzHead head;
    assert(out_diffInfo!=0);
    assert(compressedDiff!=0);
    assert(compressedDiff->read!=0);
    return read_diffz_head(out_diffInfo,&head,compressedDiff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x87eec
jmp 0x87f0b
leaq 0x2cdce(%rip), %rdi     # 0xb4cc1
leaq 0x2cae0(%rip), %rsi     # 0xb49da
movl $0x4d2, %edx            # imm = 0x4D2
leaq 0x2cdcb(%rip), %rcx     # 0xb4cd1
callq 0x4270
cmpq $0x0, -0x10(%rbp)
je 0x87f14
jmp 0x87f33
leaq 0x2ce12(%rip), %rdi     # 0xb4d2d
leaq 0x2cab8(%rip), %rsi     # 0xb49da
movl $0x4d3, %edx            # imm = 0x4D3
leaq 0x2cda3(%rip), %rcx     # 0xb4cd1
callq 0x4270
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x87f40
jmp 0x87f5f
leaq 0x2cdf8(%rip), %rdi     # 0xb4d3f
leaq 0x2ca8c(%rip), %rsi     # 0xb49da
movl $0x4d4, %edx            # imm = 0x4D4
leaq 0x2cd77(%rip), %rcx     # 0xb4cd1
callq 0x4270
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x78(%rbp), %rsi
callq 0x87b50
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)